
    i!                       d dl mZ d dlmZ d dlmZ d dlZddl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mZmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlmZm Z  ddl!m"Z"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          Z0dS )    )annotations)List)chainN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)is_givenpath_templatemaybe_transformstrip_not_given)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)AsyncPaginatormake_request_options)version_list_params)AnthropicBetaParam)BetaManagedAgentsAgentVersionsAsyncVersionsc                  X    e Zd Zedd            Zedd            ZeeedddedddZdS )r   returnVersionsWithRawResponsec                     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/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        )r#   selfs    r/home/agentuser/.hermes/hermes-agent/venv/lib/python3.11/site-packages/anthropic/resources/beta/agents/versions.pywith_raw_responsezVersions.with_raw_response   s     't,,,    VersionsWithStreamingResponsec                     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/anthropics/anthropic-sdk-python#with_streaming_response
        )r+   r&   s    r(   with_streaming_responsez Versions.with_streaming_response$   s     -T222r*   Nlimitpagebetasextra_headersextra_query
extra_bodytimeoutagent_idstrr0   
int | Omitr1   
str | Omitr2   List[AnthropicBetaParam] | Omitr3   Headers | Noner4   Query | Noner5   Body | Noner6   'float | httpx.Timeout | None | NotGiven&SyncPageCursor[BetaManagedAgentsAgent]c                  |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     t          d|          t          t                   t          ||||t          ||dt          j                  	          t          
          S )	  List Agent Versions

        Args:
          limit: Maximum results per page.

        Default 20, maximum 100.

          page: Opaque pagination cursor.

          betas: Optional header to specify the beta version(s) you want to use.

          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
        7Expected a non-empty value for `agent_id` but received anthropic-beta,c              3  4   K   | ]}t          |          V  d S Nr8   .0es     r(   	<genexpr>z Versions.list.<locals>.<genexpr>S   (      5L5Lc!ff5L5L5L5L5L5Lr*   managed-agents-2026-04-01(/v1/agents/{agent_id}/versions?beta=truer7   r0   r1   r3   r4   r5   r6   queryr1   optionsmodel)
ValueErrorr   r   joinr   r   _get_api_listr   r   r   r   r   r   VersionListParams	r'   r7   r0   r1   r2   r3   r4   r5   r6   s	            r(   listzVersions.list-   s,   B  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!DxXXX 67(+'%%!& $  (9    )! " 
 
 	
r*   )r"   r#   )r"   r+   )r7   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   r5   r>   r6   r?   r"   r@   	__name__
__module____qualname__r   r)   r.   r   r   r\    r*   r(   r   r      s        - - - _- 3 3 3 _3 !15 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
r*   c                  X    e Zd Zedd            Zedd            ZeeedddedddZdS )r    r"   AsyncVersionsWithRawResponsec                     t          |           S r%   )rc   r&   s    r(   r)   zAsyncVersions.with_raw_responsep   s     ,D111r*   "AsyncVersionsWithStreamingResponsec                     t          |           S r-   )re   r&   s    r(   r.   z%AsyncVersions.with_streaming_responsez   s     2$777r*   Nr/   r7   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   r5   r>   r6   r?   OAsyncPaginator[BetaManagedAgentsAgent, AsyncPageCursor[BetaManagedAgentsAgent]]c                  |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     t          d|          t          t                   t          ||||t          ||dt          j                  	          t          
          S )rB   rC   rD   rE   c              3  4   K   | ]}t          |          V  d S rG   rH   rI   s     r(   rL   z%AsyncVersions.list.<locals>.<genexpr>   rM   r*   rN   rO   rP   rQ   rR   rT   )rW   r   r   rX   r   r   rY   r   r   r   r   r   r   rZ   r[   s	            r(   r\   zAsyncVersions.list   s,   B  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!DxXXX !78(+'%%!& $  (9    )! " 
 
 	
r*   )r"   rc   )r"   re   )r7   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   r5   r>   r6   r?   r"   rg   r]   ra   r*   r(   r    r    o   s        2 2 2 _2 8 8 8 _8 !15 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
r*   c                      e Zd ZddZdS )r#   versionsr   r"   Nonec                P    || _         t          j        |j                  | _        d S rG   )	_versionsr   to_raw_response_wrapperr\   r'   rk   s     r(   __init__z VersionsWithRawResponse.__init__   s&    !$<M
 
			r*   Nrk   r   r"   rl   r^   r_   r`   rq   ra   r*   r(   r#   r#      (        
 
 
 
 
 
r*   r#   c                      e Zd ZddZdS )rc   rk   r    r"   rl   c                P    || _         t          j        |j                  | _        d S rG   )rn   r   async_to_raw_response_wrapperr\   rp   s     r(   rq   z%AsyncVersionsWithRawResponse.__init__   s&    !$BM
 
			r*   Nrk   r    r"   rl   rs   ra   r*   r(   rc   rc      rt   r*   rc   c                      e Zd ZddZdS )r+   rk   r   r"   rl   c                F    || _         t          |j                  | _        d S rG   )rn   r   r\   rp   s     r(   rq   z&VersionsWithStreamingResponse.__init__   s#    !0M
 
			r*   Nrr   rs   ra   r*   r(   r+   r+      rt   r*   r+   c                      e Zd ZddZdS )re   rk   r    r"   rl   c                F    || _         t          |j                  | _        d S rG   )rn   r   r\   rp   s     r(   rq   z+AsyncVersionsWithStreamingResponse.__init__   s#    !6M
 
			r*   Nrx   rs   ra   r*   r(   re   re      rt   r*   re   )1
__future__r   typingr   	itertoolsr   httpx r   _typesr   r	   r
   r   r   r   r   _utilsr   r   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.beta.agentsr   types.anthropic_beta_paramr   $types.beta.beta_managed_agents_agentr   __all__r   r    r#   rc   r+   re   ra   r*   r(   <module>r      su   # " " " " "              ! ! ! ! ! ! L L L L L L L L L L L L L L L L L L P P P P P P P P P P P P ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : : A A A A A A A A 5 5 5 5 5 5 = = = = = = K K K K K K
'S
 S
 S
 S
 S
 S
 S
 S
lS
 S
 S
 S
 S
$ S
 S
 S
l
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r*   