U
    h,                     @  s   d dl mZ d dlZddlmZ ddlmZmZmZm	Z	m
Z
 ddlmZmZ ddlmZ ddlmZm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gZG dd deZG dd deZG dd dZG dd dZ G dd dZ!G dd dZ"dS )    )annotationsN   )_legacy_response)	NOT_GIVENBodyQueryHeadersNotGiven)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)client_secret_create_params)ClientSecretCreateResponseClientSecretsAsyncClientSecretsc                	   @  sZ   e Zd ZeddddZeddddZeeddded	d
dddddddddZdS )r   ClientSecretsWithRawResponsereturnc                 C  s   t | S a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )r   self r   L/tmp/pip-unpacked-wheel-dms8d3uv/openai/resources/realtime/client_secrets.pywith_raw_response   s    zClientSecrets.with_raw_response"ClientSecretsWithStreamingResponsec                 C  s   t | S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )r   r   r   r   r   with_streaming_response   s    z%ClientSecrets.with_streaming_responseNexpires_aftersessionextra_headersextra_query
extra_bodytimeout3client_secret_create_params.ExpiresAfter | NotGiven.client_secret_create_params.Session | NotGivenHeaders | NoneQuery | NoneBody | None'float | httpx.Timeout | None | NotGivenr   r#   r$   r%   r&   r'   r(   r   c             	   C  s,   | j dt||dtjt||||dtdS )n  
        Create a Realtime client secret with an associated session configuration.

        Args:
          expires_after: Configuration for the client secret expiration. Expiration refers to the time
              after which a client secret will no longer be valid for creating sessions. The
              session itself may continue after that time once started. A secret can be used
              to create multiple sessions until it expires.

          session: Session configuration to use for the client secret. Choose either a realtime
              session or a transcription session.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        /realtime/client_secretsr#   r$   r%   r&   r'   r(   bodyoptionsZcast_to)_postr
   r   ClientSecretCreateParamsr   r   r   r#   r$   r%   r&   r'   r(   r   r   r   create(   s         zClientSecrets.create__name__
__module____qualname__r   r   r!   r   r:   r   r   r   r   r      s   	c                	   @  sZ   e Zd ZeddddZeddddZeeddded	d
dddddddddZdS )r   !AsyncClientSecretsWithRawResponser   c                 C  s   t | S r   )r?   r   r   r   r   r   Y   s    z$AsyncClientSecrets.with_raw_response'AsyncClientSecretsWithStreamingResponsec                 C  s   t | S r    )r@   r   r   r   r   r!   c   s    z*AsyncClientSecrets.with_streaming_responseNr"   r)   r*   r+   r,   r-   r.   r   r/   c             	     s8   | j dt||dtjI dH t||||dtdI dH S )r0   r1   r2   Nr3   r4   )r7   r   r   r8   r   r   r9   r   r   r   r:   l   s         zAsyncClientSecrets.creater;   r   r   r   r   r   X   s   	c                   @  s   e Zd ZdddddZdS )r   r   Noneclient_secretsr   c                 C  s   || _ t|j| _d S N)_client_secretsr   Zto_raw_response_wrapperr:   r   rC   r   r   r   __init__   s    z%ClientSecretsWithRawResponse.__init__Nr<   r=   r>   rG   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )r?   r   rA   rB   c                 C  s   || _ t|j| _d S rD   )rE   r   Zasync_to_raw_response_wrapperr:   rF   r   r   r   rG      s    z*AsyncClientSecretsWithRawResponse.__init__NrH   r   r   r   r   r?      s   r?   c                   @  s   e Zd ZdddddZdS )r   r   rA   rB   c                 C  s   || _ t|j| _d S rD   )rE   r   r:   rF   r   r   r   rG      s    z+ClientSecretsWithStreamingResponse.__init__NrH   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )r@   r   rA   rB   c                 C  s   || _ t|j| _d S rD   )rE   r   r:   rF   r   r   r   rG      s    z0AsyncClientSecretsWithStreamingResponse.__init__NrH   r   r   r   r   r@      s   r@   )#
__future__r   Zhttpx r   _typesr   r   r   r   r	   _utilsr
   r   _compatr   Z	_resourcer   r   	_responser   r   Z_base_clientr   Ztypes.realtimer   Z,types.realtime.client_secret_create_responser   __all__r   r   r   r?   r   r@   r   r   r   r   <module>   s"   DD			