
    Miz                        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\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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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\S\\\\4   \4   S\\\\4      S\\\4   4S4 jjr> S:S\S\\\\4   \4   S\\\\4      S\\\4   4S5 jjr? " S6 S7\	R                  5      rA " S8 S9\	R                  5      rBg);    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_configz8api_key_config parameter is not supported in Gemini API.	auth_typez3auth_type parameter is not supported in Gemini API.google_service_account_configzGgoogle_service_account_config parameter is not supported in Gemini API.http_basic_auth_configz@http_basic_auth_config parameter is not supported in Gemini API.oauth_configz6oauth_config parameter is not supported in Gemini API.oidc_configz5oidc_config parameter is not supported in Gemini API.getvsetv
ValueErrorr   r   	to_objects      m/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/google/genai/caches.py_AuthConfig_to_mldevr$   #   s     !)	+	{#/XJ[9+ >?	+()*6
O
PP	+}%1
J
KK	+789E
	 
 
+012>
J  
+'(4
M
NN	+'3
L
MM	    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_name6display_name parameter is not supported in Gemini API.	mime_typemimeTyper   r!   s      r#   _Blob_to_mldevr,   E   sw     !)	+x ,VHd;9:	+'(4
M
NN	+}%1ZL${[M"BC	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_mldevr4   V   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_vertexr2   s       r#   _Content_to_vertexr8   k   s     !)	+y!-		 [7)4	
4 D,4	
 
+x ,VHd;9:		
r5   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_namez6kms_key_name parameter is not supported in Gemini API.)	r   r   t
t_contentsr4   	t_content_Tool_to_mldev_ToolConfig_to_mldevr    r2   s       r#   #_CreateCachedContentConfig_to_mldevrJ      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
NN	G	
&	
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 )Nr:   r;   r<   r(   r=   r>   r?   r@   rA   rB   rC   rD   encryption_spec
kmsKeyName)r   r   rE   rF   r8   rG   _Tool_to_vertex_ToolConfig_to_vertexr2   s       r#   $_CreateCachedContentConfig_to_vertexrP      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   rE   t_caches_modelrJ   rQ   r   r   r"   s       r#   '_CreateCachedContentParameters_to_mldevrX      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$ rS   )r   r   rE   rV   rP   rW   s       r#   (_CreateCachedContentParameters_to_vertexrZ     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   rE   t_cached_content_namerW   s       r#   '_DeleteCachedContentParameters_to_mldevra      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$ r\   r_   rW   s       r#   (_DeleteCachedContentParameters_to_vertexrd   0  rb   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_mldevrj   @  @     !)	+)*+7'(${=N<O*P 
r%   c                 X    0 n[        U S/5      b  [        US/[        U S/5      5        U$ rf   ri   r!   s      r#   (_DeleteCachedContentResponse_from_vertexrm   M  rk   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_mldevrq   Z  sw     !)	+'(4
M
NN	+
|$0YKkJ<!@A	+}%1ZL${[M"BC	r%   c                 X   0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      e[        U S/5      b  [        S5      eU$ )Nidargsr]   partial_argsz6partial_args parameter is not supported in Gemini API.will_continuez7will_continue parameter is not supported in Gemini API.r   r!   s      r#   _FunctionCall_to_mldevrw   k  s     !)	+v*TFDtf56	+x ,VHd;9:	+x ,VHd;9:	+'(4
M
NN	+()5
N
OO	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_argumentszHstream_function_call_arguments parameter is not supported in Gemini API.r   r!   s      r#   _FunctionCallingConfig_to_mldevr}     s     !)	+012>	 [345 
+x ,VHd;9:	+89:F
	 
 
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      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descriptionr]   
parametersparameters_json_schemaparametersJsonSchemaresponseresponse_json_schemaresponseJsonSchemabehaviorzHbehavior parameter is not supported in Gemini Enterprise Agent Platform.r   r!   s      r#   _FunctionDeclaration_to_vertexr     s.    !)	+'3]OT+%GH	+x ,VHd;9:	+~&2\ND|n$EF	+012>	 [345 
+
|$0ZL${ZL"AB	+./0<	[123 
+
|$0
	 
 
r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r\   r_   rW   s       r#   $_GetCachedContentParameters_to_mldevr     rb   r%   c                     0 n[        US/5      b/  [        USS/[        R                  " U [        US/5      5      5        U$ r\   r_   rW   s       r#   %_GetCachedContentParameters_to_vertexr     rb   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 not supported in Gemini API.exclude_domainsz9exclude_domains parameter is not supported in Gemini API.time_range_filtertimeRangeFilterr   r!   s      r#   _GoogleSearch_to_mldevr     s     !)	+'(4]OT+7G%HI	+-./;
G  
+)*+7
C  
++,-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	pageTokenri   r!   s      r#   "_ListCachedContentsConfig_to_mldevr     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   ri   r!   s      r#   #_ListCachedContentsConfig_to_vertexr   #  r   r%   c                 T    0 n[        U S/5      b  [        [        U S/5      U5        U$ NrU   )r   r   r!   s      r#   &_ListCachedContentsParameters_to_mldevr   8  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   C  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 Nrg   rh   nextPageTokennext_page_tokencachedContentscached_contentsri   r2   s       r#   &_ListCachedContentsResponse_from_mldevr   P       !)	+)*+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   ri   r2   s       r#   '_ListCachedContentsResponse_from_vertexr   g  r   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   rq   rw   r,   r!   s      r#   r1   r1   ~  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      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S	/5      b  [        US
/[        U S	/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        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   zItool_call parameter is not supported in Gemini Enterprise Agent Platform.r   zMtool_response parameter is not supported in Gemini Enterprise Agent Platform.r   zMpart_metadata parameter is not supported in Gemini Enterprise Agent Platform.r   r!   s      r#   r7   r7     sY    !)	+*+,8%&[;M:N(O 
+/01=	[234 
+)*+7%&[;L:M(NO	+}%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
	 
 
+()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#   rI   rI     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   zdinclude_server_side_tool_invocations parameter is not supported in Gemini Enterprise Agent Platform.r   r!   s      r#   rO   rO   0  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	retrievalz3retrieval parameter is not supported in Gemini API.computer_usecomputerUsefile_search
fileSearchgoogle_searchgoogleSearchgoogle_maps
googleMapscode_executioncodeExecutionenterprise_web_searchz?enterprise_web_search parameter is not supported in Gemini API.function_declarationsfunctionDeclarationsgoogle_search_retrievalgoogleSearchRetrievalparallel_ai_searchz<parallel_ai_search parameter is not supported in Gemini API.url_context
urlContextmcp_servers
mcpServers)r   r    r   r   r   r2   s       r#   rH   rH   J  s8    !)	+}%1
J
KK	+'(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=
I  
+/01=	 {-D,EFGF$FG 
+123?	 ![456 
+,-.:
F  
+'3\ND}o$FG	+'3	{]O<=<$<= 
3 	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      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      b3  [        US/[        U S/5       Vs/ s H  n[        X25      PM     sn5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        S5      eU$ s  snf )Nr   r   r   r   zKfile_search parameter is not supported in Gemini Enterprise Agent Platform.r   r   r   r   r   r   r   enterpriseWebSearchr   r   r   r   r   parallelAiSearchr   r   r   zKmcp_servers parameter is not supported in Gemini Enterprise Agent Platform.)r   r   r    r   r2   s       r#   rN   rN     s/    !)	+}%1[M4k]#CD	+'(4]OT+7G%HI	+'3
	 
 
+()5^$d;8I&JK	+'3\ND}o$FG	+()*6_%tK:J9K'LM	+/01=	[234 
+/01=	  [+B*CD	
D +4;D	
 
+123?	 ![456 
+,-.:	[/01 
+'3\ND}o$FG	+'3
	 
 
;	
s   +Gc                     0 n[        U S/5      b  [        US/[        U S/5      5        [        U S/5      b  [        US/[        U S/5      5        U$ Nr:   r;   r<   ri   r!   s      r#   #_UpdateCachedContentConfig_to_mldevr     [     !)	+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   ri   r!   s      r#   $_UpdateCachedContentConfig_to_vertexr     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$ Nr]   r^   rU   )r   r   rE   r`   r   rW   s       r#   '_UpdateCachedContentParameters_to_mldevr     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   rE   r`   r   rW   s       r#   (_UpdateCachedContentParameters_to_vertexr     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rU   rT   rU   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',
      },
  )
rT   rU   r^   r   r   ?rU   Npostresponse_schemar   include_all_fieldsr  r   r  r   kwargs)r   _CreateCachedContentParameters_api_clientvertexairZ   get
format_maprX   r   poprU   http_optionsr	   convert_to_dictencode_unserializable_typesrequestbodyjsonloadsCachedContent_from_responsegetattr_verify_responseselfrT   rU   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%   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$ )zGets cached content configurations.

.. code-block:: python

  client.caches.get(name= ... ) // The server-generated resource name.
r]   rU   r^   {name}r   r  rU   Nr  r  r   r  r  r  )r   _GetCachedContentParametersr
  r  r   r  r  r   r   r  rU   r  r	   r  r  r  r  r  r  r  r  r  r  r  r]   rU   r  r  r  r  r   r  r   r!  r"  s               r#   r  
Caches.getz  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.
r&  r^   r'  r   r  rU   Ndeleter  r   r  r  r  headers)r   _DeleteCachedContentParametersr
  r  rd   r  r  ra   r   r  rU   r  r	   r  r  r  r  r  r  rm   rj   DeleteCachedContentResponser  r  HttpResponser.  rh   r  r)  s               r#   r,  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',
      },
  )
r&  r^   r'  r   r  rU   Npatchr  r   r  r  r  )r   _UpdateCachedContentParametersr
  r  r   r  r  r   r   r  rU   r  r	   r  r  r  r  r  r  r  r  r  r  r)  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   r^   r   r   r  rU   r  r  r   r  r  r  r-  )r   _ListCachedContentsParametersr
  r  r   r  r  r   r   r  rU   r  r	   r  r  r  r  r  r  r   r   ListCachedContentsResponser  r  r1  r.  rh   r  r  rU   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   )r=  r   r  rU   list_requests      r#   listCaches.list  s1    * ::L

&
!	 r%    )__name__
__module____qualname____firstlineno__strr   r   CreateCachedContentConfigOrDictr  r#  GetCachedContentConfigOrDictr  DeleteCachedContentConfigOrDictr0  r,  UpdateCachedContentConfigOrDictr6  ListCachedContentsConfigOrDictr;  r=  r   rB  __static_attributes__rD  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)AsyncCachesi  Nr   rT   rU   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  r^   r   r   r  rU   Nr  r  r   r  r  r  )r   r	  r
  r  rZ   r  r  rX   r   r  rU   r  r	   r  r  async_requestr  r  r  r  r  r  r  r  s               r#   r#  AsyncCaches.create  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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)zGets cached content configurations.

.. code-block:: python

  await client.aio.caches.get(name= ... ) // The server-generated resource
  name.
r&  r^   r'  r   r  rU   Nr  r  r   r  r  r  )r   r(  r
  r  r   r  r  r   r   r  rU   r  r	   r  r  rS  r  r  r  r  r  r  r  r)  s               r#   r  AsyncCaches.getC  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rU  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.
r&  r^   r'  r   r  rU   Nr,  r  r   r  r  r  r-  )r   r/  r
  r  rd   r  r  ra   r   r  rU   r  r	   r  r  rS  r  r  r  rm   rj   r0  r  r  r1  r.  rh   r  r)  s               r#   r,  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',
      },
  )
