o
    iv                     @   sx   d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ dd	lmZ G d
d dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)BillingBreakdownV1Response   )AsyncRawBreakdownClientRawBreakdownClient)BreakdownListRequestDeployment) BreakdownListRequestGroupingItemc                   @      e Zd ZdefddZedefddZdddddddddd	ed
e	j
e de	j
e de	j
e de	j
e de	j
e de	j
e de	j
e	jee	je f  de	j
e defddZdS )BreakdownClientclient_wrapperc                C      t |d| _d S N)r   )r	   _raw_clientselfr    r   h/home/ubuntu/.local/lib/python3.10/site-packages/deepgram/manage/v1/projects/billing/breakdown/client.py__init__      zBreakdownClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawBreakdownClient
        r   r   r   r   r   with_raw_response      	z!BreakdownClient.with_raw_responseNstartendaccessor
deploymenttag	line_itemgroupingrequest_options
project_idr   r    r!   r"   r#   r$   r%   r&   c                C   s$   | j j|||||||||	d	}
|
jS )aI  
        Retrieves the billing summary for a specific project, with various filter options or by grouping options.

        Parameters
        ----------
        project_id : str
            The unique identifier of the project

        start : typing.Optional[str]
            Start date of the requested date range. Format accepted is YYYY-MM-DD

        end : typing.Optional[str]
            End date of the requested date range. Format accepted is YYYY-MM-DD

        accessor : typing.Optional[str]
            Filter for requests where a specific accessor was used

        deployment : typing.Optional[BreakdownListRequestDeployment]
            Filter for requests where a specific deployment was used

        tag : typing.Optional[str]
            Filter for requests where a specific tag was used

        line_item : typing.Optional[str]
            Filter requests by line item (e.g. streaming::nova-3)

        grouping : typing.Optional[typing.Union[BreakdownListRequestGroupingItem, typing.Sequence[BreakdownListRequestGroupingItem]]]
            Group billing breakdown by one or more dimensions (accessor, deployment, line_item, tags)

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BillingBreakdownV1Response
            Billing breakdown response

        Examples
        --------
        from deepgram import DeepgramClient

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.billing.breakdown.list(
            project_id="123456-7890-1234-5678-901234",
            start="start",
            end="end",
            accessor="12345678-1234-1234-1234-123456789012",
            deployment="hosted",
            tag="tag1",
            line_item="streaming::nova-3",
        )
        r   r   listdatar   r'   r   r    r!   r"   r#   r$   r%   r&   	_responser   r   r   r)      s   EzBreakdownClient.list)__name__
__module____qualname__r   r   propertyr	   r   strtypingOptionalr
   Unionr   Sequencer   r   r)   r   r   r   r   r      F    	
r   c                   @   r   )AsyncBreakdownClientr   c                C   r   r   )r   r   r   r   r   r   r   p   r   zAsyncBreakdownClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawBreakdownClient
        r   r   r   r   r   r   s   r   z&AsyncBreakdownClient.with_raw_responseNr   r'   r   r    r!   r"   r#   r$   r%   r&   c                   s,   | j j|||||||||	d	I dH }
|
jS )a  
        Retrieves the billing summary for a specific project, with various filter options or by grouping options.

        Parameters
        ----------
        project_id : str
            The unique identifier of the project

        start : typing.Optional[str]
            Start date of the requested date range. Format accepted is YYYY-MM-DD

        end : typing.Optional[str]
            End date of the requested date range. Format accepted is YYYY-MM-DD

        accessor : typing.Optional[str]
            Filter for requests where a specific accessor was used

        deployment : typing.Optional[BreakdownListRequestDeployment]
            Filter for requests where a specific deployment was used

        tag : typing.Optional[str]
            Filter for requests where a specific tag was used

        line_item : typing.Optional[str]
            Filter requests by line item (e.g. streaming::nova-3)

        grouping : typing.Optional[typing.Union[BreakdownListRequestGroupingItem, typing.Sequence[BreakdownListRequestGroupingItem]]]
            Group billing breakdown by one or more dimensions (accessor, deployment, line_item, tags)

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BillingBreakdownV1Response
            Billing breakdown response

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.billing.breakdown.list(
                project_id="123456-7890-1234-5678-901234",
                start="start",
                end="end",
                accessor="12345678-1234-1234-1234-123456789012",
                deployment="hosted",
                tag="tag1",
                line_item="streaming::nova-3",
            )


        asyncio.run(main())
        r   Nr(   r+   r   r   r   r)   ~   s   MzAsyncBreakdownClient.list)r-   r.   r/   r   r   r0   r   r   r1   r2   r3   r
   r4   r   r5   r   r   r)   r   r   r   r   r7   o   r6   r7   )r2   core.client_wrapperr   r   core.request_optionsr   "types.billing_breakdown_v1responser   
raw_clientr   r	   'types.breakdown_list_request_deploymentr
   *types.breakdown_list_request_grouping_itemr   r   r7   r   r   r   r   <module>   s   b