
    R-jP                    P   d dl mZ d dlmZ d dlZddlmZmZ ddlm	Z	m
Z
mZmZmZmZmZ ddlmZmZ ddlmZ dd	lmZmZ dd
lmZmZmZmZ ddlmZ ddlm Z  ddl!m"Z" ddl#m$Z$ ddgZ% G d de      Z& G d de      Z' G d d      Z( G d d      Z) G d d      Z* G d d      Z+y)    )annotations)IterableN   )agent_list_paramsagent_create_params)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)Agent)make_request_options)AgentListResponse)AgentDeleteResponseAgentsResourceAsyncAgentsResourcec                     e Zd Zedd       Zedd       Zdeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	dddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd	Z
dddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zy)r   c                    t        |       S a$  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/stainless-sdks/gemini-next-gen-api-python#accessing-raw-response-data-eg-headers
        )AgentsResourceWithRawResponseselfs    y/Users/jameslopez/projects/TradingBot25/.venv/lib/python3.12/site-packages/google/genai/_interactions/resources/agents.pywith_raw_responsez AgentsResource.with_raw_response,   s     -T22    c                    t        |       S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/stainless-sdks/gemini-next-gen-api-python#with_streaming_response
        )#AgentsResourceWithStreamingResponser"   s    r$   with_streaming_responsez&AgentsResource.with_streaming_response6   s     3488r&   Napi_versionid
base_agentbase_environmentdescriptionsystem_instructiontoolsextra_headersextra_query
extra_bodytimeoutc                  || j                   j                         }|st        d|      | j                  | j                   j	                  |d      t        ||||||dt        j                        t        ||	|
|      t              S )  
        Creates a new Agent (Typed version for SDK).

        Args:
          id: The unique identifier for the agent.

          base_agent: The base agent to extend.

          base_environment: The environment configuration for the agent.

          description: Agent description for developers to quickly read and understand.

          system_instruction: System instruction for the agent.

          tools: The tools available to the agent.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        :Expected a non-empty value for `api_version` but received agentsr,   pathr-   r.   r/   r0   r1   r2   r3   r4   r5   r6   bodyoptionscast_to)
_client_get_api_version_path_param
ValueError_post_build_maybe_vertex_pathr   r   AgentCreateParamsr   r   r#   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   s               r$   createzAgentsResource.create?   s    R ,,BBDKYZeYhijjzzLL11kPX1Y ",(8#.*<" $55
 )+Q[el !  
 	
r&   r,   	page_size
page_tokenparentr3   r4   r5   r6   c                  || j                   j                         }|st        d|      | j                  | j                   j	                  |d      t        ||||t        |||dt        j                              t              S )E  
        Lists all Agents.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        r9   r:   r;   rL   rM   rN   r3   r4   r5   r6   queryrA   rB   )
rC   rD   rE   _getrG   r   r   r   AgentListParamsr   	r#   r,   rL   rM   rN   r3   r4   r5   r6   s	            r$   listzAgentsResource.list   s    4 ,,BBDKYZeYhijjyyLL11kPX1Y(+'%%%.&0"(
 &55 &!  
 	
r&   r,   r3   r4   r5   r6   c          	         || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t              S )E  
        Deletes an Agent.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        r9   1Expected a non-empty value for `id` but received agents/r;   r>   rT   rC   rD   rE   _deleterG   r   r   r#   r-   r,   r3   r4   r5   r6   s          r$   deletezAgentsResource.delete   s    0 ,,BBDKYZeYhijjPQSPVWXX||LL11kRYZ\Y]P^1_(+Q[el (  
 	
