+
    iOS                        ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIt^ RI	t	^RI
Ht ^RIHt ^RIHt ^RIHtHt ^RIHtHt ^R	IHtHt ^R
IHtHt ^RIHtHt ^RIH t  ^RI!H"t"H#t# ^RI$H%t%H&t& ^RI'H(t(H)t) ^RI*H+t+H,t, ^RIH-t-H.t.H/t/ ^ RI0t0^ RI1t1^RI
H2t2 ^RI3H4t4 ^RI5H6t6H7t7H8t8 ^RI3H5t5 ^RI9H:t;H<t= Rs> ! R R]5P~                  4      t? ! R R]5P                  4      t@ ! R R4      tA ! R R]	P                  4      tC ! R  R!4      tDR# )"    N)TracebackType)OptionalUnionBaseApiClient)get_base_url)ReplayApiClient)AsyncBatchesBatches)AsyncCachesCaches)
AsyncChatsChats)AsyncFileSearchStoresFileSearchStores)
AsyncFilesFiles	AsyncLive)AsyncModelsModels)AsyncOperations
Operations)AsyncTokensTokens)AsyncTuningsTunings)HttpOptionsHttpOptionsDictHttpRetryOptions)has_aiohttp)_common)AsyncGeminiNextGenAPIClientDEFAULT_MAX_RETRIESGeminiNextGenAPIClient)_interactions)AsyncInteractionsResourceInteractionsResourceFc                   ~   a  ] tR t^4t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	Rt
V tR# )"AsyncGeminiNextGenAPIClientAdapter*Adapter for the Gemini NextGen API Client.c                    < V ^8  d   QhRS[ /#    
api_clientr   )format__classdict__s   "f/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/google/genai/client.py__annotate__/AsyncGeminiNextGenAPIClientAdapter.__annotate__6        " " "    c                    Wn         R # N_api_clientselfr/   s   &&r2   __init__+AsyncGeminiNextGenAPIClientAdapter.__init__6       !r6   c                    < V ^8  d   QhRS[ /# r.   returnbool)r0   r1   s   "r2   r3   r4   9        . .D .r6   c                B    V P                   P                  ;'       g    R # Fr:   vertexair<   s   &r2   is_vertex_ai/AsyncGeminiNextGenAPIClientAdapter.is_vertex_ai9       $$---r6   c                .   < V ^8  d   QhRS[ R,          /# r.   rB   Nstr)r0   r1   s   "r2   r3   r4   <        $ $3: $r6   c                .    V P                   P                  # r8   r:   projectrJ   s   &r2   get_project.AsyncGeminiNextGenAPIClientAdapter.get_project<       ###r6   c                .   < V ^8  d   QhRS[ R,          /# rO   rP   )r0   r1   s   "r2   r3   r4   ?        % %C$J %r6   c                .    V P                   P                  # r8   r:   locationrJ   s   &r2   get_location/AsyncGeminiNextGenAPIClientAdapter.get_location?       $$$r6   c                6   < V ^8  d   QhRS[ S[S[3,          /# rA   dictrQ   )r0   r1   s   "r2   r3   r4   B   s     
 
DcN 
r6   c                J  "   V P                   P                  '       d   R V P                   P                  /# V P                   P                  4       G Rj  xL
 pRRV 2/pV P                   P                  ;p'       d"   VP                  '       d   VP                  VR&   V#  LL5i)x-goog-api-keyNAuthorizationBearer x-goog-user-project)r:   api_key_async_access_token_credentialsquota_project_idr<   access_tokenheaderscredss   &   r2   async_get_auth_headers9AsyncGeminiNextGenAPIClientAdapter.async_get_auth_headersB   s      0 0 8 899))==??L/G   ---u-				).)?)?%&N @s   AB#B!(B#>B#B#r9   N)__name__
__module____qualname____firstlineno____doc__r=   rK   rV   r^   rq   __static_attributes____classdictcell__r1   s   @r2   r*   r*   4   :     2" ". .$ $% %
 
