
    OjN@                        S r SSKJrJrJr  SSKJrJrJr  SSK	J
r
Jr  SSKJrJrJrJrJr  SSKJr  SSKJrJr  SSKJrJr  SS	KJr  S
SKrS
SKrS
SKrS
SKrS
SKJ r J!r!J"r"J#r#J$r$J%r%  S
SK&r&\#(       a  SSK'J(r(J)r)  SSK*J+r+J,r,  SSK-J.r.J/r/   " S S\5      r0 " S S5      r1 " S S5      r2 " S S\
5      r3 " S S5      r4 " S S5      r5g)zACode generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.   )modelstypesutils)AsyncSDKHooksSDKHooksinit_async_hooks)AsyncBaseSDKBaseSDK)AsyncHttpClientClientOwner
HttpClientclose_clientsclose_clients_async)SDKConfiguration)OptionalNullableUNSET)Loggerget_default_logger)RetryConfig    N)CallableDictOptionalTYPE_CHECKINGUnioncast)AgentsAsyncAgents)AsyncInteractionsInteractions)AsyncWebhooksWebhooksc                   x  ^  \ rS rSr% Sr\S 5       r\S 5       rS\S'   S\S'   S	\S
'   SSSS.r	SSSSSSSS\
SS4S\\\R                  \/ \R                  4   4      S\\   S\\   S\\   S\\   S\\\\4      S\\   S\\   S\\   S\\   S\\   SS4S jjrS$S jrS\4S jrU 4S  jrS! rS" rS#rU =r$ )%GenAI.     Gemini API: The Gemini Interactions API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.c                     [        U 5      $ N)GenAIWithRawResponseselfs    X/var/www/html/leaf-doctor-v1/venv/lib/python3.13/site-packages/google/genai/_gaos/sdk.pywith_raw_responseGenAI.with_raw_response1   s    #D))    c                     [        U 5      $ r(   )GenAIWithStreamingResponser*   s    r,   with_streaming_responseGenAI.with_streaming_response5   s    )$//r/   r    interactionsr"   webhooksr   agents).interactionsr    )	.webhooksr"   ).agentsr   r4   r5   r6   Nsecurityapi_versionapi_revisionuser_project
server_idx
url_params
server_urlclientretry_config
timeout_msdebug_loggerreturnc                    SnUc  [         R                  " SS9nSn[        [        U5      [        5      (       d   S5       eUc
  [        5       nUb  Ub  [        R                  " Xv5      n[        R                  R                  [        R                  " US[        5      [        R                  " US[        5      [        R                  " US[        5      S	9n[        R                  " U [        UUSSUUUUU	U
US
9U S9  [!        5       n[#        5       nXR$                  R&                  S'   XR$                  R&                  S'   [)        U5        UR+                  U R$                  5      U l        [,        R.                  " U [0        [3        [4        U R$                  5      U R$                  R6                  U R$                  R8                  5        g)a5  Instantiates the SDK configuring it with the provided parameters.

:param security: The security details required for authentication
:param api_version: Configures the api_version parameter for all supported operations
:param api_revision: Configures the api_revision parameter for all supported operations
:param user_project: Configures the user_project parameter for all supported operations
:param server_idx: The index of the server to use for all methods
:param server_url: The server URL to use for all methods
:param url_params: Parameters to optionally template the server URL with
:param client: The HTTP client to use for all synchronous methods
:param retry_config: The retry configuration to use for all supported methods
:param timeout_ms: Optional request timeout applied to each operation in milliseconds
TNfollow_redirectsFz;The provided client must implement the HttpClient protocol.GOOGLE_GENAI_API_VERSIONGOOGLE_GENAI_API_REVISIONGOOGLE_GENAI_USER_PROJECTr<   r=   r>   rB   client_suppliedasync_clientasync_client_suppliedglobalsr;   rA   r?   rC   rD   rE   
parent_ref_hooks_async_hooks)httpxClient
issubclasstyper   r   r   template_urlr   internalGlobalsget_global_from_envstrr
   __init__r   r   r   sdk_configuration__dict__r   sdk_initweakreffinalizer   r   r   rB   rO   )r+   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rO   _globalshooksasync_hookss                   r,   r`   GenAI.__init__B   s   6 >\\48F#OL*
 
 	IH	I 
 -/L!%"//
G
??**117 2293 2293 + 

 	 /!&+ !%%)%) 	
$ 
#o 5:''1:E''7%!&0F0F!Gd445""))""22	
r/   c                 @   [        U5       H  n [        R                  " U[        S9s  $    [	        SU SU S35      e! [         aT    [        R
                  R                  U[        5      n[        R                  R                  US 5        X2S-
  :X  a     Ml   M  f = fN)packager   zFailed to import module 'z' after z	 attempts
range	importlibimport_module__package__KeyErrorutilresolve_namesysmodulespopr+   modnameretriesattemptresolveds        r,   dynamic_importGenAI.dynamic_import       W~G ..wLL & 27)8G9IVWW  $>>66wL$/k) *	   ?ABBnamec                    XR                   ;   aM  U R                   U   u  p# U R                  U5      n[        XC5      nU" U R                  U S9n[	        XU5        U$ [        S[        U 5      R                   SU S35      e! [
         a  n[        SU SU SU 35      UeS nAf[         a  n[        SU SU SU SU 35      UeS nAff = f	NrS   zFailed to import module z for attribute z: zFailed to find class z in module 'z' object has no attribute '	_sub_sdk_mapr}   getattrra   setattrImportErrorAttributeErrorrZ   __name__r+   r   module_path
class_namemoduleklassinstancees           r,   __getattr__GenAI.__getattr__      $$$&*&7&7&=#K,,[93 !7!7DIH- T
##$$?vQG
 	
  $.{m?4&PRSTRUV " $+J<{;-_c^ddfghfij#   :B 
CB!!C.CCc                    > [        [        TU ]	  5       5      n[        U R                  R	                  5       5      n[        [        [        X-   5      5      5      $ r(   listsuper__dir__r   keyssortedsetr+   default_attrs
lazy_attrs	__class__s      r,   r   GenAI.__dir__   E    UW_./$++0023
d3}9:;<<r/   c                     U $ r(    r*   s    r,   	__enter__GenAI.__enter__   s    r/   c                     U R                   R                  b?  U R                   R                  (       d$  U R                   R                  R                  5         S U R                   l        g r(   )ra   rB   rO   closer+   exc_typeexc_valexc_tbs       r,   __exit__GenAI.__exit__   sI    ""))5**::""))//1(,%r/   ra      )r   
__module____qualname____firstlineno____doc__propertyr-   r2   __annotations__r   r   r   r   r   Securityr   r_   intr   r   r   r   r   r`   r}   r   r   r   r   __static_attributes____classcell__r   s   @r,   r$   r$   .   s|    P* * 0 0 ! 9-'L SW%)&*&*$(/3$('+6;$()-Y
5"enn:L1M!MNOY
 c]Y
 sm	Y

 smY
 SMY
 T#s(^,Y
 SMY
 $Y
 '{3Y
 SMY
 v&Y
 
Y
v
X
 
,=
- -r/   r$   c                   V    \ rS rSrS\SS4S jr\S 5       r\S 5       r\S 5       r	S	r
g)
r)      sdkrF   Nc                     Xl         g r(   _sdkr+   r   s     r,   r`   GenAIWithRawResponse.__init__       	r/   c                 B    U R                   R                  R                  $ r(   r   r4   r-   r*   s    r,   r4   !GenAIWithRawResponse.interactions       yy%%777r/   c                 B    U R                   R                  R                  $ r(   r   r5   r-   r*   s    r,   r5   GenAIWithRawResponse.webhooks       yy!!333r/   c                 B    U R                   R                  R                  $ r(   r   r6   r-   r*   s    r,   r6   GenAIWithRawResponse.agents       yy111r/   r   r   r   r   r   r$   r`   r   r4   r5   r6   r   r   r/   r,   r)   r)      sQ    E d  8 8 4 4 2 2r/   r)   c                   V    \ rS rSrS\SS4S jr\S 5       r\S 5       r\S 5       r	S	r
g)
r1      r   rF   Nc                     Xl         g r(   r   r   s     r,   r`   #GenAIWithStreamingResponse.__init__   r   r/   c                 B    U R                   R                  R                  $ r(   r   r4   r2   r*   s    r,   r4   'GenAIWithStreamingResponse.interactions       yy%%===r/   c                 B    U R                   R                  R                  $ r(   r   r5   r2   r*   s    r,   r5   #GenAIWithStreamingResponse.webhooks       yy!!999r/   c                 B    U R                   R                  R                  $ r(   r   r6   r2   r*   s    r,   r6   !GenAIWithStreamingResponse.agents       yy777r/   r   r   r   r/   r,   r1   r1      sQ    E d  > > : : 8 8r/   r1   c                   x  ^  \ rS rSr% Sr\S 5       r\S 5       rS\S'   S\S'   S	\S
'   SSSS.r	SSSSSSSS\
SS4S\\\R                  \/ \R                  4   4      S\\   S\\   S\\   S\\   S\\\\4      S\\   S\\   S\\   S\\   S\\   SS4S jjrS$S jrS\4S jrU 4S  jrS! rS" rS#rU =r$ )%
AsyncGenAI   r&   c                     [        U 5      $ r(   )AsyncGenAIWithRawResponser*   s    r,   r-   AsyncGenAI.with_raw_response   s    (..r/   c                     [        U 5      $ r(   )AsyncGenAIWithStreamingResponser*   s    r,   r2   "AsyncGenAI.with_streaming_response   s    .t44r/   r   r4   r!   r5   r   r6   )r7   r   )r8   r!   )r9   r   r:   Nr;   r<   r=   r>   r?   r@   rA   rP   rC   rD   rE   rF   c                    SnUc  [         R                  " SS9nSnUc
  [        5       n[        [	        U5      [
        5      (       d   S5       eUb  Ub  [        R                  " Xv5      n[        R                  R                  [        R                  " US[        5      [        R                  " US[        5      [        R                  " US[        5      S	9n[        R                  " U [        SSUUUUUUU	U
US
9U S9  [!        5       n[#        5       nXR$                  R&                  S'   XR$                  R&                  S'   [)        U5        UR+                  U R$                  5      U l        [,        R.                  " U [0        [3        [4        U R$                  5      U R$                  R6                  U R$                  R8                  5        g)aB  Instantiates the SDK configuring it with the provided parameters.

:param security: The security details required for authentication
:param api_version: Configures the api_version parameter for all supported operations
:param api_revision: Configures the api_revision parameter for all supported operations
:param user_project: Configures the user_project parameter for all supported operations
:param server_idx: The index of the server to use for all methods
:param server_url: The server URL to use for all methods
:param url_params: Parameters to optionally template the server URL with
:param async_client: The Async HTTP client to use for all asynchronous methods
:param retry_config: The retry configuration to use for all supported methods
:param timeout_ms: Optional request timeout applied to each operation in milliseconds
TNrH   FzFThe provided async_client must implement the AsyncHttpClient protocol.rJ   rK   rL   rM   rN   rS   rU   rV   )rW   AsyncClientr   rY   rZ   r   r   r[   r   r\   r]   r^   r_   r	   r`   r   r   r   ra   rb   r   rc   rd   re   r   r   r   rP   rQ   )r+   r;   r<   r=   r>   r?   r@   rA   rP   rC   rD   rE   rQ   rf   rg   rh   s                   r,   r`   AsyncGenAI.__init__  s   6 !% ,,dCL$)!-/L
 
 	TS	T 
 !%"//
G
??**117 2293 2293 + 

 	 %)&; !%%)%) 	
$ 
#o 5:''1:E''7%!&0F0F!Gd445""//""88	
r/   c                 @   [        U5       H  n [        R                  " U[        S9s  $    [	        SU SU S35      e! [         aT    [        R
                  R                  U[        5      n[        R                  R                  US 5        X2S-
  :X  a     Ml   M  f = frk   rm   rx   s        r,   r}   AsyncGenAI.dynamic_import_  r   r   r   c                    XR                   ;   aM  U R                   U   u  p# U R                  U5      n[        XC5      nU" U R                  U S9n[	        XU5        U$ [        S[        U 5      R                   SU S35      e! [
         a  n[        SU SU SU 35      UeS nAf[         a  n[        SU SU SU SU 35      UeS nAff = fr   r   r   s           r,   r   AsyncGenAI.__getattr__k  r   r   c                    > [        [        TU ]	  5       5      n[        U R                  R	                  5       5      n[        [        [        X-   5      5      5      $ r(   r   r   s      r,   r   AsyncGenAI.__dir__  r   r/   c                    #    U $ 7fr(   r   r*   s    r,   
__aenter__AsyncGenAI.__aenter__  s
     s   c                    #    U R                   R                  bG  U R                   R                  (       d,  U R                   R                  R                  5       I S h  vN   S U R                   l        g  N7fr(   )ra   rP   rQ   acloser   s       r,   	__aexit__AsyncGenAI.__aexit__  sW     ""//;**@@((55<<>>>.2+ ?s   AA5A3A5r   r   )r   r   r   r   r   r   r-   r2   r   r   r   r   r   r   r   r   r_   r   r   r   r   r   r   r`   r}   r   r   r   r   r   r   r   s   @r,   r   r      s|    P/ / 5 5 &%>2,L SW%)&*&*$(/3$(266;$()-W
5"enn:L1M!MNOW
 c]W
 sm	W

 smW
 SMW
 T#s(^,W
 SMW
 /W
 '{3W
 SMW
 v&W
 
W
r
X
 
,=
3 3r/   r   c                   V    \ rS rSrS\SS4S jr\S 5       r\S 5       r\S 5       r	S	r
g)
r   i  r   rF   Nc                     Xl         g r(   r   r   s     r,   r`   "AsyncGenAIWithRawResponse.__init__  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r4   &AsyncGenAIWithRawResponse.interactions  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r5   "AsyncGenAIWithRawResponse.webhooks  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r6    AsyncGenAIWithRawResponse.agents  r   r/   r   r   r   r   r   r   r`   r   r4   r5   r6   r   r   r/   r,   r   r     sQ    J 4  8 8 4 4 2 2r/   r   c                   V    \ rS rSrS\SS4S jr\S 5       r\S 5       r\S 5       r	S	r
g)
r   i  r   rF   Nc                     Xl         g r(   r   r   s     r,   r`   (AsyncGenAIWithStreamingResponse.__init__  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r4   ,AsyncGenAIWithStreamingResponse.interactions  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r5   (AsyncGenAIWithStreamingResponse.webhooks  r   r/   c                 B    U R                   R                  R                  $ r(   r   r*   s    r,   r6   &AsyncGenAIWithStreamingResponse.agents  r   r/   r   r  r   r/   r,   r   r     sQ    J 4  > > : : 8 8r/   r   )6r    r   r   r   rU   r   r   r   basesdkr	   r
   
httpclientr   r   r   r   r   sdkconfigurationr   r   r   utils.loggerr   r   utils.retriesr   rW   ro   importlib.utilru   typingr   r   r   r   r   r   rd   r6   r   r   r4   r   r    r5   r!   r"   r$   r)   r1   r   r   r   r   r/   r,   <module>r     s   " H " " = = *  / * 4 &    
 G G +=1_-G _-D2 2"8 8"]3 ]3@2 2"8 8r/   