Ë
    ïÏjP$  ã                  óD  — 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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)Ú,RealtimeTranslationSessionCreateRequestParam)Úclient_secret_create_params)Ú-RealtimeTranslationClientSecretCreateResponseÚClientSecretsÚAsyncClientSecretsc                  ó`   — e Zd Zedd„«       Zedd„«       Z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    úr/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/openai/resources/realtime/translations/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Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               óŠ   — | j                  dt        ||dœt        j                  «      t	        ||||ddi¬«      t
        ¬«      S )áo  
        Create a Realtime translation client secret with an associated translation
        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
        Translation API without leaking your main API key. You can configure a custom
        TTL for each client secret.

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

        Args:
          session: Realtime translation session configuration. Translation sessions stream source
              audio in and translated audio plus transcript deltas out continuously.

          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.

          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/translations/client_secrets©Úsessionr(   Úbearer_authT©r)   r*   r+   r,   Úsecurity©ÚbodyÚoptionsÚcast_to)Ú_postr   r   ÚClientSecretCreateParamsr   r   ©r   r1   r(   r)   r*   r+   r,   s          r    ÚcreatezClientSecrets.create.   s`   € ðR �z‰zØ3Ü à&Ø%2ñô ,×DÑDóô )Ø+Ø'Ø%ØØ'¨Ð.ôô Bð! ó 
ð 	
r"   )Úreturnr   )r=   r%   ©r1   r   r(   z/client_secret_create_params.ExpiresAfter | Omitr)   zHeaders | Noner*   zQuery | Noner+   zBody | Noner,   z(float | httpx2.Timeout | None | NotGivenr=   r   ©	Ú__name__Ú
__module__Ú__qualname__r   r!   r&   r   r   r<   © r"   r    r   r      s‰   „ Øò2ó ð2ð ò8ó ð8ð JNð )-Ø$(Ø"&Ø<Eñ:
ð >ð:
ð Gð	:
ð &ð:
ð "ð:
ð  ð:
ð :ð:
ð 
7ô:
r"   c                  ó`   — e Zd Zedd„«       Zedd„«       Zedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)	r   c                ó   — t        | «      S r   )Ú!AsyncClientSecretsWithRawResponser   s    r    r!   z$AsyncClientSecrets.with_raw_responsel   s   € ô 1°Ó6Ð6r"   c                ó   — t        | «      S r$   )Ú'AsyncClientSecretsWithStreamingResponser   s    r    r&   z*AsyncClientSecrets.with_streaming_responsev   s   € ô 7°tÓ<Ð<r"   Nr'   c             ƒ  óº   K  — | j                  dt        ||dœt        j                  «      ƒ d{  –—† t	        ||||ddi¬«      t
        ¬«      ƒ d{  –—† S 7 Œ'7 Œ­w)r.   r/   r0   Nr2   Tr3   r5   )r9   r   r   r:   r   r   r;   s          r    r<   zAsyncClientSecrets.create   sy   è ø€ ðR —Z‘ZØ3Ü,à&Ø%2ñô ,×DÑDó÷ ô )Ø+Ø'Ø%ØØ'¨Ð.ôô Bð!  ó 
÷ 
ð 	
ðøð
ús!   ‚-A¯A
°"AÁAÁAÁA)r=   rF   )r=   rH   r>   r?   rC   r"   r    r   r   k   s‰   „ Øò7ó ð7ð ò=ó ð=ð JNð )-Ø$(Ø"&Ø<Eñ:
ð >ð:
ð Gð	:
ð &ð:
ð "ð:
ð  ð:
ð :ð:
ð 
7ô:
r"   c                  ó   — e Zd Zdd„Zy)r   c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú_client_secretsr   Úto_raw_response_wrapperr<   ©r   Úclient_secretss     r    Ú__init__z%ClientSecretsWithRawResponse.__init__½   s%   € Ø-ˆÔä&×>Ñ>Ø×!Ñ!ó
ˆ�r"   N©rP   r   r=   ÚNone©r@   rA   rB   rQ   rC   r"   r    r   r   ¼   ó   „ ô
r"   r   c                  ó   — e Zd Zdd„Zy)rF   c                óZ   — || _         t        j                  |j                  «      | _        y rL   )rM   r   Úasync_to_raw_response_wrapperr<   rO   s     r    rQ   z*AsyncClientSecretsWithRawResponse.__init__Æ   s%   € Ø-ˆÔä&×DÑDØ×!Ñ!ó
ˆ�r"   N©rP   r   r=   rS   rT   rC   r"   r    rF   rF   Å   rU   r"   rF   c                  ó   — e Zd Zdd„Zy)r%   c                óF   — || _         t        |j                  «      | _        y rL   )rM   r   r<   rO   s     r    rQ   z+ClientSecretsWithStreamingResponse.__init__Ï   s   € Ø-ˆÔä2Ø×!Ñ!ó
ˆ�r"   NrR   rT   rC   r"   r    r%   r%   Î   rU   r"   r%   c                  ó   — e Zd Zdd„Zy)rH   c                óF   — || _         t        |j                  «      | _        y rL   )rM   r   r<   rO   s     r    rQ   z0AsyncClientSecretsWithStreamingResponse.__init__Ø   s   € Ø-ˆÔä8Ø×!Ñ!ó
ˆ�r"   NrY   rT   rC   r"   r    rH   rH   ×   rU   r"   rH   )(Ú
__future__r   Úhttpx2Ú r   Ú_typesr   r   r   r	   r
   r   r   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú_base_clientr   Útypes.realtimer   Útypes.realtime.translationsr   Ú@types.realtime.realtime_translation_session_create_request_paramÚAtypes.realtime.realtime_translation_client_secret_create_responser   Ú__all__r   r   r   rF   r%   rH   rC   r"   r    Ú<module>rl      sŒ   ðõ #ã å !ß L× LÑ Lß =Ý 'ß ;ß ZÝ 1Ý KÝ Gõõð Ð0Ð
1€ôN
�Oô N
ôbN
Ð)ô N
÷b
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r"   