
    Oj                     v   S SK r S SKrS SKJrJrJr  S SKJr  SSKJ	r	  SSKJ
r
  SSKJr  SSKJr  SS	KJr  SS
K
Jr  SSK
Jr  SSKJrJr  \R.                  " S5      r S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr  S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr! S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr" S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr# S=S\S\\\\4   \4   S\\\\4      S\\\4   4S jjr$ S=S\S\\\\4   \4   S\\\\4      S\\\4   4S jjr% S=S\S\\\\4   \4   S\\\\4      S\\\4   4S jjr& S=S\S\\\\4   \4   S\\\\4      S\\\4   4S jjr' S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr( S=S\\\\4   \4   S\\\\4      S\\\4   4S jjr) S=S\\\\4   \4   S\\\\4      S\\\4   4S  jjr* S=S\\\\4   \4   S\\\\4      S\\\4   4S! jjr+ S=S\\\\4   \4   S\\\\4      S\\\4   4S" jjr, S=S\\\\4   \4   S\\\\4      S\\\4   4S# jjr- S=S\S\\\\4   \4   S\\\\4      S\\\4   4S$ jjr. S=S\S\\\\4   \4   S\\\\4      S\\\4   4S% jjr/ S=S\\\\4   \4   S\\\\4      S\\\4   4S& jjr0 S=S\\\\4   \4   S\\\\4      S\\\4   4S' jjr1 S=S\\\\4   \4   S\\\\4      S\\\4   4S( jjr2 S=S\\\\4   \4   S\\\\4      S\\\4   4S) jjr3 S=S\\\\4   \4   S\\\\4      S\\\4   4S* jjr4 S=S\\\\4   \4   S\\\\4      S\\\4   4S+ jjr5 S=S\\\\4   \4   S\\\\4      S\\\4   4S, jjr6 S=S\\\\4   \4   S\\\\4      S\\\4   4S- jjr7 S=S\\\\4   \4   S\\\\4      S\\\4   4S. jjr8 S=S\\\\4   \4   S\\\\4      S\\\4   4S/ jjr9 S=S\\\\4   \4   S\\\\4      S\\\4   4S0 jjr: S=S\\\\4   \4   S\\\\4      S\\\4   4S1 jjr; S=S\\\\4   \4   S\\\\4      S\\\4   4S2 jjr< S=S\\\\4   \4   S\\\\4      S\\\4   4S3 jjr= S=S\\\\4   \4   S\\\\4      S\\\4   4S4 jjr> S=S\\\\4   \4   S\\\\4      S\\\4   4S5 jjr? S=S\\\\4   \4   S\\\\4      S\\\4   4S6 jjr@ S=S\S\\\\4   \4   S\\\\4      S\\\4   4S7 jjrA S=S\S\\\\4   \4   S\\\\4      S\\\4   4S8 jjrB " S9 S:\	R                  5      rD " S; S<\	R                  5      rEg)>    N)AnyOptionalUnion)	urlencode   )_api_module)_common)_transformers)types)BaseApiClient)get_value_by_path)set_value_by_path)
AsyncPagerPagerzgoogle_genai.cachesfrom_objectparent_objectreturnc                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S	/5      b  [        S
5      e[        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Napi_keyapiKeyapi_key_configzvapi_key_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.	auth_typezqauth_type parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.google_service_account_configzgoogle_service_account_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.http_basic_auth_configz~http_basic_auth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oauth_configztoauth_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.oidc_configzsoidc_config parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.getvsetv
ValueErrorr   r   	to_objects      U/var/www/html/leaf-doctor-v1/venv/lib/python3.13/site-packages/google/genai/caches.py_AuthConfig_to_mldevr$   #   s    !)	+	{#/XJ[9+ >?	+()*6
	< 
 
+}%1
	< 
 
+789E
	M 
 
+012>
	M 
 
+'(4
	< 
 
+'3
	< 
 
    c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        U$ )N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,   R   s     !)	+x ,VHd;9:	+'(4
	< 
 
