
    4Rj!                    l   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      Z0y)    )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                  l    e Zd Zedd       Zedd       Zeee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/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        )VersionsWithRawResponseselfs    p/var/www/html/meridian/meridian-ai/venv/lib/python3.12/site-packages/anthropic/resources/beta/agents/versions.pywith_raw_responsezVersions.with_raw_response   s     't,,    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/anthropics/anthropic-sdk-python#with_streaming_response
        )VersionsWithStreamingResponser%   s    r'   with_streaming_responsez Versions.with_streaming_response$   s     -T22r)   Nlimitpagebetasextra_headersextra_query
extra_bodytimeoutc               t   |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  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  2   K   | ]  }t        |        y wNstr.0es     r'   	<genexpr>z Versions.list.<locals>.<genexpr>S        5Lc!f5L   managed-agents-2026-04-01(/v1/agents/{agent_id}/versions?beta=trueagent_idr/   r0   r2   r3   r4   r5   queryr0   optionsmodel)
ValueErrorr   r   joinr   r   _get_api_listr   r   r   r   r   r   VersionListParams	r&   rH   r/   r0   r1   r2   r3   r4   r5   s	            r'   listzVersions.list-   s    B VW_Vbcdd	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!DxX 67(+'%%!& $ (99 )! " 
 	
r)   )returnr$   )rU   r,   )rH   r>   r/   
int | Omitr0   
str | Omitr1   List[AnthropicBetaParam] | Omitr2   Headers | Noner3   Query | Noner4   Body | Noner5   'float | httpx.Timeout | None | NotGivenrU   z&SyncPageCursor[BetaManagedAgentsAgent]	__name__
__module____qualname__r   r(   r-   r   r   rT    r)   r'   r   r      s    - - 3 3 !15 )-$("&;D?
?
 	?

 ?
 /?
 &?
 "?
  ?
 9?
 
0?
r)   c                  l    e Zd Zedd       Zedd       Zeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)	r    c                    t        |       S r#   )AsyncVersionsWithRawResponser%   s    r'   r(   zAsyncVersions.with_raw_responsep   s     ,D11r)   c                    t        |       S r+   )"AsyncVersionsWithStreamingResponser%   s    r'   r-   z%AsyncVersions.with_streaming_responsez   s     2$77r)   Nr.   c               t   |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  t        d|      t        t           t        ||||t        ||dt        j                        	      t        
      S )r7   r8   r9   r:   c              3  2   K   | ]  }t        |        y wr<   r=   r?   s     r'   rB   z%AsyncVersions.list.<locals>.<genexpr>   rC   rD   rE   rF   rG   rI   rJ   rL   )rO   r   r   rP   r   r   rQ   r   r   r   r   r   r   rR   rS   s	            r'   rT   zAsyncVersions.list   s    B VW_Vbcdd	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!DxX !78(+'%%!& $ (99 )! " 
 	
r)   )rU   rd   )rU   rf   )rH   r>   r/   rV   r0   rW   r1   rX   r2   rY   r3   rZ   r4   r[   r5   r\   rU   zOAsyncPaginator[BetaManagedAgentsAgent, AsyncPageCursor[BetaManagedAgentsAgent]]r]   ra   r)   r'   r    r    o   s    2 2 8 8 !15 )-$("&;D?
?
 	?

 ?
 /?
 &?
 "?
  ?
 9?
 
Y?
r)   c                      e Zd ZddZy)r$   c                Z    || _         t        j                  |j                        | _        y r<   )	_versionsr   to_raw_response_wrapperrT   r&   versionss     r'   __init__z VersionsWithRawResponse.__init__   s"    !$<<MM
	r)   Nrn   r   rU   Noner^   r_   r`   ro   ra   r)   r'   r$   r$          
r)   r$   c                      e Zd ZddZy)rd   c                Z    || _         t        j                  |j                        | _        y r<   )rk   r   async_to_raw_response_wrapperrT   rm   s     r'   ro   z%AsyncVersionsWithRawResponse.__init__   s"    !$BBMM
	r)   Nrn   r    rU   rq   rr   ra   r)   r'   rd   rd      rs   r)   rd   c                      e Zd ZddZy)r,   c                F    || _         t        |j                        | _        y r<   )rk   r   rT   rm   s     r'   ro   z&VersionsWithStreamingResponse.__init__   s    !0MM
	r)   Nrp   rr   ra   r)   r'   r,   r,      rs   r)   r,   c                      e Zd ZddZy)rf   c                F    || _         t        |j                        | _        y r<   )rk   r   rT   rm   s     r'   ro   z+AsyncVersionsWithStreamingResponse.__init__   s    !6MM
	r)   Nrw   rr   ra   r)   r'   rf   rf      rs   r)   rf   )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$   rd   r,   rf   ra   r)   r'   <module>r      s    #    ! L L L P P ' ; Z : A 5 = K
'S
 S
lS
$ S
l
 

 

 

 
r)   