+
    Ti                        ^ RI t ^ RIt^ RIHtHtHtHtHt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 ^RIHt ^RIHt ^RIHt ^RIHt ^RIHtHt ]P>                  ! R4      t R R lt!R R lt"R R lt#RR R llt$RR R llt%RR R llt&RR R llt'RR R  llt(RR! R" llt)RR# R$ llt*RR% R& llt+RR' R( llt,RR) R* llt-RR+ R, llt.RR- R. llt/RR/ R0 llt0RR1 R2 llt1RR3 R4 llt2RR5 R6 llt3RR7 R8 llt4RR9 R: llt5RR; R< llt6RR= R> llt7RR? R@ llt8RRA RB llt9RRC RD llt:RRE RF llt;RRG RH llt<RRI RJ llt=RRK RL llt>RRM RN llt?RRO RP llt@RRQ RR lltARRS RT lltBRRU RV lltCRRW RX lltDRRY RZ lltERR[ R\ lltFRR] R^ lltGRR_ R` lltHRRa Rb lltIRRc Rd lltJRRe Rf lltKRRg Rh lltLRRi Rj lltMRRk Rl lltNRRm Rn lltORRo Rp lltPRRq Rr lltQRRs Rt lltRRRu Rv lltSRRw Rx lltTRRy Rz lltURR{ R| lltVRR} R~ lltWRR R lltXRR R lltYRR R lltZRR R llt[RR R llt\RR R llt]RR R llt^RR R llt_RR R llt`RR R lltaRR R lltbRR R lltcRR R lltdRR R llteRR R lltfRR R lltgRR R llthRR R lltiRR R lltjRR R lltkRR R lltlRR R lltmRR R lltnRR R lltoRR R lltpRR R lltqRR R lltrRR R lltsRR R llttRR R lltuRR R lltvRR R lltwRR R lltxRR R lltyRR R lltzRR R llt{RR R llt|RR R llt}RR R llt~RR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R lltRR R llt ! R R]EP*                  4      t ! R R]EP*                  4      tR# )    N)AnyAsyncIterator	AwaitableIteratorOptionalUnion)	urlencode)_api_module)_base_transformers)_common)_extra_utils)
_mcp_utils)_transformers)errors)types)BaseApiClient)get_value_by_path)set_value_by_path)
AsyncPagerPagerzgoogle_genai.modelsc                (    V ^8  d   QhR\         RR/#    
enum_valuereturnNr   )formats   "^/home/kuhnn/.local/share/uv/tools/nano-pdf/lib/python3.14/site-packages/google/genai/models.py__annotate__r   (   s     Q Q Q Q    c                 D    V \        R .4      9   d   \        V  R24      hR# )	ALLOW_ALL+ enum value is not supported in Gemini API.Nset
ValueErrorr   s   &r   (_PersonGeneration_to_mldev_enum_validater(   (   s)    3}%%

|#NO
PP &r    c                (    V ^8  d   QhR\         RR/# r   r   )r   s   "r   r   r   -   s     Q Q# Q$ Qr    c                 D    V \        R .4      9   d   \        V  R24      hR# )
BLOCK_NONEr#   Nr$   r'   s   &r   )_SafetyFilterLevel_to_mldev_enum_validater,   -   s)    3~&&

|#NO
PP 'r    c                (    V ^8  d   QhR\         RR/# r   r   )r   s   "r   r   r   2   s      Q QQ	Qr    c                 D    V \        R .4      9   d   \        V  R24      hR# )STYLEr#   Nr$   r'   s   &r   4_VideoGenerationReferenceType_to_mldev_enum_validater0   2   s*     3y>!

|#NO
PP "r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r   from_objectparent_objectroot_objectr   r   dictstrr   objectr   )r   s   "r   r   r   9   n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                     / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       V# )datadisplay_name6display_name parameter is not supported in Gemini API.	mime_typemimeTypegetvsetvr&   r3   r4   r5   	to_objects   &&& r   _Blob_to_mldevrF   9   sw    
 !)	+x ,VHd;9:	+'(4
M
NN	+}%1ZL${[M"BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   K   n     6 6tCH~v-.6DcN+6 %S#X 6786 
#s(^	6r    c           
      f   / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e   \        VR
.\        V R	.4      4       \        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  qDNK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )contentcitationMetadatacitation_metadata
tokenCounttoken_countfinishReasonfinish_reasonavgLogprobsavg_logprobsgroundingMetadatagrounding_metadataindexlogprobsResultlogprobs_resultsafetyRatingssafety_ratingsurlContextMetadataurl_context_metadata)rB   rC   _CitationMetadata_from_mldevr3   r4   r5   rE   items   &&&  r   _Candidate_from_mldevr_   K   s   
 !)	+	{#/YKkI;!?@	+*+,8	$123Y	
 
+~&2]OT+~%FG	+'(4_%tK.9I'JK	+'3^$d;&HI	++,-9	[./0 
+y!-WItK';<	+()*6&'k<L;M)NO	+()5	{_,=>?>$>? 
+,-.:	 [/01 
 	@s   3
F.c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                     / p\        V R .4      e)   \        TR.\        V R .4       Uu. uF  qDNK  	  up4       V# u upi )citationSources	citationsrB   rC   r]   s   &&&  r   r\   r\      sW    
 !)	+)*+7	{->,?@A@$@A 
 	Bs   
<c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# r   
api_clientr3   r4   r5   r   r   r   r7   r8   r   r9   r   )r   s   "r   r   r      sx      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                 &   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e=   \        TR.\        P                  ! \        VR.4      4       Uu. uF  qUNK  	  up4       V# u upi )model_urlcontents)rB   rC   tt_model
t_contentsrh   r3   r4   r5   rE   r^   s   &&&&  r   "_ComputeTokensParameters_to_vertexrr      s     !)	+y!-				*d;	:; 
+
|$0	,,tK*'FGHG$GH 
 	Is   ;
Bc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      n      tCH~v-.DcN+ %S#X 678 
#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  qDNK  	  up4       V# u upi )sdkHttpResponsesdk_http_response
tokensInfotokens_infore   r]   s   &&&  r   "_ComputeTokensResponse_from_vertexrz      s    
 !)	+)*+7'(${=N<O*P 
+~&2	{\N;<;$;< 
 	=s   
A$c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      n      tCH~v-.DcN+ %S#X 678 
#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# )	truncatedrN   re   rD   s   &&& r   '_ContentEmbeddingStatistics_from_vertexr      s[    
 !)	+}%1[M4k]#CD	+'3]OT+%GH	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      rt   r    c           
          / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       V# )values
statistics)rB   rC   r   rD   s   &&& r   _ContentEmbedding_from_vertexr      sl    
 !)	+z".XJ[8* =>	+~&2	/|n-y	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                     / p\        V R .4      e4   \        TR .\        V R .4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )partsrole)rB   rC   _Part_to_mldevr]   s   &&&  r   _Content_to_mldevr      s    
 !)	+y!-		 [7)4	
4 4K84	
 
+x ,VHd;9:		
s   A/c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r      n      tCH~v-.DcN+ %S#X 678 
#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# )control_typecontrolType enable_control_image_computationcomputeControlre   rD   s   &&& r   !_ControlReferenceConfig_to_vertexr      si    
 !)	+'(4]OT+7G%HI	+:;<H	[=>? 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                     / p\        V R .4      e   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        R4      hV# )system_instructionz<system_instruction parameter is not supported in Gemini API.toolsz/tools parameter is not supported in Gemini API.generation_configz;generation_config parameter is not supported in Gemini API.)rB   r&   rD   s   &&& r   _CountTokensConfig_to_mldevr     sp    
 !)	+,-.:
F  
+y!-
F
GG	++,-9
E  
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   %  n     ! !tCH~v-.!DcN+! %S#X 678! 
#s(^	!r    c                 t   / p\        V R .4      e.   \        VR.\        P                  ! \        V R .4      4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\	        WCV4      NK  	  up4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       V# u upi )r   systemInstructionr   r   generationConfig)rB   rC   rn   	t_content_Tool_to_vertex_GenerationConfig_to_vertexr]   s   &&&  r   _CountTokensConfig_to_vertexr   %  s    
 !)	+,-.:		D';&<=> 
+y!-		 [7)4	
4 D[94	
 
++,-9	#234i	
 
	
s   %B5c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   I  sx      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      eH   \        TR.\        P                  ! \        VR.4      4       Uu. uF  p\        WTV4      NK  	  up4       \        VR.4      e   \        \        VR.4      WC4       V# u upi rk   rl   rm   config)rB   rC   rn   ro   rp   r   r   rq   s   &&&&  r   _CountTokensParameters_to_mldevr   I  s     !)	+y!-				*d;	:; 
+
|$0	 T+
|%DE	
E d{;E	
 
+z".[8*%y 
	
s   ;B?c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   i  sx      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                 r   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e=   \        TR.\        P                  ! \        VR.4      4       Uu. uF  qUNK  	  up4       \        VR.4      e   \        \        VR.4      WC4       V# u upi r   )rB   rC   rn   ro   rp   r   rq   s   &&&&  r    _CountTokensParameters_to_vertexr   i  s     !)	+y!-				*d;	:; 
+
|$0	,,tK*'FGHG$GH 
+z". [8*%y 
 	Is   ;
B4c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#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   \        VR.\        V R.4      4       V# )rv   rw   totalTokenstotal_tokenscachedContentTokenCountcached_content_token_countre   rD   s   &&& r   _CountTokensResponse_from_mldevr     s    
 !)	+)*+7'(${=N<O*P 
+'3^$d;&HI	+123?	%&[456 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#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# )rv   rw   r   r   re   rD   s   &&& r    _CountTokensResponse_from_vertexr     sg    
 !)	+)*+7'(${=N<O*P 
+'3^$d;&HI	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                     / p\        VR .4      e0   \        VRR.\        P                  ! V \        VR .4      4      4       V# rk   rl   namerB   rC   rn   ro   rh   r3   r4   r5   rE   s   &&&& r   _DeleteModelParameters_to_mldevr     J     !)	+y!-				*d;	:; 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r   r    c                     / p\        VR .4      e0   \        VRR.\        P                  ! V \        VR .4      4      4       V# r   r   r   s   &&&& r    _DeleteModelParameters_to_vertexr     r   r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                 Z    / p\        V R .4      e   \        VR.\        V R .4      4       V# rv   rw   re   rD   s   &&& r   _DeleteModelResponse_from_mldevr     @    
 !)	+)*+7'(${=N<O*P 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                 Z    / p\        V R .4      e   \        VR.\        V R .4      4       V# r   re   rD   s   &&& r    _DeleteModelResponse_from_vertexr     r   r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     t     v vtCH~v-.vDcN+v %S#X 678v 
#s(^	vr    c                 z   / p\        V R .4      e   \        VRR.\        V R .4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        VRR
.\        V R	.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       V# ) output_gcs_uri
parameters
storageUrinegative_promptnegativePromptnumber_of_imagessampleCountaspect_ratioaspectRatioguidance_scaleguidanceScaleseedsafety_filter_levelsafetySettingperson_generationpersonGenerationinclude_safety_attributesincludeSafetyAttributesinclude_rai_reasonincludeRaiReasonlanguageoutput_mime_typeoutput_compression_qualityadd_watermarkaddWatermarklabels	edit_modeeditMode
base_stepsr   outputOptionsr@   r   r   compressionQuality)r   
editConfig	baseStepsre   rD   s   &&& r   _EditImageConfig_to_vertexr     sO   
 !)	+()*6	|$[+,- 
+)*+7	'([,-. 
+*+,8	}%[-./ 
+'(4	}%[>*+ 
+()*6	'[+,- 
+x ,v.[6(0KL	+-./;	'[012 
++,-9	)*[./0 
+345A	01[678 
+,-.:	)*[/01 
+
|$0	z"[:,' 
+*+,83[-./ 
+456B=[789 
+()5	~&[?+, 
+z".
Dxj$AB	+}%1	z"[;-( 
+~&21[<.) 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   f  sx         tCH~v-.  DcN+  %S#X 678	 
 
#s(^ r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \        VRR.\        VR.4      4       \        VR.4      e5   \        TRR.\        VR.4       Uu. uF  p\	        WTV4      NK  	  up4       \        VR.4      e   \        \        VR.4      WC4       V# u upi )rk   rl   promptinstances[0]reference_imagesreferenceImagesr   )rB   rC   rn   ro   _ReferenceImageAPI_to_vertexr   rq   s   &&&&  r   _EditImageParameters_to_vertexr   f  s     !)	+y!-				*d;	:; 
+z".^X.[8*0MN	+*+,8	*+ [+=*>?	
? )+F?	
 
+z".[8*%y 
	
s   Cc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                     / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       V# u upi rv   rw   predictionsgenerated_imagesrB   rC   _GeneratedImage_from_vertexr]   s   &&&  r   _EditImageResponse_from_vertexr        
 !)	+)*+7'(${=N<O*P 
+'3	 [=/:	
: (E:	
 
	
   A/c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                 h   / p\        V R .4      e   \        VRR.\        V R .4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        R	4      hV# )
	task_type
requests[]taskTypetitleoutput_dimensionalityoutputDimensionalityr?   z3mime_type parameter is not supported in Gemini API.auto_truncatez7auto_truncate parameter is not supported in Gemini API.rA   rD   s   &&& r   _EmbedContentConfig_to_mldevr    s    
 !)	+}%1	z"[;-( 
+y!-w/kG91MN	+/01=	-.[234 
+}%1
J
KK	+()5
N
OO	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     sn     & &tCH~v-.&DcN+& %S#X 678& 
#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 R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR	.\        V R.4      4       V# )
r	  instances[]r  r  r   r  r?   r@   r  autoTruncatere   rD   s   &&& r   _EmbedContentConfig_to_vertexr    s    
 !)	+}%1	$[;-( 
+y!-0${WI2NO	+/01=	-.[234 
+}%1	
#[;-( 
+()5	~&[?+, 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     sx     $ $$tCH~v-.$ DcN+$ %S#X 678	$
 
#s(^$r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e@   \        TRR.\        P                  ! V \        VR.4      4       Uu. uF  pVNK  	  up4       \        VR.4      e   \        \        VR.4      WC4       \        VRR .\        P                  ! V \        VR .4      4      4       V# u upi )rk   rl   rm   r
  rJ   r   )rB   rC   rn   ro   t_contents_for_embedr  rq   s   &&&&  r    _EmbedContentParameters_to_mldevr    s     !)	+y!-				*d;	:; 
+
|$0	y! ..Dzl;	
 	
	 
+z". [8*%y Wii
Dwi89
 
%	
s   =C&c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     sx      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                 x   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e@   \        TRR.\        P                  ! V \        VR.4      4       Uu. uF  pVNK  	  up4       \        VR.4      e   \        \        VR.4      WC4       V# u upi )rk   rl   rm   r  rJ   r   )rB   rC   rn   ro   r  r  rq   s   &&&&  r   !_EmbedContentParameters_to_vertexr    s     !)	+y!-				*d;	:; 
+
|$0		" ..Dzl;	
 	
	 
+z".![8*%y 
	
s   =B7c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   4  r   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  qDNK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )rv   rw   
embeddingsmetadatare   r]   s   &&&  r    _EmbedContentResponse_from_mldevr!  4  s    
 !)	+)*+7'(${=N<O*P 
+~&2	{\N;<;$;< 
+
|$0ZL${ZL"AB	 	=s   
Bc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   L  n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                 <   / p\        V R .4      e   \        VR.\        V R .4      4       \        V RR.4      e5   \        TR.\        V RR.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )rv   rw   zpredictions[]r  r   )rB   rC   r   r]   s   &&&  r   !_EmbedContentResponse_from_vertexr%  L  s    
 !)	+)*+7'(${=N<O*P 
+67C	 [?L*IJ	
J *$;GJ	
 
+
|$0ZL${ZL"AB		
s   Bc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   g  r   r    c                     / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )endpointr   deployedModelIddeployed_model_idre   rD   s   &&& r   _Endpoint_from_vertexr+  g  sf    
 !)	+
|$0VHd;=>	+)*+7'(${=N<O*P 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   x  r:   r    c                     / p\        V R .4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r=   r>   file_urifileUrir?   r@   rB   r&   rC   rD   s   &&& r   _FileData_to_mldevr1  x  sw    
 !)	+'(4