r6   r*   c                   ~   a  ] tR t^Ot o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	Rt
V tR# )GeminiNextGenAPIClientAdapterr+   c                    < V ^8  d   QhRS[ /# r-   r   )r0   r1   s   "r2   r3   *GeminiNextGenAPIClientAdapter.__annotate__Q   r5   r6   c                    Wn         R # r8   r9   r;   s   &&r2   r=   &GeminiNextGenAPIClientAdapter.__init__Q   r?   r6   c                    < V ^8  d   QhRS[ /# rA   rC   )r0   r1   s   "r2   r3   r   T   rE   r6   c                B    V P                   P                  ;'       g    R # rG   rH   rJ   s   &r2   rK   *GeminiNextGenAPIClientAdapter.is_vertex_aiT   rM   r6   c                .   < V ^8  d   QhRS[ R,          /# rO   rP   )r0   r1   s   "r2   r3   r   W   rR   r6   c                .    V P                   P                  # r8   rT   rJ   s   &r2   rV   )GeminiNextGenAPIClientAdapter.get_projectW   rX   r6   c                .   < V ^8  d   QhRS[ R,          /# rO   rP   )r0   r1   s   "r2   r3   r   Z   rZ   r6   c                .    V P                   P                  # r8   r\   rJ   s   &r2   r^   *GeminiNextGenAPIClientAdapter.get_locationZ   r`   r6   c                6   < V ^8  d   QhRS[ S[S[3,          /# rA   rb   )r0   r1   s   "r2   r3   r   ]   s     
 
S#X 
r6   c                .   V P                   P                  '       d   R V P                   P                  /# V P                   P                  4       pRRV 2/pV P                   P                  ;p'       d"   VP                  '       d   VP                  VR&   V# )re   rf   rg   rh   )r:   ri   _access_tokenrk   rl   rm   s   &   r2   get_auth_headers.GeminiNextGenAPIClientAdapter.get_auth_headers]   s     0 0 8 899##113L/G   ---u-				).)?)?%&Nr6   r9   N)rs   rt   ru   rv   rw   r=   rK   rV   r^   r   rx   ry   rz   s   @r2   r}   r}   O   r{   r6   r}   c                     a  ] tR t^jt o RtV 3R lR lt]V 3R lR l4       t]V 3R lR l4       t]V 3R lR	 l4       t	]V 3R
 lR l4       t
]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       tV 3R lR ltV 3R  lR! ltV 3R" lR# ltV 3R$ lR% ltR&tV tR'# )(AsyncClientz7Client for making asynchronous (non-blocking) requests.c                    < V ^8  d   QhRS[ /# r-   r   )r0   r1   s   "r2   r3   AsyncClient.__annotate__m   s     P P Pr6   c                   Wn         \        V P                   4      V n        \        V P                   4      V n        \        V P                   4      V n        \        V P                   4      V n        \        V P                   4      V n
        \        V P                   4      V n        \        V P                   4      V n        \        V P                   4      V n        \#        V P                   4      V n        R V n        R # r8   )r:   r   _modelsr   _tuningsr   _cachesr
   _batchesr   _filesr   _file_search_storesr   _liver   _tokensr   _operations_nextgen_client_instancer;   s   &&r2   r=   AsyncClient.__init__m   s    !t//0DL !1!12DMt//0DL !1!12DMT--.DK4T5E5EFD4++,DJt//0DL&t'7'78DKOD!r6   c                    < V ^8  d   QhRS[ /# rA   )r#   )r0   r1   s   "r2   r3   r   |   s     >) >): >)r6   c                   V P                   e   V P                   # V P                  P                  pVP                  '       d   \        P
                  ! R\        ^R7       VP                  pVed   VP                  f9   VP                  f+   VP                  f   VP                  f   VP                  e   \        P
                  ! R\        ^R7       V P                  P                  pV P                  P                  P                  ;'       g    / pRV9   p\        '       d&   V'       g   \        P
                  ! R\        ^R7       Ve   VP                   e   VP                   pM\"        ^,           p\%        VP&                  V P                  P(                  VP*                  VP,                  TVP.                  '       d   VP.                  R,          MR V\1        V P                  4      R7      V n         V P                   pV P                  P2                  '       d>   RVn        V P                  P6                  Vn        V P                  P:                  Vn        V P                   # )	N>extra_body properties are not supported in `.interactions` yetcategory
