
    UEjT                        d dl mZmZmZ ddlmZ ddlmZ ddl	m
Z ddl	mZ 	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddedeeeef   ef   d	eeeef      d
eeef   fdZ	 ddedeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddedeeeef   ef   d	eeeef      d
eeef   fdZ	 ddedeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ	 ddeeeef   ef   d	eeeef      d
eeef   fdZ 	 ddeeeef   ef   d	eeeef      d
eeef   fdZ!y)    )AnyOptionalUnion   )_transformers)BaseApiClient)get_value_by_path)set_value_by_pathNfrom_objectparent_objectreturnc                    i }t        | dg      t        d      t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             |S )	Nlanguage_codeszvlanguage_codes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.language_autolanguageAutolanguage_hintslanguageHintsadaptation_phrasesadaptationPhrasesgetv
ValueErrorsetvr   r   	to_objects      U/var/www/html/qr/venv/lib/python3.12/site-packages/google/genai/_tokens_converters.py"_AudioTranscriptionConfig_to_mldevr      s     !)	+()*6
	< 
 
+()5^$d;8I&JK	+()*6_%tK:J9K'LM	+,-.:	[/01 
    c                 v   i }t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        d      t        | dg      t        d      t        | d	g      t        d
      t        | dg      t        d      t        | dg      t        d      |S )Napi_keyapiKeyapi_key_configzvapi_key_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	auth_typezqauth_type parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.google_service_account_configzgoogle_service_account_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.http_basic_auth_configz~http_basic_auth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oauth_configztoauth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oidc_configzsoidc_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r   r   r   s      r   _AuthConfig_to_mldevr)   5   s    !)	+	{#/XJ[9+ >?	+()*6
	< 
 
+}%1
	< 
 
+789E
	M 
 
+012>
	M 
 
+'(4
	< 
 
+'3
	< 
 
r   c                     i }t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        |dgt        | dg             |S )Ndatadisplay_nametdisplay_name parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	mime_typemimeTyper(   r   s      r   _Blob_to_mldevr0   d   s     !)	+x ,VHd;9:	+'(4
	< 
 
+}%1ZL${[M"BC	r   c                     i }t        | dg      1t        |dgt        | dg      D cg c]  }t        ||       c}       t        | dg      t        |dgt        | dg             |S c c}w )Npartsrole)r   r   _Part_to_mldevr   r   r   items       r   _Content_to_mldevr7   x   s     !)	+y!-		 [7)4	
 4+	
 
+x ,VHd;9:		
s   A)
api_clientc                    i }t        |dg      t        |dgt        |dg             t        |dg      t        |dgt        |dg             t        |dg      t        |dgt        |dg             t        |dg      $t        |dgt        | t        |dg      |             t        |dg      t        |d	gt        |dg             |S )
Nexpire_time
expireTimenew_session_expire_timenewSessionExpireTimeuseslive_connect_constraintsbidiGenerateContentSetuplock_additional_fields	fieldMask)r   r    _LiveConnectConstraints_to_mldevr8   r   r   r   s       r   _CreateAuthTokenConfig_to_mldevrE      s    
 !)	+'3[=/(JK	+123?	 [456 
+x ,${VH"=>	+234@	#$(9:;	
 
+012>	[345 
r   c                 l    i }t        |dg      $t        |dgt        | t        |dg      |             |S )Nconfig)r   r   rE   rD   s       r   #_CreateAuthTokenParameters_to_mldevrH      sH    
 !)	+z".	
'[8*5y	
 
r   c                 :    i }t        | dg      t        d      |S )NrG   znconfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.)r   r   r   s      r   $_CreateAuthTokenParameters_to_vertexrJ      s2     !)	+z".
	5 
 
r   c                     i }t        | dg      t        d      t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             |S )Nr,   r-   file_urifileUrir.   r/   r   r   s      r   _FileData_to_mldevrN      s     !)	+'(4
	< 
 
