o
    ib`                     @  s   d dl mZ 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 ddlmZ ejrKddlmZmZ ddlmZmZ G dd dZG dd dZdS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)UsageV1Response   )AsyncRawUsageClientRawUsageClient)UsageGetRequestDeployment)UsageGetRequestEndpoint)UsageGetRequestMethod)AsyncBreakdownClientBreakdownClient)AsyncFieldsClientFieldsClientc                .   @     e Zd ZdGddZedHddZd	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d
-dIdAdBZedCdD ZedEdF Zd	S )JUsageClientclient_wrapperr   c                C  "   t |d| _|| _d | _d | _d S Nr   )r
   _raw_client_client_wrapper
_breakdown_fieldsselfr    r   \/home/ubuntu/.local/lib/python3.10/site-packages/deepgram/manage/v1/projects/usage/client.py__init__      
zUsageClient.__init__returnr
   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawUsageClient
        r   r   r   r   r   with_raw_response      	zUsageClient.with_raw_responseN-startendaccessoralternativescallback_methodcallbackchannelscustom_intent_modecustom_intentcustom_topic_modecustom_topic
deploymentdetect_entitiesdetect_languagediarize	dictationencodingendpointextrafiller_wordsintentskeytermkeywordslanguagemeasurementsmethodmodelmultichannelnumerals
paragraphsprofanity_filter	punctuateredactreplacesample_ratesearch	sentimentsmart_format	summarizetagtopics	utt_split
utterancesversionrequest_options
project_idstrr)   typing.Optional[str]r*   r+   r,   typing.Optional[bool]r-   r.   r/   r0   r1   r2   r3   r4   *typing.Optional[UsageGetRequestDeployment]r5   r6   r7   r8   r9   r:   (typing.Optional[UsageGetRequestEndpoint]r;   r<   r=   r>   r?   r@   rA   rB   &typing.Optional[UsageGetRequestMethod]rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   typing.Optional[RequestOptions]r   c       -   0      C  s$  | j j|fi d|d|d|d|d|d|d|d|	d	|
d
|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d| d |!d!|"d"|#d#|$d$|%d%|&d&|'d'|(d(|)d)|*d*|+d+|,d,|-d-|.}/|/jS ).a  
        Retrieves the usage for a specific project. Use Get Project Usage Breakdown for a more comprehensive usage summary.

        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

        alternatives : typing.Optional[bool]
            Filter for requests where alternatives were used

        callback_method : typing.Optional[bool]
            Filter for requests where callback method was used

        callback : typing.Optional[bool]
            Filter for requests where callback was used

        channels : typing.Optional[bool]
            Filter for requests where channels were used

        custom_intent_mode : typing.Optional[bool]
            Filter for requests where custom intent mode was used

        custom_intent : typing.Optional[bool]
            Filter for requests where custom intent was used

        custom_topic_mode : typing.Optional[bool]
            Filter for requests where custom topic mode was used

        custom_topic : typing.Optional[bool]
            Filter for requests where custom topic was used

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

        detect_entities : typing.Optional[bool]
            Filter for requests where detect entities was used

        detect_language : typing.Optional[bool]
            Filter for requests where detect language was used

        diarize : typing.Optional[bool]
            Filter for requests where diarize was used

        dictation : typing.Optional[bool]
            Filter for requests where dictation was used

        encoding : typing.Optional[bool]
            Filter for requests where encoding was used

        endpoint : typing.Optional[UsageGetRequestEndpoint]
            Filter for requests where a specific endpoint was used

        extra : typing.Optional[bool]
            Filter for requests where extra was used

        filler_words : typing.Optional[bool]
            Filter for requests where filler words was used

        intents : typing.Optional[bool]
            Filter for requests where intents was used

        keyterm : typing.Optional[bool]
            Filter for requests where keyterm was used

        keywords : typing.Optional[bool]
            Filter for requests where keywords was used

        language : typing.Optional[bool]
            Filter for requests where language was used

        measurements : typing.Optional[bool]
            Filter for requests where measurements were used

        method : typing.Optional[UsageGetRequestMethod]
            Filter for requests where a specific method was used

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

        multichannel : typing.Optional[bool]
            Filter for requests where multichannel was used

        numerals : typing.Optional[bool]
            Filter for requests where numerals were used

        paragraphs : typing.Optional[bool]
            Filter for requests where paragraphs were used

        profanity_filter : typing.Optional[bool]
            Filter for requests where profanity filter was used

        punctuate : typing.Optional[bool]
            Filter for requests where punctuate was used

        redact : typing.Optional[bool]
            Filter for requests where redact was used

        replace : typing.Optional[bool]
            Filter for requests where replace was used

        sample_rate : typing.Optional[bool]
            Filter for requests where sample rate was used

        search : typing.Optional[bool]
            Filter for requests where search was used

        sentiment : typing.Optional[bool]
            Filter for requests where sentiment was used

        smart_format : typing.Optional[bool]
            Filter for requests where smart format was used

        summarize : typing.Optional[bool]
            Filter for requests where summarize was used

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

        topics : typing.Optional[bool]
            Filter for requests where topics was used

        utt_split : typing.Optional[bool]
            Filter for requests where utt split was used

        utterances : typing.Optional[bool]
            Filter for requests where utterances was used

        version : typing.Optional[bool]
            Filter for requests where version was used

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

        Returns
        -------
        UsageV1Response
            A specific request for a specific project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.usage.get(
            project_id="123456-7890-1234-5678-901234",
            start="start",
            end="end",
            accessor="12345678-1234-1234-1234-123456789012",
            alternatives=True,
            callback_method=True,
            callback=True,
            channels=True,
            custom_intent_mode=True,
            custom_intent=True,
            custom_topic_mode=True,
            custom_topic=True,
            deployment="hosted",
            detect_entities=True,
            detect_language=True,
            diarize=True,
            dictation=True,
            encoding=True,
            endpoint="listen",
            extra=True,
            filler_words=True,
            intents=True,
            keyterm=True,
            keywords=True,
            language=True,
            measurements=True,
            method="sync",
            model="6f548761-c9c0-429a-9315-11a1d28499c8",
            multichannel=True,
            numerals=True,
            paragraphs=True,
            profanity_filter=True,
            punctuate=True,
            redact=True,
            replace=True,
            sample_rate=True,
            search=True,
            sentiment=True,
            smart_format=True,
            summarize=True,
            tag="tag1",
            topics=True,
            utt_split=True,
            utterances=True,
            version=True,
        )
        r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   r   getdata0r   rV   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   	_responser   r   r   r_   &   s    ~	
 !"#$%&'()*+,-.0zUsageClient.getc                 C  *   | j d u rddlm} || jd| _ | j S )Nr   )r   r   )r   breakdown.clientr   r   )r   r   r   r   r   	breakdownU     
zUsageClient.breakdownc                 C  rc   )Nr   )r   r   )r   fields.clientr   r   )r   r   r   r   r   fields]  rf   zUsageClient.fields)r   r   )r"   r
   ^rV   rW   r)   rX   r*   rX   r+   rX   r,   rY   r-   rY   r.   rY   r/   rY   r0   rY   r1   rY   r2   rY   r3   rY   r4   rZ   r5   rY   r6   rY   r7   rY   r8   rY   r9   rY   r:   r[   r;   rY   r<   rY   r=   rY   r>   rY   r?   rY   r@   rY   rA   rY   rB   r\   rC   rX   rD   rY   rE   rY   rF   rY   rG   rY   rH   rY   rI   rY   rJ   rY   rK   rY   rL   rY   rM   rY   rN   rY   rO   rY   rP   rX   rQ   rY   rR   rY   rS   rY   rT   rY   rU   r]   r"   r   	__name__
__module____qualname__r    propertyr&   r_   re   rh   r   r   r   r   r      sp    
  1
r   c                .   @  r   )JAsyncUsageClientr   r   c                C  r   r   )r	   r   r   r   r   r   r   r   r   r    g  r!   zAsyncUsageClient.__init__r"   r	   c                 C  r#   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawUsageClient
        r$   r%   r   r   r   r&   m  r'   z"AsyncUsageClient.with_raw_responseNr(   rV   rW   r)   rX   r*   r+   r,   rY   r-   r.   r/   r0   r1   r2   r3   r4   rZ   r5   r6   r7   r8   r9   r:   r[   r;   r<   r=   r>   r?   r@   rA   rB   r\   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   r]   r   c       -   0        s,  | j j|fi d|d|d|d|d|d|d|d|	d	|
d
|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d| d |!d!|"d"|#d#|$d$|%d%|&d&|'d'|(d(|)d)|*d*|+d+|,d,|-d-|.I d.H }/|/jS )/a:  
        Retrieves the usage for a specific project. Use Get Project Usage Breakdown for a more comprehensive usage summary.

        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

        alternatives : typing.Optional[bool]
            Filter for requests where alternatives were used

        callback_method : typing.Optional[bool]
            Filter for requests where callback method was used

        callback : typing.Optional[bool]
            Filter for requests where callback was used

        channels : typing.Optional[bool]
            Filter for requests where channels were used

        custom_intent_mode : typing.Optional[bool]
            Filter for requests where custom intent mode was used

        custom_intent : typing.Optional[bool]
            Filter for requests where custom intent was used

        custom_topic_mode : typing.Optional[bool]
            Filter for requests where custom topic mode was used

        custom_topic : typing.Optional[bool]
            Filter for requests where custom topic was used

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

        detect_entities : typing.Optional[bool]
            Filter for requests where detect entities was used

        detect_language : typing.Optional[bool]
            Filter for requests where detect language was used

        diarize : typing.Optional[bool]
            Filter for requests where diarize was used

        dictation : typing.Optional[bool]
            Filter for requests where dictation was used

        encoding : typing.Optional[bool]
            Filter for requests where encoding was used

        endpoint : typing.Optional[UsageGetRequestEndpoint]
            Filter for requests where a specific endpoint was used

        extra : typing.Optional[bool]
            Filter for requests where extra was used

        filler_words : typing.Optional[bool]
            Filter for requests where filler words was used

        intents : typing.Optional[bool]
            Filter for requests where intents was used

        keyterm : typing.Optional[bool]
            Filter for requests where keyterm was used

        keywords : typing.Optional[bool]
            Filter for requests where keywords was used

        language : typing.Optional[bool]
            Filter for requests where language was used

        measurements : typing.Optional[bool]
            Filter for requests where measurements were used

        method : typing.Optional[UsageGetRequestMethod]
            Filter for requests where a specific method was used

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

        multichannel : typing.Optional[bool]
            Filter for requests where multichannel was used

        numerals : typing.Optional[bool]
            Filter for requests where numerals were used

        paragraphs : typing.Optional[bool]
            Filter for requests where paragraphs were used

        profanity_filter : typing.Optional[bool]
            Filter for requests where profanity filter was used

        punctuate : typing.Optional[bool]
            Filter for requests where punctuate was used

        redact : typing.Optional[bool]
            Filter for requests where redact was used

        replace : typing.Optional[bool]
            Filter for requests where replace was used

        sample_rate : typing.Optional[bool]
            Filter for requests where sample rate was used

        search : typing.Optional[bool]
            Filter for requests where search was used

        sentiment : typing.Optional[bool]
            Filter for requests where sentiment was used

        smart_format : typing.Optional[bool]
            Filter for requests where smart format was used

        summarize : typing.Optional[bool]
            Filter for requests where summarize was used

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

        topics : typing.Optional[bool]
            Filter for requests where topics was used

        utt_split : typing.Optional[bool]
            Filter for requests where utt split was used

        utterances : typing.Optional[bool]
            Filter for requests where utterances was used

        version : typing.Optional[bool]
            Filter for requests where version was used

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

        Returns
        -------
        UsageV1Response
            A specific request for a specific project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.usage.get(
                project_id="123456-7890-1234-5678-901234",
                start="start",
                end="end",
                accessor="12345678-1234-1234-1234-123456789012",
                alternatives=True,
                callback_method=True,
                callback=True,
                channels=True,
                custom_intent_mode=True,
                custom_intent=True,
                custom_topic_mode=True,
                custom_topic=True,
                deployment="hosted",
                detect_entities=True,
                detect_language=True,
                diarize=True,
                dictation=True,
                encoding=True,
                endpoint="listen",
                extra=True,
                filler_words=True,
                intents=True,
                keyterm=True,
                keywords=True,
                language=True,
                measurements=True,
                method="sync",
                model="6f548761-c9c0-429a-9315-11a1d28499c8",
                multichannel=True,
                numerals=True,
                paragraphs=True,
                profanity_filter=True,
                punctuate=True,
                redact=True,
                replace=True,
                sample_rate=True,
                search=True,
                sentiment=True,
                smart_format=True,
                summarize=True,
                tag="tag1",
                topics=True,
                utt_split=True,
                utterances=True,
                version=True,
            )


        asyncio.run(main())
        r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   Nr^   ra   r   r   r   r_   x  s     	
 !"#$%&'()*+,-.
0zAsyncUsageClient.getc                 C  rc   )Nr   )r   r   )r   rd   r   r   )r   r   r   r   r   re     rf   zAsyncUsageClient.breakdownc                 C  rc   )Nr   )r   r   )r   rg   r   r   )r   r   r   r   r   rh     rf   zAsyncUsageClient.fields)r   r   )r"   r	   ri   rj   r   r   r   r   ro   f  sp    
  9
ro   )
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   types.usage_v1responser   
raw_clientr	   r
   "types.usage_get_request_deploymentr    types.usage_get_request_endpointr   types.usage_get_request_methodr   TYPE_CHECKINGrd   r   r   rg   r   r   r   ro   r   r   r   r   <module>   s      T