stacklevel?Granular retry options are not supported in `.interactions` yet	transportzCAsync interactions client cannot use aiohttp, fallingback to httpx.  base_urlri   api_versiondefault_headershttp_clienttimeoutmax_retriesclient_adapterT)r   r:   _http_options
extra_bodywarningswarnUserWarningretry_optionsinitial_delay	max_delayexp_basejitterhttp_status_codes_async_httpx_clientasync_client_argsr!   attemptsr$   r#   r   ri   r   ro   r   r*   rI   
_is_vertexrU   _vertex_projectr]   _vertex_location)r<   	http_opts
retry_optsr   r   has_custom_transportr   clients   &       r2   _nextgen_clientAsyncClient._nextgen_client{   s   $$0***  ..Imm
J ((J  ,+*(''3mm
K &*%5%5%I%IK((66HHNNB&*;;{/mm
O *"5"5"A''k'!+k$?##  (())!)),5,=,=,=	!!D(49$:J:JK
%D! **F   f#//77f $ 0 0 9 9f(((r6   c                    < V ^8  d   QhRS[ /# rA   ) AsyncNextGenInteractionsResource)r0   r1   s   "r2   r3   r      s     	- 	-< 	-r6   c                    \         '       g    R s \        P                  ! R\        ^R7       V P                  P
                  # TzEInteractions usage is experimental and may change in future versions.r   !_interactions_experimental_warnedr   r   r   r   interactionsrJ   s   &r2   r   AsyncClient.interactions   s9     -,*.'mm
Q
 ,,,r6   c                    < V ^8  d   QhRS[ /# rA   rC   )r0   r1   s   "r2   r3   r            4 r6   c                F    \        V R 4      ;'       d    V P                  RJ# r   Nhasattrr   rJ   s   &r2   _has_nextgen_clientAsyncClient._has_nextgen_client   ,     	01 	2 	2%%T1r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r            k r6   c                    V P                   # r8   r   rJ   s   &r2   modelsAsyncClient.models       <<r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r            | r6   c                    V P                   # r8   r   rJ   s   &r2   tuningsAsyncClient.tunings       ==r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      r   r6   c                    V P                   # r8   r   rJ   s   &r2   cachesAsyncClient.caches   r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      s     $ $"7 $r6   c                    V P                   # r8   r   rJ   s   &r2   file_search_storesAsyncClient.file_search_stores       ###r6   c                    < V ^8  d   QhRS[ /# rA   )r
   )r0   r1   s   "r2   r3   r      r   r6   c                    V P                   # r8   r   rJ   s   &r2   batchesAsyncClient.batches   r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      s     + +Z +r6   c                .    \        V P                  R 7      # )modules)r   r   rJ   s   &r2   chatsAsyncClient.chats   s    dkk**r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      s      Z r6   c                    V P                   # r8   r   rJ   s   &r2   filesAsyncClient.files       ;;r6   c                    < V ^8  d   QhRS[ /# rA   r   )r0   r1   s   "r2   r3   r      s      I r6   c                    V P                   # r8   )r   rJ   s   &r2   liveAsyncClient.live   s    ::r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      s      ; r6   c                    V P                   # r8   r   rJ   s   &r2   auth_tokensAsyncClient.auth_tokens   r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   r      s      / r6   c                    V P                   # r8   r   rJ   s   &r2   
operationsAsyncClient.operations       r6   c                   < V ^8  d   QhRR/# rO    )r0   r1   s   "r2   r3   r      s     ) )D )r6   c                   "   V P                   P                  4       G Rj  xL
  V P                  '       d%   V P                  P	                  4       G Rj  xL
  R# R#  L< L
5i)a  Closes the async client explicitly.

However, it doesn't close the sync client, which can be closed using the
Client.close() method or using the context manager.

Usage:
.. code-block:: python

  from google.genai import Client

  async_client = Client(
      vertexai=True, project='my-project-id', location='us-central1'
  ).aio
  response_1 = await async_client.models.generate_content(
      model='gemini-2.0-flash',
      contents='Hello World',
  )
  response_2 = await async_client.models.generate_content(
      model='gemini-2.0-flash',
      contents='Hello World',
  )
  # Close the client to release resources.
  await async_client.aclose()
N)r:   acloser   r   closerJ   s   &r2   r  AsyncClient.aclose   sR     2 


!
!
###  &&(((   $ )s&   A!AA!A!A	A!A!c                   < V ^8  d   QhRR/# )r.   rB   r   r  )r0   r1   s   "r2   r3   r     s       r6   c                   "   V # 5ir8   r  rJ   s   &r2   
__aenter__AsyncClient.__aenter__  s
     Ks   c                `   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[,          RR/# r.   exc_type	exc_value	tracebackrB   Nr   	Exceptionr   )r0   r1   s   "r2   r3   r     sB      # )$ -(	
 r6   c                B   "   V P                  4       G R j  xL
  R #  L5ir8   )r  r<   r  r  r   s   &&&&r2   	__aexit__AsyncClient.__aexit__  s      ++-s   c                   < V ^8  d   QhRR/# rO   r  )r0   r1   s   "r2   r3   r            t r6   c                     \         P                  ! 4       P                  V P                  4       4       R #   \         d     R # i ; ir8   )asyncioget_running_loopcreate_taskr  r"  rJ   s   &r2   __del__AsyncClient.__del__   s6     ,,T[[]; 
s   26 AA)r:   r   r   r   r   r   r   r   r   r   r   N)rs   rt   ru   rv   rw   r=   propertyr   r   r   r   r   r   r   r   r   r   r  r
  r  r  r  r%  r-  rx   ry   rz   s   @r2   r   r   j   sA    ?P P >) >)@ 	- 	-         $ $   + +        ) )<   r6   r   c                      a  ] tR tRt o Rt]P                  ! R R7      t]P                  ! R R7      t]P                  ! R R7      t	V 3R lt
RtV tR	# )
DebugConfigi'  zGConfiguration options that change client network behavior when testing.c                 0    \         P                  ! R R4      # )GOOGLE_GENAI_CLIENT_MODENosgetenvr  r6   r2   <lambda>DebugConfig.<lambda>+  s    bii(BDIr6   )default_factoryc                 0    \         P                  ! R R4      # )GOOGLE_GENAI_REPLAYS_DIRECTORYNr4  r  r6   r2   r7  r8  /  s    bii(H$Or6   c                 0    \         P                  ! R R4      # )GOOGLE_GENAI_REPLAY_IDNr4  r  r6   r2   r7  r8  3  s    bii(@$Gr6   c                n   < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r.   client_modereplays_directory	replay_id)r   rQ   )r0   r1   s   "r2   r3   DebugConfig.__annotate__'  s>      }   c]   c]  r6   r  N)rs   rt   ru   rv   rw   pydanticFieldr?  r@  rA  __annotate_func__rx   ry   rz   s   @r2   r1  r1  '  sG     O'~~I + &.^^O& &^^G)  r6   r1  c                   F  a  ] tR tRt o RtRRRRRRRRRRR	RR
R/V 3R lR llt]R4V 3R lR ll4       t]V 3R lR l4       t	]V 3R lR l4       t
]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR  l4       t]V 3R! lR" l4       t]V 3R# lR$ l4       t]V 3R% lR& l4       t]V 3R' lR( l4       t]V 3R) lR* l4       tV 3R+ lR, ltV 3R- lR. ltV 3R/ lR0 ltV 3R1 lR2 ltR3tV tR# )5Clienti8  a
  Client for making synchronous requests.

Use this client to make a request to the Gemini Developer API or Vertex AI
API and then wait for the response.

To initialize the client, provide the required arguments either directly
or by using environment variables. Gemini API users and Vertex AI users in
express mode can provide API key by providing input argument
`api_key="your-api-key"` or by defining `GOOGLE_API_KEY="your-api-key"` as an
environment variable

Vertex AI API users can provide inputs argument as `vertexai=True,
project="your-project-id", location="us-central1"` or by defining
`GOOGLE_GENAI_USE_VERTEXAI=true`, `GOOGLE_CLOUD_PROJECT` and
`GOOGLE_CLOUD_LOCATION` environment variables.

Attributes:
  api_key: The `API key <https://ai.google.dev/gemini-api/docs/api-key>`_ to
    use for authentication. Applies to the Gemini Developer API only.
  vertexai: Indicates whether the client should use the Vertex AI API
    endpoints. Defaults to False (uses Gemini Developer API endpoints).
    Applies to the Vertex AI API only.
  credentials: The credentials to use for authentication when calling the
    Vertex AI APIs. Credentials can be obtained from environment variables and
    default credentials. For more information, see `Set up Application Default
    Credentials
    <https://cloud.google.com/docs/authentication/provide-credentials-adc>`_.
    Applies to the Vertex AI API only.
  project: The `Google Cloud project ID
    <https://cloud.google.com/vertex-ai/docs/start/cloud-environment>`_ to use
    for quota. Can be obtained from environment variables (for example,
    ``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only.
    Find your `Google Cloud project ID <https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects>`_.
  location: The `location
    <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>`_
    to send API requests to (for example, ``us-central1``). Can be obtained
    from environment variables. Applies to the Vertex AI API only.
  debug_config: Config settings that control network behavior of the client.
    This is typically used when running test code.
  http_options: Http options to use for the client. These options will be
    applied to all requests made by the client. Example usage: `client =
    genai.Client(http_options=types.HttpOptions(api_version='v1'))`.

Usage for the Gemini Developer API:

.. code-block:: python

  from google import genai

  client = genai.Client(api_key='my-api-key')

Usage for the Vertex AI API:

.. code-block:: python

  from google import genai

  client = genai.Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )
rI   Nri   credentialsrU   r]   debug_confighttp_optionsc                  < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[P                  P
                  P                  ,          RS[ S[,          RS[ S[,          RS[ S[,          RS[ S[S[	S[
3,          ,          /# )r.   rI   ri   rH  rU   r]   rI  rJ  )r   rD   rQ   googleauthrH  Credentialsr1  r   r   r   )r0   r1   s   "r2   r3   Client.__annotate__w  s     FK FK FK }	FK
 FKK33??@FK }FK FK [)FK U;#?@AFKr6   c          
        T;'       g    \        4       V n        \        V\        4      '       d   \	        R/ VB p\        T;'       g    RV4      pV'       d   V'       d   Wn        M\	        VR7      pV P                  VVVVVV P                  VR7      V n        \        V P                  4      V n
        \        V P                  4      V n        \        V P                  4      V n        \        V P                  4      V n        \#        V P                  4      V n        \'        V P                  4      V n        \+        V P                  4      V n        \/        V P                  4      V n        \3        V P                  4      V n        RV n        R# )a  Initializes the client.

Args:
   vertexai (bool): Indicates whether the client should use the Vertex AI
     API endpoints. Defaults to False (uses Gemini Developer API endpoints).
     Applies to the Vertex AI API only.
   api_key (str): The `API key
     <https://ai.google.dev/gemini-api/docs/api-key>`_ to use for
     authentication. Applies to the Gemini Developer API only.
   credentials (google.auth.credentials.Credentials): The credentials to use
     for authentication when calling the Vertex AI APIs. Credentials can be
     obtained from environment variables and default credentials. For more
     information, see `Set up Application Default Credentials
     <https://cloud.google.com/docs/authentication/provide-credentials-adc>`_.
     Applies to the Vertex AI API only.
   project (str): The `Google Cloud project ID
     <https://cloud.google.com/vertex-ai/docs/start/cloud-environment>`_ to
     use for quota. Can be obtained from environment variables (for example,
     ``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only.
   location (str): The `location
     <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>`_
     to send API requests to (for example, ``us-central1``). Can be obtained
     from environment variables. Applies to the Vertex AI API only.
   debug_config (DebugConfig): Config settings that control network behavior
     of the client. This is typically used when running test code.
   http_options (Union[HttpOptions, HttpOptionsDict]): Http options to use
     for the client.
F)r   rI   ri   rH  rU   r]   rI  rJ  Nr  )r1  _debug_config
isinstancerc   r   r   r   _get_api_clientr:   r   _aior   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )	r<   rI   ri   rH  rU   r]   rI  rJ  r   s	   &$$$$$$$ r2   r=   Client.__init__w  s<   P &66D,%% 0<0lH--|<H	 ("H5++''! , D D,,-DI$**+DLD,,-DM$**+DL/0@0@ADD,,-DM(()DK$**+DL!$"2"23DFJD!r6   c                   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[P                  P
                  P                  ,          RS[ S[,          RS[ S[,          RS[ S[,          RS[ S[,          RS[	/# )	r.   rI   ri   rH  rU   r]   rI  rJ  rB   )
r   rD   rQ   rL  rM  rH  rN  r1  r   r   )r0   r1   s   "r2   r3   rO    s     ! !!}! FKK33??@! }	!
 ! [)! [)! !r6   c                    V'       dD   VP                   R9   d3   \        VP                   VP                  VP                  V VVVVVR7	      # \	        V VVVVVR7      # )record)	moderA  r@  rI   ri   rH  rU   r]   rJ  )rI   ri   rH  rU   r]   rJ  )rY  replayauto)r?  r	   rA  r@  r   rQ  s   &&&&&&&r2   rT  Client._get_api_client  sv     00 5 
 '' **(::!#
 
 ! r6   c                    < V ^8  d   QhRS[ /# rA   )r%   )r0   r1   s   "r2   r3   rO    s     2) 2)5 2)r6   c                   V P                   e   V P                   # V P                  P                  pVP                  '       d   \        P
                  ! R\        ^R7       VP                  pVed   VP                  f9   VP                  f+   VP                  f   VP                  f   VP                  e   \        P
                  ! R\        ^R7       Ve   VP                  e   VP                  pM\        ^,           p\        VP                   V P                  P"                  VP$                  VP&                  V P                  P(                  VP*                  '       d   VP*                  R,          MR V\-        V P                  4      R7      V n         V P                   pV P                  P.                  '       d>   RVn        V P                  P2                  Vn        V P                  P6                  Vn        V P                   # )Nr   r   r   r   r   T)r   r:   r   r   r   r   r   r   r   r   r   r   r   r   r$   r%   r   ri   r   ro   _httpx_clientr   r}   rI   r   rU   r   r]   r   )r<   r   r   r   r   s   &    r2   r   Client._nextgen_client  s   $$0***  ..Imm
J ((J  ,+*(''3mm
K *"5"5"A''k'!+k$:##  (())!))$$22,5,=,=,=	!!D(44T5E5EF
%D! **F   f#//77f $ 0 0 9 9f(((r6   c                    < V ^8  d   QhRS[ /# rA   )NextGenInteractionsResource)r0   r1   s   "r2   r3   rO    s     	- 	-7 	-r6   c                    \         '       g    R s \        P                  ! R\        ^R7       V P                  P
                  # r   r   rJ   s   &r2   r   Client.interactions  s9     -,*.'mmO
 ,,,r6   c                    < V ^8  d   QhRS[ /# rA   rC   )r0   r1   s   "r2   r3   rO  %  r   r6   c                F    \        V R 4      ;'       d    V P                  RJ# r   r   rJ   s   &r2   r   Client._has_nextgen_client$  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  ,  s     & &U &r6   c                .    \        V P                  R 7      # r   )r   r   rJ   s   &r2   r   Client.chats+  s    %%r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  0  s      ; r6   c                    V P                   # r8   )rU  rJ   s   &r2   aio
Client.aio/  s    99r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  4        f r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.models3  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  8        w r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.tunings7  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  <  rq  r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.caches;  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  @  s     $ $"2 $r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.file_search_stores?  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  D  ru  r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.batchesC  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  H  s      U r6   c                    V P                   # r8   r   rJ   s   &r2   r   Client.filesG  r  r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  L  s      6 r6   c                    V P                   # r8   r	  rJ   s   &r2   r
  Client.auth_tokensK  r   r6   c                    < V ^8  d   QhRS[ /# rA   )r   )r0   r1   s   "r2   r3   rO  P  s      * r6   c                    V P                   # r8   r  rJ   s   &r2   r  Client.operationsO  r  r6   c                    < V ^8  d   QhRS[ /# rA   rC   )r0   r1   s   "r2   r3   rO  T  s     . . .r6   c                B    V P                   P                  ;'       g    R# )z6Returns whether the client is using the Vertex AI API.FrH   rJ   s   &r2   rI   Client.vertexaiS  s     $$---r6   c                   < V ^8  d   QhRR/# rO   r  )r0   r1   s   "r2   r3   rO  X  s     # #T #r6   c                    V P                   P                  4        V P                  '       d   V P                  P                  4        R# R# )aq  Closes the synchronous client explicitly.

However, it doesn't close the async client, which can be closed using the
Client.aio.aclose() method or using the async context manager.

Usage:
.. code-block:: python

  from google.genai import Client

  client = Client(
      vertexai=True, project='my-project-id', location='us-central1'
  )
  response_1 = client.models.generate_content(
      model='gemini-2.0-flash',
      contents='Hello World',
  )
  response_2 = client.models.generate_content(
      model='gemini-2.0-flash',
      contents='Hello World',
  )
  # Close the client to release resources.
  client.close()
N)r:   r  r   r   rJ   s   &r2   r  Client.closeX  s9    2 	
  "  r6   c                   < V ^8  d   QhRR/# )r.   rB   rG  r  )r0   r1   s   "r2   r3   rO  v  s       r6   c                    V # r8   r  rJ   s   &r2   	__enter__Client.__enter__v  s    Kr6   c                `   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[,          RR/# r  r!  )r0   r1   s   "r2   r3   rO  y  sB      # )$ -(	
 r6   c                &    V P                  4        R # r8   )r  r$  s   &&&&r2   __exit__Client.__exit__y  s     	JJLr6   c                   < V ^8  d   QhRR/# rO   r  )r0   r1   s   "r2   r3   rO    r(  r6   c                L     V P                  4        R #   \         d     R # i ; ir8   )r  r"  rJ   s   &r2   r-  Client.__del__  s"    
jjl 
s    ##)rU  r:   r   r   rR  r   r   r   r   r   r   r   )NNNNNNN)rs   rt   ru   rv   rw   r=   staticmethodrT  r/  r   r   r   r   rn  r   r   r   r   r   r   r
  r  rI   r  r  r  r-  rx   ry   rz   s   @r2   rG  rG  8  s    <|FK "&FK  $	FK
 DHFK  $FK !%FK -1FK EIFK FKP ! ! !F 2) 2)h 	- 	-   & &         $ $         . .# #<   r6   rG  )Er*  r5  typesr   typingr   r   google.authrL  rC  r:   r   	_base_urlr   _replay_api_clientr	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r  r   r   tokensr   r   r   r   r   r   r   r    r   httpxr!    r"   r&   r#   r$   r%   _interactions.resourcesr'   r   r(   rc  r   r*   r}   r   	BaseModelr1  rG  r  r6   r2   <module>r     s      	  "   & # / * ' $ G $  ' 3 ' * A A   $  c c  X$) !)Y)Y 6M$O$O 6z zz($$ "M Mr6   