+
    Ti                        ^ RI t ^ RIt^ RIt^ RIt^ RIHtHtHt ^ RIH	t	 ^ RI
t^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHtHt ]P6                  ! R4      tR&R R lltR&R R lltR&R R lltR&R R llt R&R R llt!R&R R llt"R&R R llt#R&R R llt$R&R R llt%R&R  R! llt& ! R" R#]PN                  4      t( ! R$ R%]PN                  4      t)R# )'    N)AnyOptionalUnion)	urlencode)_api_client)_api_module)_common)_extra_utils)_transformers)types)get_value_by_path)set_value_by_path)
AsyncPagerPagerzgoogle_genai.filesc                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /#    from_objectparent_objectreturnr   dictstrr   objectr   )formats   "]/home/kuhnn/.local/share/uv/tools/nano-pdf/lib/python3.14/site-packages/google/genai/files.py__annotate__r   )   M      tCH~v-.DcN+ 
#s(^    c                 Z    / p\        V R .4      e   \        VR .\        V R .4      4       V# )filegetvsetvr   r   	to_objects   && r   _CreateFileParameters_to_mldevr'   )   5     !)	+x ,VHd;9:	r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   4   M     
 
tCH~v-.
DcN+
 
#s(^
r   c                 Z    / p\        V R .4      e   \        VR.\        V R .4      4       V# sdkHttpResponsesdk_http_responser"   r%   s   && r   _CreateFileResponse_from_mldevr/   4   @     !)	+)*+7'(${=N<O*P 
r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   A   r*   r   c           
          / p\        V R .4      e/   \        VRR.\        P                  ! \        V R .4      4      4       V# name_urlr!   r#   r$   tt_file_namer%   s   && r   _DeleteFileParameters_to_mldevr9   A   F     !)	+x ,FF#Q]]4fX3N%O 
r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   N   r*   r   c                 Z    / p\        V R .4      e   \        VR.\        V R .4      4       V# r,   r"   r%   s   && r   _DeleteFileResponse_from_mldevr=   N   r0   r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   [   r*   r   c           
          / p\        V R .4      e/   \        VRR.\        P                  ! \        V R .4      4      4       V# r3   r6   r%   s   && r   _GetFileParameters_to_mldevr@   [   r:   r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   h   r   r   c                 Z    / p\        V R .4      e   \        VR .\        V R .4      4       V# )urisr"   r%   s   && r   )_InternalRegisterFilesParameters_to_mldevrD   h   r(   r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r   s   sM      tCH~v-.DcN+ 
#s(^r   c                     / p\        V R .4      e   \        VRR.\        V R .4      4       \        V R.4      e   \        VRR.\        V R.4      4       V# )	page_size_querypageSize
page_token	pageTokenr"   r%   s   && r   _ListFilesConfig_to_mldevrL   s   sm     !)	+}%1*-tK+/O 
+~&2	;[<.) 
r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r      r   r   c                 V    / p\        V R .4      e   \        \        V R .4      V4       V# config)r#   rL   r%   s   && r   _ListFilesParameters_to_mldevrQ      s1     !)	+z".d;
;YG	r   c                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r      sM      tCH~v-.DcN+ 
#s(^r   c                 "   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e)   \        TR.\        V R.4       Uu. uF  q3NK  	  up4       V# u upi )r-   r.   nextPageTokennext_page_tokenfilesr"   r   r   r&   items   &&  r   _ListFilesResponse_from_mldevrY      s     !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+y!-WIkG91MN1M1MNO	  Os   9
Bc                    V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\        \        \        3,          /# r   r   )r   s   "r   r   r      sM      tCH~v-.DcN+ 
#s(^r   c                     / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e)   \        TR.\        V R.4       Uu. uF  q3NK  	  up4       V# u upi )r-   r.   rV   r"   rW   s   &&  r   !_RegisterFilesResponse_from_mldevr\      s}     !)	+)*+7'(${=N<O*P 
+y!-WIkG91MN1M1MNO	  Os   
A$c                   
  a  ] tR t^t o RR/V 3R lR lltRR/V 3R lR lltRR/V 3R lR lltRR/V 3R	 lR
 lltRR/V 3R lR lltRR/V 3R lR llt	RR/V 3R lR llt
