# 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__ = [
    'GetInvoicesResult',
    'AwaitableGetInvoicesResult',
    'get_invoices',
    'get_invoices_output',
]

@pulumi.output_type
class GetInvoicesResult:
    """
    A collection of values returned by getInvoices.
    """
    def __init__(__self__, ar_customer_transaction_id=None, compartment_id=None, fields=None, filters=None, id=None, invoices=None, time_from=None, time_to=None):
        if ar_customer_transaction_id and not isinstance(ar_customer_transaction_id, str):
            raise TypeError("Expected argument 'ar_customer_transaction_id' to be a str")
        pulumi.set(__self__, "ar_customer_transaction_id", ar_customer_transaction_id)
        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 fields and not isinstance(fields, list):
            raise TypeError("Expected argument 'fields' to be a list")
        pulumi.set(__self__, "fields", fields)
        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 invoices and not isinstance(invoices, list):
            raise TypeError("Expected argument 'invoices' to be a list")
        pulumi.set(__self__, "invoices", invoices)
        if time_from and not isinstance(time_from, str):
            raise TypeError("Expected argument 'time_from' to be a str")
        pulumi.set(__self__, "time_from", time_from)
        if time_to and not isinstance(time_to, str):
            raise TypeError("Expected argument 'time_to' to be a str")
        pulumi.set(__self__, "time_to", time_to)

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

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

    @property
    @pulumi.getter
    def fields(self) -> Optional[Sequence[str]]:
        return pulumi.get(self, "fields")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetInvoicesFilterResult']]:
        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
    def invoices(self) -> Sequence['outputs.GetInvoicesInvoiceResult']:
        """
        The list of invoices.
        """
        return pulumi.get(self, "invoices")

    @property
    @pulumi.getter(name="timeFrom")
    def time_from(self) -> Optional[str]:
        return pulumi.get(self, "time_from")

    @property
    @pulumi.getter(name="timeTo")
    def time_to(self) -> Optional[str]:
        return pulumi.get(self, "time_to")


class AwaitableGetInvoicesResult(GetInvoicesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInvoicesResult(
            ar_customer_transaction_id=self.ar_customer_transaction_id,
            compartment_id=self.compartment_id,
            fields=self.fields,
            filters=self.filters,
            id=self.id,
            invoices=self.invoices,
            time_from=self.time_from,
            time_to=self.time_to)


def get_invoices(ar_customer_transaction_id: Optional[str] = None,
                 compartment_id: Optional[str] = None,
                 fields: Optional[Sequence[str]] = None,
                 filters: Optional[Sequence[pulumi.InputType['GetInvoicesFilterArgs']]] = None,
                 time_from: Optional[str] = None,
                 time_to: Optional[str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInvoicesResult:
    """
    This data source provides the list of Invoices in Oracle Cloud Infrastructure Onesubscription service.

    This is a collection API which returns a list of Invoices for given filters.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_invoices = oci.OneSubsription.get_invoices(ar_customer_transaction_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        fields=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_from=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str ar_customer_transaction_id: AR Unique identifier for an invoice .
    :param str compartment_id: The OCID of the root compartment.
    :param Sequence[str] fields: Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information  (fields) required by the client. This parameter is used to control what fields to return.
    :param str time_from: Initial date to filter Invoice data in SPM.
    :param str time_to: Final date to filter Invoice data in SPM.
    """
    __args__ = dict()
    __args__['arCustomerTransactionId'] = ar_customer_transaction_id
    __args__['compartmentId'] = compartment_id
    __args__['fields'] = fields
    __args__['filters'] = filters
    __args__['timeFrom'] = time_from
    __args__['timeTo'] = time_to
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:OneSubsription/getInvoices:getInvoices', __args__, opts=opts, typ=GetInvoicesResult).value

    return AwaitableGetInvoicesResult(
        ar_customer_transaction_id=__ret__.ar_customer_transaction_id,
        compartment_id=__ret__.compartment_id,
        fields=__ret__.fields,
        filters=__ret__.filters,
        id=__ret__.id,
        invoices=__ret__.invoices,
        time_from=__ret__.time_from,
        time_to=__ret__.time_to)


@_utilities.lift_output_func(get_invoices)
def get_invoices_output(ar_customer_transaction_id: Optional[pulumi.Input[str]] = None,
                        compartment_id: Optional[pulumi.Input[str]] = None,
                        fields: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                        filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetInvoicesFilterArgs']]]]] = None,
                        time_from: Optional[pulumi.Input[Optional[str]]] = None,
                        time_to: Optional[pulumi.Input[Optional[str]]] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInvoicesResult]:
    """
    This data source provides the list of Invoices in Oracle Cloud Infrastructure Onesubscription service.

    This is a collection API which returns a list of Invoices for given filters.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_invoices = oci.OneSubsription.get_invoices(ar_customer_transaction_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        fields=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_from=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str ar_customer_transaction_id: AR Unique identifier for an invoice .
    :param str compartment_id: The OCID of the root compartment.
    :param Sequence[str] fields: Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information  (fields) required by the client. This parameter is used to control what fields to return.
    :param str time_from: Initial date to filter Invoice data in SPM.
    :param str time_to: Final date to filter Invoice data in SPM.
    """
    ...
