
    i0y                       d dl 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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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+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 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@dS )"    )annotations)AnyListOptionalcast)chain)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)is_givenpath_templatemaybe_transformstrip_not_givenasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)AsyncPaginatormake_request_options)resource_add_paramsresource_list_paramsresource_update_params)AnthropicBetaParam)ResourceUpdateResponse)ResourceRetrieveResponse)BetaManagedAgentsFileResource) BetaManagedAgentsSessionResource)&BetaManagedAgentsDeleteSessionResource	ResourcesAsyncResourcesc                      e Zd Zed+d            Zed,d            Zedddedd-dZedddedd.dZ	eeedddedd/d Z
edddedd0d"Zeeddded#d1d*ZdS )2r*   returnResourcesWithRawResponsec                     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    u/home/agentuser/.hermes/hermes-agent/venv/lib/python3.11/site-packages/anthropic/resources/beta/sessions/resources.pywith_raw_responsezResources.with_raw_response   s     (---    ResourcesWithStreamingResponsec                     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
        )r6   r1   s    r3   with_streaming_responsez!Resources.with_streaming_response)   s     .d333r5   Nbetasextra_headersextra_query
extra_bodytimeoutresource_idstr
session_idr;   List[AnthropicBetaParam] | Omitr<   Headers | Noner=   Query | Noner>   Body | Noner?   'float | httpx.Timeout | None | NotGivenr&   c                  |st          d|          |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          t          |                     t          d||          t          ||||	          t          t          t                    
                    S )  
        Get Session Resource

        Args:
          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
        9Expected a non-empty value for `session_id` but received :Expected a non-empty value for `resource_id` but received anthropic-beta,c              3  4   K   | ]}t          |          V  d S NrA   .0es     r3   	<genexpr>z%Resources.retrieve.<locals>.<genexpr>T   (      5L5Lc!ff5L5L5L5L5L5Lr5   managed-agents-2026-04-01;/v1/sessions/{session_id}/resources/{resource_id}?beta=truerB   r@   r<   r=   r>   r?   optionscast_to
ValueErrorr   r   joinr   r   r   r&   _getr   r    r   r2   r@   rB   r;   r<   r=   r>   r?   s           r3   retrievezResources.retrieve2   sG   6  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`$IIQ) +  
 -"/[U_ip   1    
 
 	
r5   authorization_tokenr%   c                  |st          d|          |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          t          |                     t          d||          t          d	|it          j                  t          ||||
          t          t          t                                        S ):  
        Update Session Resource

        Args:
          authorization_token: New authorization token for the resource. Currently only `github_repository`
              resources support token rotation.

          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
        rJ   rK   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z#Resources.update.<locals>.<genexpr>   rU   r5   rV   rW   rX   rc   rY   bodyr[   r\   )r^   r   r   r_   r   r   r   r%   _postr   r   r#   ResourceUpdateParamsr    r   	r2   r@   rB   rc   r;   r<   r=   r>   r?   s	            r3   updatezResources.updatem   se   >  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`"JJQ) +  
 %*,?@BXBm  -"/[U_ip   /    
 
 	
r5   limitpager;   r<   r=   r>   r?   rn   
int | Omitro   
str | Omit0SyncPageCursor[BetaManagedAgentsSessionResource]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          t          t                    
          S )e  
        List Session Resources

        Args:
          limit: Maximum number of resources to return per page (max 1000). If omitted, returns
              all resources.

          page: Opaque cursor from a previous response's next_page field.

          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
        rJ   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z!Resources.list.<locals>.<genexpr>   rU   r5   rV   -/v1/sessions/{session_id}/resources?beta=truerB   rn   ro   r<   r=   r>   r?   queryro   r[   model)r^   r   r   r_   r   r   _get_api_listr   r   r(   r    r   r"   ResourceListParamsr   r   	r2   rB   rn   ro   r;   r<   r=   r>   r?   s	            r3   listzResources.list   s=   B  	igYcgghhh	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!IV`aaa @A(+'%%!& $  );    5 ! " 
 
 	
r5   r)   c          
        |st          d|          |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          
          S )  
        Delete Session Resource

        Args:
          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
        rJ   rK   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z#Resources.delete.<locals>.<genexpr>  rU   r5   rV   rW   rX   rY   rZ   
