
    Ojn                    h   S SK r S SKrS SKJrJrJr  S SKJr  SSKJ	r	  SSKJ
r
  SSKJr  SSKJr  SS	KJr  SS
KJr  SSK
Jr  SSK
Jr  SSK
Jr  SSKJrJr  \R4                  " S5      r SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr  SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr! SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr" SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr# SLS\S\\\\4   \4   S\\\\4      S\\\4   4S jjr$ SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr% SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr& SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr' SLS\\\\4   \4   S\\\\4      S\\\4   4S jjr( SLS\S\\\\4   \4   S\\\\4      S\\\4   4S jjr) SLS\S\\\\4   \4   S\\\\4      S\\\4   4S jjr* SLS\\\\4   \4   S\\\\4      S\\\4   4S  jjr+ SLS\\\\4   \4   S\\\\4      S\\\4   4S! jjr, SLS\\\\4   \4   S\\\\4      S\\\4   4S" jjr- SLS\\\\4   \4   S\\\\4      S\\\4   4S# jjr. SLS\\\\4   \4   S\\\\4      S\\\4   4S$ jjr/ SLS\S\\\\4   \4   S\\\\4      S\\\4   4S% jjr0 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S& jjr1 SLS\\\\4   \4   S\\\\4      S\\\4   4S' jjr2 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S( jjr3 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S) jjr4 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S* jjr5 SLS\\\\4   \4   S\\\\4      S\\\4   4S+ jjr6 SLS\\\\4   \4   S\\\\4      S\\\4   4S, jjr7 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S- jjr8 SLS\\\\4   \4   S\\\\4      S\\\4   4S. jjr9 SLS\S\\\\4   \4   S\\\\4      S\\\4   4S/ jjr: SLS\\\\4   \4   S\\\\4      S\\\4   4S0 jjr; SLS\\\\4   \4   S\\\\4      S\\\4   4S1 jjr< SLS\\\\4   \4   S\\\\4      S\\\4   4S2 jjr= SLS\S\\\\4   \4   S\\\\4      S\\\4   4S3 jjr> SLS\\\\4   \4   S\\\\4      S\\\4   4S4 jjr? SLS\S\\\\4   \4   S\\\\4      S\\\4   4S5 jjr@ SLS\S\\\\4   \4   S\\\\4      S\\\4   4S6 jjrA SLS\\\\4   \4   S\\\\4      S\\\4   4S7 jjrB SLS\\\\4   \4   S\\\\4      S\\\4   4S8 jjrC SLS\\\\4   \4   S\\\\4      S\\\4   4S9 jjrD SLS\S\\\\4   \4   S\\\\4      S\\\4   4S: jjrE SLS\\\\4   \4   S\\\\4      S\\\4   4S; jjrF SLS\\\\4   \4   S\\\\4      S\\\4   4S< jjrG SLS\\\\4   \4   S\\\\4      S\\\4   4S= jjrH SLS\\\\4   \4   S\\\\4      S\\\4   4S> jjrI SLS\\\\4   \4   S\\\\4      S\\\4   4S? jjrJ SLS\\\\4   \4   S\\\\4      S\\\4   4S@ jjrK SLS\\\\4   \4   S\\\\4      S\\\4   4SA jjrL SLS\\\\4   \4   S\\\\4      S\\\4   4SB jjrM SLS\\\\4   \4   S\\\\4      S\\\4   4SC jjrN SLS\\\\4   \4   S\\\\4      S\\\4   4SD jjrO SLS\\\\4   \4   S\\\\4      S\\\4   4SE jjrP SLS\\\\4   \4   S\\\\4      S\\\4   4SF jjrQ SLS\\\\4   \4   S\\\\4      S\\\4   4SG jjrR " SH SI\	R                  5      rT " SJ SK\	R                  5      rUg)M    N)AnyOptionalUnion)	urlencode   )_api_module)_common)_extra_utils)_transformers)types)BaseApiClient)get_value_by_path)move_value_by_path)set_value_by_path)
AsyncPagerPagerzgoogle_genai.batchesfrom_objectparent_objectreturnc                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Napi_keyapiKeyapi_key_configzvapi_key_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	auth_typezqauth_type parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.google_service_account_configzgoogle_service_account_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.http_basic_auth_configz~http_basic_auth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oauth_configztoauth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oidc_configzsoidc_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.getvsetv
ValueErrorr   r   	to_objects      V/var/www/html/leaf-doctor-v1/venv/lib/python3.13/site-packages/google/genai/batches.py_AuthConfig_to_mldevr&   %   s    !)	+	{#/XJ[9+ >?	+()*6
	< 
 
+}%1
	< 
 
+789E
	M 
 
+012>
	M 
 
+'(4
	< 
 