RR/V 3R lR lltRR/V 3R lR lltRtV tR# )FilesrP   Nc                ^   < V ^8  d   QhRS[ S[P                  ,          RS[P                  /# r   rP   r   r   r   ListFilesConfigOrDictListFilesResponse)r   __classdict__s   "r   r   Files.__annotate__   s.     2 2 ; ;<22r   c               
   \         P                  ! VR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWSV4      pVP                   '       g   / M\"        P$                  ! VP                   4      p	V P                  P                  '       g   \'        V	4      p	\         P(                  P+                  WP-                  4       R	7      p
\         P.                  ! VP0                  R
7      V
n        V P                  P5                  V
4       V
# rO   =This method is only supported in the Gemini Developer client.r5   rV   rH   ?rP   Ngetresponsekwargsheaders)r   _ListFilesParametersr   vertexai
ValueErrorrQ   rj   
format_mapr   poprP   http_optionsr	   convert_to_dictencode_unserializable_typesrequestbodyjsonloadsrY   rc   _from_response
model_dumpHttpResponsero   r.   _verify_responseselfrP   parameter_modelrequest_dictrequest_url_dictpathquery_paramsru   rl   response_dictreturn_values   &$         r   _listFiles._list   s    00O
    
I  3?Cl%))&1	!!"23##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmmBHMM1JM$$$3MBm**99'A'A'C : L &+%7%7  &L" 	%%l3r   c                x   < V ^8  d   QhRS[ P                  RS[S[ P                  ,          RS[ P                  /# r   r!   rP   r   r   
FileOrDictr   CreateFileConfigOrDictCreateFileResponse)r   rd   s   "r   r   re      B     = = = u334	=
 =r   c               V   \         P                  ! VVR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWdV4      p	VeH   \!        VR	R4      '       d5   \         P"                  ! V	R
7      p
V P                  P%                  V
4       V
# V	P&                  '       g   / M\(        P*                  ! V	P&                  4      pV P                  P                  '       g   \-        V4      p\         P"                  P/                  WP1                  4       R7      p
V P                  P%                  V
4       V
# r!   rP   rh   r5   zupload/v1beta/filesrH   ri   rP   Npostshould_return_http_responser.   rk   )r   _CreateFileParametersr   rq   rr   r'   rj   rs   r   rt   rP   ru   r	   rv   rw   rx   getattrr   r   ry   rz   r{   r/   r|   r}   r   r!   rP   r   r   r   r   r   ru   rl   r   r   s   &$$         r   _createFiles._create   s    11O    
I  4ODl%))&1	$//0@A$##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH g-t  --Il
''5&mmmBHMM1JM$$$4]Cm++::'A'A'C ; L 	%%l3r   c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r   r4   rP   r   r   r   r   GetFileConfigOrDictFile)r   rd   s   "r   r   re   +  s4     ? ??"*5+D+D"E?zz?r   c               r   \         P                  ! VVR7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  R	WdV4      p	V	P                   '       g   / M\"        P$                  ! V	P                   4      p
\         P&                  P)                  WP+                  4       R
7      pV P                  P-                  V4       V# )aA  Retrieves the file information from the service.

Args:
  name (str): The name identifier for the file to retrieve.
  config (GetFileConfig): Optional, configuration for the get method.

Returns:
  File: The file information.

Usage:

.. code-block:: python

  file = client.files.get(name='files/...')
  print(file.uri)