+
|$0YKkJ<!@A	+}%1ZL${[M"BC	r   c                 N   i }t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        d      |S )Nidargsnamepartial_argsztpartial_args parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.will_continuezuwill_continue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r(   r   s      r   _FunctionCall_to_mldevrU      s     !)	+v*TFDtf56	+x ,VHd;9:	+x ,VHd;9:	+'(4
	< 
 
+()5
	< 
 
r   c           
          i }t        | dg      #t        |dgt        t        | dg      |             t        | dg      t        |dgt        | dg             |S )Nauth_config
authConfigenable_widgetenableWidget)r   r   r)   r   s      r   _GoogleMaps_to_mldevr[     sl     !)	+'3	T+?K 
+()5^$d;8I&JK	r   c                    i }t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        d      t        | dg      t        |dgt        | dg             |S )	Nsearch_typessearchTypesblocking_confidencez{blocking_confidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.exclude_domainszwexclude_domains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.time_range_filtertimeRangeFilterr(   r   s      r   _GoogleSearch_to_mldevrc     s     !)	+'(4]OT+7G%HI	+-./;
	B 
 
+)*+7
	< 
 
++,-9%&[;N:O(P 
r   c                    i }t        |dg      t        |ddgt        |dg             t        |dg      t        |g dt        |dg             t        |dg      t        |g dt        |dg             t        |dg      t        |g d	t        |dg             t        |d
g      t        |g dt        |d
g             t        |dg      t        |g dt        |dg             t        |dg      t        |g dt        |dg             t        |dg      t        |g dt        |dg             t        |dg      -t        |g dt        j                  t        |dg                   t        |dg      t        |g dt        |dg             t        |dg      t        |g dt        |dg             t        |dg      7t        |ddgt	        t        j
                  t        |dg            |             t        |dg      Zt        |ddgt        j                  | t        |dg            D cg c]"  }t        t        j                  | |      |      $ c}       t        |dg      $t        |ddgt        t        |dg      |             t        |dg      $t        |ddgt        t        |dg      |             t        |dg      $t        |dd gt        t        |dg      |             t        |d!g      t        |dd"gt        |d!g             t        |d#g      t        |dd$gt        |d#g             t        |d%g      t        |dd%gt        |d%g             t        |d&g      t        d'      t        |d(g      t        |dd)gt        |d(g             t        |d*g      t        |dd+gt        |d*g             t        |d,g      2t        |dd-gt        |d,g      D cg c]  }t        ||       c}       t        |d.g      t        |g d/t        |d.g             |S c c}w c c}w )0Ngeneration_configsetupgenerationConfigresponse_modalities)rf   rg   responseModalitiestemperature)rf   rg   rj   top_p)rf   rg   topPtop_k)rf   rg   topKmax_output_tokens)rf   rg   maxOutputTokensmedia_resolution)rf   rg   mediaResolutionseed)rf   rg   rs   speech_config)rf   rg   speechConfigthinking_config)rf   rg   thinkingConfigenable_affective_dialog)rf   rg   enableAffectiveDialogsystem_instructionsystemInstructiontoolssession_resumptionsessionResumptioninput_audio_transcriptioninputAudioTranscriptionoutput_audio_transcriptionoutputAudioTranscriptionrealtime_input_configrealtimeInputConfigcontext_window_compressioncontextWindowCompressionproactivityexplicit_vad_signalz{explicit_vad_signal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.history_confighistoryConfigavatar_configavatarConfigsafety_settingssafetySettingstranslation_config)rf   rg   translationConfig)r   r   tt_live_speech_configr7   	t_contentt_tools_Tool_to_mldevt_tool!_SessionResumptionConfig_to_mldevr   r   _SafetySetting_to_mldev)r8   r   r   r   r6   s        r   _LiveConnectConfig_to_mldevr   5  s,   
 !)	++,-9	$%[./0 
+-./;;[012 
+'34[=/* 
+y!--[7)$ 
+y!--[7)$ 
++,-98[./0 
+*+,88[-./ 
+x ,-[6(# 
+()55	tK/1BCD 
+)*+77[,-. 
+123?>[456 
+,-.:	%&KK[+?*@ABI	
 
+y!-	' 		*d;	.JK	
 188J5yA	
 
+,-.:	%&)345y	
 
+345A	+,*:;<i	
 
+456B	,-*;<=y	
 
+/01=	'([234 
+456B	,-[789 
+'3	- [=/* 
+-./;
	B 
 
+()*6	/"[+,- 
+()5	.![?+, 
+)*+7	"# [+<*=>	
 $D)4	
 
+,-.::[/01 
w	
\	
s    'QQ	c                     i }t        |dg      .t        |ddgt        j                  | t        |dg                   t        |dg      $t        |dgt	        | t        |dg      |             |S )Nmodelrf   rG   )r   r   r   t_modelr   rD   s       r   rC   rC     s    
 !)	+y!-	'			*d;	:; 
+z".	
#[8*5y	
 
r   c           
      n   i }t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      #t        |dgt        t        | dg      |             t        | d	g      #t        |d
gt        t        | d	g      |             t        | dg      t        |dgt        | dg             t        | dg      #t        |dgt	        t        | dg      |             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             |S )Nrq   rr   code_execution_resultcodeExecutionResultexecutable_codeexecutableCode	file_datafileDatafunction_callfunctionCallfunction_responsefunctionResponseinline_data
inlineDatatextthoughtthought_signaturethoughtSignaturevideo_metadatavideoMetadata	tool_calltoolCalltool_responsetoolResponsepart_metadatapartMetadata)r   r   rN   rU   r0   r   s      r   r4   r4     s    !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%1	4k];YG 
+()5	tK/1BCYO 
++,-9	[./0 
+'3	tK-99E 
+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	+}%1ZL${[M"BC	+()5^$d;8I&JK	+()5^$d;8I&JK	r   c                     i }t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        |dgt        | dg             |S )Ncategorymethodznmethod parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	thresholdr(   r   s      r   r   r   Y  s~     !)	+
|$0ZL${ZL"AB	+z".
	3 
 
+}%1[M4k]#CD	r   c                     i }t        | dg      t        |dgt        | dg             t        | dg      t        d      |S )Nhandletransparentzstransparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r(   r   s      r   r   r   m  sX     !)	+z".XJ[8* =>	+'3
	< 
 
r   c           
         i }t        | dg      t        d      t        | dg      t        |dgt        | dg             t        | dg      t        |dgt        | dg             t        | dg      #t        |dgt        t        | dg      |             t        | d	g      #t        |d
gt	        t        | d	g      |             t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      't        |dgt        | dg      D cg c]  }| c}       t        | dg      t        |dgt        | dg             t        | dg      t        d      t        | dg      t        |dgt        | dg             t        | dg      't        |dgt        | dg      D cg c]  }| c}       |S c c}w c c}w )N	retrievalzqretrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.computer_usecomputerUsefile_search
fileSearchgoogle_searchgoogleSearchgoogle_maps
googleMapscode_executioncodeExecutionenterprise_web_searchz}enterprise_web_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.function_declarationsfunctionDeclarationsgoogle_search_retrievalgoogleSearchRetrievalparallel_ai_searchzzparallel_ai_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.url_context
urlContextmcp_servers
mcpServers)r   r   r   rc   r[   r5   s       r   r   r   ~  s:    !)	+}%1
	< 
 
