o
    i@                     @  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 ddlmZ dd	lmZ dd
lmZ ddlmZmZ ejrqddlmZmZ ddlmZmZ ddlmZmZ ddlm Z m!Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z' e(ej)dZ*G dd dZ+G dd dZ,dS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)DeleteProjectV1Response)GetProjectV1Response)LeaveProjectV1Response)ListProjectsV1Response)UpdateProjectV1Response   )AsyncRawProjectsClientRawProjectsClient)AsyncBillingClientBillingClient)AsyncKeysClient
KeysClient)AsyncMembersClientMembersClient)AsyncModelsClientModelsClient)AsyncRequestsClientRequestsClient)AsyncUsageClientUsageClient.c                   @     e Zd Zd1ddZed2ddZd	d
d3ddZd	d	d	dd4ddZd	d
d5ddZe	d	dd6d d!Z
d	d
d7d#d$Zed%d& Zed'd( Zed)d* Zed+d, Zed-d. Zed/d0 Zd	S )8ProjectsClientclient_wrapperr   c                C  :   t |d| _|| _d | _d | _d | _d | _d | _d | _d S Nr   )	r   _raw_client_client_wrapper_keys_members_models	_requests_usage_billingselfr    r+   V/home/ubuntu/.local/lib/python3.10/site-packages/deepgram/manage/v1/projects/client.py__init__      
zProjectsClient.__init__returnr   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawProjectsClient
        r!   r*   r+   r+   r,   with_raw_response&      	z ProjectsClient.with_raw_responseNrequest_optionsr6   typing.Optional[RequestOptions]r
   c                C  s   | j j|d}|jS )a  
        Retrieves basic information about the projects associated with the API key

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

        Returns
        -------
        ListProjectsV1Response
            A list of projects

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.list()
        r5   r!   listdatar*   r6   	_responser+   r+   r,   r9   1   s   zProjectsClient.listlimitpager6   
project_idstrr>   typing.Optional[float]r?   r   c                C  s   | j j||||d}|jS )a  
        Retrieves information about the specified project

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

        limit : typing.Optional[float]
            Number of results to return per page. Default 10. Range [1,1000]

        page : typing.Optional[float]
            Navigate and return the results to retrieve specific portions of information of the response

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

        Returns
        -------
        GetProjectV1Response
            A project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.get(
            project_id="123456-7890-1234-5678-901234",
            limit=1.1,
            page=1.1,
        )
        r=   r!   getr:   r*   r@   r>   r?   r6   r<   r+   r+   r,   rD   K   s   +zProjectsClient.getr   c                C     | j j||d}|jS )ah  
        Deletes the specified project

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

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

        Returns
        -------
        DeleteProjectV1Response
            A project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.delete(
            project_id="123456-7890-1234-5678-901234",
        )
        r5   r!   deleter:   r*   r@   r6   r<   r+   r+   r,   rH   y      zProjectsClient.deletenamer6   rL   typing.Optional[str]r   c                C  s   | j j|||d}|jS )a  
        Updates the name or other properties of an existing project

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

        name : typing.Optional[str]
            The name of the project

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

        Returns
        -------
        UpdateProjectV1Response
            A project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.update(
            project_id="123456-7890-1234-5678-901234",
        )
        rK   r!   updater:   r*   r@   rL   r6   r<   r+   r+   r,   rO      s   %zProjectsClient.updater	   c                C  rF   )a  
        Removes the authenticated account from the specific project

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

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

        Returns
        -------
        LeaveProjectV1Response
            Successfully removed account from project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.leave(
            project_id="123456-7890-1234-5678-901234",
        )
        r5   r!   leaver:   rI   r+   r+   r,   rR      rJ   zProjectsClient.leavec                 C  *   | j d u rddlm} || jd| _ | j S )Nr   )r   r    )r#   keys.clientr   r"   )r*   r   r+   r+   r,   keys      