r4   rP   rh   r5   files/{file}rH   ri   rP   Nrj   rk   )r   _GetFileParametersr   rq   rr   r@   rj   rs   r   rt   rP   ru   r	   rv   rw   rx   ry   rz   r{   r   r|   r}   r   r   r4   rP   r   r   r   r   r   ru   rl   r   r   s   &$$         r   rj   	Files.get+  sx   ( ..O    
I  1Al%))&1	(()9:##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmmBHMM1JM::,,'A'A'C - L 	%%l3r   c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r   r   r   r   DeleteFileConfigOrDictDeleteFileResponse)r   rd   s   "r   r   re   l  ;     E EE"*5+G+G"HEEr   c                  \         P                  ! VVR7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  R	WdV4      p	V	P                   '       g   / M\"        P$                  ! V	P                   4      p
V P                  P                  '       g   \'        V
4      p
\         P(                  P+                  WP-                  4       R
7      p\         P.                  ! V	P0                  R7      Vn        V P                  P5                  V4       V# )a9  Deletes a remotely stored file.

Args:
  name (str): The name identifier for the file to delete.
  config (DeleteFileConfig): Optional, configuration for the delete method.

Returns:
  DeleteFileResponse: The response for the delete method

Usage:

.. code-block:: python

  client.files.delete(name='files/...')
r   rh   r5   r   rH   ri   rP   Ndeleterk   rn   )r   _DeleteFileParametersr   rq   rr   r9   rj   rs   r   rt   rP   ru   r	   rv   rw   rx   ry   rz   r{   r=   r   r|   r}   r~   ro   r.   r   r   s   &$$         r   r   Files.deletel  s   & 11O    
I  4ODl%))&1	(()9:##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''$lH 'mmmBHMM1JM$$$4]Cm++::'A'A'C ; L &+%7%7  &L" 	%%l3r   c                t   < V ^8  d   QhRS[ S[,          RS[S[P                  ,          RS[P
                  /# r   rC   rP   r   listr   r   r   RegisterFilesConfigOrDictRegisterFilesResponse)r   rd   s   "r   r   re     @     = = I= u667	=
 ""=r   c               V   \         P                  ! VVR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWdV4      p	VeH   \!        VR	R4      '       d5   \         P"                  ! V	R
7      p
V P                  P%                  V
4       V
# V	P&                  '       g   / M\(        P*                  ! V	P&                  4      pV P                  P                  '       g   \-        V4      p\         P"                  P/                  WP1                  4       R7      p
V P                  P%                  V
4       V
# rC   rP   rh   r5   zfiles:registerrH   ri   rP   Nr   r   r   rk   )r    _InternalRegisterFilesParametersr   rq   rr   rD   rj   rs   r   rt   rP   ru   r	   rv   rw   rx   r   r   r   ry   rz   r{   r\   r|   r}   r   rC   rP   r   r   r   r   r   ru   rl   r   r   s   &$$         r   _register_filesFiles._register_files  s    <<O    
I  ?Ol%))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH g-t  008Ll
''5&mmmBHMM1JM$$$7Fm..=='A'A'C > L 	%%l3r   c                   < V ^8  d   QhRS[ S[S[P                  S[,          S[P
                  3,          RS[S[P                  ,          RS[P                  /# r   
r   r   osPathLikeioIOBaser   r   UploadFileConfigOrDictr   )r   rd   s   "r   r   re     sX     J J #r{{3'23J u334	J
 zzJr   c               P   V P                   P                  '       d   \        R4      h\        P                  ! 4       pV'       dh   \        V\        4      '       d   \        P                  ! R/ VB pMTp\        P                  ! VP                  VP                  VP                  R7      pM\        P                  ! 4       pVP                  e6   VP                  P                  R4      '       g   RVP                   2Vn	        \        P                  ! VVP                  VP                  R7      w  rVpWdn        Wtn        V P!                  V\        P"                  ! VRR7      R7      pVP$                  e4   VP$                  P&                  e   RVP$                  P&                  9  d   \)        R	4      hVP$                  P&                  R,          p	\        V\*        P,                  4      '       d*   V P                   P/                  WVP                  VR
7      p
M>\0        P2                  ! V4      pV P                   P/                  WVP                  VR
7      p
\        P                  P5                  V
P6                  R,          V'       d   VP9                  4       R7      # / R7      # )a  Calls the API to upload a file using a supported file service.

Args:
  file: A path to the file or an `IOBase` object to be uploaded. If it's an
    IOBase object, it must be opened in blocking (the default) mode and
    binary mode. In other words, do not use non-blocking mode or text mode.
    The given stream must be seekable, that is, it must be able to call
    `seek()` on 'path'.
  config: Optional parameters to set `diplay_name`, `mime_type`, and `name`.
rh   	mime_typer4   display_namefiles/user_http_optionsuser_mime_typeTru   r   r   x-goog-upload-urlPFailed to create file. Upload URL did not returned from the create file request.ru   r!   rk    )r   rq   rr   r   UploadFileConfig
isinstancer   r   r   r4   r   
startswithr
   prepare_resumable_uploadru   
size_bytesr   CreateFileConfigr.   ro   KeyErrorr   r   upload_filer   fspathr|   rz   r}   r   r!   rP   config_modelfile_objru   r   r   rl   
upload_urlreturn_filefs_paths   &$$         r   uploadFiles.upload  s@        
I  ))+L	FD	!	!--77 **  #00h h}} )A)A()K)Kx}}o.hm*6*O*O&33#--+'Li
 %"||%%%4
  H 	""*%%--5h&@&@&H&HH  ++334GHJ$		""$$00
