
    _jW                       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  SS
KJrJr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K0J1r1J2r2  SSK3J4r4  SSK5J6r6  SSK7J8r8  SS/r9 " S S\%5      r: " S S\&5      r; " S S5      r< " S S5      r= " S S5      r> " S S 5      r?g)!    )annotations)Mappingcast)LiteralN   )_legacy_response   )ContentAsyncContentContentWithRawResponseAsyncContentWithRawResponseContentWithStreamingResponse!AsyncContentWithStreamingResponse)deepcopy_with_paths)	BodyOmitQueryHeadersNoneTypeNotGiven	FileTypesomit	not_given)extract_filespath_templatemaybe_transform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    \/home/rurouni/.local/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
)FilesWithRawResponser3   s    r5   with_raw_responseFiles.with_raw_response(   s     $D))r8   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
)FilesWithStreamingResponser3   s    r5   with_streaming_responseFiles.with_streaming_response2   s     *$//r8   Nfilefile_idextra_headersextra_query
extra_bodytimeoutc               R   U(       d  [        SU< 35      e[        UUS.S//5      n[        [        [        [
        [        4   U5      S//S9n	U	(       a  SS0U=(       d    0 EnU R                  [        SUS9[        U[        R                  5      U	[        UUUUS	S
0S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 rD   rE   rD   pathsContent-Typemultipart/form-data /containers/{container_id}/filescontainer_idbearer_authTrF   rG   rH   rI   securitybodyfilesoptionscast_to)
ValueErrorr   r   r   r   strobject_postr   r   r(   FileCreateParamsr&   r*   
r4   rT   rD   rE   rF   rG   rH   rI   rY   rZ   s
             r5   createFiles.create;   s    @ Z[gZjkll"" XJ
 d73;#7>xjQ ,-B\}GZXZ\Mzz<<X '9'J'JK(+'%'. '  
 	
r8   rF   rG   rH   rI   c                   U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  [        SX!S9[        UUUUSS0S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
rL   6Expected a non-empty value for `file_id` but received */containers/{container_id}/files/{file_id}rT   rE   rU   TrV   r[   r\   r]   _getr   r&   r+   r4   rE   rT   rF   rG   rH   rI   s          r5   retrieveFiles.retrievex   sw    0 Z[gZjkllUV]U`abbyyFUas(+'%'. )  

 
	
r8   afterlimitorderrF   rG   rH   rI   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU[        UUUS.[        R                  5      SS0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
rL   rR   rS   )rr   rs   rt   rU   T)rF   rG   rH   rI   queryrW   )pager[   model)	r]   _get_api_listr   r#   r)   r&   r   r'   FileListParams	r4   rT   rr   rs   rt   rF   rG   rH   rI   s	            r5   list
Files.list   s    L Z[gZjkll!!<<X 01(+'%%!&!&!&
 %33 (. #% " 
 	
r8   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X!S9[        UUUUSS0S	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
rL   rh   Accept*/*ri   rj   rU   TrV   rk   r]   _deleter   r&   r   rn   s          r5   deleteFiles.delete   s    0 Z[gZjkllUV]U`abb!5B]-@bB||FUas(+'%'.   

 
	
r8    )returnr
   )r   r;   )r   r@   rT   r^   rD   zFileTypes | OmitrE   
str | OmitrF   Headers | NonerG   Query | NonerH   Body | NonerI   'float | httpx.Timeout | None | NotGivenr   r*   rE   r^   rT   r^   rF   r   rG   r   rH   r   rI   r   r   r+   )rT   r^   rr   r   rs   
int | Omitrt   Literal['asc', 'desc'] | OmitrF   r   rG   r   rH   r   rI   r   r   z SyncCursorPage[FileListResponse]rE   r^   rT   r^   rF   r   rG   r   rH   r   rI   r   r   None__name__
__module____qualname____firstlineno__r   r6   r<   rA   r   r   rc   ro   r}   r   __static_attributes__r   r8   r5   r,   r,   #   s   % % * * 0 0 "&" )-$("&;D;
;
 	;

 ;
 &;
 ";
  ;
 9;
 
;
H )-$("&;D&
&
 	&
 &&
 "&
  &
 9&
 
&
X ! /3 )-$("&;D;
;
 	;

 ;
 -;
 &;
 ";
  ;
 9;
 
*;
H )-$("&;D'
'
 	'
 &'
 "'
  '
 9'
 
'
 '
r8   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-   i  c                ,    [        U R                  5      $ r1   )r   r2   r3   s    r5   r6   AsyncFiles.content  s    DLL))r8   c                    [        U 5      $ r:   )AsyncFilesWithRawResponser3   s    r5   r<   AsyncFiles.with_raw_response  s     )..r8   c                    [        U 5      $ r?   )AsyncFilesWithStreamingResponser3   s    r5   rA   "AsyncFiles.with_streaming_response  s     /t44r8   NrC   c                 #    U(       d  [        SU< 35      e[        UUS.S//5      n[        [        [        [
        [        4   U5      S//S9n	U	(       a  SS0U=(       d    0 EnU R                  [        SUS9[        U[        R                  5      I S	h  vN U	[        UUUUS
S0S9[        S9I S	h  vN $  N" N7f)rK   rL   rM   rD   rN   rP   rQ   rR   rS   NrU   TrV   rX   )r]   r   r   r   r   r^   r_   r`   r   r   r(   ra   r&   r*   rb   s
             r5   rc   AsyncFiles.create  s     @ Z[gZjkll"" XJ
 d73;#7>xjQ ,-B\}GZXZ\MZZ<<X,T3E3V3VWW(+'%'. '   
 
 	
W
s$   BB?B;
B?6B=7B?=B?re   c                  #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  [        SX!S9[        UUUUSS0S9[        S9I S	h  vN $  N7f)
rg   rL   rh   ri   rj   rU   TrV   rk   Nrl   rn   s          r5   ro   AsyncFiles.retrieve\  s     0 Z[gZjkllUV]U`abbYYFUas(+'%'. )  

 

 
	
 

s   AA#A!A#rq   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU[        UUUS.[        R                  5      SS0S9[        S9$ rv   )	r]   rz   r   r$   r)   r&   r   r'   r{   r|   s	            r5   r}   AsyncFiles.list  s    L Z[gZjkll!!<<X !12(+'%%!&!&!&
 %33 (. #% " 
 	
r8   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X!S9[        UUUUSS0S	9[        S
9I Sh  vN $  N7f)r   rL   rh   r   r   ri   rj   rU   TrV   rk   Nr   rn   s          r5   r   AsyncFiles.delete  s     0 Z[gZjkllUV]U`abb!5B]-@bB\\FUas(+'%'.  " 

 

 
	
 

s   A)A2+A0,A2r   )r   r   )r   r   )r   r   r   r   )rT   r^   rr   r   rs   r   rt   r   rF   r   rG   r   rH   r   rI   r   r   zCAsyncPaginator[FileListResponse, AsyncCursorPage[FileListResponse]]r   r   r   r8   r5   r-   r-     s   * * / / 5 5 "&" )-$("&;D;
;
 	;

 ;
 &;
 ";
  ;
 9;
 
;
H )-$("&;D&
&
 	&
 &&
 "&
  &
 9&
 
&
X ! /3 )-$("&;D;
;
 	;

 ;
 -;
 &;
 ";
  ;
 9;
 
M;
H )-$("&;D'
'
 	'
 &'
 "'
  '
 9'
 
'
 '
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 r1   )_filesr   to_raw_response_wrapperrc   ro   r}   r   r4   rZ   s     r5   __init__FilesWithRawResponse.__init__  sq    &>>LL
 )@@NN
 %<<JJ
	 '>>LL