M
NN	+
|$0YKkJ<!@A	+}%1ZL${[M"BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                 b   / 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   \        VR.\        V R.4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        R4      hV# )idargsr   partial_argsz6partial_args parameter is not supported in Gemini API.will_continuez7will_continue parameter is not supported in Gemini API.rA   rD   s   &&& r   _FunctionCall_to_mldevr8    s    
 !)	+v*TFDtf56	+x ,VHd;9:	+x ,VHd;9:	+'(4
M
NN	+()5
N
OO	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n      tCH~v-.DcN+ %S#X 678 
#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   \        R4      hV# )allowed_function_namesallowedFunctionNamesmodestream_function_call_argumentszHstream_function_call_arguments parameter is not supported in Gemini API.rA   rD   s   &&& r   _FunctionCallingConfig_to_mldevr@    s    
 !)	+012>	 [345 
+x ,VHd;9:	+89:F
	 
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     sn     # #tCH~v-.#DcN+# %S#X 678# 
#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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        R	4      hV# )
descriptionr   r   parameters_json_schemaparametersJsonSchemaresponseresponse_json_schemaresponseJsonSchemabehaviorz1behavior parameter is not supported in Vertex AI.rA   rD   s   &&& r   _FunctionDeclaration_to_vertexrJ    s&   
 !)	+'3]OT+%GH	+x ,VHd;9:	+~&2\ND|n$EF	+012>	 [345 
+
|$0ZL${ZL"AB	+./0<	[123 
+
|$0
H
II	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     s     v vvtCH~v-.v DcN+v %S#X 678	v
 
#s(^vr    c                 
   / p\        VR .4      e9   \        VR.\        \        P                  ! \        VR .4      4      VV4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR	.4      e   \        VR
.\        VR	.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e/   \        VR.\        P
                  ! V \        VR.4      4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        R4      h\        VR.4      e   \        R4      h\        VR.4      e4   \        TR .\        VR.4       Uu. uF  p\        WTV4      NK  	  up4       \        VR!.4      e]   \        TR!.\        P                  ! V \        VR!.4      4       Uu. uF#  p\        \        P                  ! W4      WC4      NK%  	  up4       \        VR".4      e$   \        VR#.\        \        VR".4      WC4      4       \        VR$.4      e   \        R%4      h\        VR&.4      e/   \        VR'.\        P                  ! V \        VR&.4      4      4       \        VR(.4      e   \        VR).\        VR(.4      4       \        VR*.4      e   \        VR+.\        VR*.4      4       \        VR,.4      e.   \        VR-.\        P                  ! \        VR,.4      4      4       \        VR..4      e   \        R/4      h\        VR0.4      e   \        VR1.\        VR0.4      4       \        VR2.4      e$   \        VR3.\        \        VR2.4      WC4      4       \        VR4.4      e   \        VR5.\        VR4.4      4       \        VR6.4      e   \        R74      hV# u upi u upi )8r   r   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frequencyPenaltyr   response_mime_typeresponseMimeTyperesponse_schemaresponseSchemarG  rH  routing_configz8routing_config parameter is not supported in Gemini API.model_selection_configz@model_selection_config parameter is not supported in Gemini API.safety_settingssafetySettingsr   tool_config
