U
    ~fh[                     @  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 ddlmZmZ ddlmZmZmZ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)cached_property)SyncAPIResourceAsyncAPIResource)StreamedBinaryAPIResponseAsyncStreamedBinaryAPIResponse#to_custom_streamed_response_wrapper)async_to_custom_streamed_response_wrapper)make_request_optionsContentAsyncContentc                	   @  sV   e Zd ZeddddZeddddZddded	d
d
ddddddddZdS )r   ContentWithRawResponse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   M/tmp/pip-unpacked-wheel-rjiviquo/openai/resources/containers/files/content.pywith_raw_response   s    zContent.with_raw_responseContentWithStreamingResponsec                 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Content.with_streaming_responseNextra_headersextra_query
extra_bodytimeoutstrHeaders | NoneQuery | NoneBody | None'float | httpx.Timeout | None | NotGiven+_legacy_response.HttpxBinaryResponseContentfile_idcontainer_idr!   r"   r#   r$   r   c                C  s`   |st d||s$t d|ddi|p0i }| jd| d| dt||||dtjd	S )
S  
        Retrieve Container File Content

        Args:
          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
        ;Expected a non-empty value for `container_id` but received 6Expected a non-empty value for `file_id` but received Acceptapplication/binary/containers//files//contentr    optionsZcast_to
ValueError_getr   r   ZHttpxBinaryResponseContentr   r,   r-   r!   r"   r#   r$   r   r   r   retrieve*   s       zContent.retrieve__name__
__module____qualname__r
   r   r   r   r<   r   r   r   r   r      s   	c                	   @  sV   e Zd ZeddddZeddddZddded	d
d
ddddddddZdS )r   AsyncContentWithRawResponser   c                 C  s   t | S r   )rA   r   r   r   r   r   Q   s    zAsyncContent.with_raw_response!AsyncContentWithStreamingResponsec                 C  s   t | S r   )rB   r   r   r   r   r   [   s    z$AsyncContent.with_streaming_responseNr    r%   r&   r'   r(   r)   r*   r+   c                  sf   |st d||s$t d|ddi|p0i }| jd| d| dt||||dtjd	I d
H S )r.   r/   r0   r1   r2   r3   r4   r5   r    r6   Nr8   r;   r   r   r   r<   d   s       zAsyncContent.retriever=   r   r   r   r   r   P   s   	c                   @  s   e Zd ZdddddZdS )r   r   Nonecontentr   c                 C  s   || _ t|j| _d S N)_contentr   Zto_raw_response_wrapperr<   r   rE   r   r   r   __init__   s    zContentWithRawResponse.__init__Nr>   r?   r@   rI   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )rA   r   rC   rD   c                 C  s   || _ t|j| _d S rF   )rG   r   Zasync_to_raw_response_wrapperr<   rH   r   r   r   rI      s    z$AsyncContentWithRawResponse.__init__NrJ   r   r   r   r   rA      s   rA   c                   @  s   e Zd ZdddddZdS )r   r   rC   rD   c                 C  s   || _ t|jt| _d S rF   )rG   r   r<   r   rH   r   r   r   rI      s
    z%ContentWithStreamingResponse.__init__NrJ   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )rB   r   rC   rD   c                 C  s   || _ t|jt| _d S rF   )rG   r   r<   r   rH   r   r   r   rI      s
    z*AsyncContentWithStreamingResponse.__init__NrJ   r   r   r   r   rB      s   rB   )
__future__r   Zhttpx r   _typesr   r   r   r   r	   _compatr
   Z	_resourcer   r   	_responser   r   r   r   Z_base_clientr   __all__r   r   r   rA   r   rB   r   r   r   r   <module>   s   ::		