+'3
	< 
 
    c                 h   0 n[        U S/5      b  [        US/[        U S/5      5        [        U SS/5      b4  [        US/[        U SS/5       Vs/ s H  n[        X25      PM     sn5        [        U SS/5       b+  [        US/[        U SS/5       Vs/ s H  nUPM     sn5        U$ s  snf s  snf )NresponsesFile	file_nameinlinedResponsesinlined_responsesinlinedEmbedContentResponsesinlined_embed_content_responses)r    r!   _InlinedResponse_from_mldevr   r   r$   items       r%   _BatchJobDestination_from_mldevr2   T   s     !)	+()5[M4o5F#GH	+*,>?@L	 02DE	
 (8	
	 ;79KLM 		*+ /1CD	
 	

 
1	
	
s   B*B/c           
      ^   0 n[        U S/5      b  [        US/[        U S/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U S	/5      b#  [        US
/[        [        U S	/5      U5      5        U$ )NpredictionsFormatformatgcsDestinationoutputUriPrefixgcs_uribigqueryDestination	outputUribigquery_uri"vertexMultimodalDatasetDestinationvertex_dataset)r    r!   /_VertexMultimodalDatasetDestination_from_vertexr#   s      r%    _BatchJobDestination_from_vertexr?   |   s     !)	++,-9XJ[3F2G HI	+(*;<=I	[+->?@ 
+-{;<H	[0+>? 
+<=>J	7CDEy	
 
r'   c           
         0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S/5      b#  [        US/[        [        U S/5      U5      5        U$ )Nr5   r4   r8   r6   r7   r;   r9   r:   r*   qfile_name parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r,   zyinlined_responses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r.   zinlined_embed_content_responses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r=   r<   )r    r!   r"   -_VertexMultimodalDatasetDestination_to_vertexr#   s      r%   _BatchJobDestination_to_vertexrC      sD    !)	+z".()4hZ+HI	+	{#/	,-[9+& 
+'(4	,[>*+ 
+}%1
	9 
 
++,-9
	? 
 
+9:;G
	M 
 
+()*6	-.5/019	
 
r'   c           	      P   0 n[        U S/5      b  [        US/[        U S/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U S	S
/5       b  [        US/[        U S	S
/5      5        U$ )NinstancesFormatr5   	gcsSourceurisr8   bigquerySourceinputUrir;   vertexMultimodalDatasetSourcedatasetNamevertex_dataset_namer    r!   r#   s      r%   _BatchJobSource_from_vertexrN      s     !)	+)*+7XJ[3D2E FG	+V,-9YKkK3H!IJ	+(*56B	[+Z89 ;8-HI 		[:MJK 
r'   
api_clientc                    0 n[        US/5      b  [        S5      e[        US/5      b  [        S5      e[        US/5      b  [        S5      e[        US/5      b  [        US/[        US/5      5        [        US	/5      b5  [        US
S
/[        US	/5       Vs/ s H  n[        XU5      PM     sn5        [        US/5      b  [        S5      eU$ s  snf )Nr5   znformat parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r8   zogcs_uri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r;   ztbigquery_uri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r*   fileNameinlined_requestsrequestsrL   z{vertex_dataset_name parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.)r    r"   r!   _InlinedRequest_to_mldevrO   r   r   r$   r1   s        r%   _BatchJobSource_to_mldevrV      s   
 !)	+z".
	3 
 
+	{#/
	< 
 
+'(4
	< 
 
+}%1ZL${[M"BC	+*+,8	Z  [+=*>?	
? %ZyA?	
 
+-./;
	B 
 
	
s   Cc                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        USS/[        U S/5      5        U$ )Nr5   rE   r8   rF   rG   r;   rH   rI   r*   rA   rR   zxinlined_requests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.rL   rJ   rK   r   r#   s      r%   _BatchJobSource_to_vertexrX     s    !)	+z".&'kH:)FG	+	{#/[&)4i[+IJ	+'(4	:&[>*+ 
+}%1
	9 
 
+*+,8
	? 
 
+-./;	(-8[012 
r'   c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U SS/5      b.  [        US/[        R                  " [        U SS/5      5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U SS/5      b  [        US	/[        U SS/5      5        [        U SS
/5      b  [        US/[        U SS
/5      5        [        U SS/5      b  [        US/[        U SS/5      5        [        U SS/5      b8  [        US/[	        [        R
                  " [        U SS/5      5      U5      5        U$ )NnamemetadatadisplayNamedisplay_namestate
createTimecreate_timeendTimeend_time
updateTimeupdate_timemodeloutputdest)r    r!   tt_job_stater2   t_recv_batch_job_destinationr#   s      r%   _BatchJob_from_mldevrk   G  s    !)	+x ,VHd;9:	+
M23?	[:}56 
+
G,-9			d;W(=>? 
+
L12>	[:|45 
+
I./;ZL${Z4K"LM	+
L12>	[:|45 
+
G,-9WItK*g1FGH	+
H-.:	'**[:x"89 		
	 
r'   c                 x   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b-  [        US/[        R                  " [        U S/5      5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US	/[        U S/5      5        [        U S
/5      b  [        US/[        U S
/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[	        [        U S/5      U5      5        [        U S/5      b7  [        US/[        [        R                  " [        U S/5      5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )NrZ   r\   r]   r^   errorr_   r`   	startTime
start_timera   rb   rc   rd   re   inputConfigsrcoutputConfigrg   completionStatscompletion_stats
outputInfooutput_info)r    r!   rh   ri   rN   r?   rj   r#   s      r%   _BatchJob_from_vertexrw     sB    !)	+x ,VHd;9:	+'3^$d;&HI	+y!-WIq}}T+y-IJK	+y!-WItK';<	+~&2]OT+~%FG	+}%1\ND{m$DE	+	{#/ZL${YK"@A	+~&2]OT+~%FG	+y!-WItK';<	+'3	#}o.		
 
+'(4	(**4n=M+NO	
 
+)*+7&'k<M;N)O 
+~&2]OT+~%FG	r'   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        U$ )Ndatar]   tdisplay_name parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	mime_typemimeTyper   r#   s      r%   _Blob_to_mldevr}     s     !)	+x ,VHd;9:	+'(4
	< 
 
+}%1ZL${[M"BC	r'   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ NrZ   _urlr    r!   rh   t_batch_job_namerO   r   r   r$   s       r%   "_CancelBatchJobParameters_to_mldevr     L    
 !)	+x ,		:tK&'BC 
r'   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r   r   r   s       r%   #_CancelBatchJobParameters_to_vertexr     r   r'   c           
      T   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US	/[        U S/5      5        [        U S
/5      b  [        US/[        U S
/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        [        U S/5      b  [        US/[        U S/5      5        U$ s  snf )NcontentcitationMetadatacitation_metadata
tokenCounttoken_countfinishReasonfinish_reasongroundingMetadatagrounding_metadataavgLogprobsavg_logprobsindexlogprobsResultlogprobs_resultsafetyRatingssafety_ratingsurlContextMetadataurl_context_metadata)r    r!   _CitationMetadata_from_mldevr0   s       r%   _Candidate_from_mldevr     s    !)	+	{#/YKkI;!?@	+*+,8	$123Y	
 
+~&2]OT+~%FG	+'(4_%tK.9I'JK	++,-9	[./0 
+'3^$d;&HI	+y!-WItK';<	+()*6&'k<L;M)NO	+()5	{_,=>?>$>? 
+,-.:	 [/01 
 	@s   *F%c                     0 n[        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        U$ s  snf )NcitationSources	citationsrM   r0   s       r%   r   r   *  sW     !)	+)*+7	{->,?@A@$@A 
 	Bs   <c                     0 n[        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        [        U S/5      b  [        US/[        U S/5      5        U$ s  snf )Npartsrole)r    r!   _Part_to_mldevr0   s       r%   _Content_to_mldevr   9  s     !)	+y!-		 [7)4	
4 4+4	
 
+x ,VHd;9:		
s   A-c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        USS/[        U S/5      5        U$ )Nr]   batchr\   rg   zldest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.webhook_configwebhookConfigr   r#   s      r%   _CreateBatchJobConfig_to_mldevr   N  s     !)	+'(4	- [>*+ 
+x ,
	3 
 
+()*6	/"[+,- 
r'   c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b7  [        US/[        [        R                  " [        U S/5      5      U5      5        [        U S/5      b  [        S5      eU$ )Nr]   r\   rg   rr   r   zvwebhook_config parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.)r    r!   rC   rh   t_batch_job_destinationr"   r#   s      r%   _CreateBatchJobConfig_to_vertexr   k  s     !)	+'(4kN;K)LM	+x ,	&%%d;&ABI	
 
+()*6
	? 
 
r'   c                 ^   0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        [        US/5      b:  [        USS/[	        U [        R
                  " U [        US/5      5      U5      5        [        US/5      b  [        [        US/5      U5        U$ Nre   r   rq   r   rp   config)r    r!   rh   t_modelrV   t_batch_job_sourcer   r   s       r%   "_CreateBatchJobParameters_to_mldevr     s    
 !)	+y!-				*d;	:; 
+w+	-    T+w-GH	
 
+z"."4hZ#@)L	r'   c                 X   0 n[        US/5      b.  [        US/[        R                  " U [        US/5      5      5        [        US/5      b8  [        US/[	        [        R
                  " U [        US/5      5      U5      5        [        US/5      b  [        [        US/5      U5        U$ )Nre   rq   rp   r   )r    r!   rh   r   rX   r   r   r   s       r%   #_CreateBatchJobParameters_to_vertexr     s    
 !)	+y!-					*d;	:; 
+w+	!  T+w-GH	
 
+z".#Dxj$A9M	r'   c                 Z    0 n[        U S/5      b  [        USS/[        U S/5      5        U$ )Nr]   r   r\   rM   r#   s      r%   (_CreateEmbeddingsBatchJobConfig_to_mldevr     sA     !)	+'(4	- [>*+ 
r'   c                 4   0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        [        US/5      b%  [        USS/[	        U [        US/5      U5      5        [        US/5      b  [        [        US/5      U5        U$ r   )r    r!   rh   r   "_EmbeddingsBatchJobSource_to_mldevr   r   s       r%   ,_CreateEmbeddingsBatchJobParameters_to_mldevr     s    
 !)	+y!-				*d;	:; 
+w+	- *[5'2I	
 
+z".,[8*%y 
r'   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r   r   r   s       r%   "_DeleteBatchJobParameters_to_mldevr     r   r'   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r   r   r   s       r%   #_DeleteBatchJobParameters_to_vertexr     r   r'   c                 B   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ NsdkHttpResponsesdk_http_responserZ   donerm   rM   r#   s      r%   _DeleteResourceJob_from_mldevr          !)	+)*+7'(${=N<O*P 
+x ,VHd;9:	+x ,VHd;9:	+y!-WItK';<	r'   c                 B   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ r   rM   r#   s      r%   _DeleteResourceJob_from_vertexr   %  r   r'   c                 .   0 n[        US/5      b@  [        U/ SQ[        R                  " U [        US/5      5       Vs/ s H  nUPM     sn5        [        US/5      b1  [        US/[	        [        US/5      U5      5        [        USS05        U$ s  snf )Ncontents)
requests[]requestr   r   _selfzrequests[].*zrequests[].request.*)r    r!   rh   t_contents_for_embed_EmbedContentConfig_to_mldevmovevrU   s        r%   _EmbedContentBatch_to_mldevr   ;  s    
 !)	+
|$0, ..Dzl;	
 	
	 
+z".		$T+z%BIN
 
)n&<=>		
s   Bc                    0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        S5      e[        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )N	task_typer   taskTypetitleoutput_dimensionalityoutputDimensionalityr{   zqmime_type parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.auto_truncatezuauto_truncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.document_ocrztdocument_ocr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.audio_track_extractionz~audio_track_extraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r#   s      r%   r   r   W  s.    !)	+}%1	z"[;-( 
+y!-w/kG91MN	+/01=	-.[234 
+}%1
	< 
 
+()5
	< 
 
+'(4
	< 
 
+012>
	M 
 
r'   c                     0 n[        US/5      b  [        US/[        US/5      5        [        US/5      b$  [        US/[        U [        US/5      U5      5        U$ )Nr*   rR   rS   )r    r!   r   r   s       r%   r   r     sr    
 !)	+}%1[M4k]#CD	+*+,8	#[+=*>?	
 
r'   c                     0 n[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nr]   rz   file_urifileUrir{   r|   )r    r"   r!   r#   s      r%   _FileData_to_mldevr     s     !)	+'(4
	< 
 
+
|$0YKkJ<!@A	+}%1ZL${[M"BC	r'   c                 X   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )NidargsrZ   partial_argsztpartial_args parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.will_continuezuwill_continue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r#   s      r%   _FunctionCall_to_mldevr     s     !)	+v*TFDtf56	+x ,VHd;9:	+x ,VHd;9:	+'(4
	< 
 
+()5
	< 
 
r'   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Nallowed_function_namesallowedFunctionNamesmodestream_function_call_argumentszstream_function_call_arguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r#   s      r%   _FunctionCallingConfig_to_mldevr     s     !)	+012>	 [345 
+x ,VHd;9:	+89:F
	M 
 
r'   c                 
   0 n[        US/5      b7  [        US/[        [        R                  " [        US/5      5      U5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US	/[        US/5      5        [        US
/5      b  [        US/[        US
/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b.  [        US/[        R
                  " U [        US/5      5      5        [        US/5      b  [        US/[        US/5      5        [        US/5      b  [        S5      e[        US/5      b  [        S5      e[        US /5      b3  [        US!/[        US /5       Vs/ s H  n[        XC5      PM     sn5        [        US"/5      b]  [        US"/[        R                  " U [        US"/5      5       Vs/ s H#  n[        [        R                  " X5      U5      PM%     sn5        [        US#/5      b#  [        US$/[        [        US#/5      U5      5        [        US%/5      b  [        S&5      e[        US'/5      b.  [        US(/[        R                  " U [        US'/5      5      5        [        US)/5      b  [        US*/[        US)/5      5        [        US+/5      b  [        US,/[        US+/5      5        [        US-/5      b-  [        US./[        R                  " [        US-/5      5      5        [        US//5      b  [        S05      e[        US1/5      b  [        US2/[        US1/5      5        [        US3/5      b#  [        US4/[        [        US3/5      U5      5        [        US5/5      b  [        US6/[        US5/5      5        [        US7/5      b  [        S85      e[        US9/5      b  [        US:/[        US9/5      5        U$ s  snf s  snf );Nsystem_instructionsystemInstructiontemperaturetop_ptopPtop_ktopKcandidate_countcandidateCountmax_output_tokensmaxOutputTokensstop_sequencesstopSequencesresponse_logprobsresponseLogprobslogprobspresence_penaltypresencePenaltyfrequency_penaltyfrequencyPenaltyseedresponse_mime_typeresponseMimeTyperesponse_schemaresponseSchemaresponse_json_schemaresponseJsonSchemarouting_configzvrouting_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.model_selection_configz~model_selection_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.safety_settingssafetySettingstoolstool_config
toolConfiglabelsznlabels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.cached_contentcachedContentresponse_modalitiesresponseModalitiesmedia_resolutionmediaResolutionspeech_configspeechConfigaudio_timestampzwaudio_timestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.thinking_configthinkingConfigimage_configimageConfigenable_enhanced_civic_answersenableEnhancedCivicAnswersmodel_armor_configzzmodel_armor_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.service_tierserviceTier)r    r!   r   rh   	t_contentt_schemar"   _SafetySetting_to_mldevt_tools_Tool_to_mldevt_tool_ToolConfig_to_mldevt_cached_content_namet_speech_config_ImageConfig_to_mldevrU   s        r%   _GenerateContentConfig_to_mldevr*    s   
 !)	+,-.:	KK[+?*@ABI	
 
+'3]OT+%GH	+y!-VHd;	:;	+y!-VHd;	:;	+)*+7%&[;L:M(NO	++,-9%&[;N:O(P 
+()*6_%tK:J9K'LM	++,-9	[./0 
+
|$0ZL${ZL"AB	+*+,8%&[;M:N(O 
++,-9	[./0 
+x ,VHd;9:	+,-.:	[/01 
+)*+7		

:tK2C1DEF 
+./0<	[123 
+()*6
	< 
 
+012>
	M 
 
+)*+7	 [+<*=>	
> $D4>	
 
+y!-		 		*d;	.JK	
K 188J5yAK	
 
+'3	T+?K 
+z".
	3 
 
+()*6		[+;*<=	
 
+-./;	[012 
+*+,8%&[;M:N(O 
+()5		${_,=>? 
+)*+7
	< 
 
+)*+7%&[;L:M(NO	+'(4	d;0@A9M 
+789E	%&[:;< 
+,-.:
	B 
 
+'(4kN;K)LM	s	
	
s   U,*Uc                 j   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US	/[        U S/5      5        [        U S
/5      b  [        US/[        U S
/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ s  snf )Nr   r   
candidatesmodelVersionmodel_versionpromptFeedbackprompt_feedback
responseIdresponse_idusageMetadatausage_metadatamodelStatusmodel_status)r    r!   r   r0   s       r%   #_GenerateContentResponse_from_mldevr7    s]    !)	+)*+7'(${=N<O*P 
+~&2	 [<.9	
9 "$29	
 
+'(4_%tK.9I'JK	+()*6&'k<L;M)NO	+~&2]OT+~%FG	+()5%&[?:K(LM	+'3^$d;&HI	+	
s   D0c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r   r   r   s       r%   _GetBatchJobParameters_to_mldevr9    r   r'   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r   r   r   s       r%    _GetBatchJobParameters_to_vertexr;    r   r'   c           
          0 n[        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nauth_config
authConfigenable_widgetenableWidget)r    r!   r&   r#   s      r%   _GoogleMaps_to_mldevrA    sl     !)	+'3	T+?K 
+()5^$d;8I&JK	r'   c                 
   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        U$ )	Nsearch_typessearchTypesblocking_confidencez{blocking_confidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.exclude_domainszwexclude_domains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.time_range_filtertimeRangeFilterr   r#   s      r%   _GoogleSearch_to_mldevrI    s     !)	+'(4]OT+7G%HI	+-./;
	B 
 
+)*+7
	< 
 
++,-9%&[;N:O(P 
r'   c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Naspect_ratioaspectRatio
image_size	imageSizeperson_generationzyperson_generation parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.prominent_peoplezxprominent_people parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.output_mime_typezxoutput_mime_type parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.output_compression_qualityzoutput_compression_quality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.image_output_optionsz|image_output_options parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r#   s      r%   r)  r)    s    !)	+'(4]OT+7G%HI	+~&2[M4l^#DE	++,-9
	B 
 
+*+,8
	B 
 
+*+,8
	B 
 
+456B
	M 
 
+./0<
	B 
 
r'   c                    0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        [        US/5      bH  [        USS/[        R                  " [        US/5      5       Vs/ s H  n[        XC5      PM     sn5        [        US/5      b  [        US/[        US/5      5        [        US/5      b/  [        USS/[        U [        US/5      [        US/0 S95      5        U$ s  snf )Nre   r   r   r[   r   generationConfig)default_value)r    r!   rh   r   
t_contentsr   r*  rU   s        r%   rT   rT   D  s   
 !)	+y!-	G			*d;	:; 
+
|$0	J T+
|%DE	
E d.E	
 
+
|$0ZL${ZL"AB	+z".	&''xj)YKr:	
 
)	
s   :C<c           
         0 n[        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nresponser[   rm   )r    r!   r7  r#   s      r%   r/   r/   l  s     !)	+
|$0	+zl+Y	
 
+
|$0ZL${ZL"AB	+y!-WItK';<	r'   c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        S5      eU$ )N	page_size_querypageSize
page_token	pageTokenfilterznfilter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r#   s      r%   _ListBatchJobsConfig_to_mldevra    s     !)	+}%1*-tK+/O 
+~&2	;[<.) 
+z".
	3 
 
r'   c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        U$ )Nr[  r\  r]  r^  r_  r`  rM   r#   s      r%   _ListBatchJobsConfig_to_vertexrc    s     !)	+}%1*-tK+/O 
+~&2	;[<.) 
+z".8,d;
.KL	r'   c                 T    0 n[        U S/5      b  [        [        U S/5      U5        U$ Nr   )r    ra  r#   s      r%   !_ListBatchJobsParameters_to_mldevrf    s1     !)	+z".!${XJ"?K	r'   c                 T    0 n[        U S/5      b  [        [        U S/5      U5        U$ re  )r    rc  r#   s      r%   "_ListBatchJobsParameters_to_vertexrh    s1     !)	+z"."4hZ#@)L	r'   c                 2   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        U$ s  snf )Nr   r   nextPageTokennext_page_token
operations
batch_jobs)r    r!   rk   r0   s       r%   !_ListBatchJobsResponse_from_mldevrn    s     !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+~&2	 [<.9	
9 !19	
 
	
   6Bc                 2   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        U$ s  snf )Nr   r   rj  rk  batchPredictionJobsrm  )r    r!   rw   r0   s       r%   "_ListBatchJobsResponse_from_vertexrr    s     !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+-./;	 [+@*AB	
B "$2B	
 
	
ro  c           
         0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S	/5      b#  [        US
/[        [        U S	/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[	        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nr  r  code_execution_resultcodeExecutionResultexecutable_codeexecutableCode	file_datafileDatafunction_callfunctionCallfunction_responsefunctionResponseinline_data
inlineDatatextthoughtthought_signaturethoughtSignaturevideo_metadatavideoMetadata	tool_calltoolCalltool_responsetoolResponsepart_metadatapartMetadata)r    r!   r   r   r}   r#   s      r%   r   r      s    !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%1	4k];YG 
+()5	tK/1BCYO 
++,-9	[./0 
+'3	tK-99E 
+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	+}%1ZL${[M"BC	+()5^$d;8I&JK	+()5^$d;8I&JK	r'   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        U$ )Ncategorymethodznmethod parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	thresholdr   r#   s      r%   r"  r"  L  s~     !)	+
|$0ZL${ZL"AB	+z".
	3 
 
+}%1[M4k]#CD	r'   c           
         0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nretrieval_configretrievalConfigfunction_calling_configfunctionCallingConfig$include_server_side_tool_invocations includeServerSideToolInvocations)r    r!   r   r#   s      r%   r&  r&  `  s     !)	+*+,8%&[;M:N(O 
+123?	 !'89:I	
 
+>?@L	+,[ABC 
r'   c           
         0 n[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S	/5      b#  [        US
/[	        [        U S	/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        U$ s  snf s  snf )N	retrievalzqretrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.computer_usecomputerUsefile_search
fileSearchgoogle_searchgoogleSearchgoogle_maps
googleMapscode_executioncodeExecutionenterprise_web_searchz}enterprise_web_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.function_declarationsfunctionDeclarationsgoogle_search_retrievalgoogleSearchRetrievalparallel_ai_searchzzparallel_ai_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.url_context
urlContextmcp_servers
mcpServers)r    r"   r!   rI  rA  r0   s       r%   r$  r$  }  sF    !)	+}%1
	< 
 
+'(4]OT+7G%HI	+'3\ND}o$FG	+()5	tK/1BCYO 
+'3	T+?K 
+()*6_%tK:J9K'LM	+/01=
	B 
 
+/01=	 {-D,EFGF$FG 
+123?	 ![456 
+,-.:
	B 
 
+'3\ND}o$FG	+'3	{]O<=<$<= 
5 	H. 	>s   1G#G(c           	          0 n[        U SS/5      b  [        US/[        U SS/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nr9   r:   bigquery_destinationr\   r]   rM   r#   s      r%   r>   r>     sl     !)	+-{;<H	 [0+>? 
+'3^$d;&HI	r'   c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nr  r9   r:   r]   r\   rM   r#   s      r%   rB   rB     sk     !)	+./0<	,[123 
+'(4]OT+7G%HI	r'   c            	       8   \ rS rSrSSS.S\\   S\\R                  \R                  4   S\\R                     S\R                  4S jjrSSS.S\\   S\R                  S\\R                     S\R                  4S	 jjrSS
.S\S\\R                      S\R                  4S jjrSS
.S\S\\R$                     SS4S jjrSS
.S\\R(                     S\R*                  4S jjrSS
.S\S\\R.                     S\R0                  4S jjrSS
.S\S\R                  S\\R                     S\R                  4S jjrSS
.S\S\R                  S\\R                     S\R                  4S jjrSS
.S\\R(                     S\\R                     4S jjrSrg)Batchesi  Nre   r   re   rq   r   r   c                   [         R                  " UUUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S n	UR                  b-  UR                  R                  b  UR                  R                  n	[        R                  " U5      n[        R                  " U5      nU R                  R                  SXuU	5      n
U
R                   (       d  0 O["        R$                  " U
R                   5      nU R                  R                  (       a  ['        U5      nU R                  R                  (       d  [)        U5      n[         R*                  R-                  U[/        USS 5      (       aG  S[/        UR                  S	S 5      [/        UR                  S
S 5      [/        UR                  SS 5      S.0O0 S9nU R                  R1                  U5        U$ Nre   rq   r   r   rq  z{model}:batchGenerateContentr\  ?r   postr  r  include_all_fieldsr  r  r  rY  kwargs)r   _CreateBatchJobParameters_api_clientvertexair   get
format_mapr   r   popr   http_optionsr	   convert_to_dictencode_unserializable_typesr   bodyjsonloadsrw   rk   BatchJob_from_responsegetattr_verify_responseselfre   rq   r   parameter_modelrequest_dictrequest_url_dictpathquery_paramsr  rY  response_dictreturn_values                r%   _createBatches._create  sK    55O   8


Ol &))&1	$//0@A$7


Ol &))&1	-889IJ-##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmBHMM1JM  +M:m$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3r'   c                V   [         R                  " UUUS9nU R                  R                  (       a  [	        S5      e[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S n	UR                  b-  UR                  R                  b  UR                  R                  n	[        R                  " U5      n[        R                  " U5      nU R                  R                  SXuU	5      n
U
R                   (       d  0 O["        R$                  " U
R                   5      nU R                  R                  (       d  ['        U5      n[         R(                  R+                  U[-        USS 5      (       aG  S[-        UR                  S	S 5      [-        UR                  S
S 5      [-        UR                  SS 5      S.0O0 S9nU R                  R/                  U5        U$ Nr  ziThis method is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   z{model}:asyncBatchEmbedContentr\  r  r   r  r  r  r  r  r  )r   #_CreateEmbeddingsBatchJobParametersr  r  r"   r   r  r  r   r  r   r  r	   r  r  r   r  r  r  rk   r  r  r  r  r  s                r%   _create_embeddingsBatches._create_embeddings?  s    ??O   4 
 B


Ol &))&1	/::;KL/##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmBHMM1JM$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3r'   r   rZ   c                   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S
S5      [/        UR                  SS5      [/        UR                  SS5      S.0O0 S9nU R                  R1                  U5        U$ )a#  Gets a batch job.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the Gemini Enterprise
      Agent Platform client. Or "batches/abc" using the Gemini Developer AI
      client.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = client.batches.get(name='123456789')
  print(f"Batch job: {batch_job.name}, state {batch_job.state}")
rZ   r   r   batchPredictionJobs/{name}batches/{name}r\  r  r   Nr  r  r  r  r  r  )r   _GetBatchJobParametersr  r  r;  r  r  r9  r   r  r   r  r	   r  r  r   r  r  r  rw   rk   r  r  r  r  r  rZ   r   r  r  r  r  r  r  rY  r  r  s               r%   r  Batches.get  sC   . 22O   5


Ol &))&1	+667GH+4


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmBHMM1JM  +M:m$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3r'   c                   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5        g)
a  Cancels a batch job.

Only available for batch jobs that are running or pending.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the Vertex AI client. Or
      "batches/abc" using the Gemini Developer AI client.

Usage:

.. code-block:: python

  client.batches.cancel(name='123456789')
r  r   !batchPredictionJobs/{name}:cancelbatches/{name}:cancelr\  r  r   Nr  )r   _CancelBatchJobParametersr  r  r   r  r  r   r   r  r   r  r	   r  r  r   	r  rZ   r   r  r  r  r  r  r  s	            r%   cancelBatches.cancel  sR   . 55O   8


Ol &))&1	2==>NO27


Ol &))&1	&112BC&##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DLVTFr'   c                (   [         R                  " US9nU R                  R                  (       a8  [	        U5      nUR                  S5      nU(       a  SR                  U5      nO:SnO7[        U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S nUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXSU5      nUR                   (       d  0 O["        R$                  " UR                   5      n	U R                  R                  (       a  ['        U	5      n	U R                  R                  (       d  [)        U	5      n	[         R*                  R-                  U	[/        USS 5      (       aG  S[/        UR                  S	S 5      [/        UR                  S
S 5      [/        UR                  SS 5      S.0O0 S9n
[         R0                  " UR2                  S9U
l        U R                  R7                  U
5        U
$ Nr  r   rq  batchesr\  r  r   r  r  r  r  r  r  headers)r   _ListBatchJobsParametersr  r  rh  r  r  rf  r   r  r   r  r	   r  r  r   r  r  r  rr  rn  ListBatchJobsResponser  r  HttpResponser  r   r  r  r   r  r  r  r  r  r  rY  r  r  s              r%   _listBatches._list-  sF    44O   7Hl%))&1	$//0@A$6Gl%))&1	##$45##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmBHMM1JM  8Gm$$7Fm..== ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! > L$ &+%7%7  &L" 	%%l3r'   c                V   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S
S5      [/        UR                  SS5      [/        UR                  SS5      S.0O0 S9n[         R0                  " U	R2                  S9Ul        U R                  R7                  U5        U$ )a}  Deletes a batch job.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the client.

Returns:
  A DeleteResourceJob object that shows the status of the deletion.

Usage:

.. code-block:: python

  client.batches.delete(name='123456789')
r  r   r  r  r\  r  r   Ndeleter  r  r  r  r  r  )r   _DeleteBatchJobParametersr  r  r   r  r  r   r   r  r   r  r	   r  r  r   r  r  r  r   r   DeleteResourceJobr  r  r  r  r   r  r  s               r%   r  Batches.deletev  sh   . 55O   8


Ol &))&1	+667GH+7


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''$lH 'mmBHMM1JM  4]Cm$$3MBm**99 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! : L$ &+%7%7  &L" 	%%l3r'   c                &   [         R                  " U R                  U5      n[        R                  " UUUS9nU R                  R
                  (       a0  [        R                  " X$R                  5      nU R                  XUS9$ U R                  XUS9$ )a  Creates a batch job.

Args:
  model (str): The model to use for the batch job.
  src: The source of the batch job. Currently Gemini Enterprise Agent
    Platform supports GCS URI(-s) or BigQuery URI. Example:
    "gs://path/to/input/data" or "bq://projectId.bqDatasetId.bqTableId".
    Gemini Developer API supports List of inlined_request, or file name.
    Example: "files/file_name".
  config (CreateBatchJobConfig): Optional configuration for the batch job.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = client.batches.create(
      model="gemini-2.0-flash-001",
      src="gs://path/to/input/data",
  )
  print(batch_job.state)
r  
rh   r   r  r   r  r  r
   format_destinationr   r  r  re   rq   r   r  s        r%   createBatches.create  s    > 

t//
5C 55O   ..s4J4JKf\\v\>>\\v\>>r'   c                "   SSK nUR                  S[        R                  SS9  [        R
                  " U R                  U5      n[        R                  " UUUS9nU R                  R                  (       a  [        S5      eU R                  XUS9$ )a!  **Experimental** Creates an embedding batch job.

Args:
  model (str): The model to use for the batch job.
  src: Gemini Developer API supports List of inlined_request, or file name.
    Example: "files/file_name".
  config (CreateBatchJobConfig): Optional configuration for the batch job.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = client.batches.create_embeddings(
      model="text-embedding-004",
      src="files/my_embedding_input",
  )
  print(batch_job.state)
r   NJbatches.create_embeddings() is experimental and may change without notice.   r  
stacklevelr  lGemini Enterprise Agent Platform (previously known as Vertex AI) does not support batches.create_embeddings.)warningswarnr	   ExperimentalWarningrh   t_embedding_batch_job_sourcer  r   r  r  r"   r  )r  re   rq   r   r  r  s         r%   create_embeddingsBatches.create_embeddings	  s    8 MM	,,	   
(
()9)93
?C ??O   9 
 $$5&$IIr'   c                P    U R                   n[        SUU R                  US9U5      $ )a  Lists batch jobs.

Args:
  config (ListBatchJobsConfig): Optional configuration for the list request.

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

Usage:

.. code-block:: python
  config = {'page_size': 10}
  for batch_job in client.batches.list(config):
    print(batch_job.name)
rm  r  )r  r   r  r   list_requests      r%   listBatches.list=	  s1    ( ::L

&
!	 r'    )__name__
__module____qualname____firstlineno__r   strr   r   BatchJobSourceUnionBatchJobSourceUnionDictCreateBatchJobConfigOrDictr  r  EmbeddingsBatchJobSourceOrDict$CreateEmbeddingsBatchJobConfigOrDictr  GetBatchJobConfigOrDictr  CancelBatchJobConfigOrDictr  ListBatchJobsConfigOrDictr  r  DeleteBatchJobConfigOrDictr  r  r  r  r   r  __static_attributes__r  r'   r%   r  r    sl   
 ";?Q c]Q **E,I,IIJ	Q
 u778Q ~~Ql "EIJ c]J //	J
 uAABJ ~~JZ MQ^^"*5+H+H"I^~~^H <@	@G @G u778	@G
 @GF DHG ? ?@G""GZ <@	b b u778	b
 bR <@,? ,? ((	,?
 u778,? ~~,?f FJ3J 3J //	3J
 uAAB3J ~~3Jl DH ? ?@U^^ r'   r  c            	       8   \ rS rSrSSS.S\\   S\\R                  \R                  4   S\\R                     S\R                  4S jjrSSS.S\\   S\R                  S\\R                     S\R                  4S	 jjrSS
.S\S\\R                      S\R                  4S jjrSS
.S\S\\R$                     SS4S jjrSS
.S\\R(                     S\R*                  4S jjrSS
.S\S\\R.                     S\R0                  4S jjrSS
.S\S\R                  S\\R                     S\R                  4S jjrSS
.S\S\R                  S\\R                     S\R                  4S jjrSS
.S\\R(                     S\\R                     4S jjrSrg)AsyncBatchesiZ	  Nr  re   rq   r   r   c                0  #    [         R                  " UUUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S n	UR                  b-  UR                  R                  b  UR                  R                  n	[        R                  " U5      n[        R                  " U5      nU R                  R                  SXuU	5      I S h  vN n
U
R                   (       d  0 O["        R$                  " U
R                   5      nU R                  R                  (       a  ['        U5      nU R                  R                  (       d  [)        U5      n[         R*                  R-                  U[/        USS 5      (       aG  S[/        UR                  S	S 5      [/        UR                  S
S 5      [/        UR                  SS 5      S.0O0 S9nU R                  R1                  U5        U$  GN7fr  )r   r  r  r  r   r  r  r   r   r  r   r  r	   r  r  async_requestr  r  r  rw   rk   r  r  r  r  r  s                r%   r  AsyncBatches._create\	  sY     55O   8


Ol &))&1	$//0@A$7


Ol &))&1	-889IJ-##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmBHMM1JM  +M:m$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3As   E9J;J<DJc                r  #    [         R                  " UUUS9nU R                  R                  (       a  [	        S5      e[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S n	UR                  b-  UR                  R                  b  UR                  R                  n	[        R                  " U5      n[        R                  " U5      nU R                  R                  SXuU	5      I S h  vN n
U
R                   (       d  0 O["        R$                  " U
R                   5      nU R                  R                  (       d  ['        U5      n[         R(                  R+                  U[-        USS 5      (       aG  S[-        UR                  S	S 5      [-        UR                  S
S 5      [-        UR                  SS 5      S.0O0 S9nU R                  R/                  U5        U$  N7fr  )r   r  r  r  r"   r   r  r  r   r  r   r  r	   r  r  r%  r  r  r  rk   r  r  r  r  r  s                r%   r  AsyncBatches._create_embeddings	  s     ??O   4 
 B


Ol &))&1	/::;KL/##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmBHMM1JM$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3;s   EH7H5C2H7r  rZ   c                .  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S
S5      [/        UR                  SS5      [/        UR                  SS5      S.0O0 S9nU R                  R1                  U5        U$  GN7f)a-  Gets a batch job.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the Gemini Enterprise
      Agent Platform client. Or "batches/abc" using the Gemini Developer AI
      client.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = await client.aio.batches.get(name='123456789')
  print(f"Batch job: {batch_job.name}, state {batch_job.state}")
r  r   r  r  r\  r  r   Nr  r  r  r  r  r  )r   r  r  r  r;  r  r  r9  r   r  r   r  r	   r  r  r%  r  r  r  rw   rk   r  r  r  r  r  s               r%   r  AsyncBatches.get	  sV    . 22O   5


Ol &))&1	+667GH+4


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmBHMM1JM  +M:m$$*=9m>>00 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 1 L& 	%%l3As   E8J:J;DJc                  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5      I Sh  vN   g N7f)
a  Cancels a batch job.

Only available for batch jobs that are running or pending.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the Vertex AI client. Or
      "batches/abc" using the Gemini Developer AI client.

Usage:

.. code-block:: python

  await client.aio.batches.cancel(name='123456789')
r  r   r  r  r\  r  r   Nr  )r   r  r  r  r   r  r  r   r   r  r   r  r	   r  r  r%  r  s	            r%   r  AsyncBatches.cancel]
  sb    . 55O   8


Ol &))&1	2==>NO27


Ol &))&1	&112BC&##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL



(
(L  s   E8F:F ;Fc                F  #    [         R                  " US9nU R                  R                  (       a8  [	        U5      nUR                  S5      nU(       a  SR                  U5      nO:SnO7[        U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S nUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXSU5      I S h  vN nUR                   (       d  0 O["        R$                  " UR                   5      n	U R                  R                  (       a  ['        U	5      n	U R                  R                  (       d  [)        U	5      n	[         R*                  R-                  U	[/        USS 5      (       aG  S[/        UR                  S	S 5      [/        UR                  S
S 5      [/        UR                  SS 5      S.0O0 S9n
[         R0                  " UR2                  S9U
l        U R                  R7                  U
5        U
$  GN;7fr  )r   r  r  r  rh  r  r  rf  r   r  r   r  r	   r  r  r%  r  r  r  rr  rn  r  r  r  r  r  r   r  r  s              r%   r  AsyncBatches._list
  sY     44O   7Hl%))&1	$//0@A$6Gl%))&1	##$45##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmBHMM1JM  8Gm$$7Fm..== ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! > L$ &+%7%7  &L" 	%%l3Es   E!J!#J$D;J!c                t  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  S	XdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S
S5      [/        UR                  SS5      [/        UR                  SS5      S.0O0 S9n[         R0                  " U	R2                  S9Ul        U R                  R7                  U5        U$  GN;7f)a  Deletes a batch job.

Args:
  name (str): A fully-qualified BatchJob resource name or ID.
    Example: "projects/.../locations/.../batchPredictionJobs/456" or "456"
      when project and location are initialized in the client.

Returns:
  A DeleteResourceJob object that shows the status of the deletion.

Usage:

.. code-block:: python

  await client.aio.batches.delete(name='123456789')
r  r   r  r  r\  r  r   Nr  r  r  r  r  r  r  )r   r  r  r  r   r  r  r   r   r  r   r  r	   r  r  r%  r  r  r  r   r   r  r  r  r  r  r   r  r  s               r%   r  AsyncBatches.delete
  sv    . 55O   8


Ol &))&1	+667GH+7


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33$l H 'mmBHMM1JM  4]Cm$$3MBm**99 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! : L$ &+%7%7  &L" 	%%l3Es   E8J8:J5;D;J8c                V  #    [         R                  " U R                  U5      n[        R                  " UUUS9nU R                  R
                  (       a8  [        R                  " X$R                  5      nU R                  XUS9I Sh  vN $ U R                  XUS9I Sh  vN $  N N7f)a  Creates a batch job asynchronously.

Args:
  model (str): The model to use for the batch job.
  src: The source of the batch job. Currently Gemini Enterprise Agent
    Platform supports GCS URI(-s) or BigQuery URI. Example:
    "gs://path/to/input/data" or "bq://projectId.bqDatasetId.bqTableId".
    Gemini Develop API supports List of inlined_request, or file name.
    Example: "files/file_name".
  config (CreateBatchJobConfig): Optional configuration for the batch job.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = await client.aio.batches.create(
      model="gemini-2.0-flash-001",
      src="gs://path/to/input/data",
  )
r  Nr  r  s        r%   r  AsyncBatches.createP  s     < 

t//
5C 55O   ..s4J4JKf<<eV<DDD<<eV<DDD EDs$   BB)B%	B) B'!B)'B)c                  #    SSK nUR                  S[        R                  SS9  [        R
                  " U R                  U5      n[        R                  " UUUS9nSnUR                  b-  UR                  R                  b  UR                  R                  nU R                  R                  (       a  [        S5      eU R                  XUS9I Sh  vN $  N7f)a3  **Experimental** Creates an asynchronously embedding batch job.

Args:
  model (str): The model to use for the batch job.
  src: Gemini Developer API supports inlined_requests, or file name.
    Example: "files/file_name".
  config (CreateBatchJobConfig): Optional configuration for the batch job.

Returns:
  A BatchJob object that contains details about the batch job.

Usage:

.. code-block:: python

  batch_job = await client.aio.batches.create_embeddings(
      model="text-embedding-004",
      src="files/my_embedding_input",
  )
  print(batch_job.state)
r   Nr  r  r  r  r  )r  r  r	   r	  rh   r
  r  r   r  r   r  r  r"   r  )r  re   rq   r   r  r  r  s          r%   r  AsyncBatches.create_embeddings}  s     8 MM	,,	   
(
()9)93
?C ??O 15L*""//;$++88l  9 
 ***OOOOs   CCCCc                l   #    U R                   n[        SUU R                  US9I Sh  vN U5      $  N	7f)a  Lists batch jobs asynchronously.

Args:
  config (ListBatchJobsConfig): Optional configuration for the list request.

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

Usage:

.. code-block:: python
  async for batch_job in await client.aio.batches.list():
    print(batch_job.name)
rm  r  N)r  r   r  s      r%   r  AsyncBatches.list  s<     & ::Ljjj''	  	(s   &42
4r  )r  r  r  r  r   r  r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r   r  r!  r  r'   r%   r#  r#  Z	  sm   
 ";?Q c]Q **E,I,IIJ	Q
 u778Q ~~Ql "EIJ c]J //	J
 uAABJ ~~JZ MQ``"*5+H+H"I`~~`L <@	B B u778	B
 BJ DHI ? ?@I""I^ <@	b b u778	b
 bR <@+E +E ((	+E
 u778+E ~~+Ed FJ:P :P //	:P
 uAAB:P ~~:Pz DH ? ?@%..! r'   r#  )N)Vr  loggingtypingr   r   r   urllib.parser    r   r	   r
   r   rh   r   r  r   r   r    r   r   r   r!   pagersr   r   	getLoggerloggerdictr  objectr&   r2   r?   rC   rN   rV   rX   rk   rw   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r*  r7  r9  r;  rA  rI  r)  rT   r/   ra  rc  rf  rh  rn  rr  r   r"  r&  r$  r>   rB   
BaseModuler  r#  r  r'   r%   <module>rA     sV  $   ' ' "       & . 0 . %			1	2
 /3,tCH~v-.,DcN+, 
#s(^,b /3%tCH~v-.%DcN+% 
#s(^%T /3tCH~v-.DcN+ 
#s(^H /31tCH~v-.1DcN+1 
#s(^1l /3tCH~v-.DcN+ 
#s(^D /3++tCH~v-.+ DcN++ 
#s(^	+` /3%tCH~v-.%DcN+% 
#s(^%T /36tCH~v-.6DcN+6 
#s(^6v /3;tCH~v-.;DcN+; 
#s(^;@ /3tCH~v-.DcN+ 
#s(^. /3tCH~v-. DcN+ 
#s(^	& /3tCH~v-. DcN+ 
#s(^	$ /35tCH~v-.5DcN+5 
#s(^5t /3tCH~v-.DcN+ 
#s(^" /3tCH~v-.DcN+ 
#s(^. /3tCH~v-.DcN+ 
#s(^> /3tCH~v-.DcN+ 
#s(^< /3tCH~v-. DcN+ 
#s(^	B /3tCH~v-. DcN+ 
#s(^	> /3tCH~v-.DcN+ 
#s(^& /3tCH~v-. DcN+ 
#s(^	B /3tCH~v-. DcN+ 
#s(^	& /3tCH~v-. DcN+ 
#s(^	$ /3tCH~v-.DcN+ 
#s(^0 /3tCH~v-.DcN+ 
#s(^2 /3tCH~v-. DcN+ 
#s(^	< /3.tCH~v-..DcN+. 
#s(^.h /3tCH~v-. DcN+ 
#s(^	. /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^> /3tCH~v-.DcN+ 
#s(^6 /3{{tCH~v-.{ DcN+{ 
#s(^	{@ /3#tCH~v-.#DcN+# 
#s(^#R /3tCH~v-. DcN+ 
#s(^	& /3tCH~v-. DcN+ 
#s(^	$ /3tCH~v-.DcN+ 
#s(^( /3tCH~v-.DcN+ 
#s(^< /3)tCH~v-.)DcN+) 
#s(^)^ /3%%tCH~v-.% DcN+% 
#s(^	%T /3tCH~v-.DcN+ 
#s(^2 /3tCH~v-.DcN+ 
#s(^: /3tCH~v-.DcN+ 
#s(^4 /3tCH~v-.DcN+ 
#s(^ /3tCH~v-.DcN+ 
#s(^ /3tCH~v-.DcN+ 
#s(^8 /3tCH~v-.DcN+ 
#s(^8 /3ItCH~v-.IDcN+I 
#s(^I\ /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^> /3FtCH~v-.FDcN+F 
#s(^FV /3tCH~v-.DcN+ 
#s(^( /3tCH~v-.DcN+ 
#s(^$m	k$$ m	`x	;)) x	r'   