r8   c                @    [        U R                  R                  5      $ r1   )r   r   r6   r3   s    r5   r6   FilesWithRawResponse.content  s    %dkk&9&9::r8   r   rc   r   r}   ro   NrZ   r,   r   r   )r   r   r   r   r   r   r   r   r6   r   r   r8   r5   r;   r;     s    
  ; ;r8   r;   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 r1   )r   r   async_to_raw_response_wrapperrc   ro   r}   r   r   s     r5   r   "AsyncFilesWithRawResponse.__init__  sq    &DDLL
 )FFNN
 %BBJJ
	 'DDLL
r8   c                @    [        U R                  R                  5      $ r1   )r   r   r6   r3   s    r5   r6   !AsyncFilesWithRawResponse.content  s    *4;;+>+>??r8   r   NrZ   r-   r   r   )r   r   r   r   r8   r5   r   r     s    
  @ @r8   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 r1   )r   r!   rc   ro   r}   r   r   s     r5   r   #FilesWithStreamingResponse.__init__  sY    2LL
 5NN
 1JJ
	 3LL
r8   c                @    [        U R                  R                  5      $ r1   )r   r   r6   r3   s    r5   r6   "FilesWithStreamingResponse.content(  s    +DKK,?,?@@r8   r   Nr   )r   r   r   r   r8   r5   r@   r@     s    
  A Ar8   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 r1   )r   r"   rc   ro   r}   r   r   s     r5   r   (AsyncFilesWithStreamingResponse.__init__.  sY    8LL
 ;NN
 7JJ
	 9LL
r8   c                @    [        U R                  R                  5      $ r1   )r   r   r6   r3   s    r5   r6   'AsyncFilesWithStreamingResponse.content>  s    01D1DEEr8   r   Nr   )r   r   r   r   r8   r5   r   r   -  s    
  F Fr8   r   )@
__future__r   typingr   r   typing_extensionsr   httpx r   r6   r
   r   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-   r;   r   r@   r   r   r8   r5   <module>r      s    #   %  !  + a a a [ [ ' ; Z : A E D H LL
!a
O a
Ha
! a
H; ;,@ @,A A,F Fr8   