+}%1ZL${[M"BC	r%   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Noutcomeoutputidjid parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   r!   s      r#   _CodeExecutionResult_to_vertexr2   f   s~     !)	+	{#/YKkI;!?@	+z".XJ[8* =>	+v*
	2 
 
r%   c                 &   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Nenvironmentexcluded_predefined_functionsexcludedPredefinedFunctions!enable_prompt_injection_detectionenablePromptInjectionDetectiondisabled_safety_policieszdisabled_safety_policies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   r!   s      r#   _ComputerUse_to_vertexr:   z   s     !)	+'3]OT+%GH	+789E	&'[:;< 
+;<=I	)*[>?@ 
+234@
	M 
 
r%   c                     0 n[        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        [        U S/5      b  [        US/[        U S/5      5        U$ s  snf Npartsrole)r   r   _Part_to_mldevr   r   r"   items       r#   _Content_to_mldevrB      s     !)	+y!-		 [7)4	
4 4+4	
 
+x ,VHd;9:		
   A-c                     0 n[        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        [        U S/5      b  [        US/[        U S/5      5        U$ s  snf r<   )r   r   _Part_to_vertexr@   s       r#   _Content_to_vertexrF      s     !)	+y!-		 [7)4	
4 D,4	
 
+x ,VHd;9:		
rC   c                 R   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      bG  [        US/[        R                  " [        U S/5      5       Vs/ s H  n[	        X25      PM     sn5        [        U S/5      b7  [        US/[	        [        R
                  " [        U S/5      5      U5      5        [        U S	/5      b3  [        US	/[        U S	/5       Vs/ s H  n[        X25      PM     sn5        [        U S
/5      b#  [        US/[        [        U S
/5      U5      5        [        U S/5      b  [        S5      eU$ s  snf s  snf )Nttlexpire_time
expireTimer(   displayNamecontentssystem_instructionsystemInstructiontoolstool_config
toolConfigkms_key_nameztkms_key_name parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.)	r   r   t
t_contentsrB   	t_content_Tool_to_mldev_ToolConfig_to_mldevr    r@   s       r#   #_CreateCachedContentConfig_to_mldevrX      s    !)	+w+kE7!;<	+'3[=/(JK	+'(4kN;K)LM	+
|$0	 T+
|%DE	
E d.E	
 
+,-.:	KK[+?*@ABI	
 
+y!-		 [7)4	
4 4+4	
 
+'3	T+?K 
+'(4
	< 
 
M	
&	
s   1F7F$c                 p   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      bG  [        US/[        R                  " [        U S/5      5       Vs/ s H  n[	        X25      PM     sn5        [        U S/5      b7  [        US/[	        [        R
                  " [        U S/5      5      U5      5        [        U S	/5      b3  [        US	/[        U S	/5       Vs/ s H  n[        X25      PM     sn5        [        U S
/5      b#  [        US/[        [        U S
/5      U5      5        [        U S/5      b  [        USS/[        U S/5      5        U$ s  snf s  snf )NrH   rI   rJ   r(   rK   rL   rM   rN   rO   rP   rQ   rR   encryption_spec
kmsKeyName)r   r   rS   rT   rF   rU   _Tool_to_vertex_ToolConfig_to_vertexr@   s       r#   $_CreateCachedContentConfig_to_vertexr^      s    !)	+w+kE7!;<	+'3[=/(JK	+'(4kN;K)LM	+
|$0	 T+
|%DE	
E t/E	
 
+,-.:	KK[+?*@ABI	
 
+y!-		 [7)4	
4 D,4	
 
+'3	d;@)L 
+'(4	L)[>*+ 
O	
&	
s   1F.7F3
api_clientc                     0 n[        US/5      b.  [        US/[        R                  " U [        US/5      5      5        [        US/5      b  [	        [        US/5      U5        U$ Nmodelconfig)r   r   rS   t_caches_modelrX   r_   r   r   r"   s       r#   '_CreateCachedContentParameters_to_mldevrf   <  sp    
 !)	+y!-			T+y%AB 
+z".'[8*%y 
r%   c                     0 n[        US/5      b.  [        US/[        R                  " U [        US/5      5      5        [        US/5      b  [	        [        US/5      U5        U$ ra   )r   r   rS   rd   r^   re   s       r#   (_CreateCachedContentParameters_to_vertexrh   Q  sp    
 !)	+y!-			T+y%AB 
+z".([8*%y 
r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ Nname_urlr   r   rS   t_cached_content_namere   s       r#   '_DeleteCachedContentParameters_to_mldevro   f  L    
 !)	+x ,		
Dvh,GH 
r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ rj   rm   re   s       r#   (_DeleteCachedContentParameters_to_vertexrr   v  rp   r%   c                 X    0 n[        U S/5      b  [        US/[        U S/5      5        U$ NsdkHttpResponsesdk_http_responser   r   r!   s      r#   '_DeleteCachedContentResponse_from_mldevrx     @     !)	+)*+7'(${=N<O*P 
r%   c                 X    0 n[        U S/5      b  [        US/[        U S/5      5        U$ rt   rw   r!   s      r#   (_DeleteCachedContentResponse_from_vertexr{     ry   r%   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Ncodelanguager0   r1   r   r!   s      r#   _ExecutableCode_to_vertexr     s~     !)	+x ,VHd;9:	+
|$0ZL${ZL"AB	+v*
	2 
 
r%   c                     0 n[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nr(   r)   file_urifileUrir*   r+   )r   r    r   r!   s      r#   _FileData_to_mldevr     s     !)	+'(4
	< 
 
+
|$0YKkJ<!@A	+}%1ZL${[M"BC	r%   c                 X   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Nr0   argsrk   partial_argsztpartial_args parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.will_continuezuwill_continue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r!   s      r#   _FunctionCall_to_mldevr     s     !)	+v*TFDtf56	+x ,VHd;9:	+x ,VHd;9:	+'(4
	< 
 
+()5
	< 
 
r%   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Nallowed_function_namesallowedFunctionNamesmodestream_function_call_argumentszstream_function_call_arguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.r   r!   s      r#   _FunctionCallingConfig_to_mldevr     s     !)	+012>	 [345 
+x ,VHd;9:	+89:F
	M 
 
r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ rj   rm   re   s       r#   $_GetCachedContentParameters_to_mldevr     rp   r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ rj   rm   re   s       r#   %_GetCachedContentParameters_to_vertexr     rp   r%   c           
          0 n[        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nauth_config
authConfigenable_widgetenableWidget)r   r   r$   r!   s      r#   _GoogleMaps_to_mldevr     sl     !)	+'3	T+?K 
+()5^$d;8I&JK	r%   c                 
   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        U$ )	Nsearch_typessearchTypesblocking_confidencez{blocking_confidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.exclude_domainszwexclude_domains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.time_range_filtertimeRangeFilterr   r!   s      r#   _GoogleSearch_to_mldevr   /  s     !)	+'(4]OT+7G%HI	+-./;
	B 
 
+)*+7
	< 
 
++,-9%&[;N:O(P 
r%   c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        U$ N	page_size_querypageSize
page_token	pageTokenrw   r!   s      r#   "_ListCachedContentsConfig_to_mldevr   K  m     !)	+}%1*-tK+/O 
+~&2	;[<.) 
r%   c                     0 n[        U S/5      b  [        USS/[        U S/5      5        [        U S/5      b  [        USS/[        U S/5      5        U$ r   rw   r!   s      r#   #_ListCachedContentsConfig_to_vertexr   `  r   r%   c                 T    0 n[        U S/5      b  [        [        U S/5      U5        U$ Nrc   )r   r   r!   s      r#   &_ListCachedContentsParameters_to_mldevr   u  s1     !)	+z".&tK('DiP	r%   c                 T    0 n[        U S/5      b  [        [        U S/5      U5        U$ r   )r   r   r!   s      r#   '_ListCachedContentsParameters_to_vertexr     s6     !)	+z".'[8*%y 
r%   c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        U$ s  snf Nru   rv   nextPageTokennext_page_tokencachedContentscached_contentsrw   r@   s       r#   &_ListCachedContentsResponse_from_mldevr          !)	+)*+7'(${=N<O*P 
+()5&'kO;L)MN	+()*6	{-=,>?@?$?@ 
 	A   6B
c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        U$ s  snf r   rw   r@   s       r#   '_ListCachedContentsResponse_from_vertexr     r   r   c                 n    0 n[        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Nrk   zlname parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.streamable_http_transportzstreamable_http_transport parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.)r   r    r!   s      r#   _McpServer_to_vertexr     sX     !)	+x ,
	2 
 
+345A
	M 
 
r%   c           
         0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S	/5      b#  [        US
/[        [        U S	/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[	        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nmedia_resolutionmediaResolutioncode_execution_resultcodeExecutionResultexecutable_codeexecutableCode	file_datafileDatafunction_callfunctionCallfunction_responsefunctionResponseinline_data
inlineDatatextthoughtthought_signaturethoughtSignaturevideo_metadatavideoMetadata	tool_calltoolCalltool_responsetoolResponsepart_metadatapartMetadata)r   r   r   r   r,   r!   s      r#   r?   r?     s    !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%1	4k];YG 
+()5	tK/1BCYO 
++,-9	[./0 
+'3	tK-99E 
+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	+}%1ZL${[M"BC	+()5^$d;8I&JK	+()5^$d;8I&JK	r%   c           
      "   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S	/5      b  [        US
/[        U S	/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [	        S5      e[        U S/5      b  [	        S5      e[        U S/5      b  [	        S5      eU$ )Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   zqtool_call parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   zutool_response parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   zupart_metadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.)r   r   r2   r   r    r!   s      r#   rE   rE     ss    !)	+*+,8%&[;M:N(O 
+/01=	&678)	
 
+)*+7	!012I	
 
+}%1ZL${[M"BC	+()5^$d;8I&JK	++,-9	[./0 
+'3\ND}o$FG	+x ,VHd;9:	+	{#/YKkI;!?@	++,-9	[./0 
+()*6_%tK:J9K'LM	+}%1
	9 
 
+()5
	? 
 
+()5
	? 
 
r%   c           
         0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        U$ )Nretrieval_configretrievalConfigfunction_calling_configfunctionCallingConfig$include_server_side_tool_invocations includeServerSideToolInvocations)r   r   r   r!   s      r#   rW   rW   l  s     !)	+*+,8%&[;M:N(O 
+123?	 !'89:I	
 
+>?@L	+,[ABC 
r%   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ )Nr   r   r   r   r   zinclude_server_side_tool_invocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   r!   s      r#   r]   r]     s     !)	+*+,8%&[;M:N(O 
+123?	 ![456 
+>?@L
	  
r%   c           
         0 n[        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S	/5      b#  [        US
/[	        [        U S	/5      U5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        U$ s  snf s  snf )N	retrievalzqretrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.computer_usecomputerUsefile_search
fileSearchgoogle_searchgoogleSearchgoogle_maps
googleMapscode_executioncodeExecutionenterprise_web_searchz}enterprise_web_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.function_declarationsfunctionDeclarationsgoogle_search_retrievalgoogleSearchRetrievalparallel_ai_searchzzparallel_ai_search parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.url_context
urlContextmcp_servers
mcpServers)r   r    r   r   r   r@   s       r#   rV   rV     sF    !)	+}%1
	< 
 
+'(4]OT+7G%HI	+'3\ND}o$FG	+()5	tK/1BCYO 
+'3	T+?K 
+()*6_%tK:J9K'LM	+/01=
	B 
 
+/01=	 {-D,EFGF$FG 
+123?	 ![456 
+,-.:
	B 
 
+'3\ND}o$FG	+'3	{]O<=<$<= 
5 	H. 	>s   1G#G(c                    0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b#  [        US/[        [        U S/5      U5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US	/[        U S/5      5        [        U S
/5      b  [        US/[        U S
/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b)  [        US/[        U S/5       Vs/ s H  o3PM     sn5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b3  [        US/[        U S/5       Vs/ s H  n[	        X25      PM     sn5        U$ s  snf s  snf )Nr   r   r   r   zsfile_search parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.r   r   r   r   r   r   r   enterpriseWebSearchr   r   r   r   r   parallelAiSearchr   r   r   r   )r   r   r:   r    r   r@   s       r#   r\   r\     s^    !)	+}%1[M4k]#CD	+'(4	tK.1ABIN 
+'3
	9 
 
+()5^$d;8I&JK	+'3\ND}o$FG	+()*6_%tK:J9K'LM	+/01=	[234 
+/01=	 {-D,EFGF$FG 
+123?	 ![456 
+,-.:	[/01 
+'3\ND}o$FG	+'3	 [=/:	
: !1:	
 
= 	H0	
s   5G?!Hc                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ NrH   rI   rJ   rw   r!   s      r#   #_UpdateCachedContentConfig_to_mldevr   7  [     !)	+w+kE7!;<	+'3[=/(JK	r%   c                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ r   rw   r!   s      r#   $_UpdateCachedContentConfig_to_vertexr  F  r   r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        [        US/5      b  [	        [        US/5      U5        U$ Nrk   rl   rc   )r   r   rS   rn   r   re   s       r#   '_UpdateCachedContentParameters_to_mldevr  U  ss    
 !)	+x ,		
Dvh,GH 
+z".'[8*%y 
r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        [        US/5      b  [	        [        US/5      U5        U$ r  )r   r   rS   rn   r  re   s       r#   (_UpdateCachedContentParameters_to_vertexr  j  ss    
 !)	+x ,		
Dvh,GH 
+z".([8*%y 
r%   c                      \ rS rSrSS.S\S\\R                     S\R                  4S jjr	SS.S\S\\R                     S\R                  4S	 jjrSS.S\S\\R                     S\R                  4S
 jjrSS.S\S\\R                     S\R                  4S jjrSS.S\\R"                     S\R$                  4S jjrSS.S\\R"                     S\\R                     4S jjrSrg)Cachesi  Nrc   rb   rc   r   c                x   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$ )a  Creates a cached contents resource.

Usage:

.. code-block:: python

  contents = ... // Initialize the content to cache.
  response = client.caches.create(
      model= ... // The publisher model id
      contents=contents,
      config={
          'display_name': 'test cache',
          'system_instruction': 'What is the sum of the two pdfs?',
          'ttl': '86400s',
      },
  )
rb   rc   rl   r   r   ?rc   Npostresponse_schemaresponse_json_schemainclude_all_fieldsr  r  r  responsekwargs)r   _CreateCachedContentParameters_api_clientvertexairh   get
format_maprf   r   poprc   http_optionsr	   convert_to_dictencode_unserializable_typesrequestbodyjsonloadsCachedContent_from_responsegetattr_verify_responseselfrb   rc   parameter_modelrequest_dictrequest_url_dictpathquery_paramsr  r  response_dictreturn_values               r#   createCaches.create  s   0 ::O   =


Ol &))&1	**+;<<


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''LH 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l3r%   rk   c                x   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$ )zGets cached content configurations.

.. code-block:: python

  client.caches.get(name= ... ) // The server-generated resource name.
rk   rc   rl   {name}r   r  rc   Nr  r  r  r  r  r  )r   _GetCachedContentParametersr  r  r   r  r  r   r   r  rc   r  r	   r  r  r  r  r   r!  r"  r#  r$  r%  r'  rk   rc   r(  r)  r*  r+  r,  r  r  r-  r.  s               r#   r  
Caches.get  s    77O   :


Ol &))&1	""#349


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l3r%   c                V   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S	S5      [/        UR                  S
S5      [/        UR                  SS5      S.0O0 S9n[         R0                  " U	R2                  S9Ul        U R                  R7                  U5        U$ )zDeletes cached content.

Usage:

.. code-block:: python

  client.caches.delete(name= ... ) // The server-generated resource name.
r2  rl   r3  r   r  rc   Ndeleter  r  r  r  r  headers)r   _DeleteCachedContentParametersr  r  rr   r  r  ro   r   r  rc   r  r	   r  r  r  r  r   r!  r{   rx   DeleteCachedContentResponser#  r$  HttpResponser:  rv   r%  r5  s               r#   r8  Caches.delete.  si    ::O   =


Ol &))&1	""#34<


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''$lH 'mmBHMM1JM  >}Mm$$=mLm44CC ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! D L$ &+%7%7  &L" 	%%l3r%   c                x   [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$ )zUpdates cached content configurations.

.. code-block:: python

  response = client.caches.update(
      name= ... // The server-generated resource name.
      config={
          'ttl': '7600s',
      },
  )
r2  rl   r3  r   r  rc   Npatchr  r  r  r  r  )r   _UpdateCachedContentParametersr  r  r  r  r  r  r   r  rc   r  r	   r  r  r  r  r   r!  r"  r#  r$  r%  r5  s               r#   updateCaches.update  s   $ ::O   =


Ol &))&1	""#34<


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''\H 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l3r%   c                (   [         R                  " US9nU R                  R                  (       a8  [	        U5      nUR                  S5      nU(       a  SR                  U5      nO:SnO7[        U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S nUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXSU5      nUR                   (       d  0 O["        R$                  " UR                   5      n	U R                  R                  (       a  ['        U	5      n	U R                  R                  (       d  [)        U	5      n	[         R*                  R-                  U	[/        USS 5      (       aG  S[/        UR                  SS 5      [/        UR                  S	S 5      [/        UR                  S
S 5      S.0O0 S9n
[         R0                  " UR2                  S9U
l        U R                  R7                  U
5        U
$ Nr	  rl   r   r   r  rc   r  r  r  r  r  r  r9  )r   _ListCachedContentsParametersr  r  r   r  r  r   r   r  rc   r  r	   r  r  r  r  r   r!  r   r   ListCachedContentsResponser#  r$  r=  r:  rv   r%  r'  rc   r(  r)  r*  r+  r,  r  r  r-  r.  s              r#   _listCaches._list  sG    99O   <_Ml%))&1	**+;<;OLl%))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL''t<PH&mmBHMM1JM  =mLm$$<]Km33BB ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! C L$ &+%7%7  &L" 	%%l3r%   c                P    U R                   n[        SUU R                  US9U5      $ )a  Lists cached contents.

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

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

Usage:

.. code-block:: python
  for cached_content in client.caches.list():
    print(cached_content.name)
r   r	  )rI  r   r'  rc   list_requests      r#   listCaches.list*  s1    * ::L

&
!	 r%    )__name__
__module____qualname____firstlineno__strr   r   CreateCachedContentConfigOrDictr"  r/  GetCachedContentConfigOrDictr  DeleteCachedContentConfigOrDictr<  r8  UpdateCachedContentConfigOrDictrB  ListCachedContentsConfigOrDictrG  rI  r   rN  __static_attributes__rP  r%   r#   r  r    si    AE	[ [ u<<=	[
 [B >B	N N u99:	N
 Nh AE	Z Z u<<=	Z
 ((Z@ AE	U U u<<=	U
 Up IMG D DEG''GT IM D DEU  ! r%   r  c                      \ rS rSrSS.S\S\\R                     S\R                  4S jjr	SS.S\S\\R                     S\R                  4S	 jjrSS.S\S\\R                     S\R                  4S
 jjrSS.S\S\\R                     S\R                  4S jjrSS.S\\R"                     S\R$                  4S jjrSS.S\\R"                     S\\R                     4S jjrSrg)AsyncCachesiH  Nr	  rb   rc   r   c                  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$  N7f)a  Creates a cached contents resource.

Usage:

.. code-block:: python

  contents = ... // Initialize the content to cache.
  response = await client.aio.caches.create(
      model= ... // The publisher model id
      contents=contents,
      config={
          'display_name': 'test cache',
          'system_instruction': 'What is the sum of the two pdfs?',
          'ttl': '86400s',
      },
  )
r  rl   r   r   r  rc   Nr  r  r  r  r  r  )r   r  r  r  rh   r  r  rf   r   r  rc   r  r	   r  r  async_requestr  r   r!  r"  r#  r$  r%  r&  s               r#   r/  AsyncCaches.createJ  s%    0 ::O   =


Ol &))&1	**+;<<


Ol &))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33L H 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l35   E8I:I;CIrk   c                  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$  N7f)zGets cached content configurations.

.. code-block:: python

  await client.aio.caches.get(name= ... ) // The server-generated resource
  name.
r2  rl   r3  r   r  rc   Nr  r  r  r  r  r  )r   r4  r  r  r   r  r  r   r   r  rc   r  r	   r  r  r_  r  r   r!  r"  r#  r$  r%  r5  s               r#   r  AsyncCaches.get  s%     77O   :


Ol &))&1	""#349


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l35ra  c                t  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
U R                  R                  (       a  ['        U
5      n
U R                  R                  (       d  [)        U
5      n
[         R*                  R-                  U
[/        USS5      (       aG  S[/        UR                  S	S5      [/        UR                  S
S5      [/        UR                  SS5      S.0O0 S9n[         R0                  " U	R2                  S9Ul        U R                  R7                  U5        U$  GN;7f)zDeletes cached content.

Usage:

.. code-block:: python

  await client.aio.caches.delete(name= ... ) // The server-generated
  resource name.
r2  rl   r3  r   r  rc   Nr8  r  r  r  r  r  r9  )r   r;  r  r  rr   r  r  ro   r   r  rc   r  r	   r  r  r_  r  r   r!  r{   rx   r<  r#  r$  r=  r:  rv   r%  r5  s               r#   r8  AsyncCaches.delete  sw      ::O   =


Ol &))&1	""#34<


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33$l H 'mmBHMM1JM  >}Mm$$=mLm44CC ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! D L$ &+%7%7  &L" 	%%l3Es   E8J8:J5;D;J8c                  #    [         R                  " UUS9nU R                  R                  (       aC  [	        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOESnOB[        U R                  U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS5        SnUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXdU5      I Sh  vN n	U	R                   (       d  0 O["        R$                  " U	R                   5      n
[         R&                  R)                  U
[+        USS5      (       aG  S[+        UR                  S	S5      [+        UR                  S
S5      [+        UR                  SS5      S.0O0 S9nU R                  R-                  U5        U$  N7f)zUpdates cached content configurations.

.. code-block:: python

  response = await client.aio.caches.update(
      name= ... // The server-generated resource name.
      config={
          'ttl': '7600s',
      },
  )
r2  rl   r3  r   r  rc   Nr@  r  r  r  r  r  )r   rA  r  r  r  r  r  r  r   r  rc   r  r	   r  r  r_  r  r   r!  r"  r#  r$  r%  r5  s               r#   rB  AsyncCaches.updateW  s%    $ ::O   =


Ol &))&1	""#34<


Ol &))&1	""#34##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33\ H 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l35ra  c                F  #    [         R                  " US9nU R                  R                  (       a8  [	        U5      nUR                  S5      nU(       a  SR                  U5      nO:SnO7[        U5      nUR                  S5      nU(       a  SR                  U5      nOSnUR                  S5      nU(       a  U S[        U5       3nUR                  SS 5        S nUR                  b-  UR                  R                  b  UR                  R                  n[        R                  " U5      n[        R                  " U5      nU R                  R                  SXSU5      I S h  vN nUR                   (       d  0 O["        R$                  " UR                   5      n	U R                  R                  (       a  ['        U	5      n	U R                  R                  (       d  [)        U	5      n	[         R*                  R-                  U	[/        USS 5      (       aG  S[/        UR                  SS 5      [/        UR                  S	S 5      [/        UR                  S
S 5      S.0O0 S9n
[         R0                  " UR2                  S9U
l        U R                  R7                  U
5        U
$  GN;7frE  )r   rF  r  r  r   r  r  r   r   r  rc   r  r	   r  r  r_  r  r   r!  r   r   rG  r#  r$  r=  r:  rv   r%  rH  s              r#   rI  AsyncCaches._list  sZ     99O   <_Ml%))&1	**+;<;OLl%))&1	**+;<##H-LvQy./0dXt$04L*""//;$++88l**<8L66|DL%%33t< H 'mmBHMM1JM  =mLm$$<]Km33BB ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! C L$ &+%7%7  &L" 	%%l3Es   E!J!#J$D;J!c                l   #    U R                   n[        SUU R                  US9I Sh  vN U5      $  N	7f)a  Lists cached contents asynchronously.

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

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

Usage:

.. code-block:: python
  async for cached_content in await client.aio.caches.list():
    print(cached_content.name)
r   r	  N)rI  r   rL  s      r#   rN  AsyncCaches.list  s<     * ::Ljjj''	  	(s   &42
4rP  )rQ  rR  rS  rT  rU  r   r   rV  r"  r/  rW  r  rX  r<  r8  rY  rB  rZ  rG  rI  r   rN  r[  rP  r%   r#   r]  r]  H  si    AE	[ [ u<<=	[
 [B >B	Q Q u99:	Q
 Qn AE	[ [ u<<=	[
 (([B AE	U U u<<=	U
 Up IMI D DEI''IX IM D DE%%%& r%   r]  )N)Fr   loggingtypingr   r   r   urllib.parser    r   r	   r
   rS   r   r  r   r   r   r   r   pagersr   r   	getLoggerloggerdictrU  objectr$   r,   r2   r:   rB   rF   rX   r^   rf   rh   ro   rr   rx   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r?   rE   rW   r]   rV   r\   r   r  r  r  
BaseModuler  r]  rP  r%   r#   <module>rv     s=  $   ' ' "      & . . %			0	1
 /3,tCH~v-.,DcN+, 
#s(^,b /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^, /3tCH~v-.DcN+ 
#s(^B /3tCH~v-.DcN+ 
#s(^. /3tCH~v-.DcN+ 
#s(^. /39tCH~v-.9DcN+9 
#s(^9| /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(^	0 /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(^> /3tCH~v-.DcN+ 
#s(^6 /3tCH~v-. DcN+ 
#s(^	& /3tCH~v-. DcN+ 
#s(^	$ /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(^2 /3tCH~v-.DcN+ 
#s(^2 /3tCH~v-.DcN+ 
#s(^, /3ItCH~v-.IDcN+I 
#s(^I\ /3NtCH~v-.NDcN+N 
#s(^Nf /3tCH~v-.DcN+ 
#s(^> /3tCH~v-.DcN+ 
#s(^: /3FtCH~v-.FDcN+F 
#s(^FV /3GtCH~v-.GDcN+G 
#s(^G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(^	0 /3tCH~v-. DcN+ 
#s(^	*F[## FRL+(( Lr%   