toolConfigr   0labels parameter is not supported in Gemini API.cached_contentcachedContentresponse_modalitiesresponseModalitiesmedia_resolutionmediaResolutionspeech_configspeechConfigaudio_timestampz9audio_timestamp parameter is not supported in Gemini API.thinking_configthinkingConfigimage_configimageConfigenable_enhanced_civic_answersenableEnhancedCivicAnswersmodel_armor_configz<model_armor_config parameter is not supported in Gemini API.)rB   rC   r   rn   r   t_schemar&   _SafetySetting_to_mldevt_tools_Tool_to_mldevt_tool_ToolConfig_to_mldevt_cached_content_namet_speech_config_ImageConfig_to_mldevrq   s   &&&&  r   _GenerateContentConfig_to_mldevr    s    !)	+,-.:	KK[+?*@AB	
 
+'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
O
PP	+012>
J  
+)*+7	 [+<*=>	
> $D[A>	
 
+y!-		 		*d;	.JK	
K 188J5yNK	
 
+'3	}o.		
 
+z".
G
HH	+()*6		[+;*<=	
 
+-./;	[012 
+*+,8%&[;M:N(O 
+()5		${_,=>? 
+)*+7
C  
+)*+7%&[;L:M(NO	+'(4	~./	
 
+789E	%&[:;< 
+,-.:
F  
k	
	
s   )T= )Uc                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     s     i iitCH~v-.i DcN+i %S#X 678	i
 
#s(^ir    c                 
   / p\        VR .4      e.   \        VR.\        P                  ! \        VR .4      4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR	.4      e   \        VR
.\        VR	.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e   \        VR.\        VR.4      4       \        VR.4      e/   \        VR.\        P                  ! V \        VR.4      4      4       \        VR.4      e   \        VR.\        VR.4      4       \        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  qUNK  	  up4       \        VR!.4      e]   \        TR!.\        P
                  ! V \        VR!.4      4       Uu. uF#  p\        \        P                  ! W4      WC4      NK%  	  up4       \        VR".4      e   \        VR#.\        VR".4      4       \        VR$.4      e   \        VR$.\        VR$.4      4       \        VR%.4      e/   \        VR&.\        P                  ! V \        VR%.4      4      4       \        VR'.4      e   \        VR(.\        VR'.4      4       \        VR).4      e   \        VR*.\        VR).4      4       \        VR+.4      e.   \        VR,.\        P                  ! \        VR+.4      4      4       \        VR-.4      e   \        VR..\        VR-.4      4       \        VR/.4      e   \        VR0.\        VR/.4      4       \        VR1.4      e$   \        VR2.\        \        VR1.4      WC4      4       \        VR3.4      e   \        R44      h\        VR5.4      e   \        VR6.\        VR5.4      4       V# u upi u upi )7r   r   rM  rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r   r_  r`  ra  rb  rG  rH  rc  routingConfigrd  modelConfigre  rf  r   rg  rh  r   rj  rk  rl  rm  rn  ro  rp  rq  rr  audioTimestamprs  rt  ru  rv  rw  Fenable_enhanced_civic_answers parameter is not supported in Vertex AI.ry  modelArmorConfig)rB   rC   rn   r   rz  r|  r   r~  r  r  _ImageConfig_to_vertexr&   rq   s   &&&&  r    _GenerateContentConfig_to_vertexr    s    !)	+,-.:		D';&<=> 
+'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_%tK:J9K'LM	+012>	[345 
+)*+7	{->,?@A@$@A 
+y!-		 		*d;	.JK	
K AHHZ6	OK	
 
+'3[=/(JK	+z".
Dxj$AB	+()*6		[+;*<=	
 
+-./;	[012 
+*+,8%&[;M:N(O 
+()5		${_,=>? 
+)*+7%&[;L:M(NO	+)*+7%&[;L:M(NO	+'(4	~./	
 
+789E
P  
+,-.:	[/01 
U 	B	
s   :
U)Uc                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   F  x     ! !!tCH~v-.! DcN+! %S#X 678	!
 
#s(^!r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      eH   \        TR.\        P                  ! \        VR.4      4       Uu. uF  p\        WTV4      NK  	  up4       \        VR.4      e%   \        VR.\        V \        VR.4      WC4      4       V# u upi rk   rl   rm   r   r   )rB   rC   rn   ro   rp   r   r  rq   s   &&&&  r   #_GenerateContentParameters_to_mldevr  F  s     !)	+y!-				*d;	:; 
+
|$0	 T+
|%DE	
E d{;E	
 
+z".	'[8*5y	
 
	
s   ;Cc                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   j  x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e=   \        TR.\        P                  ! \        VR.4      4       Uu. uF  qUNK  	  up4       \        VR.4      e%   \        VR.\        V \        VR.4      WC4      4       V# u upi r  )rB   rC   rn   ro   rp   r  rq   s   &&&&  r   $_GenerateContentParameters_to_vertexr  j  s     !)	+y!-				*d;	:; 
+
|$0	,,tK*'FGHG$GH 
+z".	([8*5y	
 
 	Is   ;
Cc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                 (   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e   \        VR
.\        V R	.4      4       V# u upi )rv   rw   
candidatesmodelVersionmodel_versionpromptFeedbackprompt_feedback
responseIdresponse_idusageMetadatausage_metadata)rB   rC   r_   r]   s   &&&  r   #_GenerateContentResponse_from_mldevr    s8   
 !)	+)*+7'(${=N<O*P 
+~&2	 [<.9	
9 "$;?9	
 
+'(4_%tK.9I'JK	+()*6&'k<L;M)NO	+~&2]OT+~%FG	+()5%&[?:K(LM	%	
s   Dc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                 b   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e)   \        TR.\        V R.4       Uu. uF  qDNK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e   \        VR
.\        V R	.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )rv   rw   r  
createTimecreate_timer  r  r  r  r  r  r  r  re   r]   s   &&&  r   $_GenerateContentResponse_from_vertexr    sN   
 !)	+)*+7'(${=N<O*P 
+~&2	{\N;<;$;< 
+~&2]OT+~%FG	+'(4_%tK.9I'JK	+()*6&'k<L;M)NO	+~&2]OT+~%FG	+()5%&[?:K(LM	% 	=s   
D,c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     st     n ntCH~v-.nDcN+n %S#X 678n 
#s(^	nr    c                     / p\        V R .4      e   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        VRR
.\        V R	.4      4       \        V R.4      e   \        R4      h\        V R.4      e1   \        \        V R.4      4       \        VRR.\        V R.4      4       \        V R.4      e1   \	        \        V R.4      4       \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        V. R O\        V R.4      4       \        V R.4      e   \        V. R!O\        V R.4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        R4      hV# )"r   8output_gcs_uri parameter is not supported in Gemini API.r   z9negative_prompt parameter is not supported in Gemini API.r   r   r   r   r   r   r   r   .seed parameter is not supported in Gemini API.r   r   r   r   r   r   r   r   r   r   r   r   z7add_watermark parameter is not supported in Gemini API.r   ri  
image_sizesampleImageSizeenhance_promptz8enhance_prompt parameter is not supported in Gemini API.r   r   )rB   r&   rC   r,   r(   rD   s   &&& r   _GenerateImagesConfig_to_mldevr    s   
 !)	+()*6
O
PP	+)*+7
C  
+*+,8	}%[-./ 
+'(4	}%[>*+ 
+()*6	'[+,- 
+x ,
E
FF	+-./;-[012 		'[012 
++,-9,[./0 		)*[./0 
+345A	01[678 
+,-.:	)*[/01 
+
|$0	z"[:,' 
+*+,83[-./ 
+456B=[789 
+()5
N
OO	+z".
G
HH	+~&2	()[<.) 
+()*6
O
PP	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   D  r   r    c                 z   / p\        V R .4      e   \        VRR.\        V R .4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        VRR
.\        V R	.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       V# ) 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  enhancePromptr   r   re   rD   s   &&& r   _GenerateImagesConfig_to_vertexr  D  sY   
 !)	+()*6	|$[+,- 
+)*+7	'([,-. 
+*+,8	}%[-./ 
+'(4	}%[>*+ 
+()*6	'[+,- 
+x ,v.[6(0KL	+-./;	'[012 
++,-9	)*[./0 
+345A	01[678 
+,-.:	)*[/01 
+
|$0	z"[:,' 
+*+,83[-./ 
+456B=[789 
+()5	~&[?+, 
+z".
Dxj$AB	+~&2	()[<.) 
+()*6	'[+,- 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                 $   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \        VRR.\        VR.4      4       \        VR.4      e   \	        \        VR.4      WC4       V# rk   rl   r   r   r   )rB   rC   rn   ro   r  r   s   &&&& r   "_GenerateImagesParameters_to_mldevr    s     !)	+y!-				*d;	:; 
+z".^X.[8*0MN	+z"."[8*%y 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r  r    c                 $   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \        VRR.\        VR.4      4       \        VR.4      e   \	        \        VR.4      WC4       V# r  )rB   rC   rn   ro   r  r   s   &&&& r   #_GenerateImagesParameters_to_vertexr    s     !)	+y!-				*d;	:; 
+z".^X.[8*0MN	+z".#[8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     n        tCH~v-. DcN+  %S#X 678  
#s(^	 r    c                 N   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e%   \        VR.\        \        V R.4      VV4      4       V# u upi rv   rw   r   r   positivePromptSafetyAttributes!positive_prompt_safety_attributes)rB   rC   _GeneratedImage_from_mldev_SafetyAttributes_from_mldevr]   s   &&&  r   "_GenerateImagesResponse_from_mldevr    s    
 !)	+)*+7'(${=N<O*P 
+'3	 [=/:	
: 'tD:	
 
+89:F	,-$?@A	
 
#	
   B"c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r  r    c                 N   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e%   \        VR.\        \        V R.4      VV4      4       V# u upi r  )rB   rC   r  _SafetyAttributes_from_vertexr]   s   &&&  r   #_GenerateImagesResponse_from_vertexr    s    
 !)	+)*+7'(${=N<O*P 
+'3	 [=/:	
: (E:	
 
+89:F	,-%?@A	
 
#	
r  c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   5  st     d dtCH~v-.dDcN+d %S#X 678d 
#s(^	dr    c                    / p\        V R .4      e   \        VRR.\        V R .4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        R
4      h\        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        R4      h\        V R.4      e%   \        VRR.\        \        V R.4      W24      4       \        V R.4      e5   \        TRR.\        V R.4       Uu. uF  p\	        WCV4      NK  	  up4       \        V R.4      e   \        R4      h\        V R.4      e   \        R 4      hV# u upi )!number_of_videosr   r   r   r  fpsz-fps parameter is not supported in Gemini API.duration_secondsdurationSecondsr   r  r   r   
resolutionr   r   pubsub_topicz6pubsub_topic parameter is not supported in Gemini API.r   r   r  r  generate_audioz8generate_audio parameter is not supported in Gemini API.
last_framer   	lastFramer   r   maskz.mask parameter is not supported in Gemini API.compression_qualityz=compression_quality parameter is not supported in Gemini API.)rB   rC   r&   _Image_to_mldev'_VideoGenerationReferenceImage_to_mldevr]   s   &&&  r   _GenerateVideosConfig_to_mldevr  5  s   
 !)	+*+,8	}%[-./ 
+()*6
O
PP	+w+
D
EE	+*+,8	()[-./ 
+x ,
E
FF	+'(4	}%[>*+ 
+~&2	|$[<.) 
++,-9	)*[./0 
+'(4
M
NN	+)*+7	'([,-. 
+()*6	'[+,- 
+()*6
O
PP	+~&2	%|n-y	
 
+*+,8	*+
 [+=*>?		
 @ 4 @		
	 
+x ,
E
FF	+-./;
G  
!	
s   >Ic          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     st     x xtCH~v-.xDcN+x %S#X 678x 
#s(^	x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 R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        VRR
.\        V R	.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       \        V R.4      e5   \        TRR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e%   \        VRR.\	        \        V R.4      W24      4       \        V R.4      e   \        VRR.\        V R.4      4       V# u upi )r  r   r   r   r   r  r  r  r   r   r   r  r   r   r  pubsubTopicr   r   r  r  r  generateAudior  r   r  r   r   r  r  r   )rB   rC   _Image_to_vertex(_VideoGenerationReferenceImage_to_vertex_VideoGenerationMask_to_vertexr]   s   &&&  r   _GenerateVideosConfig_to_vertexr    sq   
 !)	+*+,8	}%[-./ 
+()*6	|$[+,- 
+w+u-tK%/IJ	+*+,8	()[-./ 
+x ,v.[6(0KL	+'(4	}%[>*+ 
+~&2	|$[<.) 
++,-9	)*[./0 
+'(4	}%[>*+ 
+)*+7	'([,-. 
+()*6	'[+,- 
+()*6	'[+,- 
+~&2	%|n-y	
 
+*+,8	*+
 [+=*>?		
 @ 5 @		
	 
+x ,	 &vh'	
 
+-./;	+,[012 
1	
s   	Kc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     sn     ( (tCH~v-.(DcN+( %S#X 678( 
#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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V RR.4      e&   \        VR.\        \        V RR.4      VV4      4       \        V RR.4      e&   \        VR.\        \        V RR.4      VV4      4       V# )r   r   doneerrorrF  generateVideoResponseresult)rB   rC   "_GenerateVideosResponse_from_mldevrD   s   &&& r   #_GenerateVideosOperation_from_mldevr    s-   
 !)	+x ,VHd;9:	+
|$0ZL${ZL"AB	+x ,VHd;9:	+y!-WItK';<	+
$;<=I	*z+BCD	
 
+
$;<=I	
*z+BCD	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   B  sn     $ $tCH~v-.$DcN+$ %S#X 678$ 
#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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       V# )r   r   r  r  rF  r  )rB   rC   #_GenerateVideosResponse_from_vertexrD   s   &&& r   $_GenerateVideosOperation_from_vertexr  B  s   
 !)	+x ,VHd;9:	+
|$0ZL${ZL"AB	+x ,VHd;9:	+y!-WItK';<	+
|$0	+zl+Y	
 
+
|$0	
+zl+Y	
 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   i  x     ) ))tCH~v-.) DcN+) %S#X 678	)
 
#s(^)r    c                 <   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \        VRR.\        VR.4      4       \        VR.4      e%   \        VRR.\	        \        VR.4      WC4      4       \        VR.4      e%   \        VRR.\        \        VR.4      WC4      4       \        VR.4      e   \        \        VR.4      WC4       \        VR.4      e   \        \        VR.4      WC4       V# rk   rl   r   r   imagevideosourcer   )rB   rC   rn   ro   r  _Video_to_mldev_GenerateVideosSource_to_mldevr  r   s   &&&& r   "_GenerateVideosParameters_to_mldevr  i  s/    !)	+y!-				*d;	:; 
+z".^X.[8*0MN	+y!-	![7)4iM 
+y!-	![7)4iM 
+z"."[8*%y 
+z"."[8*%y 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r  r    c                 <   / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \        VRR.\        VR.4      4       \        VR.4      e%   \        VRR.\	        \        VR.4      WC4      4       \        VR.4      e%   \        VRR.\        \        VR.4      WC4      4       \        VR.4      e   \        \        VR.4      WC4       \        VR.4      e   \        \        VR.4      WC4       V# r  )rB   rC   rn   ro   r  _Video_to_vertex_GenerateVideosSource_to_vertexr  r   s   &&&& r   #_GenerateVideosParameters_to_vertexr    s/    !)	+y!-				*d;	:; 
+z".^X.[8*0MN	+y!-	!kG95yN 
+y!-	!kG95yN 
+z".#[8*%y 
+z".#[8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r  r    c                 8   / p\        V R .4      e4   \        TR.\        V R .4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )generatedSamplesgenerated_videosraiMediaFilteredCountrai_media_filtered_countraiMediaFilteredReasonsrai_media_filtered_reasons)rB   rC   _GeneratedVideo_from_mldevr]   s   &&&  r   r  r    s    
 !)	+*+,8	 [+=*>?	
? 'tD?	
 
+/01=	#$[234 
+123?	%&[456 
)	
   Bc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r  r    c                 8   / p\        V R .4      e4   \        TR.\        V R .4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )videosr  r   r  r  r  )rB   rC   _GeneratedVideo_from_vertexr]   s   &&&  r   r  r    s    
 !)	+z".	 [8*5	
5 (E5	
 
+/01=	#$[234 
+123?	%&[456 
)	
r  c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   	  n      tCH~v-.DcN+ %S#X 678 
#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      W24      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       V# r   r   r  r  )rB   rC   r  r  rD   s   &&& r   r  r  	  s    
 !)	+z".14hZ3P 
+y!-	![7)4iM 
+y!-	![7)4iM 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   	  r  r    c           
      (   / p\        V R .4      e   \        VRR .\        V R .4      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       V# r  )rB   rC   r  r  rD   s   &&& r   r  r  	  s    
 !)	+z".14hZ3P 
+y!-	!kG95yN 
+y!-	!kG95yN 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   ;	  r   r    c           
          / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e)   \        TR.\        V R.4       Uu. uF  qDNK  	  up4       V# u upi )_selfr  r   )rB   rC   _Image_from_vertexr]   s   &&&  r   _GeneratedImageMask_from_vertexr  ;	  s    
 !)	+y!-	wi()	
 
+z".H:kH:1NO1N1NO 
  Ps   
A.c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   R	  sn      tCH~v-.DcN+ %S#X 678 
#s(^	r    c           
      "   / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R .4      e$   \        VR.\        \        V R .4      W24      4       V# )r  r  raiFilteredReasonrai_filtered_reasonsafety_attributes)rB   rC   _Image_from_mldevr  rD   s   &&& r   r  r  R	  s    
 !)	+y!-		${WI6	O 
++,-9	[./0 
+y!-	$wi()	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   r	  sn     " "tCH~v-."DcN+" %S#X 678" 
#s(^	"r    c           
      r   / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r  r  r  r  r  r   enhanced_prompt)rB   rC   r  r  rD   s   &&& r   r  r  r	  s    
 !)	+y!-		wi()	
 
++,-9	[./0 
+y!-	%wi()	
 
+z".&'kH:)FG	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   	  ra   r    c           
      n    / p\        V R .4      e$   \        VR .\        \        V R .4      W24      4       V# )r  )rB   rC   _Video_from_mldevrD   s   &&& r   r  r  	  sC    
 !)	+y!-		${WI6	O 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   	  r:   r    c           
      n    / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       V# )r  r  )rB   rC   _Video_from_vertexrD   s   &&& r   r	  r	  	  sF    
 !)	+y!-		wi()	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   	  st     o otCH~v-.oDcN+o %S#X 678o 
#s(^	o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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR	.\        V R.4      4       \        V R
.4      e   \        VR.\        V R
.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R .4      e   \        VR!.\        V R .4      4       \        V R".4      e   \        VR".\        V R".4      4       \        V R#.4      e   \        VR$.\        V R#.4      4       \        V R%.4      e   \        VR&.\        V R%.4      4       \        V R'.4      e   \        VR(.\        V R'.4      4       \        V R).4      e   \        R*4      hV# )+rd  r  rG  rH  rr  r  rR  rS  enable_affective_dialogenableAffectiveDialogr]  r^  rZ  rT  rU  rn  ro  r[  r\  rX  rY  r_  r`  rl  rm  ra  rb  rc  r  r   rp  rq  rV  rW  rM  rs  rt  rP  rQ  rN  rO  rw  r  rA   rD   s   &&& r   r   r   	  s   
 !)	+012>	[345 
+./0<	[123 
+)*+7%&[;L:M(NO	+)*+7%&[;L:M(NO	+123?	 ![456 
++,-9	[./0 
+
|$0ZL${ZL"AB	++,-9%&[;N:O(P 
+*+,8%&[;M:N(O 
+*+,8%&[;M:N(O 
++,-9	[./0 
+,-.:	[/01 
+-./;	[012 
+)*+7%&[;L:M(NO	+()*6_%tK:J9K'LM	+x ,VHd;9:	+()5^$d;8I&JK	+()*6_%tK:J9K'LM	+'3]OT+%GH	+)*+7%&[;L:M(NO	+y!-VHd;	:;	+y!-VHd;	:;	+789E
P  
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   +
  r   r    c                     / p\        VR .4      e0   \        VRR.\        P                  ! V \        VR .4      4      4       V# r   r   r   s   &&&& r   _GetModelParameters_to_mldevr*  +
  r   r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   <
  r   r    c                     / p\        VR .4      e0   \        VRR.\        P                  ! V \        VR .4      4      4       V# r   r   r   s   &&&& r   _GetModelParameters_to_vertexr-  <
  r   r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   M
  r|   r    c                     / p\        V R .4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       V# )auth_configz5auth_config parameter is not supported in Gemini API.enable_widgetenableWidgetr0  rD   s   &&& r   _GoogleMaps_to_mldevr3  M
  sS    
 !)	+'3
L
MM	+()5^$d;8I&JK	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   \
  r   r    c                     / p\        V R .4      e   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       V# )exclude_domainsz9exclude_domains parameter is not supported in Gemini API.blocking_confidencez=blocking_confidence parameter is not supported in Gemini API.time_range_filtertimeRangeFilterr0  rD   s   &&& r   _GoogleSearch_to_mldevr:  \
  s    
 !)	+)*+7
C  
+-./;
G  
++,-9%&[;N:O(P 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   t
  n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c                 F   / 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   \        R4      h\        V R.4      e   \        R4      h\        V R.4      e   \        R	4      hV# )
r   r   r  	imageSizer   z;person_generation parameter is not supported in Gemini API.r   z:output_mime_type parameter is not supported in Gemini API.r   zDoutput_compression_quality parameter is not supported in Gemini API.rA   rD   s   &&& r   r  r  t
  s    
 !)	+'(4]OT+7G%HI	+~&2[M4l^#DE	++,-9
E  
+*+,8
D  
+456B
N  
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   
  r   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   \        VR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        VRR
.\        V R	.4      4       V# )r   r   r  r>  r   r   r   imageOutputOptionsr@   r   r   re   rD   s   &&& r   r  r  
  s    
 !)	+'(4]OT+7G%HI	+~&2[M4l^#DE	++,-9	[./0 
+*+,8	z*[-./ 
+456B	34[789 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   
  n      tCH~v-.DcN+ %S#X 678 
#s(^	r    c           
          / p\        V R .4      e.   \        VR.\        P                  ! \        V R .4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )bytesBase64Encodedimage_bytesr@   r?   rB   rC   base_tt_bytesrD   s   &&& r   r  r  
  so    
 !)	+,-.:	tK*>)?@A 
+
|$0[M4j\#BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   
  r   r    c           
      "   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )gcsUrigcs_urirE  rF  r@   r?   rG  rD   s   &&& r   r  r  
  s    
 !)	+z".YKkH:!>?	+,-.:	tK*>)?@A 
+
|$0[M4j\#BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   
  r   r    c           
         / p\        V R .4      e   \        R4      h\        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rM  z1gcs_uri parameter is not supported in Gemini API.rF  rE  r?   r@   )rB   r&   rC   rH  rI  rD   s   &&& r   r  r  
  s    
 !)	+	{#/
H
II	+'3	tK-9: 
+}%1ZL${[M"BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   
  r   r    c           
      "   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rM  rL  rF  rE  r?   r@   rG  rD   s   &&& r   r  r  
  s    
 !)	+	{#/XJ[9+ >?	+'3	tK-9: 
+}%1ZL${[M"BC	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r  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R.4      e   \        VRR.\        VR.4      4       \        VR.4      e0   \        VRR.\        P                  ! V \        VR.4      4      4       V# 		page_size_querypageSize
page_token	pageTokenfilter
query_baserl   
models_urlrB   rC   rn   t_models_urlr   s   &&&& r   _ListModelsConfig_to_mldevr_         !)	+}%1*-tK+/O 
+~&2	;[<.) 
+z".8,d;
.KL	+~&2		z4l^#DE 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   -  r  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R.4      e   \        VRR.\        VR.4      4       \        VR.4      e0   \        VRR.\        P                  ! V \        VR.4      4      4       V# rT  r]  r   s   &&&& r   _ListModelsConfig_to_vertexrc  -  r`  r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   N  x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                 X    / p\        VR .4      e   \        V \        VR .4      WC4       V# r   )rB   r_  r   s   &&&& r   _ListModelsParameters_to_mldevrh  N  s8     !)	+z".Dxj19 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   ]  re  r    c                 X    / p\        VR .4      e   \        V \        VR .4      WC4       V# rg  )rB   rc  r   s   &&&& r   _ListModelsParameters_to_vertexrk  ]  s8     !)	+z".Dxj19 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   l  r#  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      eH   \        TR.\        P                  ! \        V R.4      4       Uu. uF  p\	        WCV4      NK  	  up4       V# u upi rv   rw   nextPageTokennext_page_tokenr  models)rB   rC   rn   t_extract_models_Model_from_mldevr]   s   &&&  r   _ListModelsResponse_from_mldevrt  l  s    
 !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+y!-	
 **4gY+GH	
H d{;H	
 
	
   B+c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r#  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      eH   \        TR.\        P                  ! \        V R.4      4       Uu. uF  p\	        WCV4      NK  	  up4       V# u upi rn  )rB   rC   rn   rr  _Model_from_vertexr]   s   &&&  r   _ListModelsResponse_from_vertexry    s    
 !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+y!-	
 **4gY+GH	
H t<H	
 
	
ru  c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     rC  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   \        VR.\        V R.4      4       V# )	mask_modemaskModesegmentation_classesmaskClassesmask_dilationdilationre   rD   s   &&& r   _MaskReferenceConfig_to_vertexr    s    
 !)	+}%1ZL${[M"BC	+./0<M?D7M6N$O 
+()5ZL${_4E"FG	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     sn     7 7tCH~v-.7DcN+7 %S#X 6787 
#s(^	7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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e   \        VR
.\        V R	.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r   displayNamer=   rC  versionr  tuned_model_infoinputTokenLimitinput_token_limitoutputTokenLimitoutput_token_limitsupportedGenerationMethodssupported_actionsrM  maxTemperaturemax_temperaturerO  rN  rQ  rP  thinkingre   rD   s   &&& r   rs  rs    s)   
 !)	+x ,VHd;9:	+'3^$d;&HI	+'3]OT+%GH	+	{#/YKkI;!?@	+y!-'(${WI*FG	+)*+7'(${=N<O*P 
+*+,8	[-./ 
+456B	[789 
+'3]OT+%GH	+()*6&'k<L;M)NO	+x ,WItK&:;	+x ,WItK&:;	+
|$0ZL${ZL"AB	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     rH   r    c                 T   / 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   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e$   \        VR
.\        \        V R	.4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e)   \        TR.\        V R.4       Uu. uF  qDNK  	  up4       V# u upi u upi )r   r  r=   rC  	versionIdr  deployedModels	endpointsr   r  r  defaultCheckpointIddefault_checkpoint_idcheckpoints)rB   rC   r+  _TunedModelInfo_from_vertexr]   s   &&&  r   rx  rx    s   
 !)	+x ,VHd;9:	+'3^$d;&HI	+'3]OT+%GH	+}%1YKkK=!AB	+()*6	 [+;*<=	
= "$;?=	
 
+z".XJ[8* =>	+y!-	#wi()	
 
+-./;	 ![012 
+'3	{]O<=<$<= 
A	
: 	>s   	F 
F%c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   )  st     G GtCH~v-.GDcN+G %S#X 678G 
#s(^	G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   \        VR.\        V R.4      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       \        V R.4      e$   \        VR	.\        \        V R.4      W24      4       \        V R
.4      e   \        VR.\        V R
.4      4       \        V R.4      e$   \        VR.\	        \        V R.4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rn  ro  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)rB   rC   r1  r8  rF   rD   s   &&& r   r   r   )  s!   
 !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%1	{m,i	
 
+()5	/0)	
 
++,-9	[./0 
+'3	}o.		
 
+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   s  r:   r    c           
      n    / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       V# )product_imager  rB   rC   r  rD   s   &&& r   _ProductImage_to_vertexr  s  sH    
 !)	+()5		/0)	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     t     L LtCH~v-.LDcN+L %S#X 678L 
#s(^	L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 R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR	.\        V R.4      4       \        V R
.4      e   \        VRR.\        V R
.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r   r   r   re   rD   s   &&& r   _RecontextImageConfig_to_vertexr    s#   
 !)	+*+,8	}%[-./ 
+~&2	{#[<.) 
+()*6	|$[+,- 
+x ,v.[6(0KL	+-./;	'[012 
++,-9	)*[./0 
+()5	~&[?+, 
+*+,83[-./ 
+456B=[789 
+()*6	'[+,- 
+z".
Dxj$AB	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \	        \        VR.4      WC4       \        VR.4      e   \        \        VR.4      WC4       V# rk   rl   r  r   )rB   rC   rn   ro   _RecontextImageSource_to_vertexr  r   s   &&&& r   #_RecontextImageParameters_to_vertexr    s     !)	+y!-				*d;	:; 
+z".#[8*%y 
+z".#[8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                     / p\        V R .4      e4   \        TR.\        V R .4       Uu. uF  p\        WCV4      NK  	  up4       V# u upi )r   r   r  r]   s   &&&  r   #_RecontextImageResponse_from_vertexr    sc    
 !)	+'3	 [=/:	
: (E:	
 
	
   Ac          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r  r    c                 R   / p\        V R .4      e   \        VRR .\        V R .4      4       \        V R.4      e%   \        V. RO\        \        V R.4      W24      4       \        V R.4      e5   \        TRR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       V# u upi )r   r   person_imageproduct_imagesproductImages)r   personImager  )rB   rC   r  r  r]   s   &&&  r   r  r    s    
 !)	+z".14hZ3P 
+'(40~./	
 
+()*6	) [+;*<=	
= $D[A=	
 
	
s   B$c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   #  sn     5 5tCH~v-.5DcN+5 %S#X 6785 
#s(^	5r    c           
      v   / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       \        V R.4      e$   \        VR	.\	        \        V R.4      W24      4       \        V R
.4      e   \        VR.\        V R
.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )reference_imagereferenceImagereference_idreferenceIdreference_typereferenceTypemask_image_configmaskImageConfigcontrol_image_configcontrolImageConfigstyle_image_configstyleImageConfigsubject_image_configsubjectImageConfig)rB   rC   r  r  r   rD   s   &&& r   r   r   #  sz   
 !)	+)*+7	012I	
 
+'(4]OT+7G%HI	+()*6_%tK:J9K'LM	++,-9	&234i	
 
+./0<	)567	
 
+,-.:	[/01 
+./0<	[123 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   [  r   r    c           	         / p\        V R R.4      e   \        VR.\        V R R.4      4       \        V R R.4      e   \        VR.\        V R R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# safetyAttributes
categoriesscorescontentTypecontent_typere   rD   s   &&& r   r  r  [      
 !)	+*L9:F	[-|<= 
+*H56BH:tK2Dh1OP 
+'3^$d;&HI	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   s  r   r    c           	         / p\        V R R.4      e   \        VR.\        V R R.4      4       \        V R R.4      e   \        VR.\        V R R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# r  re   rD   s   &&& r   r  r  s  r  r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r:   r    c                     / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       V# )categorymethodz0method parameter is not supported in Gemini API.	thresholdrA   rD   s   &&& r   r{  r{    sv    
 !)	+
|$0ZL${ZL"AB	+z".
G
HH	+}%1[M4k]#CD	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     ra   r    c           
      n    / p\        V R .4      e$   \        VR .\        \        V R .4      W24      4       V# )r  r  rD   s   &&& r   _ScribbleImage_to_vertexr    sC    
 !)	+y!-		kG95yN 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     sn     ) )tCH~v-.)DcN+) %S#X 678) 
#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 R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR	.\        V R.4      4       \        V R
.4      e   \        VR
.\        V R
.4      4       V# )r>  r   max_predictionsmaxPredictionsconfidence_thresholdconfidenceThresholdr  maskDilationbinary_color_thresholdbinaryColorThresholdr   re   rD   s   &&& r   _SegmentImageConfig_to_vertexr    s/   
 !)	+x ,v.[6(0KL	+)*+7	'([,-. 
+./0<	,-[123 
+()5	~&[?+, 
+012>	-.[345 
+z".
Dxj$AB	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r  r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \	        \        VR.4      WC4       \        VR.4      e   \        \        VR.4      WC4       V# r  )rB   rC   rn   ro   _SegmentImageSource_to_vertexr  r   s   &&&& r   !_SegmentImageParameters_to_vertexr    s     !)	+y!-				*d;	:; 
+z".![8*%y 
+z".![8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                     / p\        V R .4      e4   \        TR.\        V R .4       Uu. uF  p\        WCV4      NK  	  up4       V# u upi )r   generated_masks)rB   rC   r  r]   s   &&&  r   !_SegmentImageResponse_from_vertexr    sc    
 !)	+'3	 [=/:	
: ,D[I:	
 
	
r  c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r<  r    c           
      (   / p\        V R .4      e   \        VRR .\        V R .4      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       \        V R.4      e%   \        VRR.\        \        V R.4      W24      4       V# )r   r   r  scribble_imagescribble)rB   rC   r  r  rD   s   &&& r   r  r    s    
 !)	+z".14hZ3P 
+y!-	!kG95yN 
+()*6	$ /019	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   %  r:  r    c           
          / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e%   \        VR.\        \        V R.4      VV4      4       V# )retrieval_configretrievalConfigfunction_calling_configfunctionCallingConfig)rB   rC   r@  rD   s   &&& r   r  r  %  s    
 !)	+*+,8%&[;M:N(O 
+123?	 !'89:	
 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   >  sn     : :tCH~v-.:DcN+: %S#X 678: 
#s(^	:r    c           
      B   / p\        V R .4      e   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        R	4      h\        V R
.4      e)   \        TR.\        V R
.4       Uu. uF  qDNK  	  up4       \        V R.4      e$   \        VR.\        \        V R.4      W24      4       \        V R.4      e$   \        VR.\	        \        V R.4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )	retrievalz3retrieval parameter is not supported in Gemini API.computer_usecomputerUsefile_search
fileSearchcode_executioncodeExecutionenterprise_web_searchz?enterprise_web_search parameter is not supported in Gemini API.function_declarationsfunctionDeclarationsgoogle_maps
googleMapsgoogle_searchgoogleSearchgoogle_search_retrievalgoogleSearchRetrievalurl_context
urlContext)rB   r&   rC   r3  r:  r]   s   &&&  r   r}  r}  >  s   
 !)	+}%1
J
KK	+'(4]OT+7G%HI	+'3\ND}o$FG	+()*6_%tK:J9K'LM	+/01=
I  
+/01=	 {-D,EFGF$FG 
+'3	}o.		
 
+()5	/0)	
 
+123?	 ![456 
+'3\ND}o$FG	? 	Hs   
Fc          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   {  sn     3 3tCH~v-.3DcN+3 %S#X 6783 
#s(^	3r    c                 L   / 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   \        R4      h\        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R	.4      e4   \        TR
.\        V R	.4       Uu. uF  p\        WCV4      NK  	  up4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# u upi )r  r	  r
  r  z4file_search parameter is not supported in Vertex AI.r  r  r  enterpriseWebSearchr  r  r  r  r  r  r  r  r  r  )rB   rC   r&   rJ  r]   s   &&&  r   r   r   {  s   
 !)	+}%1[M4k]#CD	+'(4]OT+7G%HI	+'3
K
LL	+()*6_%tK:J9K'LM	+/01=	[234 
+/01=	  [+B*CD	
D +4KHD	
 
+'3\ND}o$FG	+()5^$d;8I&JK	+123?	 ![456 
+'3\ND}o$FG	-	
s   #F!c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r:  r    c           	          / p\        V R R.4       e   \        VR.\        V R R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r   z&google-vertex-llm-tuning-base-model-id
base_modelr  r  
updateTimeupdate_timere   rD   s   &&& r   r  r    s    
 !)
;#KLM 		[8%MNO 
+~&2]OT+~%FG	+~&2]OT+~%FG	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   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   \        VR.\        V R.4      4       V# r=   r  rC  r  r  re   rD   s   &&& r   _UpdateModelConfig_to_mldevr%        
 !)	+'(4kN;K)LM	+'3kM?)KL	+/01=	[234 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   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   \        VR.\        V R.4      4       V# r$  re   rD   s   &&& r   _UpdateModelConfig_to_vertexr)    r&  r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     x      tCH~v-. DcN+ %S#X 678	
 
#s(^r    c                     / p\        VR .4      e0   \        VRR.\        P                  ! V \        VR .4      4      4       \        VR.4      e   \	        \        VR.4      WC4       V# )rk   rl   r   r   )rB   rC   rn   ro   r%  r   s   &&&& r   _UpdateModelParameters_to_mldevr-    sq     !)	+y!-				*d;	:; 
+z".[8*%y 
r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r     r+  r    c                     / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e   \	        \        VR.4      WC4       V# )rk   rl   r   )rB   rC   rn   ro   r)  r   s   &&&& r    _UpdateModelParameters_to_vertexr0    sq     !)	+y!-				*d;	:; 
+z". [8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   $  r  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 R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R	.4      e   \        V. RO\        V R	.4      4       \        V R
.4      e   \        V. RO\        V R
.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        V. RO\        V R.4      4       \        V R.4      e   \        VR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       \        V R.4      e   \        VRR.\        V R.4      4       V# )r   r   r   r   r   r   r   r   r   r   r   enhance_input_imageimage_preservation_factorr   r   r   r>  r   r   )r   upscaleConfigenhanceInputImage)r   r5  imagePreservationFactorre   rD   s   &&& r    _UpscaleImageAPIConfig_to_vertexr8  $  s    
 !)	+()*6	|$[+,- 
+-./;	'[012 
++,-9	)*[./0 
+,-.:	)*[/01 
+*+,83[-./ 
+456B=[789 
+-./;<[012 
+345AB[678 
+z".
Dxj$AB	+*+,8	}%[-./ 
+x ,v.[6(0KL	r    c                L   V ^8  d   QhR\         R\        \        \        \        3,          \
        3,          R\        \        \        \        3,          ,          R\        \        \        \        \        3,          \
        3,          ,          R\        \        \        3,          /# rg   ri   )r   s   "r   r   r   s  r  r    c                    / p\        VR .4      e0   \        VRR .\        P                  ! V \        VR .4      4      4       \        VR.4      e%   \        VRR.\	        \        VR.4      WC4      4       \        VR.4      e   \        V. RO\        VR.4      4       \        VR.4      e   \        \        VR.4      WC4       V# )rk   rl   r  r   upscale_factorr   )r   r5  upscaleFactor)rB   rC   rn   ro   r  r8  r   s   &&&& r   $_UpscaleImageAPIParameters_to_vertexr=  s  s     !)	+y!-				*d;	:; 
+y!-	!kG95yN 
+()*68[+,- 
+z".$[8*%y 
r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c                     / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e4   \        TR.\        V R.4       Uu. uF  p\        WCV4      NK  	  up4       V# u upi r   r  r]   s   &&&  r   !_UpscaleImageResponse_from_vertexr@    r  r  c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
          / p\        V R .4      e$   \        VR.\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       V# )r  r  r|  r}  r  rD   s   &&& r   r  r    si    
 !)	+y!-		kG95yN 
+}%1ZL${[M"BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
          / p\        V R .4      e$   \        VR .\        \        V R .4      W24      4       \        V R.4      e0   \        \        V R.4      4       \        VR.\        V R.4      4       V# r  r  r  )rB   rC   r  r0   rD   s   &&& r   r  r    s    
 !)	+y!-		[7)4iM 
+()*68[+,- 	_%tK:J9K'LM	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
          / p\        V R .4      e$   \        VR .\        \        V R .4      W24      4       \        V R.4      e   \        VR.\        V R.4      4       V# rE  r  rD   s   &&& r   r  r    sn    
 !)	+y!-		kG95yN 
+()*6_%tK:J9K'LM	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
      "   / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )uriencodedVideovideo_bytesencodingr?   rG  rD   s   &&& r   r   r     s    
 !)	+w+UGT+w78	+'(4	tK.)9:; 
+
|$0[M4j\#BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
      "   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rL  rJ  rE  rL  r@   r?   rG  rD   s   &&& r   r#  r#    s    
 !)	+z".UGT+z:;	+,-.:	tK*>)?@A 
+
|$0[M4j\#BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r     r   r    c           
      "   / p\        V R .4      e   \        VR .\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rJ  rL  rK  r?   rM  rG  rD   s   &&& r   r  r    s    
 !)	+w+UGT+w78	+'3	tK-9: 
+}%1ZL${[M"BC	r    c          
      @   V ^8  d   QhR\         \        \        \        3,          \        3,          R\
        \        \        \        3,          ,          R\
        \         \        \        \        3,          \        3,          ,          R\        \        \        3,          /# r2   r6   )r   s   "r   r   r   -  r   r    c           
      "   / p\        V R .4      e   \        VR.\        V R .4      4       \        V R.4      e.   \        VR.\        P                  ! \        V R.4      4      4       \        V R.4      e   \        VR.\        V R.4      4       V# )rJ  rL  rL  rE  r?   r@   rG  rD   s   &&& r   r  r  -  s    
 !)	+w+XJ[5' :;	+'3	tK-9: 
+}%1ZL${[M"BC	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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R!RR"RR#R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R!RR"RR#RRR/V 3R0 lR1 lltRR/V 3R2 lR3 lltR4tV tR# )5ModelsiC  r   Nc                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# r   rk   rm   r   r   r8   r   r   ContentListUnionContentListUnionDictr   GenerateContentConfigOrDictGenerateContentResponse)r   __classdict__s   "r   r   Models.__annotate__E  b     O O O e,,e.H.HHI	O
 u889O $$Or    c                  \         P                  ! VVVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	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                  '       d   \-        VRV4      pV P                  P                  '       g   \/        VRV4      p\         P"                  P1                  WP3                  4       R
7      p\         P4                  ! V
P6                  R7      Vn        V P                  P%                  V4       V# rk   rm   r   Nrl   z{model}:generateContentrV  ?r   postshould_return_http_response)rw   rF  kwargsheaders)r   _GenerateContentParameters_api_clientvertexair  get
format_mapr  r	   popr   http_optionsr   convert_to_dictencode_unserializable_typesrequestgetattrr\  _verify_responsebodyjsonloadsr  r  _from_response
model_dumpHttpResponseri  rw   selfrk   rm   r   parameter_modelrequest_dictrequest_url_dictpathquery_paramsrp  rF  return_valueresponse_dicts   &$$$         r   _generate_contentModels._generate_contentE  su    66O    9


OT?l &))&1	(334DE(8


OT?l &))&1	(334DE(##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH g-t  22XNl
''5&mmmBHMM1JM   :
m $$$9
m 00??'A'A'C @ L &+%7%7  &L" 	%%l3r    c          	         < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[S[P                  ,          /# rW  )	r8   r   r   rY  rZ  r   r[  r   r\  )r   r]  s   "r   r   r^    sg     T T T e,,e.H.HHI	T
 u889T --.Tr    c             #  V  "   \         P                  ! VVVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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e   \        VRR4      '       d   \!        R4      hV P                  P#                  R	WuV	4       F  p
V
P$                  '       g   / M\&        P(                  ! V
P$                  4      pV P                  P                  '       d   \+        VRV4      pV P                  P                  '       g   \-        VRV4      p\         P.                  P1                  WP3                  4       R
7      p\         P4                  ! V
P6                  R7      Vn        V P                  P;                  V4       Vx  K  	  R# 5i)rb  Nrl   %{model}:streamGenerateContent?alt=sserV  rc  r   re  FAccessing the raw HTTP response is not supported in streaming methods.rd  rf  rh  )r   rj  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  rt  r&   request_streamedrv  rw  rx  r  r  r\  ry  rz  r{  ri  rw   ru  r}  rk   rm   r   r~  r  r  r  r  rp  rF  r  r  s   &$$$         r   _generate_content_streamModels._generate_content_stream  so     66O    9


OT?l &))&1	6AA
 78


OT?l &))&1	6AA
 7##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DLg-t   
 $$55L !)b4::hmm3Lm				"	"	"<4
 &&&;4
 22AA )C)C)E B l (-'9'9""(l$ ''5/s   CJ)DJ):(J)#BJ)c                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r8   r   r   rY  rZ  r   EmbedContentConfigOrDictEmbedContentResponse)r   r]  s   "r   r   r^    b     _ _ _ e,,e.H.HHI	_
 u556_ !!_r    c                  \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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	WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R
7      p\         P0                  ! V
P2                  R7      Vn        V P                  P7                  V4       V# )a  Calculates embeddings for the given contents. Only text is supported.

Args:
  model (str): The model to use.
  contents (list[Content]): The contents to embed.
  config (EmbedContentConfig): Optional configuration for embeddings.

Usage:

.. code-block:: python

  embeddings = client.models.embed_content(
      model= 'text-embedding-004',
      contents=[
          'What is your name?',
          'What is your favorite color?',
      ],
      config={
          'output_dimensionality': 64
      },
  )
rb  Nrl   {model}:predict{model}:batchEmbedContentsrV  rc  r   rd  rf  rh  )r   _EmbedContentParametersrk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r%  r!  r  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   embed_contentModels.embed_content  s.   < 33O    6


OT?l &))&1	 ++,<= 5


OT?l &))&1	+667GH+##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   7
m $$$6
m --<<'A'A'C = L &+%7%7  &L" 	%%l3r    c                j   < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[P                  /# r   rk   r   r   r   r8   r   r   GenerateImagesConfigOrDictGenerateImagesResponse)r   r]  s   "r   r   r^  M  L     J J J 	J
 u778J ##Jr    c                  \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      p\         P0                  ! V
