
    2hR                       S SK Jr  S SKJrJr  S SKJr  S SKrSSKJ	r	  SSK
JrJrJrJrJrJr  SS	KJrJrJrJrJrJrJr  SS
KJrJrJrJr  SSKJr  SSK J!r!J"r"  SSK#J$r$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4  SS/r5 " S S\!5      r6 " S S\"5      r7 " S S5      r8 " S S5      r9 " S S5      r: " S S5      r;g)     )annotations)Mappingcast)LiteralN   )_legacy_response   )ContentAsyncContentContentWithRawResponseAsyncContentWithRawResponseContentWithStreamingResponse!AsyncContentWithStreamingResponse)	NOT_GIVENBodyQueryHeadersNoneTypeNotGiven	FileTypes)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                  .   \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\SSS\S.               SS jjr	SSS\S.             SS	 jjr
\\\SSS\S
.                 SS jjrSSS\S.             SS jjrSrg)r)   "   c                ,    [        U R                  5      $ N)r
   _clientselfs    _/var/www/auris/envauris/lib/python3.13/site-packages/openai/resources/containers/files/files.pycontentFiles.content#   s    t||$$    c                    [        U 5      $ z
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
)FilesWithRawResponser0   s    r2   with_raw_responseFiles.with_raw_response'   s     $D))r5   c                    [        U 5      $ 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
)FilesWithStreamingResponser0   s    r2   with_streaming_responseFiles.with_streaming_response1   s     *$//r5   Nfilefile_idextra_headersextra_query
extra_bodytimeoutc               ,   U(       d  [        SU< 35      e[        UUS.5      n[        [        [        [
        [        4   U5      S//S9n	SS0U=(       d    0 EnU R                  SU S3[        U[        R                  5      U	[        XEXgS	9[        S
9$ )  
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 rA   rB   rA   pathsContent-Typemultipart/form-data/containers//filesrC   rD   rE   rF   bodyfilesoptionscast_to)
ValueErrorr   r   r   r   strobject_postr   r%   FileCreateParamsr#   r'   
r1   container_idrA   rB   rC   rD   rE   rF   rS   rT   s
             r2   createFiles.create:   s    @ Z[gZjkll"
 d73;#7>xjQ ()>X=CVTVXzz<./ '9'J'JK(+Q[ '  
 	
r5   rQ   c          
         U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS9[        S9$ )  
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
rI   6Expected a non-empty value for `file_id` but received rO   /files/rQ   rU   rV   rW   _getr#   r(   r1   rB   r]   rC   rD   rE   rF   s          r2   retrieveFiles.retrieveq   sm    0 Z[gZjkllUV]U`abbyy<.y9(+Q[ )  
 	
r5   afterlimitorderrC   rD   rE   rF   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        UUUU[        UUUS.[        R                  5      S9[        S9$ 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
rI   rO   rP   )rk   rl   rm   )rC   rD   rE   rF   query)pagerU   model)rW   _get_api_listr    r&   r#   r   r$   FileListParams	r1   r]   rk   rl   rm   rC   rD   rE   rF   s	            r2   list
Files.list   s    L Z[gZjkll!!<./ 01(+'%%!&!&!&
 %33 ## " 
 	
r5   c          
         U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  SU SU 3[        X4XVS9[        S9$ )	  
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
rI   rb   Accept*/*rO   rc   rQ   rd   rW   _deleter#   r   rg   s          r2   deleteFiles.delete   s    0 Z[gZjkllUV]U`abb!5B]-@bB||<.y9(+Q[   
 	
r5    )returnr
   )r   r8   )r   r=   r]   rX   rA   zFileTypes | NotGivenrB   str | NotGivenrC   Headers | NonerD   Query | NonerE   Body | NonerF   'float | httpx.Timeout | None | NotGivenr   r'   rB   rX   r]   rX   rC   r   rD   r   rE   r   rF   r   r   r(   )r]   rX   rk   r   rl   int | NotGivenrm   !Literal['asc', 'desc'] | NotGivenrC   r   rD   r   rE   r   rF   r   r   z SyncCursorPage[FileListResponse]rB   rX   r]   rX   rC   r   rD   r   rE   r   rF   r   r   None__name__
__module____qualname____firstlineno__r   r3   r9   r>   r   r^   rh   rv   r~   __static_attributes__r   r5   r2   r)   r)   "   s   % % * * 0 0 &/"+ )-$("&;D5
5
 #	5

  5
 &5
 "5
  5
 95
 
5
| )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P !* )3< )-$("&;D:
:
 	:

 :
 1:
 &:
 ":
  :
 9:
 
*:
F )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r5   c                  .   \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\SSS\S.               SS jjr	SSS\S.             SS	 jjr
\\\SSS\S
.                 SS jjrSSS\S.             SS jjrSrg)r*      c                ,    [        U R                  5      $ r.   )r   r/   r0   s    r2   r3   AsyncFiles.content   s    DLL))r5   c                    [        U 5      $ r7   )AsyncFilesWithRawResponser0   s    r2   r9   AsyncFiles.with_raw_response   s     )..r5   c                    [        U 5      $ r<   )AsyncFilesWithStreamingResponser0   s    r2   r>   "AsyncFiles.with_streaming_response  s     /t44r5   Nr@   c               \  #    U(       d  [        SU< 35      e[        UUS.5      n[        [        [        [
        [        4   U5      S//S9n	SS0U=(       d    0 EnU R                  SU S3[        U[        R                  5      I S	h  vN U	[        XEXgS
9[        S9I S	h  vN $  N N7f)rH   rI   rJ   rA   rK   rM   rN   rO   rP   NrQ   rR   )rW   r   r   r   r   rX   rY   rZ   r   r%   r[   r#   r'   r\   s
             r2   r^   AsyncFiles.create  s     @ Z[gZjkll"
 d73;#7>xjQ ()>X=CVTVXZZ<./,T3E3V3VWW(+Q[ '   
 
 	
W
s$   BB,
B(
B,#B*$B,*B,rQ   c          
        #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS9[        S9I Sh  vN $  N7f)ra   rI   rb   rO   rc   rQ   rd   Nre   rg   s          r2   rh   AsyncFiles.retrieveF  sz     0 Z[gZjkllUV]U`abbYY<.y9(+Q[ )  
 
 	
 
s   AAAArj   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        UUUU[        UUUS.[        R                  5      S9[        S9$ ro   )rW   rs   r!   r&   r#   r   r$   rt   ru   s	            r2   rv   AsyncFiles.listj  s    L Z[gZjkll!!<./ !12(+'%%!&!&!&
 %33 ## " 
 	
r5   c          
        #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  SU SU 3[        X4XVS9[        S9I S	h  vN $  N7f)
ry   rI   rb   rz   r{   rO   rc   rQ   rd   Nr|   rg   s          r2   r~   AsyncFiles.delete  s     0 Z[gZjkllUV]U`abb!5B]-@bB\\<.y9(+Q[  " 
 
 	
 
s   A"A+$A)%A+r   )r   r   )r   r   )r   r   r   r   )r]   rX   rk   r   rl   r   rm   r   rC   r   rD   r   rE   r   rF   r   r   zCAsyncPaginator[FileListResponse, AsyncCursorPage[FileListResponse]]r   r   r   r5   r2   r*   r*      s   * * / / 5 5 &/"+ )-$("&;D5
5
 #	5

  5
 &5
 "5
  5
 95
 
5
| )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P !* )3< )-$("&;D:
:
 	:

 :
 1:
 &:
 ":
  :
 9:
 
M:
F )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r5   c                  2    \ rS rSrSS jr\SS j5       rSrg)r8   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r.   )_filesr   to_raw_response_wrapperr^   rh   rv   r~   r1   rT   s     r2   __init__FilesWithRawResponse.__init__  sq    &>>LL
 )@@NN
 %<<JJ
	 '>>LL
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   FilesWithRawResponse.content  s    %dkk&9&9::r5   r   r^   r~   rv   rh   NrT   r)   r   r   )r   r   r   r   r   r   r   r   r3   r   r   r5   r2   r8   r8     s    
  ; ;r5   r8   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r.   )r   r   async_to_raw_response_wrapperr^   rh   rv   r~   r   s     r2   r   "AsyncFilesWithRawResponse.__init__  sq    &DDLL
 )FFNN
 %BBJJ
	 'DDLL
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   !AsyncFilesWithRawResponse.content  s    *4;;+>+>??r5   r   NrT   r*   r   r   )r   r   r   r   r5   r2   r   r     s    
  @ @r5   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)r=   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r.   )r   r   r^   rh   rv   r~   r   s     r2   r   #FilesWithStreamingResponse.__init__  sY    2LL
 5NN
 1JJ
	 3LL
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   "FilesWithStreamingResponse.content	  s    +DKK,?,?@@r5   r   Nr   )r   r   r   r   r5   r2   r=   r=     s    
  A Ar5   r=   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r.   )r   r   r^   rh   rv   r~   r   s     r2   r   (AsyncFilesWithStreamingResponse.__init__  sY    8LL
 ;NN
 7JJ
	 9LL
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   'AsyncFilesWithStreamingResponse.content  s    01D1DEEr5   r   Nr   )r   r   r   r   r5   r2   r   r     s    
  F Fr5   r   )<
__future__r   typingr   r   typing_extensionsr   httpx r   r3   r
   r   r   r   r   r   _typesr   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*   r8   r   r=   r   r   r5   r2   <module>r      s    #   %  !  V U U ^ ^ ' ; Z : A E D H LL
!R
O R
jR
! R
j; ;,@ @,A A,F Fr5   