# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetBillingSchedulesResult',
    'AwaitableGetBillingSchedulesResult',
    'get_billing_schedules',
    'get_billing_schedules_output',
]

@pulumi.output_type
class GetBillingSchedulesResult:
    """
    A collection of values returned by getBillingSchedules.
    """
    def __init__(__self__, billing_schedules=None, compartment_id=None, filters=None, id=None, subscribed_service_id=None, subscription_id=None):
        if billing_schedules and not isinstance(billing_schedules, list):
            raise TypeError("Expected argument 'billing_schedules' to be a list")
        pulumi.set(__self__, "billing_schedules", billing_schedules)
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if subscribed_service_id and not isinstance(subscribed_service_id, str):
            raise TypeError("Expected argument 'subscribed_service_id' to be a str")
        pulumi.set(__self__, "subscribed_service_id", subscribed_service_id)
        if subscription_id and not isinstance(subscription_id, str):
            raise TypeError("Expected argument 'subscription_id' to be a str")
        pulumi.set(__self__, "subscription_id", subscription_id)

    @property
    @pulumi.getter(name="billingSchedules")
    def billing_schedules(self) -> Sequence['outputs.GetBillingSchedulesBillingScheduleResult']:
        """
        The list of billing_schedules.
        """
        return pulumi.get(self, "billing_schedules")

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        return pulumi.get(self, "compartment_id")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetBillingSchedulesFilterResult']]:
        return pulumi.get(self, "filters")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="subscribedServiceId")
    def subscribed_service_id(self) -> Optional[str]:
        """
        SPM internal Subscribed Service ID
        """
        return pulumi.get(self, "subscribed_service_id")

    @property
    @pulumi.getter(name="subscriptionId")
    def subscription_id(self) -> str:
        return pulumi.get(self, "subscription_id")


class AwaitableGetBillingSchedulesResult(GetBillingSchedulesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBillingSchedulesResult(
            billing_schedules=self.billing_schedules,
            compartment_id=self.compartment_id,
            filters=self.filters,
            id=self.id,
            subscribed_service_id=self.subscribed_service_id,
            subscription_id=self.subscription_id)


def get_billing_schedules(compartment_id: Optional[str] = None,
                          filters: Optional[Sequence[pulumi.InputType['GetBillingSchedulesFilterArgs']]] = None,
                          subscribed_service_id: Optional[str] = None,
                          subscription_id: Optional[str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBillingSchedulesResult:
    """
    This data source provides the list of Billing Schedules in Oracle Cloud Infrastructure Onesubscription service.

    This list API returns all billing schedules for given subscription id and
    for a particular Subscribed Service if provided

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_billing_schedules = oci.OneSubsription.get_billing_schedules(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        subscription_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        subscribed_service_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compartment_id: The OCID of the root compartment.
    :param str subscribed_service_id: This param is used to get only the billing schedules for a particular Subscribed Service
    :param str subscription_id: This param is used to get only the billing schedules for a particular Subscription Id
    """
    __args__ = dict()
    __args__['compartmentId'] = compartment_id
    __args__['filters'] = filters
    __args__['subscribedServiceId'] = subscribed_service_id
    __args__['subscriptionId'] = subscription_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:OneSubsription/getBillingSchedules:getBillingSchedules', __args__, opts=opts, typ=GetBillingSchedulesResult).value

    return AwaitableGetBillingSchedulesResult(
        billing_schedules=__ret__.billing_schedules,
        compartment_id=__ret__.compartment_id,
        filters=__ret__.filters,
        id=__ret__.id,
        subscribed_service_id=__ret__.subscribed_service_id,
        subscription_id=__ret__.subscription_id)


@_utilities.lift_output_func(get_billing_schedules)
def get_billing_schedules_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                 filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetBillingSchedulesFilterArgs']]]]] = None,
                                 subscribed_service_id: Optional[pulumi.Input[Optional[str]]] = None,
                                 subscription_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBillingSchedulesResult]:
    """
    This data source provides the list of Billing Schedules in Oracle Cloud Infrastructure Onesubscription service.

    This list API returns all billing schedules for given subscription id and
    for a particular Subscribed Service if provided

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_billing_schedules = oci.OneSubsription.get_billing_schedules(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        subscription_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        subscribed_service_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compartment_id: The OCID of the root compartment.
    :param str subscribed_service_id: This param is used to get only the billing schedules for a particular Subscribed Service
    :param str subscription_id: This param is used to get only the billing schedules for a particular Subscription Id
    """
    ...