P2                  R
7      Vn        V P                  P7                  V4       V# )z%Private method for generating images.rk   r   r   Nrl   r  rV  rc  r   rd  rf  rh  )r   _GenerateImagesParametersrk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r  r  r  ry  rz  r{  ri  rw   ru  r}  rk   r   r   r~  r  r  r  r  rp  rF  r  r  s   &$$$         r   _generate_imagesModels._generate_imagesM  s.    55O    8


OT?l &))&1	 ++,<= 7


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   9
m $$$8
m //>>'A'A'C ? L &+%7%7  &L" 	%%l3r    c          
         < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[S[P
                  ,          RS[P                  /# r   rk   r   r   r   r   r8   listr   _ReferenceImageAPIOrDictr   EditImageConfigOrDictEditImageResponse)r   r]  s   "r   r   r^    b     @ @ @ 	@
 U;;<@ u223@ @r    c               .   \         P                  ! VVVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WV
4      pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      p\         P.                  ! VP0                  R7      Vn        V P                  P5                  V4       V# )z$Private method for editing an image.rk   r   r   r   6This method is only supported in the Vertex AI client.Nrl   r  rV  rc  r   rd  rf  rh  )r   _EditImageParametersrk  rl  r&   r   rm  rn  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r  r  ry  rz  r{  ri  rw   ru  r}  rk   r   r   r   r~  r  r  r  r  rp  rF  r  r  s   &$$$$         r   _edit_imageModels._edit_image  s    00)	O $$$OPP3


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   4
m **99'A'A'C : L &+%7%7  &L" 	%%l3r    c          
         < V ^8  d   QhRS[ RS[P                  RS[ RS[S[P                  ,          RS[P
                  /# r   rk   r  r;  r   r   r8   r   ImageOrDictr   _UpscaleImageAPIConfigOrDictUpscaleImageResponse)r   r]  s   "r   r   r^    ]     @ @ @ 	@
 @ u99:@ !!@r    c               .   \         P                  ! VVVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WV
4      pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      p\         P.                  ! VP0                  R7      Vn        V P                  P5                  V4       V# )z&Private method for upscaling an image.rk   r  r;  r   r  Nrl   r  rV  rc  r   rd  rf  rh  )r   _UpscaleImageAPIParametersrk  rl  r&   r=  rm  rn  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r@  r  ry  rz  r{  ri  rw   ru  r}  rk   r  r;  r   r~  r  r  r  r  rp  rF  r  r  s   &$$$$         r   _upscale_imageModels._upscale_image  s    66%	O $$$OPP9


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   7
m --<<'A'A'C = L &+%7%7  &L" 	%%l3r    c                ~   < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[P
                  /# r   rk   r  r   r   r8   r   RecontextImageSourceOrDictr   RecontextImageConfigOrDictRecontextImageResponse)r   r]  s   "r   r   r^    R     j j j ..	j
 u778j ##jr    c                  \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      pV P                  P/                  V4       V# a  Recontextualizes an image.

There are two types of recontextualization currently supported:
1) Imagen Product Recontext - Generate images of products in new scenes
   and contexts.
2) Virtual Try-On: Generate images of persons modeling fashion products.

Args:
  model (str): The model to use.
  source (RecontextImageSource): An object containing the source inputs
    (prompt, person_image, product_images) for image recontext. prompt is
    optional for product recontext and disallowed for virtual try-on.
    person_image is required for virtual try-on, disallowed for product
    recontext. product_images is required for both product recontext and
    virtual try-on. Only one product image is supported for virtual try-on,
    and up to 3 product images (different angles of the same product) are
    supported for product recontext.
  config (RecontextImageConfig): Configuration for recontextualization.

Usage:

  ```
  product_recontext_response = client.models.recontext_image(
      model="imagen-product-recontext-preview-06-30",
      source=types.RecontextImageSource(
          prompt="In a modern kitchen setting.",
          product_images=[types.ProductImage.from_file(IMAGE_FILE_PATH)],
      ),
      config=types.RecontextImageConfig(
          number_of_images=1,
      ),
  )
  image = product_recontext_response.generated_images[0].image

  virtual_try_on_response = client.models.recontext_image(
      model="virtual-try-on-001",
      source=types.RecontextImageSource(
          person_image=types.Image.from_file(IMAGE1_FILE_PATH),
          product_images=[types.ProductImage.from_file(IMAGE2_FILE_PATH)],
      ),
      config=types.RecontextImageConfig(
          number_of_images=1,
      ),
  )
  image = virtual_try_on_response.generated_images[0].image
  ```
rk   r  r   r  Nrl   r  rV  rc  r   rd  rf  )r   _RecontextImageParametersrk  rl  r&   r  rm  rn  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r  r  ry  rz  ru  r}  rk   r  r   r~  r  r  r  r  rp  rF  r  r  s   &$$$         r   recontext_imageModels.recontext_image  s   n 55O $$$OPP8


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   9
m //>>'A'A'C ? L 	%%l3r    c                ~   < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[P
                  /# r  r8   r   SegmentImageSourceOrDictr   SegmentImageConfigOrDictSegmentImageResponse)r   r]  s   "r   r   r^    sR     S S S ,,	S
 u556S !!Sr    c                  \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      pV P                  P/                  V4       V# )a  Segments an image, creating a mask of a specified area.

Args:
  model (str): The model to use.
  source (SegmentImageSource): An object containing the source inputs
    (prompt, image, scribble_image) for image segmentation. The prompt is
    required for prompt mode and semantic mode, disallowed for other modes.
    scribble_image is required for the interactive mode, disallowed for
    other modes.
  config (SegmentImageConfig): Configuration for segmentation.

Usage:

  ```
  response = client.models.segment_image(
      model="image-segmentation-001",
      source=types.SegmentImageSource(
          image=types.Image.from_file(IMAGE_FILE_PATH),
      ),
  )

  mask_image = response.generated_masks[0].mask
  ```
r  r  Nrl   r  rV  rc  r   rd  rf  )r   _SegmentImageParametersrk  rl  r&   r  rm  rn  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r  r  ry  rz  ru  r  s   &$$$         r   segment_imageModels.segment_image  s   @ 33O $$$OPP6


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   7
m --<<'A'A'C = L 	%%l3r    c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r   rk   r   r   r8   r   r   GetModelConfigOrDictModel)r   r]  s   "r   r   r^    s4     ; ;;#+E,F,F#G;{{;r    c                  \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      pV P                  P1                  V4       V# 	rk   r   Nrl   {name}rV  rc  r   rm  rf  )r   _GetModelParametersrk  rl  r-  rm  rn  r*  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  rx  rs  r  ry  rz  ru  r}  rk   r   r~  r  r  r  r  rp  rF  r  r  s   &$$         r   rm  
Models.get  s    //O    2


OT?l &))&1	""#341


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmmBHMM1JM   (oNm$$$'t_Mm;;--'A'A'C . L 	%%l3r    c                ^   < V ^8  d   QhRS[ S[P                  ,          RS[P                  /# r   r   r   r   r   ListModelsConfigOrDictListModelsResponse)r   r]  s   "r   r   r^    s2     E E < <=EEr    c                  \         P                  ! VR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       dN   VP                  R4      '       d7   VP                  R4      pV RV 2pV'       d   VR\        V4       2,          pM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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      p\         P0                  ! V	P2                  R7      Vn        V P                  P7                  V4       V# rg  Nrl   z{models_url}rV  rZ  z?filter=&rc  r   rm  rf  rh  )r   _ListModelsParametersrk  rl  rk  rm  rn  rh  ro  r	   r   rp  r   rq  rr  rs  rv  rw  rx  ry  rt  r  ry  rz  r{  ri  rw   ru  r}  r   r~  r  r  r  r  query_param_filterrp  rF  r  r  s   &$          r   _listModels._list  st    11O    4


OT?l &))&1	(()9:3


OT?l &))&1	(()9:##H-L((22'++H5vX012d	!Il+,--	vQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmmBHMM1JM   5
m $$$4
m ++::'A'A'C ; L &+%7%7  &L" 	%%l3r    c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r  r8   r   r   UpdateModelConfigOrDictr  )r   r]  s   "r   r   r^  b  ?     @ @ @ u445	@
 {{@r    c                  \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R	7      pV P                  P1                  V4       V# 
r  Nrl   z{model}r  rV  rc  r   patchrf  )r   _UpdateModelParametersrk  rl  r0  rm  rn  r-  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  rx  rs  r  ry  rz  ru  r  s   &$$         r   updateModels.updateb  s    22O    5


OT?l &))&1	##$454


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''\H 'mmmBHMM1JM   (oNm$$$'t_Mm;;--'A'A'C . L 	%%l3r    c                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r  r8   r   r   DeleteModelConfigOrDictDeleteModelResponse)r   r]  s   "r   r   r^    A     F F F u445	F
   Fr    c                  \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      p\         P0                  ! V	P2                  R	7      Vn        V P                  P7                  V4       V# 
r  Nrl   r  rV  rc  r   deleterf  rh  )r   _DeleteModelParametersrk  rl  r   rm  rn  r   r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r   r   r  ry  rz  r{  ri  rw   ru  r  s   &$$         r   r  Models.delete  s+    22O    5


OT?l &))&1	""#344


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''$lH 'mmmBHMM1JM   6
m $$$5
m ,,;;'A'A'C < L &+%7%7  &L" 	%%l3r    c                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r8   r   r   rY  rZ  r   CountTokensConfigOrDictCountTokensResponse)r   r]  s   "r   r   r^    b     ] ] ] e,,e.H.HHI	]
 u445]   ]r    c                  \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      p\         P0                  ! V