r^   r   r   r_   r   r   _deleter   r    r)   ra   s           r3   deletezResources.delete   s'   6  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`||M%'  
 )+Q[el   ;  

 

 
	
r5   
mount_pathr;   r<   r=   r>   r?   file_idtypeLiteral['file']r   Optional[str] | Omitr'   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          |||dt          j
                  t          ||||		          t          
          S )2  
        Add Session Resource

        Args:
          file_id: ID of a previously uploaded file.

          mount_path: Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.

          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
        rJ   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z Resources.add.<locals>.<genexpr>N  rU   r5   rV   rv   rw   r   r   r   rY   rg   )r^   r   r   r_   r   r   ri   r   r   r!   ResourceAddParamsr    r'   
r2   rB   r   r   r   r;   r<   r=   r>   r?   s
             r3   addzResources.add(  s&   B  	igYcgghhh	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`zzIV`aaa & ", 
 $5  )+Q[el   2  
 
 	
r5   )r-   r.   )r-   r6   r@   rA   rB   rA   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   r&   r@   rA   rB   rA   rc   rA   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   r%   )rB   rA   rn   rp   ro   rq   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   rr   r@   rA   rB   rA   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   r)   rB   rA   r   rA   r   r   r   r   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   r'   __name__
__module____qualname__r   r4   r9   r   r   rb   rl   r   r   r    r5   r3   r*   r*      s`       . . . _. 4 4 4 _4 26 )-$("&;D9
 9
 9
 9
 9
 9
B 26 )-$("&;D@
 @
 @
 @
 @
 @
L !15 )-$("&;DA
 A
 A
 A
 A
 A
P 26 )-$("&;D4
 4
 4
 4
 4
 4
x ,015 )-$("&;D<
 <
 <
 <
 <
 <
 <
 <
r5   c                      e Zd Zed+d            Zed,d            Zedddedd-dZedddedd.dZ	eeedddedd/d Z
edddedd0d"Zeeddded#d1d*ZdS )2r+   r-   AsyncResourcesWithRawResponsec                     t          |           S r0   )r   r1   s    r3   r4   z AsyncResources.with_raw_responseh  s     -T222r5   #AsyncResourcesWithStreamingResponsec                     t          |           S r8   )r   r1   s    r3   r9   z&AsyncResources.with_streaming_responser  s     34888r5   Nr:   r@   rA   rB   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r&   c                 K   |st          d|          |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          t          |                     t          d||          t          ||||	          t          t          t                    
           d{V           S )rI   rJ   rK   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z*AsyncResources.retrieve.<locals>.<genexpr>  rU   r5   rV   rW   rX   rY   rZ   Nr]   ra   s           r3   rb   zAsyncResources.retrieve{  si     6  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`$))Q) +  
 -"/[U_ip   1          
 
 	