H//l 1 k 		$g$$00
x22 1 k ::$$!!&),2|&&( %  8: %  r   c                   < V ^8  d   QhRS[ S[S[P                  S[P                  S[P
                  3,          RS[S[P                  ,          RS[/# r   )	r   r   r   r   VideoGeneratedVideor   DownloadFileConfigOrDictbytes)r   rd   s   "r   r   re   >  sW     O O #uzz5;;0D0DDEO u556	O
 Or   c                  V P                   P                  '       d   \        R4      hRpV'       d0   \        V\        4      '       d   \
        P                  ! R/ VB pMTp\        V\
        P                  4      '       d   VP                  f   \        R4      h\        P                  ! V4      pRV R2pRR/pV R\        V4       2pRp\        VR	.4      e   \        VR	.4      pV P                   P                  VVR
7      p\        V\
        P                  4      '       d	   Wn        V# \        V\
        P                   4      '       d   VP"                  e   WP"                  n        V# )a
  Downloads a file's data from storage.

Files created by `upload` can't be downloaded. You can tell which files are
downloadable by checking the `source` or `download_uri` property.

Note: This method returns the data as bytes. For `Video` and
`GeneratedVideo` objects there is an additional side effect, that it also
sets the `video_bytes` property on the `Video` object.

Args:
  file (str): A file name, uri, or file object. Identifying which file to
    download.
  config (DownloadFileConfigOrDict): Optional, configuration for the get
    method.

Returns:
  File: The file data as bytes.

Usage:

.. code-block:: python

  for file client.files.list():
    if file.download_uri is not None:
      break
  else:
    raise ValueError('No files found with a `download_uri`.')
  data = client.files.download(file=file)
  # data = client.files.download(file=file.name)
  # data = client.files.download(file=file.download_uri)

  video = types.Video(uri=file.uri)
  video_bytes = client.files.download(file=video)
  video.video_bytes
rh   NzOnly generated files can be downloaded, uploaded files can't be downloaded. You can tell which files are downloadable by checking the `source` or `download_uri` property.r   	:downloadaltmediari   ru   r   r   )r   rq   rr   r   r   r   DownloadFileConfigr   download_urir7   r8   r   r#   download_filer   video_bytesr   video)	r   r!   rP   r   r4   r   r   ru   datas	   &$$      r   downloadFiles.download>  sT   R    
I  L	FD	!	!//9&9$

##(9(9(A5 
 ==DD6#D7#LV1Y|,-.DLL>*+7,(89l))! * D
 $$$ K 
D%..	/	/DJJ4J#jjKr   c                   < V ^8  d   QhRS[ P                  P                  P                  RS[S[,          RS[S[P                  ,          RS[P                  /# r   authrC   rP   r   
googler   credentialsCredentialsr   r   r   r   r   r   )r   rd   s   "r   r   re     sZ     : : KK##//: I	:
 u667: "":r   c                  \        V\        P                  P                  P                  4      '       g   \        R4      hVf   \        P                  ! 4       pM1\        P                  P                  V4      pVP                  RR7      pVP                  ;'       g    \        P                  ! 4       pVP                  ;'       g    / pVP                  4        UUu/ uF  w  rgVP                  4       VbK  	  ppp\        P                   ! V P                  V4      pRV 2VR&   VP"                  '       d   VP"                  VR&   WTn        WCn
        V P%                  W#R7      # u uppi )*Registers gcs files with the file service.:auth must be a google.auth.credentials.Credentials object.TdeepBearer authorizationx-goog-user-projectr   )r   r   r   r   r   rr   r   RegisterFilesConfigmodel_validate
model_copyru   HttpOptionsro   itemslowerr   get_token_from_credentialsquota_project_idr   	r   r   rC   rP   ru   ro   kvtokens	   &$$$     r   register_filesFiles.register_files  s/    dFKK33??@@
F  ~((*f((77?f  d +f&&==%*;*;*=L""((bG(/8qwwy!|G82243C3CTJE!(0GO'+'<'<g#$"&T99 9s   E$c                n   < V ^8  d   QhRS[ S[P                  ,          RS[S[P                  ,          /# r`   )r   r   rb   r   r   )r   rd   s   "r   r   re     s1       ; ;<UZZr   c               V    V P                   p\        RVV P                  VR7      V4      # )az  Lists all files from the service.

Args:
  config (ListFilesConfig): Optional, configuration for the list method.

Returns:
  A Pager object that contains one page of files. When iterating over
  the pager, it automatically fetches the next page if there are more.

Usage:

.. code-block:: python

  for file in client.files.list(config={'page_size': 10}):
    print(file.name)
rV   rO   )r   r   r   rP   list_requests   &$ r   r   
Files.list  s1    ( ::L

&
!	 r   r   __name__
__module____qualname____firstlineno__r   r   rj   r   r   r   r   r  r   __static_attributes____classdictcell__rd   s   @r   r^   r^      s     2?C2 2h= 8<	= =~?HL? ?BEKOE EN= ;?	= =~J 8<	J JXO :>	O Ob:
 ;?: :B?C  r   r^   c                   
  a  ] tR tRt o RR/V 3R lR lltRR/V 3R lR lltRR/V 3R lR	 lltRR/V 3R
 lR lltRR/V 3R lR lltRR/V 3R lR llt	RR/V 3R lR llt
RR/V 3R lR lltRR/V 3R lR lltRtV tR# )
AsyncFilesi  rP   Nc                ^   < V ^8  d   QhRS[ S[P                  ,          RS[P                  /# r`   ra   )r   rd   s   "r   r   AsyncFiles.__annotate__  s.     4 4 ; ;<44r   c               &  "   \         P                  ! VR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWSV4      G Rj  xL
 pVP                   '       g   / M\"        P$                  ! VP                   4      p	V P                  P                  '       g   \'        V	4      p	\         P(                  P+                  WP-                  4       R	7      p
\         P.                  ! VP0                  R
7      V
n        V P                  P5                  V
4       V
#  L5irg   )r   rp   r   rq   rr   rQ   rj   rs   r   rt   rP   ru   r	   rv   rw   async_requestry   rz   r{   rY   rc   r|   r}   r~   ro   r.   r   r   s   &$         r   r   AsyncFiles._list  s     00O
    
I  3?Cl%))&1	!!"23##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmmBHMM1JM$$$3MBm**99'A'A'C : L &+%7%7  &L" 	%%l3!s&   BHB,H>H?H=HA=Hc                x   < V ^8  d   QhRS[ P                  RS[S[ P                  ,          RS[ P                  /# r   r   )r   rd   s   "r   r   r"    r   r   c               r  "   \         P                  ! VVR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWdV4      G Rj  xL
 p	VeH   \!        VR	R4      '       d5   \         P"                  ! V	R
7      p
V P                  P%                  V
4       V
# V	P&                  '       g   / M\(        P*                  ! V	P&                  4      pV P                  P                  '       g   \-        V4      p\         P"                  P/                  WP1                  4       R7      p
V P                  P%                  V
4       V
#  L5ir   )r   r   r   rq   rr   r'   rj   rs   r   rt   rP   ru   r	   rv   rw   r$  r   r   r   ry   rz   r{   r/   r|   r}   r   s   &$$         r   r   AsyncFiles._create  s     11O    
I  4ODl%))&1	$//0@A$##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H g-t  --Il
''5&mmmBHMM1JM$$$4]Cm++::'A'A'C ; L 	%%l3+'   BH7B,H7?H5 A H7!=H7AH7c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r   r   )r   rd   s   "r   r   r"  D  s9     A AA"*5+D+D"EAzzAr   c                 "   \         P                  ! VVR7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  R	WdV4      G Rj  xL
 p	V	P                   '       g   / M\"        P$                  ! V	P                   4      p
\         P&                  P)                  WP+                  4       R
7      pV P                  P-                  V4       V#  L5i)aK  Retrieves the file information from the service.

Args:
  name (str): The name identifier for the file to retrieve.
  config (GetFileConfig): Optional, configuration for the get method.

Returns:
  File: The file information.

Usage:

.. code-block:: python

  file = await client.aio.files.get(name='files/...')
  print(file.uri)
r   rh   r5   r   rH   ri   rP   Nrj   rk   )r   r   r   rq   rr   r@   rj   rs   r   rt   rP   ru   r	   rv   rw   r$  ry   rz   r{   r   r|   r}   r   r   s   &$$         r   rj   AsyncFiles.getD  s    ( ..O    
I  1Al%))&1	(()9:##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmmBHMM1JM::,,'A'A'C - L 	%%l3s    BGB,G?G GA.Gc                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r   r   )r   rd   s   "r   r   r"    r   r   c               (  "   \         P                  ! VVR7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  R	WdV4      G Rj  xL
 p	V	P                   '       g   / M\"        P$                  ! V	P                   4      p
V P                  P                  '       g   \'        V
4      p
\         P(                  P+                  WP-                  4       R
7      p\         P.                  ! V	P0                  R7      Vn        V P                  P5                  V4       V#  L5i)aC  Deletes a remotely stored file.

Args:
  name (str): The name identifier for the file to delete.
  config (DeleteFileConfig): Optional, configuration for the delete method.

Returns:
  DeleteFileResponse: The response for the delete method

Usage:

.. code-block:: python

  await client.aio.files.delete(name='files/...')
r   rh   r5   r   rH   ri   rP   Nr   rk   rn   )r   r   r   rq   rr   r9   rj   rs   r   rt   rP   ru   r	   rv   rw   r$  ry   rz   r{   r=   r   r|   r}   r~   ro   r.   r   r   s   &$$         r   r   AsyncFiles.delete  s    & 11O    
I  4ODl%))&1	(()9:##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33$l H 'mmmBHMM1JM$$$4]Cm++::'A'A'C ; L &+%7%7  &L" 	%%l3!s&   BHB,H?H H=HA=Hc                t   < V ^8  d   QhRS[ S[,          RS[S[P                  ,          RS[P
                  /# r   r   )r   rd   s   "r   r   r"    r   r   c               r  "   \         P                  ! VVR 7      pV P                  P                  '       d   \	        R4      h\        V4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       d   V R\        V4       2pVP                  RR4       RpVP                  e/   VP                  P                  e   VP                  P                  p\        P                  ! V4      p\        P                  ! V4      pV P                  P                  RWdV4      G Rj  xL
 p	VeH   \!        VR	R4      '       d5   \         P"                  ! V	R
7      p
V P                  P%                  V
4       V
# V	P&                  '       g   / M\(        P*                  ! V	P&                  4      pV P                  P                  '       g   \-        V4      p\         P"                  P/                  WP1                  4       R7      p
V P                  P%                  V
4       V
#  L5ir   )r   r   r   rq   rr   rD   rj   rs   r   rt   rP   ru   r	   rv   rw   r$  r   r   r   ry   rz   r{   r\   r|   r}   r   s   &$$         r   r   AsyncFiles._register_files  s     <<O    
I  ?Ol%))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H g-t  008Ll
''5&mmmBHMM1JM$$$7Fm..=='A'A'C > L 	%%l3+r)  c                   < V ^8  d   QhRS[ S[S[P                  S[,          S[P
                  3,          RS[S[P                  ,          RS[P                  /# r   r   )r   rd   s   "r   r   r"    sX     O O #r{{3'23O u334	O
 zzOr   c               >  "   V P                   P                  '       d   \        R4      h\        P                  ! 4       pV'       dh   \        V\        4      '       d   \        P                  ! R/ VB pMTp\        P                  ! VP                  VP                  VP                  R7      pM\        P                  ! 4       pVP                  e6   VP                  P                  R4      '       g   RVP                   2Vn	        \        P                  ! VVP                  VP                  R7      w  rVpWdn        Wtn        V P!                  V\        P"                  ! VRR7      R7      G Rj  xL
 pVP$                  eO   VP$                  P&                  e7   R	VP$                  P&                  9  d'   R
VP$                  P&                  9  d   \)        R4      hR	VP$                  P&                  9   d   VP$                  P&                  R	,          p	MVP$                  P&                  R
,          p	\        V\*        P,                  4      '       d2   V P                   P/                  WVP                  VR7      G Rj  xL
 p
MF\0        P2                  ! V4      pV P                   P/                  WVP                  VR7      G Rj  xL
 p
\        P                  P5                  V
P6                  R,          V'       d   VP9                  4       R7      # / R7      #  EL L LX5i)a  Calls the API to upload a file asynchronously using a supported file service.

Args:
  file: A path to the file or an `IOBase` object to be uploaded. If it's an
    IOBase object, it must be opened in blocking (the default) mode and
    binary mode. In other words, do not use non-blocking mode or text mode.
    The given stream must be seekable, that is, it must be able to call
    `seek()` on 'path'.
  config: Optional parameters to set `diplay_name`, `mime_type`, and `name`.
rh   r   Nr   r   Tr   r   r   zX-Goog-Upload-URLr   r   r!   rk   r   )r   rq   rr   r   r   r   r   r   r   r4   r   r   r
   r   ru   r   r   r   r.   ro   r   r   r   async_upload_filer   r   r|   rz   r}   r   s   &$$         r   r   AsyncFiles.upload  s         
I  ))+L	FD	!	!--77 **  #00h h}} )A)A()K)Kx}}o.hm*6*O*O&33#--+'Li
 %"\\%%%4
 "  H 	""*%%--5x'A'A'I'II#8+E+E+M+MM   
 : : B B	B--556IJj--556IJj$		""**<<
H//l =  k 		$g**<<
x22 =  k ::$$!!&),2|&&( %  8: %  C0
sL   ALB*L2A<L.L/DL;L<ALL6L:LLLc                z   < V ^8  d   QhRS[ S[S[P                  3,          RS[S[P
                  ,          RS[/# r   )r   r   r   r   r   r   r   )r   rd   s   "r   r   r"  ^  sH     @ @ #uzz/"@ u556	@
 @r   c                 "   V P                   P                  '       d   \        R4      hRpV'       d0   \        V\        4      '       d   \
        P                  ! R
/ VB pMTp\        P                  ! V4      pRV R2pRp\        VR.4      e   \        VR.4      pRR/pV'       d   V R\        V4       2pV P                   P                  VVR	7      G Rj  xL
 pV#  L5i)a   Downloads a file's data from the file service.

The Vertex-AI implementation of the API foes not include the file service.

Files created by `upload` can't be downloaded. You can tell which files are
downloadable by checking the `download_uri` property.

Args:
  File (str): A file name, uri, or file object. Identifying which file to
    download.
  config (DownloadFileConfigOrDict): Optional, configuration for the get
    method.

Returns:
  File: The file data as bytes.

Usage:

.. code-block:: python

  for file client.files.list():
    if file.download_uri is not None:
      break
  else:
    raise ValueError('No files found with a `download_uri`.')
  data = client.files.download(file=file)
  # data = client.files.download(file=file.name)
  # data = client.files.download(file=file.uri)
rh   Nr   r   ru   r   r   ri   r   r   )r   rq   rr   r   r   r   r   r7   r8   r#   r   async_download_file)	r   r!   rP   r   r4   r   ru   r   r   s	   &$$      r   r   AsyncFiles.download^  s     F    
I  L	FD	!	!//9&9==DD6#DLL>*+7,(89l7#LvQy./0d!!55! 6  D
 Ks   1C"A4C")0C"C C"c                   < V ^8  d   QhRS[ P                  P                  P                  RS[S[,          RS[S[P                  ,          RS[P                  /# r   r   )r   rd   s   "r   r   r"    s`     !@ !@ KK##//!@ I	!@
 u667!@ ""!@r   c                 "   \        V\        P                  P                  P                  4      '       g   \        R4      hVf   \        P                  ! 4       pM1\        P                  P                  V4      pVP                  RR7      pVP                  ;'       g    \        P                  ! 4       pVP                  ;'       g    / pVP                  4        UUu/ uF  w  rgVP                  4       VbK  	  ppp\        P                   ! V P                  V4      G Rj  xL
 pRV 2VR&   VP"                  '       d   VP"                  VR&   WTn        WCn
        V P%                  W#R7      G Rj  xL
 # u uppi  LY L5i)	r   r   NTr   r  r  r  r   )r   r   r   r   r   rr   r   r  r  r  ru   r  ro   r  r	  r    async_get_token_from_credentialsr  r   r  s	   &$$$     r   r  AsyncFiles.register_files  sJ     dFKK33??@@
F  ~((*f((77?f  d +f&&==%*;*;*=L""((bG(/8qwwy!|G8>>$ E ")0GO'+'<'<g#$"&%%4%??? 9 @sB   BF  (F 	F E6;'F "E<#F 0F 1E>2F >F c                n   < V ^8  d   QhRS[ S[P                  ,          RS[S[P                  ,          /# r`   )r   r   rb   r   r   )r   rd   s   "r   r   r"    s1       ; ;<%**r   c               r   "   V P                   p\        RTV P                  VR7      G Rj  xL
 V4      #  L	5i)a  Lists all files from the service asynchronously.

Args:
  config (ListFilesConfig): Optional, configuration for the list method.

Returns:
  A Pager object that contains one page of files. When iterating over
  the pager, it automatically fetches the next page if there are more.

Usage:

.. code-block:: python

  async for file in await client.aio.files.list(config={'page_size': 10}):
    print(file.name)
rV   rO   N)r   r   r  s   &$ r   r   AsyncFiles.list  s<     ( ::Ljjj''	  	(s   )75
7r   r  r  s   @r   r   r     s     4?C4 4l= 8<	= =~AHLA AFEKOE EN= ;?	= =~O 8<	O Ob@ :>	@ @D!@
 ;?!@ !@F?C  r   r   )N)*r   rz   loggingr   typingr   r   r   urllib.parser   google.authr    r   r   r	   r
   r   r7   r   r   r#   r   r$   pagersr   r   	getLoggerloggerr'   r/   r9   r=   r@   rD   rL   rQ   rY   r\   
BaseModuler^   r   r   r   r   <module>rK     s   $ 
   	 ' ' "         . . % 
		/	0



*& TK"" TnP'' Pr   