P2                  R
7      Vn        V P                  P7                  V4       V# )a   Counts the number of tokens in the given content.

Multimodal input is supported for Gemini models.

Args:
  model (str): The model to use for counting tokens.
  contents (list[types.Content]): The content to count tokens for.
  config (CountTokensConfig): The configuration for counting tokens.

Usage:

.. code-block:: python

  response = client.models.count_tokens(
      model='gemini-2.0-flash',
      contents='What is your name?',
  )
  print(response)
  # total_tokens=5 cached_content_token_count=None
rb  Nrl   {model}:countTokensrV  rc  r   rd  rf  rh  )r   _CountTokensParametersrk  rl  r   rm  rn  r   r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r   r   r	  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   count_tokensModels.count_tokens  s.   8 22O    5


OT?l &))&1	$//0@A$4


OT?l &))&1	$//0@A$##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   6
m $$$5
m ,,;;'A'A'C < L &+%7%7  &L" 	%%l3r    c                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r8   r   r   rY  rZ  r   ComputeTokensConfigOrDictComputeTokensResponse)r   r]  s   "r   r   r^  K  sb     S S S e,,e.H.HHI	S
 u667S ""Sr    c               ,   \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      p\         P.                  ! V
P0                  R7      Vn        V P                  P5                  V4       V# )a>  Given a list of contents, returns a corresponding TokensInfo containing the

list of tokens and list of token ids.

This method is not supported by the Gemini Developer API.

Args:
  model (str): The model to use.
  contents (list[shared.Content]): The content to compute tokens for.

Usage:

.. code-block:: python

  response = client.models.compute_tokens(
      model='gemini-2.0-flash',
      contents='What is your name?',
  )
  print(response)
  # tokens_info=[TokensInfo(role='user', token_ids=['1841', ...],
  # tokens=[b'What', b' is', b' your', b' name', b'?'])]
rb  r  Nrl   {model}:computeTokensrV  rc  r   rd  rf  rh  )r   _ComputeTokensParametersrk  rl  r&   rr   rm  rn  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  rz   r  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   compute_tokensModels.compute_tokensK  s   < 44O $$$OPP7


OT?l &))&1	&112BC&##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   8
m ..=='A'A'C > L &+%7%7  &L" 	%%l3r    r   r  r  r  c                   < V ^8  d   QhRS[ RS[S[ ,          RS[S[P                  ,          RS[S[P                  ,          RS[S[P
                  ,          RS[S[P                  ,          RS[P                  /# r   rk   r   r  r  r  r   r   r8   r   r   r  VideoOrDictGenerateVideosSourceOrDictGenerateVideosConfigOrDictGenerateVideosOperation)r   r]  s   "r   r   r^         N N N sm	N
 e''(N e''(N u778N u778N $$Nr    c          	        \         P                  ! VVVVVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      p	V	'       d   RP                  V	4      p
MHRp
ME\        V P                  VR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WV4      pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      pV P                  P1                  V4       V# )
z%Private method for generating videos.rk   r   r  r  r  r   Nrl   {model}:predictLongRunningrV  rc  r   rd  rf  )r   _GenerateVideosParametersrk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  rs  rv  rw  rx  r  r  r  ry  rz  ru  r}  rk   r   r  r  r  r   r~  r  r  r  r  rp  rF  r  r  s   &$$$$$$         r   _generate_videosModels._generate_videos  s    55O    8


OT?l &))&1	+667GH+7


OT?l &))&1	+667GH+##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmmBHMM1JM   :
m $$$9
m 00??'A'A'C @ L 	%%l3r    c                ~   < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[P
                  /# rW  )r8   r   rZ  r   r[  r\  )r   r]  s   "r   r   r^    sR     _ _ _ **	_
 u889_ $$_r    c                  \         P                  ! V4      p\         P                  ! V4      pV'       dO   VP                  '       d=   \        P
                  ! VP                  4      '       d   \        P                  ! R4      h\         P                  ! V4      '       d   V P                  WVR7      # V'       d   ^ p\        V\        P                  4      '       d)   VP                  '       d   \        VP                  4      pM;\        V\        4      '       d&   VP                  R. 4      pV'       d   \        V4      p\        V4      V8w  d6   RP!                  \#        \$        V4      4      p\&        P)                  RV4       V P                  WVR7      # \         P*                  ! V4      p	\&        P-                  RV	 R24       . p
\        P.                  ! 4       p^ pV	^ 8  Ed   V^,          pV P                  WVR7      p\         P0                  ! V4      pV'       g   EMV'       g   EMVP2                  '       dQ   VP2                  ^ ,          P4                  '       d.   VP2                  ^ ,          P4                  P6                  '       g   EM\         P8                  ! W4      pV'       g   M\&        P-                  RV R	24       V	^,          p	V	^ 8X  d   \&        P-                  R
4       VP2                  ^ ,          P4                  p\        P:                  ! RVR7      p\<        P>                  ! V4      pV
'       g   V
PA                  V4       \        V\B        4      '       d#   VPE                  V4       VPE                  V4       V
PE                  V4       V
PE                  V4       EK  \         PF                  ! V4      '       d   Ve   V
Vn$        V# )a6  Makes an API request to generate content using a model.

For the `model` parameter, supported formats for Vertex AI API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The full resource name starts with 'projects/', for example:
  'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
- The partial resource name with 'publishers/', for example:
  'publishers/google/models/gemini-2.0-flash' or
- `/` separated publisher and model name, for example:
  'google/gemini-2.0-flash'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The model name starts with 'models/', for example:
  'models/gemini-2.0-flash'
- For tuned models, the model name starts with 'tunedModels/',
  for example:
  'tunedModels/1234567890123456789'

Some models support multimodal input and output.

Built-in MCP support is an experimental feature.

Usage:

.. code-block:: python

  from google.genai import types
  from google import genai

  client = genai.Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )

  response = client.models.generate_content(
    model='gemini-2.0-flash',
    contents='''What is a good name for a flower shop that specializes in
      selling bouquets of dried flowers?'''
  )
  print(response.text)
  # **Elegant & Classic:**
  # * The Dried Bloom
  # * Everlasting Florals
  # * Timeless Petals

  response = client.models.generate_content(
    model='gemini-2.0-flash',
    contents=[
      types.Part.from_text(text='What is shown in this image?'),
      types.Part.from_uri(file_uri='gs://generativeai-downloads/images/scones.jpg',
      mime_type='image/jpeg')
    ]
  )
  print(response.text)
  # The image shows a flat lay arrangement of freshly baked blueberry
  # scones.
