o
    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
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)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dZedddZeeddded	dddZdS )r   returnClientSecretsWithRawResponsec                 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
        )r   self r   i/var/www/html/openai_agents/venv/lib/python3.10/site-packages/openai/resources/realtime/client_secrets.pywith_raw_response      zClientSecrets.with_raw_response"ClientSecretsWithStreamingResponsec                 C  r   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      z%ClientSecrets.with_streaming_responseNexpires_aftersessionextra_headersextra_query
extra_bodytimeoutr(   /client_secret_create_params.ExpiresAfter | Omitr)   *client_secret_create_params.Session | Omitr*   Headers | Noner+   Query | Noner,   Body | Noner-   'float | httpx.Timeout | None | NotGivenr   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optionscast_to)_postr   r   ClientSecretCreateParamsr   r   r   r(   r)   r*   r+   r,   r-   r   r   r    create(   s    zClientSecrets.create)r   r   )r   r#   r(   r.   r)   r/   r*   r0   r+   r1   r,   r2   r-   r3   r   r   	__name__
__module____qualname__r   r!   r%   r
   r   r?   r   r   r   r    r          	c                   @  r   )r   r   !AsyncClientSecretsWithRawResponsec                 C  r   r   )rF   r   r   r   r    r!   Y   r"   z$AsyncClientSecrets.with_raw_response'AsyncClientSecretsWithStreamingResponsec                 C  r   r$   )rG   r   r   r   r    r%   c   r&   z*AsyncClientSecrets.with_streaming_responseNr'   r(   r.   r)   r/   r*   r0   r+   r1   r,   r2   r-   r3   r   c             	     s:   | j dt||dtjI dH t||||dtdI dH S )r4   r5   r6   Nr7   r8   )r<   r   r   r=   r   r   r>   r   r   r    r?   l   s    zAsyncClientSecrets.create)r   rF   )r   rG   r@   rA   r   r   r   r    r   X   rE   c                   @     e Zd ZdddZdS )	r   client_secretsr   r   Nonec                 C     || _ t|j| _d S N)_client_secretsr   to_raw_response_wrapperr?   r   rI   r   r   r    __init__      
z%ClientSecretsWithRawResponse.__init__NrI   r   r   rJ   rB   rC   rD   rP   r   r   r   r    r          r   c                   @  rH   )	rF   rI   r   r   rJ   c                 C  rK   rL   )rM   r   async_to_raw_response_wrapperr?   rO   r   r   r    rP      rQ   z*AsyncClientSecretsWithRawResponse.__init__NrI   r   r   rJ   rS   r   r   r   r    rF      rT   rF   c                   @  rH   )	r#   rI   r   r   rJ   c                 C     || _ t|j| _d S rL   )rM   r   r?   rO   r   r   r    rP         
z+ClientSecretsWithStreamingResponse.__init__NrR   rS   r   r   r   r    r#      rT   r#   c                   @  rH   )	rG   rI   r   r   rJ   c                 C  rW   rL   )rM   r   r?   rO   r   r   r    rP      rX   z0AsyncClientSecretsWithStreamingResponse.__init__NrV   rS   r   r   r   r    rG      rT   rG   )%
__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   rF   r#   rG   r   r   r   r    <module>   s$   $DD			