
    -2i2R                       d dl mZ d dlmZmZ 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 dd	lmZmZmZmZmZmZmZmZmZ dd
l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' ddl(m)Z)m*Z* ddl+m,Z,m-Z- ddl.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 ddgZ7 G d de#          Z8 G d de$          Z9 G d d          Z: G d d          Z; G d d          Z< G d d          Z=dS )     )annotations)Mappingcast)LiteralN   )_legacy_response   )ContentAsyncContentContentWithRawResponseAsyncContentWithRawResponseContentWithStreamingResponse!AsyncContentWithStreamingResponse)	BodyOmitQueryHeadersNoneTypeNotGiven	FileTypesomit	not_given)extract_filesmaybe_transformdeepcopy_minimalasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)file_list_paramsfile_create_params)FileListResponse)FileCreateResponse)FileRetrieveResponseFiles
AsyncFilesc                      e Zd Zed'd            Zed(d            Zed)d            Zeeddded	d*dZ	dddedd+dZ
eeedddedd,d$Zdddedd-d&ZdS ).r+   returnr
   c                *    t          | j                  S N)r
   _clientselfs    f/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/openai/resources/containers/files/files.pycontentzFiles.content#   s    t|$$$    FilesWithRawResponsec                     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
        )r7   r2   s    r4   with_raw_responsezFiles.with_raw_response'   s     $D)))r6   FilesWithStreamingResponsec                     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;   r2   s    r4   with_streaming_responsezFiles.with_streaming_response1   s     *$///r6   Nfilefile_idextra_headersextra_query
extra_bodytimeoutcontainer_idstrr@   FileTypes | OmitrA   
str | OmitrB   Headers | NonerC   Query | NonerD   Body | NonerE   'float | httpx.Timeout | None | NotGivenr)   c               f   |st          d|          t          ||d          }t          t          t          t
          t          f         |          dgg          }	ddi|pi }|                     d| dt          |t          j
                  |	t          ||||	          t          
          S )<  
        Create a Container File

        You can send either a multipart/form-data request with the raw file content, or
        a JSON request with a file ID.

        Args:
          file: The File object (not file name) to be uploaded.

          file_id: Name of the file to create.

          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 r@   rA   r@   pathsContent-Typemultipart/form-data/containers//filesrB   rC   rD   rE   bodyfilesoptionscast_to)
ValueErrorr   r   r   r   rG   object_postr   r'   FileCreateParamsr%   r)   
r3   rF   r@   rA   rB   rC   rD   rE   rZ   r[   s
             r4   createzFiles.create:   s    @  	mk[gkklll" 
 
 d73;#7>>xjQQQ ()>X=CVTVXzz/</// '9'JKK(+Q[el   '  
 
 	
r6   rX   r*   c          	         |st          d|          |st          d|          |                     d| d| t          ||||          t                    S )K  
        Retrieve Container File

        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
        rP   6Expected a non-empty value for `file_id` but received rV   /files/rX   r\   r]   r^   _getr%   r*   r3   rA   rF   rB   rC   rD   rE   s          r4   retrievezFiles.retrieveq   s    0  	mk[gkklll 	caV]aabbbyy9<9999(+Q[el   )  
 
 	
r6   afterlimitorderrB   rC   rD   rE   rn   ro   
int | Omitrp   Literal['asc', 'desc'] | Omit SyncCursorPage[FileListResponse]c                   |st          d|          |                     d| dt          t                   t	          ||||t          |||dt          j                            t                    S a  List Container files

        Args:
          after: A cursor for use in pagination.

        `after` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              ending with obj_foo, your subsequent call can include after=obj_foo in order to
              fetch the next page of the list.

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
              order and `desc` for descending order.

          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
        rP   rV   rW   )rn   ro   rp   )rB   rC   rD   rE   query)pager\   model)r^   _get_api_listr"   r(   r%   r   r&   FileListParams	r3   rF   rn   ro   rp   rB   rC   rD   rE   s	            r4   listz
