
    _i2R                       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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/J0r0  SSK1J2r2  SSK3J4r4  SSK5J6r6  SS/r7 " S S\#5      r8 " S S\$5      r9 " 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)	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                  .   \ 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    c/var/www/html/land-ocr/venv/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
)FilesWithRawResponser2   s    r4   with_raw_responseFiles.with_raw_response'   s     $D))r7   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
)FilesWithStreamingResponser2   s    r4   with_streaming_responseFiles.with_streaming_response1   s     *$//r7   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 rC   rD   rC   pathsContent-Typemultipart/form-data/containers//filesrE   rF   rG   rH   bodyfilesoptionscast_to)
ValueErrorr   r   r   r   strobject_postr   r'   FileCreateParamsr%   r)   
r3   container_idrC   rD   rE   rF   rG   rH   rU   rV   s
             r4   createFiles.create:   s    @ Z[gZjkll"
 d73;#7>xjQ ()>X=CVTVXzz<./ '9'J'JK(+Q[ '  
 	
r7   rS   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
rK   6Expected a non-empty value for `file_id` but received rQ   /files/rS   rW   rX   rY   _getr%   r*   r3   rD   r_   rE   rF   rG   rH   s          r4   retrieveFiles.retrieveq   sm    0 Z[gZjkllUV]U`abbyy<.y9(+Q[ )  
 	
r7   afterlimitorderrE   rF   rG   rH   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
rK   rQ   rR   )rm   rn   ro   )rE   rF   rG   rH   query)pagerW   model)rY   _get_api_listr"   r(   r%   r   r&   FileListParams	r3   r_   rm   rn   ro   rE   rF   rG   rH   s	            r4   list
Files.list   s    L Z[gZjkll!!<./ 01(+'%%!&!&!&
 %33 ## " 
 	
r7   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
rK   rd   Accept*/*rQ   re   rS   rf   rY   _deleter%   r   ri   s          r4   deleteFiles.delete   s    0 Z[gZjkllUV]U`abb!5B]-@bB||<.y9(+Q[   
 	
r7    )returnr
   )r   r:   )r   r?   r_   rZ   rC   zFileTypes | OmitrD   
str | OmitrE   Headers | NonerF   Query | NonerG   Body | NonerH   'float | httpx.Timeout | None | NotGivenr   r)   rD   rZ   r_   rZ   rE   r   rF   r   rG   r   rH   r   r   r*   )r_   rZ   rm   r   rn   
int | Omitro   Literal['asc', 'desc'] | OmitrE   r   rF   r   rG   r   rH   r   r   z SyncCursorPage[FileListResponse]rD   rZ   r_   rZ   rE   r   rF   r   rG   r   rH   r   r   None__name__
__module____qualname____firstlineno__r   r5   r;   r@   r   r   r`   rj   rx   r   __static_attributes__r   r7   r4   r+   r+   "   s   % % * * 0 0 "&" )-$("&;D5
5
 	5

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

 :
 -:
 &:
 ":
  :
 9:
 
*:
F )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r7   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      $ r0   )r   r1   r2   s    r4   r5   AsyncFiles.content   s    DLL))r7   c                    [        U 5      $ r9   )AsyncFilesWithRawResponser2   s    r4   r;   AsyncFiles.with_raw_response   s     )..r7   c                    [        U 5      $ r>   )AsyncFilesWithStreamingResponser2   s    r4   r@   "AsyncFiles.with_streaming_response  s     /t44r7   NrB   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)rJ   rK   rL   rC   rM   rO   rP   rQ   rR   NrS   rT   )rY   r   r   r   r   rZ   r[   r\   r   r'   r]   r%   r)   r^   s
             r4   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,rS   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)rc   rK   rd   rQ   re   rS   rf   Nrg   ri   s          r4   rj   AsyncFiles.retrieveF  sz     0 Z[gZjkllUV]U`abbYY<.y9(+Q[ )  
 
 	
 
s   AAAArl   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$ rq   )rY   ru   r#   r(   r%   r   r&   rv   rw   s	            r4   rx   AsyncFiles.listj  s    L Z[gZjkll!!<./ !12(+'%%!&!&!&
 %33 ## " 
 	
r7   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)
r{   rK   rd   r|   r}   rQ   re   rS   rf   Nr~   ri   s          r4   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_   rZ   rm   r   rn   r   ro   r   rE   r   rF   r   rG   r   rH   r   r   zCAsyncPaginator[FileListResponse, AsyncCursorPage[FileListResponse]]r   r   r   r7   r4   r,   r,      s   * * / / 5 5 "&" )-$("&;D5
5
 	5

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

 :
 -:
 &:
 ":
  :
 9:
 
M:
F )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r7   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 r0   )_filesr   to_raw_response_wrapperr`   rj   rx   r   r3   rV   s     r4   __init__FilesWithRawResponse.__init__  sq    &>>LL
 )@@NN
 %<<JJ
	 '>>LL
r7   c                @    [        U R                  R                  5      $ r0   )r   r   r5   r2   s    r4   r5   FilesWithRawResponse.content  s    %dkk&9&9::r7   r   r`   r   rx   rj   NrV   r+   r   r   )r   r   r   r   r   r   r   r   r5   r   r   r7   r4   r:   r:     s    
  ; ;r7   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 r0   )r   r   async_to_raw_response_wrapperr`   rj   rx   r   r   s     r4   r   "AsyncFilesWithRawResponse.__init__  sq    &DDLL
 )FFNN
 %BBJJ
	 'DDLL
r7   c                @    [        U R                  R                  5      $ r0   )r   r   r5   r2   s    r4   r5   !AsyncFilesWithRawResponse.content  s    *4;;+>+>??r7   r   NrV   r,   r   r   )r   r   r   r   r7   r4   r   r     s    
  @ @r7   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 r0   )r   r    r`   rj   rx   r   r   s     r4   r   #FilesWithStreamingResponse.__init__  sY    2LL
 5NN
 1JJ
	 3LL
r7   c                @    [        U R                  R                  5      $ r0   )r   r   r5   r2   s    r4   r5   "FilesWithStreamingResponse.content	  s    +DKK,?,?@@r7   r   Nr   )r   r   r   r   r7   r4   r?   r?     s    
  A Ar7   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 r0   )r   r!   r`   rj   rx   r   r   s     r4   r   (AsyncFilesWithStreamingResponse.__init__  sY    8LL
 ;NN
 7JJ
	 9LL
r7   c                @    [        U R                  R                  5      $ r0   )r   r   r5   r2   s    r4   r5   'AsyncFilesWithStreamingResponse.content  s    01D1DEEr7   r   Nr   )r   r   r   r   r7   r4   r   r     s    
  F Fr7   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,   r:   r   r?   r   r   r7   r4   <module>r      s    #   %  !  b a a ^ ^ ' ; Z : A E D H LL
!R
O R
jR
! R
j; ;,@ @,A A,F Fr7   