o
    i*                     @   s   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 d
dlmZ e e jdZG dd dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)CreateKeyV1RequestOne)CreateKeyV1Response)DeleteProjectKeyV1Response)GetProjectKeyV1Response)ListProjectKeysV1Response   )AsyncRawKeysClientRawKeysClient)KeysListRequestStatus.c                	   @      e Zd ZdefddZedefddZdddd	ed
e	j
e de	j
e defddZddd	edede	j
e defddZddd	edede	j
e defddZddd	edede	j
e defddZdS )
KeysClientclient_wrapperc                C      t |d| _d S N)r   )r   _raw_clientselfr    r   [/home/ubuntu/.local/lib/python3.10/site-packages/deepgram/manage/v1/projects/keys/client.py__init__      zKeysClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawKeysClient
        r   r   r   r   r   with_raw_response      	zKeysClient.with_raw_responseNstatusrequest_options
project_idr"   r#   c                C      | j j|||d}|jS )a  
        Retrieves all API keys associated with the specified project

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

        status : typing.Optional[KeysListRequestStatus]
            Only return keys with a specific status

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

        Returns
        -------
        ListProjectKeysV1Response
            A list of API keys

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.keys.list(
            project_id="123456-7890-1234-5678-901234",
            status="active",
        )
        r!   r   listdatar   r$   r"   r#   	_responser   r   r   r'   "   s   &zKeysClient.listr#   requestc                C   r%   )a  
        Creates a new API key with specified settings for the project

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

        request : CreateKeyV1RequestOne

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

        Returns
        -------
        CreateKeyV1Response
            API key created successfully

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.keys.create(
            project_id="project_id",
            request={"key": "value"},
        )
        r,   r#   r   creater(   r   r$   r,   r#   r*   r   r   r   r/   K   s   %zKeysClient.createkey_idc                C   r%   )a  
        Retrieves information about a specified API key

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

        key_id : str
            The unique identifier of the API key

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

        Returns
        -------
        GetProjectKeyV1Response
            A specific API key

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.keys.get(
            project_id="123456-7890-1234-5678-901234",
            key_id="123456789012345678901234",
        )
        r+   r   getr(   r   r$   r1   r#   r*   r   r   r   r3   s      "zKeysClient.getc                C   r%   )a  
        Deletes an API key for a specific project

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

        key_id : str
            The unique identifier of the API key

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

        Returns
        -------
        DeleteProjectKeyV1Response
            API key deleted

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.manage.v1.projects.keys.delete(
            project_id="123456-7890-1234-5678-901234",
            key_id="123456789012345678901234",
        )
        r+   r   deleter(   r4   r   r   r   r7      r5   zKeysClient.delete)__name__
__module____qualname__r   r   propertyr   r   strtypingOptionalr   r   r
   r'   r   r   r/   r	   r3   r   r7   r   r   r   r   r      sZ    
.
)
&r   c                	   @   r   )AsyncKeysClientr   c                C   r   r   )r   r   r   r   r   r   r      r   zAsyncKeysClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawKeysClient
        r   r   r   r   r   r      r    z!AsyncKeysClient.with_raw_responseNr!   r$   r"   r#   c                       | j j|||dI dH }|jS )a  
        Retrieves all API keys associated with the specified project

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

        status : typing.Optional[KeysListRequestStatus]
            Only return keys with a specific status

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

        Returns
        -------
        ListProjectKeysV1Response
            A list of API keys

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r!   Nr&   r)   r   r   r   r'      s   .zAsyncKeysClient.listr+   r,   c                   r@   )aS  
        Creates a new API key with specified settings for the project

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

        request : CreateKeyV1RequestOne

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

        Returns
        -------
        CreateKeyV1Response
            API key created successfully

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.manage.v1.projects.keys.create(
                project_id="project_id",
                request={"key": "value"},
            )


        asyncio.run(main())
        r-   Nr.   r0   r   r   r   r/      s   -zAsyncKeysClient.creater1   c                   r@   )au  
        Retrieves information about a specified API key

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

        key_id : str
            The unique identifier of the API key

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

        Returns
        -------
        GetProjectKeyV1Response
            A specific API key

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r+   Nr2   r4   r   r   r   r3   .     *zAsyncKeysClient.getc                   r@   )ar  
        Deletes an API key for a specific project

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

        key_id : str
            The unique identifier of the API key

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

        Returns
        -------
        DeleteProjectKeyV1Response
            API key deleted

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r+   Nr6   r4   r   r   r   r7   [  rA   zAsyncKeysClient.delete)r8   r9   r:   r   r   r;   r   r   r<   r=   r>   r   r   r
   r'   r   r   r/   r	   r3   r   r7   r   r   r   r   r?      sZ    
6
1
.r?   )r=   core.client_wrapperr   r   core.request_optionsr   types.create_key_v1request_oner   types.create_key_v1responser   #types.delete_project_key_v1responser    types.get_project_key_v1responser	   "types.list_project_keys_v1responser
   
raw_clientr   r   types.keys_list_request_statusr   castAnyOMITr   r?   r   r   r   r   <module>   s    ,