zProjectsClient.keysc                 C  rS   )Nr   )r   r    )r$   members.clientr   r"   )r*   r   r+   r+   r,   members   rV   zProjectsClient.membersc                 C  rS   )Nr   )r   r    )r%   models.clientr   r"   )r*   r   r+   r+   r,   models   rV   zProjectsClient.modelsc                 C  rS   )Nr   )r   r    )r&   requests.clientr   r"   )r*   r   r+   r+   r,   requests   rV   zProjectsClient.requestsc                 C  rS   )Nr   )r   r    )r'   usage.clientr   r"   )r*   r   r+   r+   r,   usage  rV   zProjectsClient.usagec                 C  rS   )Nr   )r   r    )r(   billing.clientr   r"   )r*   r   r+   r+   r,   billing  rV   zProjectsClient.billing)r   r   )r/   r   r6   r7   r/   r
   
r@   rA   r>   rB   r?   rB   r6   r7   r/   r   r@   rA   r6   r7   r/   r   r@   rA   rL   rM   r6   r7   r/   r   r@   rA   r6   r7   r/   r	   __name__
__module____qualname__r-   propertyr3   r9   rD   rH   OMITrO   rR   rU   rX   rZ   r\   r^   r`   r+   r+   r+   r,   r      s8    


/%)!




r   c                   @  r   )8AsyncProjectsClientr   r   c                C  r   r   )	r   r!   r"   r#   r$   r%   r&   r'   r(   r)   r+   r+   r,   r-     r.   zAsyncProjectsClient.__init__r/   r   c                 C  r0   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawProjectsClient
        r1   r2   r+   r+   r,   r3     r4   z%AsyncProjectsClient.with_raw_responseNr5   r6   r7   r
   c                  s   | j j|dI dH }|jS )a~  
        Retrieves basic information about the projects associated with the API key

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

        Returns
        -------
        ListProjectsV1Response
            A list of projects

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.list()


        asyncio.run(main())
        r5   Nr8   r;   r+   r+   r,   r9   *  s   zAsyncProjectsClient.listr=   r@   rA   r>   rB   r?   r   c                  s"   | j j||||dI dH }|jS )a&  
        Retrieves information about the specified project

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

        limit : typing.Optional[float]
            Number of results to return per page. Default 10. Range [1,1000]

        page : typing.Optional[float]
            Navigate and return the results to retrieve specific portions of information of the response

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

        Returns
        -------
        GetProjectV1Response
            A project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.get(
                project_id="123456-7890-1234-5678-901234",
                limit=1.1,
                page=1.1,
            )


        asyncio.run(main())
        r=   NrC   rE   r+   r+   r,   rD   L  s   3zAsyncProjectsClient.getr   c                     | j j||dI dH }|jS )a  
        Deletes the specified project

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

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

        Returns
        -------
        DeleteProjectV1Response
            A project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.delete(
                project_id="123456-7890-1234-5678-901234",
            )


        asyncio.run(main())
        r5   NrG   rI   r+   r+   r,   rH        &zAsyncProjectsClient.deleterK   rL   rM   r   c                  s    | j j|||dI dH }|jS )aE  
        Updates the name or other properties of an existing project

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

        name : typing.Optional[str]
            The name of the project

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

        Returns
        -------
        UpdateProjectV1Response
            A project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.update(
                project_id="123456-7890-1234-5678-901234",
            )


        asyncio.run(main())
        rK   NrN   rP   r+   r+   r,   rO     s   -zAsyncProjectsClient.updater	   c                  rm   )a  
        Removes the authenticated account from the specific project

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

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

        Returns
        -------
        LeaveProjectV1Response
            Successfully removed account from project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.leave(
                project_id="123456-7890-1234-5678-901234",
            )


        asyncio.run(main())
        r5   NrQ   rI   r+   r+   r,   rR     rn   zAsyncProjectsClient.leavec                 C  rS   )Nr   )r   r    )r#   rT   r   r"   )r*   r   r+   r+   r,   rU     rV   zAsyncProjectsClient.keysc                 C  rS   )Nr   )r   r    )r$   rW   r   r"   )r*   r   r+   r+   r,   rX     rV   zAsyncProjectsClient.membersc                 C  rS   )Nr   )r   r    )r%   rY   r   r"   )r*   r   r+   r+   r,   rZ     rV   zAsyncProjectsClient.modelsc                 C  rS   )Nr   )r   r    )r&   r[   r   r"   )r*   r   r+   r+   r,   r\     rV   zAsyncProjectsClient.requestsc                 C  rS   )Nr   )r   r    )r'   r]   r   r"   )r*   r   r+   r+   r,   r^   $  rV   zAsyncProjectsClient.usagec                 C  rS   )Nr   )r   r    )r(   r_   r   r"   )r*   r   r+   r+   r,   r`   ,  rV   zAsyncProjectsClient.billing)r   r   )r/   r   ra   rb   rc   rd   re   rf   r+   r+   r+   r,   rl     s8    


&7-1)




rl   )-
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   types.delete_project_v1responser   types.get_project_v1responser   types.leave_project_v1responser	   types.list_projects_v1responser
   types.update_project_v1responser   
raw_clientr   r   TYPE_CHECKINGr_   r   r   rT   r   r   rW   r   r   rY   r   r   r[   r   r   r]   r   r   castAnyrk   r   rl   r+   r+   r+   r,   <module>   s*    z