r&   c          	         || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t              S )J  
        Gets a specific Agent.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        r9   r\   r]   r;   r>   rT   rC   rD   rE   rU   rG   r   r   r`   s          r$   getzAgentsResource.get   s    0 ,,BBDKYZeYhijjPQSPVWXXyyLL11kRYZ\Y]P^1_(+Q[el   
 	
r&   )returnr!   )rf   r)   r,   
str | Noner-   
str | Omitr.   ri   r/   z*agent_create_params.BaseEnvironment | Omitr0   ri   r1   ri   r2   z)Iterable[agent_create_params.Tool] | Omitr3   Headers | Noner4   Query | Noner5   Body | Noner6   'float | httpx.Timeout | None | NotGivenrf   r   r,   rh   rL   z
int | OmitrM   ri   rN   ri   r3   rj   r4   rk   r5   rl   r6   rm   rf   r   r-   strr,   rh   r3   rj   r4   rk   r5   rl   r6   rm   rf   r   r-   rp   r,   rh   r3   rj   r4   rk   r5   rl   r6   rm   rf   r   __name__
__module____qualname__r   r%   r*   r   r   rJ   rX   ra   re    r&   r$   r   r   +   s   3 3 9 9 #'!%GK"&)-;? )-$("&;D>
  >
 	>

 >
 E>
  >
 '>
 9>
 &>
 ">
  >
 9>
  
!>
F #' $!%! )-$("&;D/
  /
 	/

 /
 /
 &/
 "/
  /
 9/
 
/
j #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
T #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
r&   c                     e Zd Zedd       Zedd       Zdeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	dddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd	Z
dddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zy)r   c                    t        |       S r    )"AsyncAgentsResourceWithRawResponser"   s    r$   r%   z%AsyncAgentsResource.with_raw_response   s     2$77r&   c                    t        |       S r(   )(AsyncAgentsResourceWithStreamingResponser"   s    r$   r*   z+AsyncAgentsResource.with_streaming_response  s     8==r&   Nr+   c               J  K   || j                   j                         }|st        d|      | j                  | j                   j	                  |d      t        ||||||dt        j                         d{   t        ||	|
|      t               d{   S 7 $7 w)r8   Nr9   r:   r;   r=   r>   r?   )
rC   rD   rE   rF   rG   r   r   rH   r   r   rI   s               r$   rJ   zAsyncAgentsResource.create  s     R ,,BBDKYZeYhijjZZLL11kPX1Y,",(8#.*<" $55
 
 )+Q[el !   
 
 	


s$   A8B#:B
;B#B!B#!B#rK   c               D  K   || j                   j                         }|st        d|      | j                  | j                   j	                  |d      t        ||||t        |||dt        j                         d{         t               d{   S 7 7 w)rP   Nr9   r:   r;   rQ   rR   rT   )
rC   rD   rE   rU   rG   r   r   r   rV   r   rW   s	            r$   rX   zAsyncAgentsResource.listQ  s     4 ,,BBDKYZeYhijjYYLL11kPX1Y(+'%1%.&0"(
 &55  &!  
 
 	

s$   A>B  BB BB B rY   c          	       K   || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t               d{   S 7 w)r[   Nr9   r\   r]   r;   r>   rT   r^   r`   s          r$   ra   zAsyncAgentsResource.delete  s     0 ,,BBDKYZeYhijjPQSPVWXX\\LL11kRYZ\Y]P^1_(+Q[el ( " 
 
 	
 
   BBB
Bc          	       K   || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t               d{   S 7 w)rc   Nr9   r\   r]   r;   r>   rT   rd   r`   s          r$   re   zAsyncAgentsResource.get  s     0 ,,BBDKYZeYhijjPQSPVWXXYYLL11kRYZ\Y]P^1_(+Q[el   
 
 	
 
r   )rf   ry   )rf   r{   rg   rn   ro   rq   rr   rv   r&   r$   r   r      s   8 8 > > #'!%GK"&)-;? )-$("&;D>
  >
 	>

 >
 E>
  >
 '>
 9>
 &>
 ">
  >
 9>
  
!>
F #' $!%! )-$("&;D/
  /
 	/

 /
 /
 &/
 "/
  /
 9/
 
/
j #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
T #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
r&   c                      e Zd ZddZy)r!   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y N)_agentsr   rJ   rX   ra   re   r#   r:   s     r$   __init__z&AgentsResourceWithRawResponse.__init__  s[    -MM
 ,KK
	 .MM
 +JJ
r&   Nr:   r   rf   Noners   rt   ru   r   rv   r&   r$   r!   r!         
r&   r!   c                      e Zd ZddZy)ry   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rJ   rX   ra   re   r   s     r$   r   z+AsyncAgentsResourceWithRawResponse.__init__  s[    3MM
 2KK
	 4MM
 1JJ
r&   Nr:   r   rf   r   r   rv   r&   r$   ry   ry     r   r&   ry   c                      e Zd ZddZy)r)   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rJ   rX   ra   re   r   s     r$   r   z,AgentsResourceWithStreamingResponse.__init__  s[    2MM
 1KK
	 3MM
 0JJ
r&   Nr   r   rv   r&   r$   r)   r)     r   r&   r)   c                      e Zd ZddZy)r{   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rJ   rX   ra   re   r   s     r$   r   z1AsyncAgentsResourceWithStreamingResponse.__init__  s[    8MM
 7KK
	 9MM
 6JJ
r&   Nr   r   rv   r&   r$   r{   r{     r   r&   r{   ),
__future__r   typingr   httpxtypesr   r   _typesr   r	   r
   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   r   r   types.agentr   _base_clientr   types.agent_list_responser   types.agent_delete_responser   __all__r   r   r!   ry   r)   r{   rv   r&   r$   <module>r      s   $ #   : J J J ; % 9    / 9 =2
3O
_ O
dO
* O
d
 
$
 
$
 
$
 
r&   