6MCP sessions are not supported in synchronous methods.rb  r   , Tools at indices [%s] are not compatible with automatic function calling (AFC). AFC is disabled. If AFC is intended, please include python callables in the tool list, and do not include function declaration in the tool list.&AFC is enabled with max remote calls: .AFC remote call 	 is done.8Reached max remote calls for automatic function calling.userr   r   )%r   "find_afc_incompatible_tool_indexesparse_config_for_mcp_usager   r   has_mcp_session_usager   UnsupportedFunctionErrorshould_disable_afcr  
isinstancer   GenerateContentConfiglenr7   rm  joinmapr8   loggerwarningget_max_remote_calls_afcinfor\  get_function_mapr  rJ   r   get_function_response_partsContentrn   rp   extendr  appendshould_append_afc_history"automatic_function_calling_history)r}  rk   rm   r   incompatible_tools_indexesparsed_configoriginal_tools_lengthr   indices_strremaining_remote_calls_afcrH  rF  ifunction_mapfunc_response_partsfunc_call_contentfunc_response_contents   &$$$             r   generate_contentModels.generate_content  s:   D 	77?  !;;FCM,,]-@-@AA++
B  &&}55## $   "	FE77	8	8<<<"%fll"3
fd##

7B'"%e*
	'	(,A	AiiC)C DE5 	
 ## $   ".!F!F" KK
01K0LAN ?A&,,.H	A
$q
(1fa'' ( h "22=Al!!!$$Q'///$$Q'//555(DD
 !kk$QCy12 A% 	#q	(NO"--a088#mm# h'h/*11(;	Hd	#	#)*-.(//0AB(//0EF..}==  - 1 Or    c          	         < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[S[P                  ,          /# rW  )r8   r   rZ  r   r[  r   r\  )r   r]  s   "r   r   r^    s]     @I @I @I **	@I
 u889@I --.@Ir    c             #  
  "   \         P                  ! V4      p\         P                  ! V4      pV'       dO   VP                  '       d=   \        P
                  ! VP                  4      '       d   \        P                  ! R4      h\         P                  ! V4      '       d   V P                  WVR7       Rj  xL
  R# V'       d   ^ p\        V\        P                  4      '       d)   VP                  '       d   \        VP                  4      pM;\        V\        4      '       d&   VP                  R. 4      pV'       d   \        V4      p\        V4      V8w  d6   RP!                  \#        \$        V4      4      p\&        P)                  RV4       V P                  WVR7       Rj  xL
  R# \         P*                  ! V4       \         P,                  ! V4      p	\&        P/                  RV	 R24       . p
RpRp^ pV	^ 8  Ed   V^,          pV P                  WVR7      p\         P0                  ! V4      pV^8X  d   V F  pV'       g   \         P2                  ! W+4      pVx  K'  VP4                  '       dQ   VP4                  ^ ,          P6                  '       d.   VP4                  ^ ,          P6                  P8                  '       g    EM\         P:                  ! W4      pV'       d   K  \         P2                  ! W+4      pVx  K  	  MV F@  p\         P<                  ! V4      '       d   V
Vn        \         P2                  ! W+4      pVx  KB  	  Vec   VP4                  '       dQ   VP4                  ^ ,          P6                  '       d.   VP4                  ^ ,          P6                  P8                  '       g   R# \         P:                  ! W4      pV'       g   R# V'       g   R# \&        P/                  R	V R
24       V	^,          p	V	^ 8X  d   \&        P/                  R4       Vf   EK+  VP4                  f   EK<  VP4                  ^ ,          P6                  p\        P@                  ! RVR7      p\B        PD                  ! V4      pV
'       g   V
PG                  V4       \        V\H        4      '       d'   Ve#   VPK                  V4       VPK                  V4       Ve   V
PK                  V4       V
PK                  V4       EK  R#  ELJ EL^5i)aZ  Makes an API request to generate content using a model and yields the model's response in chunks.

For the `model` parameter, supported formats for Vertex AI API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The full resource name starts with 'projects/', for example:
  'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
- The partial resource name with 'publishers/', for example:
  'publishers/google/models/gemini-2.0-flash' or
- `/` separated publisher and model name, for example:
  'google/gemini-2.0-flash'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The model name starts with 'models/', for example:
  'models/gemini-2.0-flash'
- For tuned models, the model name starts with 'tunedModels/',
  for example:
  'tunedModels/1234567890123456789'

Some models support multimodal input and output.

Built-in MCP support is an experimental feature.

Usage:

.. code-block:: python

  from google.genai import types
  from google import genai

  client = genai.Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )

  for chunk in client.models.generate_content_stream(
    model='gemini-2.0-flash',
    contents='''What is a good name for a flower shop that specializes in
      selling bouquets of dried flowers?'''
  ):
    print(chunk.text)
  # **Elegant & Classic:**
  # * The Dried Bloom
  # * Everlasting Florals
  # * Timeless Petals

  for chunk in client.models.generate_content_stream(
    model='gemini-2.0-flash',
    contents=[
      types.Part.from_text('What is shown in this image?'),
      types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
      'image/jpeg')
    ]
  ):
    print(chunk.text)
  # The image shows a flat lay arrangement of freshly baked blueberry
  # scones.
r*  rb  Nr   r+  z_Tools at indices [%s] are not compatible with automatic function calling. AFC will be disabled.r-  r.  r/  r0  r1  r2  r3  )&r   r4  r5  r   r   r6  r   r7  r8  r  r9  r   r:  r;  r7   rm  r<  r=  r8   r>  r?  'raise_error_for_afc_incompatible_configr@  rA  rB  append_chunk_contentsr  rJ   r   rC  rG  rH  rD  rn   rp   rE  r  rF  )r}  rk   rm   r   rI  rJ  rK  r   rL  rM  rH  chunkrP  rN  rF  rO  rQ  rR  s   &$$$              r   generate_content_streamModels.generate_content_stream  s>    D 	77?  !;;FCM,,]-@-@AA++
B  &&}55.. /    !	FE77	8	8<<<"%fll"3
fd##

7B'"%e*
	'	(,A	AiiC)C DE-	

 .. /     88G!-!F!F" KK
01K0LAN ?A&E	A
$q
(1fa.. / h "22=Al	
a E#99(JHK $$$''*222''*22888"."J"J# '&%;;HLhk! ( E33MBB2 4 "77H(+  M#####A&...##A&..444
*FF
  kk$QCy12 A% 	#q	(NO 
	u//;!,,Q/77 %%!
 <<)1
,
3
3H
=h%%*;*G
//+
,
///
0(
,
3
34E
F*112GHU )Q*s   AT	%T/1T!T7T8T3T:AT A&T&T'CT6"T,TT)A:T$"T,T4T	TAT%T6AT	A9TTc                j   < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r^  S  F     5 5 5 	5
 u7785 ##5r    c               \   V P                  VVVR7      pRp. pV'       d   VP                  '       g   V# VP                   FO  pVP                  '       d*   VP                  P                  R8X  d   VP                  pK>  VP	                  V4       KQ  	  \
        P                  ! VVR7      pV# )a,  Generates images based on a text description and configuration.

Args:
  model (str): The model to use.
  prompt (str): A text description of the images to generate.
  config (GenerateImagesConfig): Configuration for generation.

Usage:

.. code-block:: python

  response = client.models.generate_images(
    model='imagen-3.0-generate-002',
    prompt='Man with a dog',
    config=types.GenerateImagesConfig(
        number_of_images= 1,
        include_rai_reason= True,
    )
  )
  response.generated_images[0].image.show()
  # Shows a man with a dog.
r  NPositive Promptr   r  r  r   r  r  rF  r   r  	r}  rk   r   r   api_responser  r   generated_imagerF  s	   &$$$     r   generate_imagesModels.generate_imagesS  s    : (( ) L
 )-%|<<<'88

