o
    i24                     @   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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).CreateProjectDistributionCredentialsV1Response)+GetProjectDistributionCredentialsV1Response),ListProjectDistributionCredentialsV1Response   )%AsyncRawDistributionCredentialsClient RawDistributionCredentialsClient).DistributionCredentialsCreateRequestScopesItem.c                   @      e Zd ZdefddZedefddZddd	ed
e	j
e defddZddeddd	ede	j
e	jee	je f  de	j
e	jd  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S )DistributionCredentialsClientclient_wrapperc                C      t |d| _d S N)r   )r   _raw_clientselfr    r   k/home/ubuntu/.local/lib/python3.10/site-packages/deepgram/self_hosted/v1/distribution_credentials/client.py__init__      z&DistributionCredentialsClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawDistributionCredentialsClient
        r   r   r   r   r   with_raw_response      	z/DistributionCredentialsClient.with_raw_responseNrequest_options
project_idr    c                C   s   | j j||d}|jS )a  
        Lists sets of distribution credentials for the specified project

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

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

        Returns
        -------
        ListProjectDistributionCredentialsV1Response
            A list of distribution credentials for a specific project

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.self_hosted.v1.distribution_credentials.list(
            project_id="123456-7890-1234-5678-901234",
        )
        r   r   listdatar   r!   r    	_responser   r   r   r#       s   z"DistributionCredentialsClient.listscopesprovidercommentr    r(   r)   quayr*   c                C   s   | j j|||||d}|jS )av  
        Creates a set of distribution credentials for the specified project

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

        scopes : typing.Optional[typing.Union[DistributionCredentialsCreateRequestScopesItem, typing.Sequence[DistributionCredentialsCreateRequestScopesItem]]]
            List of permission scopes for the credentials

        provider : typing.Optional[typing.Literal["quay"]]
            The provider of the distribution service

        comment : typing.Optional[str]
            Optional comment about the credentials

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

        Returns
        -------
        CreateProjectDistributionCredentialsV1Response
            Single distribution credential

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.self_hosted.v1.distribution_credentials.create(
            project_id="123456-7890-1234-5678-901234",
        )
        r'   r   creater$   r   r!   r(   r)   r*   r    r&   r   r   r   r-   A   s   2
z$DistributionCredentialsClient.createdistribution_credentials_idc                C      | j j|||d}|jS )ay  
        Returns a set of distribution credentials for the specified project

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

        distribution_credentials_id : str
            The UUID of the distribution credentials

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

        Returns
        -------
        GetProjectDistributionCredentialsV1Response
            Single distribution credential

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.self_hosted.v1.distribution_credentials.get(
            project_id="123456-7890-1234-5678-901234",
            distribution_credentials_id="8b36cfd0-472f-4a21-833f-2d6343c3a2f3",
        )
        r   r   getr$   r   r!   r/   r    r&   r   r   r   r2   x      &z!DistributionCredentialsClient.getc                C   r0   )a|  
        Deletes a set of distribution credentials for the specified project

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

        distribution_credentials_id : str
            The UUID of the distribution credentials

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

        Returns
        -------
        GetProjectDistributionCredentialsV1Response
            Single distribution credential

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

        client = DeepgramClient(
            api_key="YOUR_API_KEY",
        )
        client.self_hosted.v1.distribution_credentials.delete(
            project_id="123456-7890-1234-5678-901234",
            distribution_credentials_id="8b36cfd0-472f-4a21-833f-2d6343c3a2f3",
        )
        r   r   deleter$   r3   r   r   r   r6      r4   z$DistributionCredentialsClient.delete)__name__
__module____qualname__r   r   propertyr   r   strtypingOptionalr   r   r#   OMITUnionr   SequenceLiteralr   r-   r   r2   r6   r   r   r   r   r      sn    
*

<
.r   c                   @   r   )"AsyncDistributionCredentialsClientr   c                C   r   r   )r
   r   r   r   r   r   r      r   z+AsyncDistributionCredentialsClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawDistributionCredentialsClient
        r   r   r   r   r   r      r   z4AsyncDistributionCredentialsClient.with_raw_responseNr   r!   r    c                   s   | j j||dI dH }|jS )aY  
        Lists sets of distribution credentials for the specified project

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

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

        Returns
        -------
        ListProjectDistributionCredentialsV1Response
            A list of distribution credentials for a specific project

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.self_hosted.v1.distribution_credentials.list(
                project_id="123456-7890-1234-5678-901234",
            )


        asyncio.run(main())
        r   Nr"   r%   r   r   r   r#      s   &z'AsyncDistributionCredentialsClient.listr'   r(   r)   r+   r*   c                   s$   | j j|||||dI dH }|jS )a  
        Creates a set of distribution credentials for the specified project

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

        scopes : typing.Optional[typing.Union[DistributionCredentialsCreateRequestScopesItem, typing.Sequence[DistributionCredentialsCreateRequestScopesItem]]]
            List of permission scopes for the credentials

        provider : typing.Optional[typing.Literal["quay"]]
            The provider of the distribution service

        comment : typing.Optional[str]
            Optional comment about the credentials

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

        Returns
        -------
        CreateProjectDistributionCredentialsV1Response
            Single distribution credential

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.self_hosted.v1.distribution_credentials.create(
                project_id="123456-7890-1234-5678-901234",
            )


        asyncio.run(main())
        r'   Nr,   r.   r   r   r   r-     s
   :
z)AsyncDistributionCredentialsClient.creater/   c                       | j j|||dI dH }|jS )a  
        Returns a set of distribution credentials for the specified project

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

        distribution_credentials_id : str
            The UUID of the distribution credentials

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

        Returns
        -------
        GetProjectDistributionCredentialsV1Response
            Single distribution credential

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.self_hosted.v1.distribution_credentials.get(
                project_id="123456-7890-1234-5678-901234",
                distribution_credentials_id="8b36cfd0-472f-4a21-833f-2d6343c3a2f3",
            )


        asyncio.run(main())
        r   Nr1   r3   r   r   r   r2   B  s   .z&AsyncDistributionCredentialsClient.getc                   rC   )a  
        Deletes a set of distribution credentials for the specified project

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

        distribution_credentials_id : str
            The UUID of the distribution credentials

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

        Returns
        -------
        GetProjectDistributionCredentialsV1Response
            Single distribution credential

        Examples
        --------
        import asyncio

        from deepgram import AsyncDeepgramClient

        client = AsyncDeepgramClient(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.self_hosted.v1.distribution_credentials.delete(
                project_id="123456-7890-1234-5678-901234",
                distribution_credentials_id="8b36cfd0-472f-4a21-833f-2d6343c3a2f3",
            )


        asyncio.run(main())
        r   Nr5   r3   r   r   r   r6   s  s
   .z)AsyncDistributionCredentialsClient.delete)r7   r8   r9   r   r   r:   r
   r   r;   r<   r=   r   r   r#   r>   r?   r   r@   rA   r   r-   r   r2   r6   r   r   r   r   rB      sn    
2

D
6rB   )r<   core.client_wrapperr   r   core.request_optionsr   8types.create_project_distribution_credentials_v1responser   5types.get_project_distribution_credentials_v1responser   6types.list_project_distribution_credentials_v1responser   
raw_clientr
   r   9types.distribution_credentials_create_request_scopes_itemr   castAnyr>   r   rB   r   r   r   r   <module>   s    ;