
    עi.$                    ,   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
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e      Z G d de      Z  G d d      Z! G d d      Z" G d d      Z# G d d      Z$y)    )annotationsN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)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                  b    e Zd Zedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    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
        )ClientSecretsWithRawResponseselfs    i/sites/domain-asset-master/.venv/lib/python3.12/site-packages/openai/resources/realtime/client_secrets.pywith_raw_responsezClientSecrets.with_raw_response   s     ,D11    c                    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
        )"ClientSecretsWithStreamingResponser   s    r   with_streaming_responsez%ClientSecrets.with_streaming_response   s     2$77r!   Nexpires_aftersessionextra_headersextra_query
extra_bodytimeoutc          
         | j                  dt        ||dt        j                        t	        ||||      t
              S ){  
        Create a Realtime client secret with an associated session configuration.

        Client secrets are short-lived tokens that can be passed to a client app, such
        as a web frontend or mobile client, which grants access to the Realtime API
        without leaking your main API key. You can configure a custom TTL for each
        client secret.

        You can also attach session configuration options to the client secret, which
        will be applied to any sessions created using that client secret, but these can
        also be overridden by the client connection.

        [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc).

        Returns the created client secret and the effective session object. The client
        secret is a string that looks like `ek_1234`.

        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optionscast_to)_postr   r   ClientSecretCreateParamsr   r   r   r'   r(   r)   r*   r+   r,   s          r   createzClientSecrets.create(   sV    \ zz& %2& ,DD )+Q[el /  
 	
r!   )returnr   )r:   r$   r'   z/client_secret_create_params.ExpiresAfter | Omitr(   z*client_secret_create_params.Session | Omitr)   zHeaders | Noner*   zQuery | Noner+   zBody | Noner,   z'float | httpx.Timeout | None | NotGivenr:   r   	__name__
__module____qualname__r   r    r%   r   r   r9    r!   r   r   r      s    2 2 8 8 JN>B )-$("&;D;
 G;
 <	;
 &;
 ";
  ;
 9;
 
$;
r!   c                  b    e Zd Zedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    t        |       S r   )!AsyncClientSecretsWithRawResponser   s    r   r    z$AsyncClientSecrets.with_raw_responseg   s     166r!   c                    t        |       S r#   )'AsyncClientSecretsWithStreamingResponser   s    r   r%   z*AsyncClientSecrets.with_streaming_responseq   s     7t<<r!   Nr&   c          
        K   | j                  dt        ||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)r.   r/   r0   Nr1   r2   )r6   r   r   r7   r   r   r8   s          r   r9   zAsyncClientSecrets.createz   so     \ ZZ&,%2& ,DD  )+Q[el /   
 
 	

s!   -AA
AAAA)r:   rC   )r:   rE   r;   r<   r@   r!   r   r   r   f   s    7 7 = = JN>B )-$("&;D;
 G;
 <	;
 &;
 ";
  ;
 9;
 
$;
r!   c                      e Zd ZddZy)r   c                Z    || _         t        j                  |j                        | _        y N)_client_secretsr   to_raw_response_wrapperr9   r   client_secretss     r   __init__z%ClientSecretsWithRawResponse.__init__   s%    -&>>!!
r!   NrM   r   r:   Noner=   r>   r?   rN   r@   r!   r   r   r          
r!   r   c                      e Zd ZddZy)rC   c                Z    || _         t        j                  |j                        | _        y rI   )rJ   r   async_to_raw_response_wrapperr9   rL   s     r   rN   z*AsyncClientSecretsWithRawResponse.__init__   s%    -&DD!!
r!   NrM   r   r:   rP   rQ   r@   r!   r   rC   rC      rR   r!   rC   c                      e Zd ZddZy)r$   c                F    || _         t        |j                        | _        y rI   )rJ   r   r9   rL   s     r   rN   z+ClientSecretsWithStreamingResponse.__init__   s    -2!!
r!   NrO   rQ   r@   r!   r   r$   r$      rR   r!   r$   c                      e Zd ZddZy)rE   c                F    || _         t        |j                        | _        y rI   )rJ   r   r9   rL   s     r   rN   z0AsyncClientSecretsWithStreamingResponse.__init__   s    -8!!
r!   NrV   rQ   r@   r!   r   rE   rE      rR   r!   rE   )%
__future__r   httpx r   _typesr   r   r   r	   r
   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.realtimer   ,types.realtime.client_secret_create_responser   __all__r   r   r   rC   r$   rE   r@   r!   r   <module>rg      s    #    K K K < & : Y 0 9 V0
1O
O O
dO
) O
d
 

 

 

 
r!   