+'(4]OT+7G%HI	+'3\ND}o$FG	+()5	tK/1BCYO 
+'3	T+?K 
+()*6_%tK:J9K'LM	+/01=
	B 
 
+/01=	 {-D,EFG$G 
+123?	 ![456 
+,-.:
	B 
 
+'3\ND}o$FG	+'3	{]O<=$= 
5 	H. 	>s   )	G	G)N)"typingr   r   r    r   r   _api_clientr   _commonr	   r   r
   r   dictstrobjectr   r)   r0   r7   rE   rH   rJ   rN   rU   r[   rc   r   rC   r4   r   r   r    r   r   <module>r      sM  $ ( '   & . .
 /3tCH~v-.DcN+ 
#s(^: /3,tCH~v-.,DcN+, 
#s(^,b /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^0 /3&&tCH~v-.& DcN+& 
#s(^	&X /3tCH~v-. DcN+ 
#s(^	( /3tCH~v-.DcN+ 
#s(^  /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^> /3tCH~v-.DcN+ 
#s(^( /3tCH~v-.DcN+ 
#s(^> /3||tCH~v-.| DcN+| 
#s(^	|D /3tCH~v-. DcN+ 
#s(^	6 /3ItCH~v-.IDcN+I 
#s(^I\ /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^& /3FtCH~v-.FDcN+F 
#s(^Fr   