
    R-jR                        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      |S )Nlanguage_codeszvlanguage_codes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.getv
ValueErrorr   r   	to_objects      m/Users/jameslopez/projects/TradingBot25/.venv/lib/python3.12/site-packages/google/genai/_tokens_converters.py"_AudioTranscriptionConfig_to_mldevr      s4     !)	+()*6
	< 
 
    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   setvr   r   s      r   _AuthConfig_to_mldevr#   (   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_mldevr*   W   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_mldevr1   k   s     !)	+y!-		 [7)4	
4 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r2   r   r   r   s       r   _CreateAuthTokenConfig_to_mldevr?      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"   r?   r>   s       r   #_CreateAuthTokenParameters_to_mldevrB      sH    
 !)	+z".	
'[8*5y	
 
r   c                 :    i }t        | dg      t        d      |S )NrA   znconfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   r   s      r   $_CreateAuthTokenParameters_to_vertexrD      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   r"   r   s      r   _FileData_to_mldevrH      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_mldevrO      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_mldevrU      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_mldevr]     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)r`   ra   responseModalitiestemperature)r`   ra   rd   top_p)r`   ra   topPtop_k)r`   ra   topKmax_output_tokens)r`   ra   maxOutputTokensmedia_resolution)r`   ra   mediaResolutionseed)r`   ra   rm   speech_config)r`   ra   speechConfigthinking_config)r`   ra   thinkingConfigenable_affective_dialog)r`   ra   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)r`   ra   translationConfig)r   r"   tt_live_speech_configr1   	t_contentt_tools_Tool_to_mldevt_tool!_SessionResumptionConfig_to_mldevr   r   _SafetySetting_to_mldev)r2   r   r   r   r0   s        r   _LiveConnectConfig_to_mldevr   (  s6   
 !)	++,-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	
K 188J5yAK	
 
+,-.:	%&)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modelr`   rA   )r   r"   r   t_modelr   r>   s       r   r=   r=     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 )Nrk   rl   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"   rH   rO   r*   r   s      r   r.   r.      s    !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%1	4k];YG 
+()5	tK/1BCYO 
++,-9	[./0 
+'3	tK-99E 
+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	+}%1ZL${[M"BC	+()5^$d;8I&JK	+()5^$d;8I&JK	r   c                     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   L  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   `  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"   r]   rU   r/   s       r   r   r   q  sF    !)	+}%1
	< 
 
+'(4]OT+7G%HI	+'3\ND}o$FG	+()5	tK/1BCYO 
+'3	T+?K 
+()*6_%tK:J9K'LM	+/01=
	B 
 
+/01=	 {-D,EFGF$FG 
+123?	 ![456 
+,-.:
	B 
 
+'3\ND}o$FG	+'3	{]O<=<$<= 
5 	H. 	>s   )	G	G)N)"typingr   r   r    r   r   _api_clientr   _commonr	   r   r
   r"   dictstrobjectr   r#   r*   r1   r?   rB   rD   rH   rO   rU   r]   r   r=   r.   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   