r5   rc   r%   c               .  K   |st          d|          |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          t          |                     t          d||          t          d	|it          j                   d
{V t          ||||          t          t          t                               d
{V           S )re   rJ   rK   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z(AsyncResources.update.<locals>.<genexpr>  rU   r5   rV   rW   rX   rc   NrY   rg   )r^   r   r   r_   r   r   r   r%   ri   r   r   r#   rj   r    r   rk   s	            r3   rl   zAsyncResources.update  s     >  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`"**Q) +  
 1*,?@BXBm        -"/[U_ip   /          
 
 	
r5   rm   rn   rp   ro   rq   cAsyncPaginator[BetaManagedAgentsSessionResource, AsyncPageCursor[BetaManagedAgentsSessionResource]]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          t          t                    
          S )rt   rJ   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z&AsyncResources.list.<locals>.<genexpr>  rU   r5   rV   rv   rw   rx   ry   r{   )r^   r   r   r_   r   r   r}   r   r   r(   r    r   r"   r~   r   r   r   s	            r3   r   zAsyncResources.list  s=   B  	igYcgghhh	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!IV`aaa !AB(+'%%!& $  );    5 ! " 
 
 	
r5   r)   c          
       K   |st          d|          |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          
           d{V S )r   rJ   rK   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z(AsyncResources.delete.<locals>.<genexpr>]  rU   r5   rV   rW   rX   rY   rZ   Nr   ra   s           r3   r   zAsyncResources.delete;  sI     6  	igYcgghhh 	kiZeiijjj	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`\\M%'  
 )+Q[el   ; " 

 

 

 

 

 

 

 

 
	
r5   r   r   r   r   r   r   r'   c          
       K   |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          |||dt          j
                   d	{V t          ||||	
          t                     d	{V S )r   rJ   rL   rM   c              3  4   K   | ]}t          |          V  d S rO   rP   rQ   s     r3   rT   z%AsyncResources.add.<locals>.<genexpr>  rU   r5   rV   rv   rw   r   NrY   rg   )r^   r   r   r_   r   r   ri   r   r   r!   r   r    r'   r   s
             r3   r   zAsyncResources.addq  sf     B  	igYcgghhh	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`ZZIV`aaa,& ", 
 $5        )+Q[el   2   
 
 
 
 
 
 
 
 	
r5   )r-   r   )r-   r   r   r   )rB   rA   rn   rp   ro   rq   r;   rC   r<   rD   r=   rE   r>   rF   r?   rG   r-   r   r   r   r   r   r5   r3   r+   r+   g  s`       3 3 3 _3 9 9 9 _9 26 )-$("&;D9
 9
 9
 9
 9
 9
B 26 )-$("&;D@
 @
 @
 @
 @
 @
L !15 )-$("&;DA
 A
 A
 A
 A
 A
P 26 )-$("&;D4
 4
 4
 4
 4
 4
x ,015 )-$("&;D<
 <
 <
 <
 <
 <
 <
 <
r5   c                      e Zd ZddZdS )r.   	resourcesr*   r-   Nonec                @   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S rO   )
_resourcesr   to_raw_response_wrapperrb   rl   r   r   r   r2   r   s     r3   __init__z!ResourcesWithRawResponse.__init__  s    #(@
 
 '>
 
 %<N
 
	 '>
 
 $;M
 
r5   Nr   r*   r-   r   r   r   r   r   r   r5   r3   r.   r.     (        
 
 
 
 
 
r5   r.   c                      e Zd ZddZdS )r   r   r+   r-   r   c                @   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S rO   )r   r   async_to_raw_response_wrapperrb   rl   r   r   r   r   s     r3   r   z&AsyncResourcesWithRawResponse.__init__  s    #(F
 
 'D
 
 %BN
 
	 'D
 
 $AM
 
r5   Nr   r+   r-   r   r   r   r5   r3   r   r     r   r5   r   c                      e Zd ZddZdS )r6   r   r*   r-   r   c                   || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S rO   )r   r   rb   rl   r   r   r   r   s     r3   r   z'ResourcesWithStreamingResponse.__init__  s    #4
 
 3
 
 1N
 
	 3
 
 0M
 
r5   Nr   r   r   r5   r3   r6   r6     r   r5   r6   c                      e Zd ZddZdS )r   r   r+   r-   r   c                   || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S rO   )r   r   rb   rl   r   r   r   r   s     r3   r   z,AsyncResourcesWithStreamingResponse.__init__  s    #:
 
 9
 
 7N
 
	 9
 
 6M
 
r5   Nr   r   r   r5   r3   r   r     r   r5   r   )A
__future__r   typingr   r   r   r   	itertoolsr   typing_extensionsr	   httpx r   _typesr   r   r   r   r   r   r   _utilsr   r   r   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r    types.beta.sessionsr!   r"   r#   types.anthropic_beta_paramr$   ,types.beta.sessions.resource_update_responser%   .types.beta.sessions.resource_retrieve_responser&   5types.beta.sessions.beta_managed_agents_file_resourcer'   8types.beta.sessions.beta_managed_agents_session_resourcer(   ?types.beta.sessions.beta_managed_agents_delete_session_resourcer)   __all__r*   r+   r.   r   r6   r   r   r5   r3   <module>r      s   # " " " " " , , , , , , , , , , , ,       % % % % % %  ! ! ! ! ! ! L L L L L L L L L L L L L L L L L L g g g g g g g g g g g g g g ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : : A A A A A A A A e e e e e e e e e e = = = = = = S S S S S S W W W W W W c c c c c c i i i i i i v v v v v v(
)F
 F
 F
 F
 F
 F
 F
 F
R
F
 F
 F
 F
 F
% F
 F
 F
R

 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
 
 
r5   