r&  r^   r'  r   r  rU   Nr4  r  r   r  r  r  )r   r5  r
  r  r   r  r  r   r   r  rU   r  r	   r  r  rS  r  r  r  r  r  r  r  r)  s               r#   r6  AsyncCaches.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%%33\ H 'mmBHMM1JM&&55 ?Hd33 #*#**,=t$ )0#**,BD) '.#**,@$'

 ! 6 L& 	%%l35rU  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r9  )r   r:  r
  r  r   r  r  r   r   r  rU   r  r	   r  r  rS  r  r  r  r   r   r;  r  r  r1  r.  rh   r  r<  s              r#   r=  AsyncCaches._listJ  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)r=  r   r@  s      r#   rB  AsyncCaches.list  s<     * ::Ljjj''	  	(s   &42
4rD  )rE  rF  rG  rH  rI  r   r   rJ  r  r#  rK  r  rL  r0  r,  rM  r6  rN  r;  r=  r   rB  rO  rD  r%   r#   rQ  rQ    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%   rQ  )N)Cr  loggingtypingr   r   r   urllib.parser    r   r	   r
   rE   r   r
  r   r   r   r   r   pagersr   r   	getLoggerloggerdictrI  objectr$   r,   r4   r8   rJ   rP   rX   rZ   ra   rd   rj   rm   rq   rw   r}   r   r   r   r   r   r   r   r   r   r   r   r1   r7   rI   rO   rH   rN   r   r   r   r   
BaseModuler   rQ  rD  r%   r#   <module>rj     s\  $   ' ' "      & . . %			0	1
 /3tCH~v-.DcN+ 
#s(^H /3tCH~v-.DcN+ 
#s(^& /3tCH~v-.DcN+ 
#s(^. /3tCH~v-.DcN+ 
#s(^. /36tCH~v-.6DcN+6 
#s(^6v /3:tCH~v-.:DcN+: 
#s(^:@ /3tCH~v-. DcN+ 
#s(^	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(^2 /3tCH~v-.DcN+ 
#s(^4 /3%tCH~v-.%DcN+% 
#s(^%V /3tCH~v-. DcN+ 
#s(^	& /3tCH~v-. DcN+ 
#s(^	$ /3tCH~v-.DcN+ 
#s(^( /3tCH~v-.DcN+ 
#s(^8 /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ItCH~v-.IDcN+I 
#s(^I\ /3FtCH~v-.FDcN+F 
#s(^FV /3tCH~v-.DcN+ 
#s(^> /3tCH~v-.DcN+ 
#s(^8 /3AtCH~v-.ADcN+A 
#s(^AL /3BtCH~v-.BDcN+B 
#s(^BN /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%   