+
+
+//<< -<,M,M)0 9 ++)*KH Or    c          
         < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[S[P
                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r^    [     6 6 6 	6
 U;;<6 u2236 6r    c               ,    V P                  VVVVR7      # )a  Edits an image based on a text description and configuration.

Args:
  model (str): The model to use.
  prompt (str): A text description of the edit to apply to the image.
    reference_images (list[Union[RawReferenceImage, MaskReferenceImage,
    ControlReferenceImage, StyleReferenceImage, SubjectReferenceImage]): The
    reference images for editing.
  config (EditImageConfig): Configuration for editing.

Usage:

.. code-block:: python

  from google.genai.types import RawReferenceImage, MaskReferenceImage

  raw_ref_image = RawReferenceImage(
    reference_id=1,
    reference_image=types.Image.from_file(IMAGE_FILE_PATH),
  )

  mask_ref_image = MaskReferenceImage(
    reference_id=2,
    config=types.MaskReferenceConfig(
        mask_mode='MASK_MODE_FOREGROUND',
        mask_dilation=0.06,
    ),
  )
  response = client.models.edit_image(
    model='imagen-3.0-capability-001',
    prompt='man with dog',
    reference_images=[raw_ref_image, mask_ref_image],
    config=types.EditImageConfig(
        edit_mode= "EDIT_MODE_INPAINT_INSERTION",
        number_of_images= 1,
        include_rai_reason= True,
    )
  )
  response.generated_images[0].image.show()
  # Shows a man with a dog instead of a cat.
r  r  r}  rk   r   r   r   s   &$$$$r   
edit_imageModels.edit_image  s)    b )	   r    c          
         < V ^8  d   QhRS[ RS[P                  RS[ RS[S[P                  ,          RS[P
                  /# r  r8   r   r  r   UpscaleImageConfigOrDictr  )r   r]  s   "r   r   r^    ]     H H H 	H
 H u556H !!Hr    c                  \         P                  ! VVVVR7       T;'       g    / p\        V\         P                  4      '       d   VP	                  4       pM\        V4      p\         P                  ! VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  R	R4      VP                  R
R4      VP                  RR4      VP                  RR4      R7
      pRVR&   ^VR&   V P                  VVVVR7      # )a}  Makes an API request to upscale a provided image.

Args:
  model (str): The model to use.
  image (Image): The input image for upscaling.
  upscale_factor (str): The factor to upscale the image (x2 or x4).
  config (UpscaleImageConfig): Configuration for upscaling.

Usage:

.. code-block:: python

  from google.genai.types import Image

  IMAGE_FILE_PATH="my-image.png"
  response=client.models.upscale_image(
      model='imagen-3.0-generate-001',
      image=types.Image.from_file(IMAGE_FILE_PATH),
      upscale_factor='x2',
  )
  response.generated_images[0].image.show()
  # Opens my-image.png which is upscaled by a factor of 2.
r  rp  Nr   r   r   r   r   r   r3  r4  r   
rp  r   r   r   r   r   r   r3  r4  r   upscaler>  r   	r   UpscaleImageParametersr9  UpscaleImageConfigrz  r7   _UpscaleImageAPIConfigDictrm  r  r}  rk   r  r;  r   
config_dct
api_configs   &$$$$  r   upscale_imageModels.upscale_image  s=   B 
  %	 \\rF&%2233$$&j<j11^^ND9!~~&6=&NN+@$G$..)<dC%>>*>E#(:DA#->>($$
 'NN+@$G",..'#
 ~~h-J$ #Jv%&J!"%	   r    c                   < V ^8  d   QhRS[ RS[S[ ,          RS[S[P                  ,          RS[S[P                  ,          RS[S[P
                  ,          RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r^         [ [ [ sm	[
 e''([ e''([ u778[ u778[ $$[r    c          
        V'       g   V'       g	   V'       d   V'       d   \        R
4      h/ pV P                  P                  '       g   V'       d   \        V\        P
                  4      '       d   VP                  4       pM\        V4      pVP                  R4      '       dN   VP                  R4      '       d7   \        P
                  ! VP                  R4      VP                  R4      R7      pEMyV P                  P                  '       Eg]   V'       EdT   \        V\        P                  4      '       d$   VP                  4       pVP                  R/ 4      pMo\        V4      p\        VP                  R4      \        P
                  4      '       d6   VP                  R\        P
                  ! 4       4      p	V	P                  4       pV'       d   VP                  R4      '       d   VP                  R4      '       dl   \        P                  ! VP                  R4      VP                  R4      \        P
                  ! VP                  R4      VP                  R4      R7      R7      pV P                  VVVVVVR	7      # )\  Generates videos based on an input (text, image, or video) and configuration.

The following use cases are supported:
1. Text to video generation.
2a. Image to video generation (additional text prompt is optional).
2b. Image to video generation with frame interpolation (specify last_frame
in config).
3. Video extension (additional text prompt is optional)

Args:
  model: The model to use.
  prompt: The text prompt for generating the videos. Optional for image to
    video and video extension use cases. This argument is deprecated, please
    use source instead.
  image: The input image for generating the videos. Optional if prompt is
    provided. This argument is deprecated, please use source instead.
  video: The input video for video extension use cases. Optional if prompt
    or image is provided. This argument is deprecated, please use source
    instead.
  source: The input source for generating the videos (prompt, image, and/or
    video)
  config: Configuration for generation.

Usage:

  ```
  operation = client.models.generate_videos(
      model="veo-2.0-generate-001",
      source=types.GenerateVideosSource(
          prompt="A neon hologram of a cat driving at top speed",
      ),
  )
  while not operation.done:
      time.sleep(10)
      operation = client.operations.get(operation)

  operation.result.generated_videos[0].video.uri
  ```
rJ  rL  r?   rJ  r?   r  r   r  r   r  r  r"  MSource and prompt/image/video are mutually exclusive. Please only use source.r&   rk  rl  r9  r   Videorz  r7   rm  GenerateVideosSourcer&  
r}  rk   r   r  r  r  r   	video_dct
source_dct	video_objs
   &$$$$$$   r   generate_videosModels.generate_videos  s   b 	%5f' 
 !#I$$$	E5;;	'	'$$&	K		u		)--">">e$	k0J
 &&&66	FE66	7	7&&(
NN7B/	&\
jnnW-u{{;;#->>'5;;=#I)**,)	y}}U++	m0L0L++>>(+..)++MM%(#--4
    !  r    c                n   < V ^8  d   QhRS[ S[P                  ,          RS[S[P                  ,          /# r  )r   r   r  r   r  )r   r]  s   "r   r   r^  i  s5     0 0 u3340 U[[	0r    c                  \         P                  ! VR7      P                  ;'       g    \         P                  ! 4       pVP                  f   RVn        V P
                  P                  '       dG   VP                  4       pVP                  '       g%   VP                  pV'       d
   VR,           MRVn        \        RV P                  V P                  VR7      V4      # )a  Makes an API request to list the available models.

If `query_base` is set to True in the config or not set (default), the
API will return all available base models. If set to False, it will return
all tuned models.

Args:
  config (ListModelsConfigOrDict): Configuration for retrieving models.

Usage:

.. code-block:: python

  response=client.models.list(config={'page_size': 5})
  print(response.page)
  # [Model(name='projects/./locations/./models/123', display_name='my_model'

  response=client.models.list(config={'page_size': 5, 'query_base': True})
  print(response.page)
  # [Model(name='publishers/google/models/gemini-2.0-flash-exp' ...
rg  T&filter=labels.tune-type:*labels.tune-type:*rq  )r   r  r   ListModelsConfigr[  rk  rl  copyrZ  r   r  r}  r   filter_values   &$ r   r  Models.listi  s    8 	##6299 	$ 	$!!#   f   {{}f}}  77% 	
 



&
!	 r     )__name__
__module____qualname____firstlineno__r  r  r  r  r  r  r  r  rm  r  r  r  r  r  r&  rS  rZ  re  rl  r|  r  r  __static_attributes____classdictcell__r]  s   @r   rU  rU  C  sp    O
 =AO ObT
 =AT Tl_
 :>_ _BJ
 <@J JX@ 7;@ @D@ >B@ @Dj
 <@j jXS
 :>S Sj;JN; ;zE@DE EN@ 9=	@ @DF 9=	F FP]
 9=] ]~S
 ;?S SjN #	N
 ,0N ,0N <@N <@N N`_
 =A_ _B@I
 =A@I @ID5
 <@5 5n6 7;6 6pH :>H HT[ #	[
 ,0[ ,0[ <@[ <@[ [z0 8<0 0 0r    rU  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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R!RR"RR#R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R0 lR1 lltR RR!RR"RR#RRR/V 3R2 lR3 lltR4tV tR# )5AsyncModelsi  r   Nc                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  rX  )r   r]  s   "r   r   AsyncModels.__annotate__  r_  r    c                 "   \         P                  ! VVVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	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                  '       d   \-        VRV4      pV P                  P                  '       g   \/        VRV4      p\         P"                  P1                  WP3                  4       R
7      p\         P4                  ! V
P6                  R7      Vn        V P                  P%                  V4       V#  ELG5ira  )r   rj  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  async_requestrt  r\  ru  rv  rw  rx  r  r  ry  rz  r{  ri  rw   r|  s   &$$$         r   r  AsyncModels._generate_content  s     66O    9


OT?l &))&1	(334DE(8


OT?l &))&1	(334DE(##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H g-t  22XNl
''5&mmmBHMM1JM   :
m $$$9
m 00??'A'A'C @ L &+%7%7  &L" 	%%l3=s-   CKB,KK	A K*=K((KA?Kc          
         < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[S[S[P                  ,          ,          /# rW  )
r8   r   r   rY  rZ  r   r[  r   r   r\  )r   r]  s   "r   r   r    sl     Y Y Y e,,e.H.HHI	Y
 u889Y u<<=>Yr    c                 a a
a"   \         P                  ! VVVR 7      o
S P                  P                  '       dG   \	        S P                  S
RS
4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        S P                  S
RS
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S
P                  e/   S
P                  P                  e   S
P                  P                  p\        P                  ! V4      p\        P                  ! V4      pVe   \        VRR4      '       d   \!        R4      hS P                  P#                  R	WdV4      G Rj  xL
 oV
VV 3R
 lp	V	! 4       #  L5i)rb  Nrl   r  rV  rc  r   re  r  rd  c                 .  <"   S  R j  xL
  p V P                   '       g   / M\        P                  ! V P                   4      pSP                  P                  '       d   \        VR S4      pSP                  P                  '       g   \        VR S4      p\        P                  P                  VSP                  4       R7      p\        P                  ! V P                  R7      Vn        SP                  P                  V4       V5x  EK   ELEDR # 5i)Nrf  rh  )rv  rw  rx  rk  rl  r  r  r   r\  ry  rz  r{  ri  rw   ru  )rF  r  r  r~  response_streamr}  s      r   async_generator=AsyncModels._generate_content_stream.<locals>.async_generator0  s     +  "*---TZZ5N$$$>T?- (((=T?- 44CC"?+E+E+G D 
 */););$$*
& 	)),7+Os3   DDDDAD (D	BDDD)r   rj  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  rt  r&   async_request_streamed)r}  rk   rm   r   r  r  r  r  rp  r  r~  r  s   f$$$      @@r   r  $AsyncModels._generate_content_stream  s     66O    9


OT?l &))&1	6AA
 78


OT?l &))&1	6AA
 7##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DLg-t   
 !,,CCL O0 9s   CGCG-G.Gc                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r  )r   r]  s   "r   r   r  J  r  r    c                 "   \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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	WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R
7      p\         P0                  ! V
P2                  R7      Vn        V P                  P7                  V4       V#  L5i)a  Calculates embeddings for the given contents. Only text is supported.

Args:
  model (str): The model to use.
  contents (list[Content]): The contents to embed.
  config (EmbedContentConfig): Optional configuration for embeddings.

Usage:

.. code-block:: python

  embeddings = await client.aio.models.embed_content(
      model= 'text-embedding-004',
      contents=[
          'What is your name?',
          'What is your favorite color?',
      ],
      config={
          'output_dimensionality': 64
      },
  )
rb  Nrl   r  r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r%  r!  r  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   r  AsyncModels.embed_contentJ  s;    < 33O    6


OT?l &))&1	 ++,<= 5


OT?l &))&1	+667GH+##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   7
m $$$6
m --<<'A'A'C = L &+%7%7  &L" 	%%l3/,   CJB,JJ	J=J(JA?Jc                j   < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r  r    c                 "   \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      p\         P0                  ! V
P2                  R
7      Vn        V P                  P7                  V4       V#  L5i)z4Private method for generating images asynchronously.r  Nrl   r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r  r  r  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   r  AsyncModels._generate_images  s;     55O    8


OT?l &))&1	 ++,<= 7


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   9
m $$$8
m //>>'A'A'C ? L &+%7%7  &L" 	%%l3/r  c          
         < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[S[P
                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r  r    c               J  "   \         P                  ! VVVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WV
4      G Rj  xL
 pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VR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)z3Private method for editing an image asynchronously.r  r  Nrl   r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r&   r   rm  rn  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r  r  ry  rz  r{  ri  rw   ru  r  s   &$$$$         r   r  AsyncModels._edit_image  s     00)	O $$$OPP3


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   4
m **99'A'A'C : L &+%7%7  &L" 	%%l3%&   BH#"B,H#H!H#%=H##A?H#c          
         < V ^8  d   QhRS[ RS[P                  RS[ RS[S[P                  ,          RS[P
                  /# r  r  )r   r]  s   "r   r   r  9  r  r    c               J  "   \         P                  ! VVVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WV
4      G Rj  xL
 pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VR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)z5Private method for upscaling an image asynchronously.r  r  Nrl   r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r&   r=  rm  rn  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r@  r  ry  rz  r{  ri  rw   ru  r  s   &$$$$         r   r  AsyncModels._upscale_image9  s     66%	O $$$OPP9


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   7
m --<<'A'A'C = L &+%7%7  &L" 	%%l3%r  c                ~   < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[P
                  /# r  r  )r   r]  s   "r   r   r  {  r  r    c                 "   \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      pV P                  P/                  V4       V#  L5ir  )r   r  rk  rl  r&   r  rm  rn  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r  r  ry  rz  ru  r  s   &$$$         r   r  AsyncModels.recontext_image{  s    n 55O $$$OPP8


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   9
m //>>'A'A'C ? L 	%%l3!&   BG<!B,G<G:G<$=G<"AG<c                ~   < V ^8  d   QhRS[ RS[P                  RS[S[P                  ,          RS[P
                  /# r  r  )r   r]  s   "r   r   r    sR     V V V ,,	V
 u556V !!Vr    c                 "   \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      p\         P(                  P+                  WP-                  4       R
7      pV P                  P/                  V4       V#  L5i)a3  Segments an image, creating a mask of a specified area.

Args:
  model (str): The model to use.
  source (SegmentImageSource): An object containing the source inputs
    (prompt, image, scribble_image) for image segmentation. The prompt is
    required for prompt mode and semantic mode, disallowed for other modes.
    scribble_image is required for the interactive mode, disallowed for
    other modes.
  config (SegmentImageConfig): Configuration for segmentation.

Usage:

  ```
  response = client.models.segment_image(
      model="image-segmentation-001",
      source=types.SegmentImageSource(
          image=types.Image.from_file(IMAGE_FILE_PATH),
      ),
      config=types.SegmentImageConfig(
          mode=types.SegmentMode.foreground,
      ),
  )

  mask_image = response.generated_masks[0].mask
  ```
r  r  Nrl   r  rV  rc  r   rd  rf  )r   r  rk  rl  r&   r  rm  rn  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r  r  ry  rz  ru  r  s   &$$$         r   r  AsyncModels.segment_image  s    F 33O $$$OPP6


OT?l &))&1	 ++,<= ##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   7
m --<<'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]  s   "r   r   r  ?  s4     = ==#+E,F,F#G={{=r    c                 "   \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      pV P                  P1                  V4       V#  L5ir  )r   r  rk  rl  r-  rm  rn  r*  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  rx  rs  r  ry  rz  ru  r  s   &$$         r   rm  AsyncModels.get?  s     //O    2


OT?l &))&1	""#341


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmmBHMM1JM   (oNm$$$'t_Mm;;--'A'A'C . L 	%%l3#,   CIB,III=I(IAIc                ^   < V ^8  d   QhRS[ S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r  ~  s2     G G < <=GGr    c                 "   \         P                  ! VR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMRpVP                  R4      pV'       dN   VP                  R4      '       d7   VP                  R4      pV RV 2pV'       d   VR\        V4       2,          pM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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      p\         P0                  ! V	P2                  R7      Vn        V P                  P7                  V4       V#  L5ir  )r   r  rk  rl  rk  rm  rn  rh  ro  r	   r   rp  r   rq  rr  r  rv  rw  rx  ry  rt  r  ry  rz  r{  ri  rw   ru  r  s   &$          r   r  AsyncModels._list~  s     11O    4


OT?l &))&1	(()9:3


OT?l &))&1	(()9:##H-L((22'++H5vX012d	!Il+,--	vQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmmBHMM1JM   5
m $$$4
m ++::'A'A'C ; L &+%7%7  &L" 	%%l3/s>   CKK1KK/B,KKK2=K0(KA?Kc                d   < V ^8  d   QhRS[ RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r  r    c                 "   \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R	7      pV P                  P1                  V4       V#  L5ir  )r   r  rk  rl  r0  rm  rn  r-  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  rx  rs  r  ry  rz  ru  r  s   &$$         r   r  AsyncModels.update  s     22O    5


OT?l &))&1	##$454


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33\ H 'mmmBHMM1JM   (oNm$$$'t_Mm;;--'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]  s   "r   r   r  	  r   r    c                 "   \         P                  ! VVR 7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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                  '       d   \'        V
RV4      p
V P                  P                  '       g   \)        V
RV4      p
\         P*                  P-                  WP/                  4       R7      p\         P0                  ! V	P2                  R	7      Vn        V P                  P7                  V4       V#  L5ir  )r   r  rk  rl  r   rm  rn  r   r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r   r   r  ry  rz  r{  ri  rw   ru  r  s   &$$         r   r  AsyncModels.delete	  s8     22O    5


OT?l &))&1	""#344


OT?l &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33$l H 'mmmBHMM1JM   6
m $$$5
m ,,;;'A'A'C < L &+%7%7  &L" 	%%l3/s,   CJB,JJJ=J(JA?Jc                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r  )r   r]  s   "r   r   r  Q  r
  r    c                 "   \         P                  ! VVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      pV'       d   RP                  V4      pMHRpME\        V P                  VR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WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      p\         P0                  ! V
P2                  R
7      Vn        V P                  P7                  V4       V#  L5i)a
  Counts the number of tokens in the given content.

Multimodal input is supported for Gemini models.

Args:
  model (str): The model to use for counting tokens.
  contents (list[types.Content]): The content to count tokens for.
  config (CountTokensConfig): The configuration for counting tokens.

Usage:

.. code-block:: python

  response = await client.aio.models.count_tokens(
      model='gemini-2.0-flash',
      contents='What is your name?',
  )
  print(response)
  # total_tokens=5 cached_content_token_count=None
rb  Nrl   r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r   rm  rn  r   r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r   r   r	  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   r  AsyncModels.count_tokensQ  s;    8 22O    5


OT?l &))&1	$//0@A$4


OT?l &))&1	$//0@A$##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   6
m $$$5
m ,,;;'A'A'C < L &+%7%7  &L" 	%%l3/r  c                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  r  )r   r]  s   "r   r   r    sb     R R R e,,e.H.HHI	R
 u667R ""Rr    c               H  "   \         P                  ! VVVR7      pV P                  P                  '       g   \	        R4      h\        V P                  VR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	WuV	4      G Rj  xL
 p
V
P                   '       g   / M\"        P$                  ! V
P                   4      pV P                  P                  '       d   \'        VR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)a  Given a list of contents, returns a corresponding TokensInfo containing the

list of tokens and list of token ids.


Args:
  model (str): The model to use.
  contents (list[shared.Content]): The content to compute tokens for.

Usage:

.. code-block:: python

  response = await client.aio.models.compute_tokens(
      model='gemini-2.0-flash',
      contents='What is your name?',
  )
  print(response)
  # tokens_info=[TokensInfo(role='user', token_ids=['1841', ...],
  # tokens=[b'What', b' is', b' your', b' name', b'?'])]
rb  r  Nrl   r  rV  rc  r   rd  rf  rh  )r   r  rk  rl  r&   rr   rm  rn  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  rz   r  ry  rz  r{  ri  rw   ru  r  s   &$$$         r   r  AsyncModels.compute_tokens  s    : 44O $$$OPP7


OT?l &))&1	&112BC&##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   8
m ..=='A'A'C > L &+%7%7  &L" 	%%l3%s&   BH"!B,H"H H"$=H""A?H"r   r  r  r  c                   < V ^8  d   QhRS[ RS[S[ ,          RS[S[P                  ,          RS[S[P                  ,          RS[S[P
                  ,          RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r   r    c          	       "   \         P                  ! VVVVVVR7      pV P                  P                  '       dG   \	        V P                  VRV4      pVP                  R4      p	V	'       d   RP                  V	4      p
MHRp
ME\        V P                  VR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WV4      G Rj  xL
 pVP                   '       g   / M\"        P$                  ! VP                   4      pV P                  P                  '       d   \'        VRV4      pV P                  P                  '       g   \)        VRV4      p\         P*                  P-                  WP/                  4       R	7      pV P                  P1                  V4       V#  L5i)
z4Private method for generating videos asynchronously.r"  Nrl   r#  rV  rc  r   rd  rf  )r   r$  rk  rl  r  rm  rn  r  r	   ro  r   rp  r   rq  rr  r  rv  rw  rx  r  r  r  ry  rz  ru  r%  s   &$$$$$$         r   r&  AsyncModels._generate_videos  s'     55O    8


OT?l &))&1	+667GH+7


OT?l &))&1	+667GH+##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmmBHMM1JM   :
m $$$9
m 00??'A'A'C @ L 	%%l3+s,   CI#B,I#I!I#"=I# (I#	AI#c                   < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[P                  /# rW  rX  )r   r]  s   "r   r   r  T  sb        e,,e.H.HHI	
 u889 $$r    c               8  "   \         P                  ! V4      p\         P                  ! V4      G Rj  xL
 w  rV\         P                  ! V4      '       d   V P	                  WVR7      G Rj  xL
 # V'       d   ^ p\        V\        P                  4      '       d)   VP                  '       d   \        VP                  4      pM;\        V\        4      '       d&   VP                  R. 4      pV'       d   \        V4      p\        V4      V8w  d6   RP                  \        \        V4      4      p	\        P!                  RV	4       V P	                  WVR7      G Rj  xL
 # \         P"                  ! V4      p
\        P%                  RV
 R24       . p\        P&                  ! 4       pV
^ 8  Ed   V P	                  WVR7      G Rj  xL
 pV
^,          p
V
^ 8X  d   \        P%                  R4       \         P(                  ! WVR	R
7      pV'       g   EMUV'       g   EMKVP*                  '       dQ   VP*                  ^ ,          P,                  '       d.   VP*                  ^ ,          P,                  P.                  '       g   M\         P0                  ! W4      G Rj  xL
 pV'       g   MVP*                  ^ ,          P,                  p\        P2                  ! RVR7      p\4        P6                  ! V4      pV'       g   VP9                  V4       \        V\:        4      '       d#   VP=                  V4       VP=                  V4       VP=                  V4       VP=                  V4       EK  \         P>                  ! V4      '       d   Ve   VVn         V#  ELY EL# EL9 EL EL5i)a  Makes an API request to generate content using a model.

Some models support multimodal input and output.

Built-in MCP support is an experimental feature.

Usage:

.. code-block:: python

  from google.genai import types
  from google import genai

  client = genai.Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )

  response = await client.aio.models.generate_content(
      model='gemini-2.0-flash',
      contents='User input: I like bagels. Answer:',
      config=types.GenerateContentConfig(
          system_instruction=
            [
              'You are a helpful language translator.',
              'Your mission is to translate text in English to French.'
            ]
      ),
  )
  print(response.text)
  # J'aime les bagels.
Nrb  r   r+  r,  r-  r.  r1  Tis_caller_method_asyncr2  r3  )!r   r4  parse_config_for_mcp_sessionsr8  r  r9  r   r:  r   r;  r7   rm  r<  r=  r8   r>  r?  r@  rA  r\  rB  r  rJ   r   !get_function_response_parts_asyncrD  rn   rp   rE  r  rF  rG  rH  )r}  rk   rm   r   rI  rJ  mcp_to_genai_tool_adaptersrK  r   rL  rM  rH  rF  rO  rP  rQ  rR  s   &$$$             r   rS  AsyncModels.generate_contentT  s    P 	77?  88@@ .M &&}55)) *    "	FE77	8	8<<<"%fll"3
fd##

7B'"%e*
	'	(,A	AiiC)C DE5 	
 )) *    ".!F!F" KK
01K0LAN ?A&,,.H
$q
(-- .  h !A% 	#q	(NO!22
Dl !!!$$Q'///$$Q'//555>>  
 !"--a088#mm# h'h/*11(;	Hd	#	#)*-.(//0AB(//0EF 	..}==  - 1 Oi 	A**s   0NN8N+N,N83N,AN2A&NNA(NNANN)"N,N9NNN AN4B	N>NNNNNc          	         < V ^8  d   QhRS[ RS[S[P                  S[P                  3,          RS[S[P                  ,          RS[S[P                  ,          /# rW  )	r8   r   r   rY  rZ  r   r[  r   r\  )r   r]  s   "r   r   r    sg     U; U; U; e,,e.H.HHI	U;
 u889U; U223U;r    c               ^  a aa"   \         P                  ! V4      p\         P                  ! V4      G Rj  xL
 w  po\         P                  ! V4      '       d+   S P	                  WVR7      G Rj  xL
 oV3R lpV! WV4      # V'       d   ^ p\        V\        P                  4      '       d)   VP                  '       d   \        VP                  4      pM;\        V\        4      '       d&   VP                  R. 4      pV'       d   \        V4      p\        V4      V8w  d6   RP                  \        \        V4      4      p	\        P!                  RV	4       S P	                  WVR7      G Rj  xL
 oV3R lpV! WV4      # \         P"                  ! V4       VV 3R lp
V
! WV4      #  ELp EL9 L?5i)	az  Makes an API request to generate content using a model and yields the model's response in chunks.

For the `model` parameter, supported formats for Vertex AI API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The full resource name starts with 'projects/', for example:
  'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
- The partial resource name with 'publishers/', for example:
  'publishers/google/models/gemini-2.0-flash' or
- `/` separated publisher and model name, for example:
  'google/gemini-2.0-flash'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The model name starts with 'models/', for example:
  'models/gemini-2.0-flash'
- For tuned models, the model name starts with 'tunedModels/',
  for example:
  'tunedModels/1234567890123456789'

Some models support multimodal input and output.

Built-in MCP support is an experimental feature.

Usage:

.. code-block:: python

  from google.genai import types
  from google import genai

  client = genai.Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )

  async for chunk in await client.aio.models.generate_content_stream(
    model='gemini-2.0-flash',
    contents='''What is a good name for a flower shop that specializes in
      selling bouquets of dried flowers?'''
  ):
    print(chunk.text)
  # **Elegant & Classic:**
  # * The Dried Bloom
  # * Everlasting Florals
  # * Timeless Petals

  async for chunk in await client.aio.models.generate_content_stream(
    model='gemini-2.0-flash',
    contents=[
      types.Part.from_text('What is shown in this image?'),
      types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
      'image/jpeg')
    ]
  ):
    print(chunk.text)
  # The image shows a flat lay arrangement of freshly baked blueberry
  # scones.
Nrb  c                <   <"   S  R j  xL
  pV5x  K   LDR # 5iNr  rk   rm   r   rY  rF  s   &&& r   base_async_generatorAAsyncModels.generate_content_stream.<locals>.base_async_generator#  !     # 	 	%+	8   	r   r+  r,  c                <   <"   S  R j  xL
  pV5x  K   LDR # 5ir  r  r  s   &&& r   r  r  ?  r  r  c                  <"   \         P                  ! V4      p\        P                  R V R24       . pRpRp^ pV^ 8  Ed   V^,          pSP	                  WVR7      G Rj  xL
 pV^8  d   \        P                  RV R24       V^,          pV^8  d   V^ 8X  d   \        P                  R4       \         P
                  ! VSRR7      p	V^8X  d   V  Rj  xL
  pV	'       g   \         P                  ! W4      pV5x  K/  VP                  '       dQ   VP                  ^ ,          P                  '       d.   VP                  ^ ,          P                  P                  '       g    M\         P                  ! Wi4      G Rj  xL
 pV'       d   K  \         P                  ! W4      pV5x  K  V  Rj  xL
  p\         P                  ! V4      '       d   VVn        \         P                  ! W4      pV5x  KJ  V	'       g   R# V'       g   R# Vf   EK  VP                  ^ ,          P                  p
\        P                  ! R	VR
7      p\        P                   ! V4      pV'       g   VP#                  V4       \%        V\&        4      '       d'   V
e#   VP)                  V
4       VP)                  V4       V
e   VP)                  V
4       VP)                  V4       EK  R#  EL} EL	 ELdEDL EL8ED:Tec   TP                  '       dQ   TP                  ^ ,          P                  '       d.   TP                  ^ ,          P                  P                  '       g   R# \         P                  ! Yi4      G Rj  xL 
 pEL5i)r-  r.  Nrb  r/  r0  r1  Tr  r2  r3  )r   r@  r>  rA  r  rB  rX  r  rJ   r   r  rG  rH  r   rD  rn   rp   rE  r9  r  rF  )rk   rm   r   rM  rH  rP  rY  rN  rF  rO  rQ  rR  r  r}  s   &&&         r   r  <AsyncModels.generate_content_stream.<locals>.async_generatorI  s    #/#H#H#P kk23M2Na
P AC( e
a&*	Q666 7 
 
 q5
++(95
6"a'"q5/14
++H $44.t
 6 &  E%;;HLhk &&&))!,444))!,44:::$FF  "
 )('==hN &  E55f==4 6 $99(JHK 
"
=
!,,Q/77 %%!
 <<)1
,
3
3H
=h%%*;*G
//+
,
///
0(
,
3
34E
F*112GHm +
( &,X m%%%%%a(000%%a(00666 BB   s   AM9"K#A2M9K(K"K(8M9"M99,M9&M9K%	M9M9/K.3K+4K.7A	M9	M9AM9'A9M9"K(%M9(M9+K..M9"M9),M9M91M42M9)r   r4  r  r8  r  r9  r   r:  r   r;  r7   rm  r<  r=  r8   r>  r?  rW  )r}  rk   rm   r   rI  rJ  r  rK  r   rL  r  r  rF  s   f$$$       @@r   rZ  #AsyncModels.generate_content_stream  s    F 	77? 
 88@@ .M- &&}5544 5  h "%=AA!	FE77	8	8<<<"%fll"3
fd##

7B'"%e*
	'	(,A	AiiC)C DE5 	
 44 5  h "%=AA 88G_IB 5M::] 	A8sM   0F-F%"F-F-/F(0F-3F-?AF-A&F-+F+,:F-(F-+F-c          
         < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[S[P
                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    rh  r    c               H   "   V P                  VVVVR7      G Rj  xL
 #  L5i)a  Edits an image based on a text description and configuration.

Args:
  model (str): The model to use.
  prompt (str): A text description of the edit to apply to the image.
    reference_images (list[Union[RawReferenceImage, MaskReferenceImage,
    ControlReferenceImage, StyleReferenceImage, SubjectReferenceImage]): The
    reference images for editing.
  config (EditImageConfig): Configuration for editing.

Usage:

.. code-block:: python

  from google.genai.types import RawReferenceImage, MaskReferenceImage

  raw_ref_image = RawReferenceImage(
    reference_id=1,
    reference_image=types.Image.from_file(IMAGE_FILE_PATH),
  )

  mask_ref_image = MaskReferenceImage(
    reference_id=2,
    config=types.MaskReferenceConfig(
        mask_mode='MASK_MODE_FOREGROUND',
        mask_dilation=0.06,
    ),
  )
  response = await client.aio.models.edit_image(
    model='imagen-3.0-capability-001',
    prompt='man with dog',
    reference_images=[raw_ref_image, mask_ref_image],
    config=types.EditImageConfig(
        edit_mode= "EDIT_MODE_INPAINT_INSERTION",
        number_of_images= 1,
        include_rai_reason= True,
    )
  )
  response.generated_images[0].image.show()
  # Shows a man with a dog instead of a cat.
r  Nrj  rk  s   &$$$$r   rl  AsyncModels.edit_image  s6     b !!)	 "    s   " "c                n   < V ^8  d   QhRS[ S[P                  ,          RS[S[P                  ,          /# r  )r   r   r  r   r  )r   r]  s   "r   r   r    s5     2 2 u3342 %++	2r    c                 "   \         P                  ! VR7      P                  ;'       g    \         P                  ! 4       pVP                  f   RVn        V P
                  P                  '       dG   VP                  4       pVP                  '       g%   VP                  pV'       d
   VR,           MRVn        \        RV P                  V P                  VR7      G Rj  xL
 V4      #  L	5i)a  Makes an API request to list the available models.

If `query_base` is set to True in the config or not set (default), the
API will return all available base models. If set to False, it will return
all tuned models.

Args:
  config (ListModelsConfigOrDict): Configuration for retrieving models.

Usage:

.. code-block:: python

  response = await client.aio.models.list(config={'page_size': 5})
  print(response.page)
  # [Model(name='projects/./locations/./models/123', display_name='my_model'

  response = await client.aio.models.list(
      config={'page_size': 5, 'query_base': True}
    )
  print(response.page)
  # [Model(name='publishers/google/models/gemini-2.0-flash-exp' ...
rg  NTr  r  rq  )r   r  r   r  r[  rk  rl  r  rZ  r   r  r  s   &$ r   r  AsyncModels.list  s     < 	##6299 	$ 	$!!#   f   {{}f}}  77% 	
 

jjj''	  	(s$   A/C*2!C*C*(6C*C(
C*c                j   < V ^8  d   QhRS[ RS[ RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r]  r    c               x  "   V P                  VVVR7      G Rj  xL
 pRp. pV'       d   VP                  '       g   V# VP                   FO  pVP                  '       d*   VP                  P                  R8X  d   VP                  pK>  VP	                  V4       KQ  	  \
        P                  ! VVR7      pV#  L5i)a6  Generates images based on a text description and configuration.

Args:
  model (str): The model to use.
  prompt (str): A text description of the images to generate.
  config (GenerateImagesConfig): Configuration for generation.

Usage:

.. code-block:: python

  response = await client.aio.models.generate_images(
    model='imagen-3.0-generate-002',
    prompt='Man with a dog',
    config=types.GenerateImagesConfig(
        number_of_images= 1,
        include_rai_reason= True,
    )
  )
  response.generated_images[0].image.show()
  # Shows a man with a dog.
r  Nr_  r`  ra  rb  s	   &$$$     r   re  AsyncModels.generate_images  s     : .. /  L
 )-%|<<<'88

+
+
+//<< -<,M,M)0 9 ++)*KH O1s   B:B8B:B:A<B:c          
         < V ^8  d   QhRS[ RS[P                  RS[ RS[S[P                  ,          RS[P
                  /# r  ro  )r   r]  s   "r   r   r  O  rq  r    c                 "   \         P                  ! VVVVR7       T;'       g    / p\        V\         P                  4      '       d   VP	                  4       pM\        V4      p\         P                  ! VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  RR4      VP                  R	R4      VP                  R
R4      VP                  RR4      VP                  RR4      R7
      pRVR&   ^VR&   V P                  VVVVR7      G Rj  xL
 #  L5i)a  Makes an API request to upscale a provided image.

Args:
  model (str): The model to use.
  image (Image): The input image for upscaling.
  upscale_factor (str): The factor to upscale the image (x2 or x4).
  config (UpscaleImageConfig): Configuration for upscaling.

Usage:

.. code-block:: python

  from google.genai.types import Image

  IMAGE_FILE_PATH="my-image.png"
  response = await client.aio.models.upscale_image(
      model='imagen-3.0-generate-001',
      image=types.Image.from_file(IMAGE_FILE_PATH),
      upscale_factor='x2',
  )
  response.generated_images[0].image.show()
  # Opens my-image.png which is upscaled by a factor of 2.
r  rp  Nr   r   r   r   r   r   r3  r4  r   rs  rt  r>  r   ru  ry  s   &$$$$  r   r|  AsyncModels.upscale_imageO  sJ    B 
  %	 \\rF&%2233$$&j<j11^^ND9!~~&6=&NN+@$G$..)<dC%>>*>E#(:DA#->>($$
 'NN+@$G",..'#
 ~~h-J$ #Jv%&J!"$$%	 %    s   EEEEc                   < V ^8  d   QhRS[ RS[S[ ,          RS[S[P                  ,          RS[S[P                  ,          RS[S[P
                  ,          RS[S[P                  ,          RS[P                  /# r  r  )r   r]  s   "r   r   r    r  r    c          
     $  "   V'       g   V'       g	   V'       d   V'       d   \        R4      h/ pV P                  P                  '       g   V'       d   \        V\        P
                  4      '       d   VP                  4       pM\        V4      pVP                  R4      '       dN   VP                  R4      '       d7   \        P
                  ! VP                  R4      VP                  R4      R7      pEMyV P                  P                  '       Eg]   V'       EdT   \        V\        P                  4      '       d$   VP                  4       pVP                  R/ 4      pMo\        V4      p\        VP                  R4      \        P
                  4      '       d6   VP                  R\        P
                  ! 4       4      p	V	P                  4       pV'       d   VP                  R4      '       d   VP                  R4      '       dl   \        P                  ! VP                  R4      VP                  R4      \        P
                  ! VP                  R4      VP                  R4      R7      R7      pV P                  VVVVVVR	7      G R
j  xL
 #  L5i)r  rJ  rL  r?   r  r  r   r  r  r"  Nr  r  r  s
   &$$$$$$   r   r  AsyncModels.generate_videos  s    b 	%5f' 
 !#I$$$	E5;;	'	'$$&	K		u		)--">">e$	k0J
 &&&66	FE66	7	7&&(
NN7B/	&\
jnnW-u{{;;#->>'5;;=#I)**,)	y}}U++	m0L0L++>>(+..)++MM%(#--4
 && '    sZ   JJJ(JJAJ'J>AJJB9JJ-JBJ	J
Jr  )r  r  r  r  r  r  r  r  r  r  r  r  rm  r  r  r  r  r  r&  rS  rZ  rl  r  re  r|  r  r  r  r  s   @r   r  r    sn    O
 =AO ObY
 =AY Yv_
 :>_ _BJ
 <@J JX@ 7;@ @D@ >B@ @Dj
 <@j jXV
 :>V Vp=JN= =~G@DG GR@ 9=	@ @DF 9=	F FP]
 9=] ]~R
 ;?R RhN #	N
 ,0N ,0N <@N <@N N`
 =A BU;
 =AU; U;n6 7;6 6p2 8<2 2h5
 <@5 5nH :>H HT[ #	[
 ,0[ ,0[ <@[ <@[ [ [r    r  )NN)rw  loggingtypingr   r   r   r   r   r   urllib.parser	    r
   r   rH  r   r   r   r   rn   r   r   rk  r   r   rB   r   rC   pagersr   r   	getLoggerr>  r(   r,   r0   rF   r_   r\   rr   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r!  r%  r+  r1  r8  r@  rJ  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-  r3  r:  r  r  r  r  r  r  r_  rc  rh  rk  rt  ry  r  rs  rx  r   r  r  r  r  r  r   r  r  r{  r  r  r  r  r  r  r}  r   r  r%  r)  r-  r0  r8  r=  r@  r  r  r  r   r#  r  r  
BaseModulerU  r  r  r    r   <module>r     s  $   K K "  *        & . . % 
		0	1Q
Q
Q$6r 0**,&.!H@:0"""vr F0B&R$ND06"$02#LvriX!HB!H!Hnbvr22 F FdNxv(V$N)X)XBB88.@"J $od""0<!H(,,,BB66(7t6rGT$L^6&B5p00$ )X6&<2:z3l2..,,L^!H0&,&,,,,V[## Vr:X+(( Xr    