Files.list   s    L  	mk[gkklll!!/</// 01(+'%%!&!&!& 
 %3    ## " 
 
 	
r6   Nonec          	         |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                    S )	I  
        Delete Container File

        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
        rP   rf   Accept*/*rV   rg   rX   rh   r^   _deleter%   r   rk   s          r4   deletezFiles.delete   s    0  	mk[gkklll 	caV]aabbb!5B]-@bB||9<9999(+Q[el     
 
 	
r6   )r.   r
   )r.   r7   )r.   r;   rF   rG   r@   rH   rA   rI   rB   rJ   rC   rK   rD   rL   rE   rM   r.   r)   rA   rG   rF   rG   rB   rJ   rC   rK   rD   rL   rE   rM   r.   r*   )rF   rG   rn   rI   ro   rq   rp   rr   rB   rJ   rC   rK   rD   rL   rE   rM   r.   rs   rA   rG   rF   rG   rB   rJ   rC   rK   rD   rL   rE   rM   r.   r}   __name__
__module____qualname__r   r5   r:   r>   r   r   rc   rl   r|   r    r6   r4   r+   r+   "   s8       % % % _% * * * _* 0 0 0 _0 "&" )-$("&;D5
 5
 5
 5
 5
 5
| )-$("&;D"
 "
 "
 "
 "
 "
P ! /3 )-$("&;D:
 :
 :
 :
 :
 :
F )-$("&;D#
 #
 #
 #
 #
 #
 #
 #
r6   c                      e Zd Zed'd            Zed(d            Zed)d            Zeeddded	d*dZ	dddedd+dZ
eeedddedd,d$Zdddedd-d&ZdS ).r,   r.   r   c                *    t          | j                  S r0   )r   r1   r2   s    r4   r5   zAsyncFiles.content   s    DL)))r6   AsyncFilesWithRawResponsec                     t          |           S r9   )r   r2   s    r4   r:   zAsyncFiles.with_raw_response   s     )...r6   AsyncFilesWithStreamingResponsec                     t          |           S r=   )r   r2   s    r4   r>   z"AsyncFiles.with_streaming_response  s     /t444r6   Nr?   rF   rG   r@   rH   rA   rI   rB   rJ   rC   rK   rD   rL   rE   rM   r)   c                 K   |st          d|          t          ||d          }t          t          t          t
          t          f         |          dgg          }	ddi|pi }|                     d| dt          |t          j
                   d	{V |	t          ||||
          t                     d	{V S )rO   rP   rQ   r@   rR   rT   rU   rV   rW   NrX   rY   )r^   r   r   r   r   rG   r_   r`   r   r'   ra   r%   r)   rb   s
             r4   rc   zAsyncFiles.create  s     @  	mk[gkklll" 
 
 d73;#7>>xjQQQ ()>X=CVTVXZZ/<///,T3E3VWWWWWWWW(+Q[el   '   
 
 
 
 
 
 
 
 	
r6   rX   r*   c          	        K   |st          d|          |st          d|          |                     d| d| t          ||||          t                     d{V S )re   rP   rf   rV   rg   rX   rh   Nri   rk   s          r4   rl   zAsyncFiles.retrieveF  s      0  	mk[gkklll 	caV]aabbbYY9<9999(+Q[el   )  
 
 
 
 
 
 
 
 	
r6   rm   rn   ro   rq   rp   rr   CAsyncPaginator[FileListResponse, AsyncCursorPage[FileListResponse]]c                   |st          d|          |                     d| dt          t                   t	          ||||t          |||dt          j                            t                    S ru   )r^   ry   r#   r(   r%   r   r&   rz   r{   s	            r4   r|   zAsyncFiles.listj  s    L  	mk[gkklll!!/</// !12(+'%%!&!&!& 
 %3    ## " 
 
 	
r6   r}   c          	        K   |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                     d	{V S )
r   rP   rf   r   r   rV   rg   rX   rh   Nr   rk   s          r4   r   zAsyncFiles.delete  s      0  	mk[gkklll 	caV]aabbb!5B]-@bB\\9<9999(+Q[el    " 
 
 
 
 
 
 
 
 	
r6   )r.   r   )r.   r   )r.   r   r   r   )rF   rG   rn   rI   ro   rq   rp   rr   rB   rJ   rC   rK   rD   rL   rE   rM   r.   r   r   r   r   r6   r4   r,   r,      s8       * * * _* / / / _/ 5 5 5 _5 "&" )-$("&;D5
 5
 5
 5
 5
 5
| )-$("&;D"
 "
 "
 "
 "
 "
P ! /3 )-$("&;D:
 :
 :
 :
 :
 :
F )-$("&;D#
 #
 #
 #
 #
 #
 #
 #
r6   c                  .    e Zd Zd	dZed
d            ZdS )r7   r[   r+   r.   r}   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r0   )_filesr   to_raw_response_wrapperrc   rl   r|   r   r3   r[   s     r4   __init__zFilesWithRawResponse.__init__  sw    &>L
 
 )@N
 
 %<J
 
	 '>L
 
r6   r   c                4    t          | j        j                  S r0   )r   r   r5   r2   s    r4   r5   zFilesWithRawResponse.content  s    %dk&9:::r6   Nr[   r+   r.   r}   )r.   r   r   r   r   r   r   r5   r   r6   r4   r7   r7     sH        
 
 
 
  ; ; ; _; ; ;r6   r7   c                  .    e Zd Zd	dZed
d            ZdS )r   r[   r,   r.   r}   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r0   )r   r   async_to_raw_response_wrapperrc   rl   r|   r   r   s     r4   r   z"AsyncFilesWithRawResponse.__init__  sw    &DL
 
 )FN
 
 %BJ
 
	 'DL
 
r6   r   c                4    t          | j        j                  S r0   )r   r   r5   r2   s    r4   r5   z!AsyncFilesWithRawResponse.content  s    *4;+>???r6   Nr[   r,   r.   r}   )r.   r   r   r   r6   r4   r   r     sN        
 
 
 
  @ @ @ _@ @ @r6   r   c                  .    e Zd Zd	dZed
d            ZdS )r;   r[   r+   r.   r}   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r0   )r   r    rc   rl   r|   r   r   s     r4   r   z#FilesWithStreamingResponse.__init__  sk    2L
 
 5N
 
 1J
 
	 3L
 
r6   r   c                4    t          | j        j                  S r0   )r   r   r5   r2   s    r4   r5   z"FilesWithStreamingResponse.content	  s    +DK,?@@@r6   Nr   )r.   r   r   r   r6   r4   r;   r;     sN        
 
 
 
  A A A _A A Ar6   r;   c                  .    e Zd Zd	dZed
d            ZdS )r   r[   r,   r.   r}   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r0   )r   r!   rc   rl   r|   r   r   s     r4   r   z(AsyncFilesWithStreamingResponse.__init__  sk    8L
 
 ;N
 
 7J
 
	 9L
 
r6   r   c                4    t          | j        j                  S r0   )r   r   r5   r2   s    r4   r5   z'AsyncFilesWithStreamingResponse.content  s    01DEEEr6   Nr   )r.   r   r   r   r6   r4   r   r     sN        
 
 
 
  F F F _F F Fr6   r   )>
__future__r   typingr   r   typing_extensionsr   httpx r   r5   r
   r   r   r   r   r   _typesr   r   r   r   r   r   r   r   r   _utilsr   r   r   r   _compatr   	_resourcer   r   	_responser    r!   
paginationr"   r#   _base_clientr$   r%   types.containersr&   r'   #types.containers.file_list_responser(   %types.containers.file_create_responser)   'types.containers.file_retrieve_responser*   __all__r+   r,   r7   r   r;   r   r   r6   r4   <module>r      s   # " " " " "                 % % % % % %  ! ! ! ! ! !                b a a a a a a a a a a a a a a a a a a a a a ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : : A A A A A A A A E E E E E E E E D D D D D D H H H H H H L L L L L LL
!R
 R
 R
 R
 R
O R
 R
 R
jR
 R
 R
 R
 R
! R
 R
 R
j; ; ; ; ; ; ; ;,@ @ @ @ @ @ @ @,A A A A A A A A,F F F F F F F F F Fr6   