
    i                       d dl mZ d dlmZmZ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l-m.Z. ddl/m0Z0 ddgZ1 G d de          Z2 G d de          Z3 G d d          Z4 G d d          Z5 G d d          Z6 G d d          Z7dS )    )annotations)DictListOptional)chainN   )_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)credential_list_paramscredential_create_paramscredential_update_params)AnthropicBetaParam)BetaManagedAgentsCredential)"BetaManagedAgentsDeletedCredentialCredentialsAsyncCredentialsc            	          e Zd Zed/d            Zed0d            Zeeedddedd1dZedddedd2dZ	eeeedddedd3d"Z
eeeeddded#d4d+Zedddedd5d-Zedddedd2d.ZdS )6r%   returnCredentialsWithRawResponsec                     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/vaults/credentials.pywith_raw_responsezCredentials.with_raw_response   s     *$///     CredentialsWithStreamingResponsec                     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
        )r1   r,   s    r.   with_streaming_responsez#Credentials.with_streaming_response%   s     0555r0   Ndisplay_namemetadatabetasextra_headersextra_query
extra_bodytimeoutvault_idstrauthcredential_create_params.Authr6   Optional[str] | Omitr7   Dict[str, str] | Omitr8   List[AnthropicBetaParam] | Omitr9   Headers | Noner:   Query | Noner;   Body | Noner<   'float | httpx.Timeout | None | NotGivenr#   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 )  
        Create Credential

        Args:
          auth: Authentication details for creating a credential.

          display_name: Human-readable name for the credential. Up to 255 characters.

          metadata: Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys
              up to 64 chars, values up to 512 chars.

          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 `vault_id` but received anthropic-beta,c              3  4   K   | ]}t          |          V  d S Nr>   .0es     r.   	<genexpr>z%Credentials.create.<locals>.<genexpr>W   (      5L5Lc!ff5L5L5L5L5L5Lr0   managed-agents-2026-04-01+/v1/vaults/{vault_id}/credentials?beta=truer=   r?   r6   r7   r9   r:   r;   r<   bodyoptionscast_to)
ValueErrorr   r   joinr   r   _postr   r   r    CredentialCreateParamsr   r#   
r-   r=   r?   r6   r7   r8   r9   r:   r;   r<   s
             r.   createzCredentials.create.   s&   H  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`zzGRZ[[[  $0 ( 
 )?  )+Q[el   0  
 
 	
r0   r8   r9   r:   r;   r<   credential_idc          
        |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 )  
        Get Credential

        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   <Expected a non-empty value for `credential_id` but received rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z'Credentials.retrieve.<locals>.<genexpr>   rT   r0   rU   ;/v1/vaults/{vault_id}/credentials/{credential_id}?beta=truer=   re   rY   r\   r]   
r^   r   r   r_   r   r   _getr   r   r#   r-   re   r=   r8   r9   r:   r;   r<   s           r.   retrievezCredentials.retrieveo   s'   6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`yyM!+  
 )+Q[el   0  

 

 
	
r0   r?   r6   r7   r8   r9   r:   r;   r<   $credential_update_params.Auth | Omit)Optional[Dict[str, Optional[str]]] | Omitc       	   
        |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          |||d	t          j
                  t          |||	|

          t                    S )  
        Update Credential

        Args:
          auth: Updated authentication details for a credential.

          display_name: Updated human-readable name for the credential. 1-255 characters.

          metadata: Metadata patch. Set a key to a string to upsert it, or to null to delete it.
              Omitted keys are preserved.

          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   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z%Credentials.update.<locals>.<genexpr>   rT   r0   rU   rj   rk   rX   rY   rZ   )r^   r   r   r_   r   r   r`   r   r   r!   CredentialUpdateParamsr   r#   r-   re   r=   r?   r6   r7   r8   r9   r:   r;   r<   s              r.   updatezCredentials.update   sR   J  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`zzM!+  
 ! $0 ( 
 )?  )+Q[el   0#  
 
 	
r0   include_archivedlimitpager8   r9   r:   r;   r<   r{   bool | Omitr|   
int | Omitr}   
str | Omit+SyncPageCursor[BetaManagedAgentsCredential]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 Credentials

        Args:
          include_archived: Whether to include archived credentials in the results.

          limit: Maximum number of credentials to return per page. Defaults to 20, maximum 100.

          page: Opaque pagination token from a previous `list_credentials` response.

          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   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z#Credentials.list.<locals>.<genexpr>  rT   r0   rU   rV   rW   r{   r|   r}   r9   r:   r;   r<   queryr}   r\   model)r^   r   r   r_   r   r   _get_api_listr   r   r#   r   r   r   CredentialListParams
r-   r=   r{   r|   r}   r8   r9   r:   r;   r<   s
             r.   listzCredentials.list   s0   F  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!GRZ[[[ ;<(+'%%,<!& $ 
 +?    .# " 
 
 	
r0   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 Credential

        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   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z%Credentials.delete.<locals>.<genexpr>S  rT   r0   rU   rj   rk   rY   rl   
r^   r   r   r_   r   r   _deleter   r   r$   ro   s           r.   deletezCredentials.delete1  s'   6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`||M!+  
 )+Q[el   7  

 

 
	
r0   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 )  
        Archive Credential

        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   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z&Credentials.archive.<locals>.<genexpr>  rT   r0   rU   C/v1/vaults/{vault_id}/credentials/{credential_id}/archive?beta=truerk   rY   rl   
r^   r   r   r_   r   r   r`   r   r   r#   ro   s           r.   archivezCredentials.archiveg  s'   6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`zzU!+  
 )+Q[el   0  

 

 
	
r0   )r(   r)   )r(   r1   r=   r>   r?   r@   r6   rA   r7   rB   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r#   re   r>   r=   r>   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r#   re   r>   r=   r>   r?   rr   r6   rA   r7   rs   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r#   )r=   r>   r{   r~   r|   r   r}   r   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r   re   r>   r=   r>   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r$   __name__
__module____qualname__r   r/   r4   r   r   rc   rp   ry   r   r   r    r0   r.   r%   r%      s       0 0 0 _0 6 6 6 _6 .2*.15 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
L 26 )-$("&;D4
 4
 4
 4
 4
 4
v 6:-1>B15 )-$("&;DF
 F
 F
 F
 F
 F
X )- 15 )-$("&;DB
 B
 B
 B
 B
 B
R 26 )-$("&;D4
 4
 4
 4
 4
 4
v 26 )-$("&;D4
 4
 4
 4
 4
 4
 4
 4
r0   c            	          e Zd Zed/d            Zed0d            Zeeedddedd1dZedddedd2dZ	eeeedddedd3d"Z
eeeeddded#d4d+Zedddedd5d-Zedddedd2d.ZdS )6r&   r(   AsyncCredentialsWithRawResponsec                     t          |           S r+   )r   r,   s    r.   r/   z"AsyncCredentials.with_raw_response  s     /t444r0   %AsyncCredentialsWithStreamingResponsec                     t          |           S r3   )r   r,   s    r.   r4   z(AsyncCredentials.with_streaming_response  s     5T:::r0   Nr5   r=   r>   r?   r@   r6   rA   r7   rB   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   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 )rI   rJ   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z*AsyncCredentials.create.<locals>.<genexpr>  rT   r0   rU   rV   rW   rX   NrY   rZ   )r^   r   r   r_   r   r   r`   r   r   r    ra   r   r#   rb   s
             r.   rc   zAsyncCredentials.create  sf     H  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`ZZGRZ[[[, $0 ( 
 )?        )+Q[el   0   
 
 
 
 
 
 
 
 	
r0   rd   re   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 )rg   rJ   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z,AsyncCredentials.retrieve.<locals>.<genexpr>  rT   r0   rU   rj   rk   rY   rl   Nrm   ro   s           r.   rp   zAsyncCredentials.retrieve  sI     6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`YYM!+  
 )+Q[el   0  

 

 

 

 

 

 

 

 
	
r0   rq   rr   rs   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          |||d	t          j
                   d
{V t          |||	|
          t                     d
{V S )ru   rJ   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z*AsyncCredentials.update.<locals>.<genexpr>U  rT   r0   rU   rj   rk   rX   NrY   rZ   )r^   r   r   r_   r   r   r`   r   r   r!   rw   r   r#   rx   s              r.   ry   zAsyncCredentials.update)  s     J  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`ZZM!+  
 - $0 ( 
 )?        )+Q[el   0#   
 
 
 
 
 
 
 
 	
r0   rz   r{   r~   r|   r   r}   r   YAsyncPaginator[BetaManagedAgentsCredential, AsyncPageCursor[BetaManagedAgentsCredential]]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 )r   rJ   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z(AsyncCredentials.list.<locals>.<genexpr>  rT   r0   rU   rV   rW   r   r   r   )r^   r   r   r_   r   r   r   r   r   r#   r   r   r   r   r   s
             r.   r   zAsyncCredentials.listq  s0   F  	ecW_ccddd	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`!!GRZ[[[ !<=(+'%%,<!& $ 
 +?    .# " 
 
 	
r0   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   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z*AsyncCredentials.delete.<locals>.<genexpr>  rT   r0   rU   rj   rk   rY   rl   Nr   ro   s           r.   r   zAsyncCredentials.delete  sI     6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`\\M!+  
 )+Q[el   7 " 

 

 

 

 

 

 

 

 
	
r0   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   rh   rK   rL   c              3  4   K   | ]}t          |          V  d S rN   rO   rP   s     r.   rS   z+AsyncCredentials.archive.<locals>.<genexpr>  rT   r0   rU   r   rk   rY   rl   Nr   ro   s           r.   r   zAsyncCredentials.archive  sI     6  	ecW_ccddd 	om\immnnn	
$'#chhu5L5Le5L5L5LOjNk/l/l&m&m&m" 	
 "	
 *+F`=K^\^`ZZU!+  
 )+Q[el   0   

 

 

 

 

 

 

 

 
	
r0   )r(   r   )r(   r   r   r   r   )r=   r>   r{   r~   r|   r   r}   r   r8   rC   r9   rD   r:   rE   r;   rF   r<   rG   r(   r   r   r   r   r0   r.   r&   r&     s       5 5 5 _5 ; ; ; _; .2*.15 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
L 26 )-$("&;D4
 4
 4
 4
 4
 4
v 6:-1>B15 )-$("&;DF
 F
 F
 F
 F
 F
X )- 15 )-$("&;DB
 B
 B
 B
 B
 B
R 26 )-$("&;D4
 4
 4
 4
 4
 4
v 26 )-$("&;D4
 4
 4
 4
 4
 4
 4
 4
r0   c                      e Zd ZddZdS )r)   credentialsr%   r(   Nonec                |   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S rN   )	_credentialsr	   to_raw_response_wrapperrc   rp   ry   r   r   r   r-   r   s     r.   __init__z#CredentialsWithRawResponse.__init__#  s    '&>
 
 )@ 
 
 '>
 
 %<
 
	 '>
 
 (?
 
r0   Nr   r%   r(   r   r   r   r   r   r   r0   r.   r)   r)   "  (        
 
 
 
 
 
r0   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                  | _        t          j        |j                  | _        d S rN   )	r   r	   async_to_raw_response_wrapperrc   rp   ry   r   r   r   r   s     r.   r   z(AsyncCredentialsWithRawResponse.__init__;  s    '&D
 
 )F 
 
 'D
 
 %B
 
	 'D
 
 (E
 
r0   Nr   r&   r(   r   r   r   r0   r.   r   r   :  r   r0   r   c                      e Zd ZddZdS )r1   r   r%   r(   r   c                @   || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S rN   )r   r   rc   rp   ry   r   r   r   r   s     r.   r   z)CredentialsWithStreamingResponse.__init__S  s    '2
 
 5 
 
 3
 
 1
 
	 3
 
 4
 
r0   Nr   r   r   r0   r.   r1   r1   R  r   r0   r1   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                  | _        t          |j                  | _        d S rN   )r   r   rc   rp   ry   r   r   r   r   s     r.   r   z.AsyncCredentialsWithStreamingResponse.__init__k  s    '8
 
 ; 
 
 9
 
 7
 
	 9
 
 :
 
r0   Nr   r   r   r0   r.   r   r   j  r   r0   r   )8
__future__r   typingr   r   r   	itertoolsr   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.vaultsr   r    r!   types.anthropic_beta_paramr"   0types.beta.vaults.beta_managed_agents_credentialr#   8types.beta.vaults.beta_managed_agents_deleted_credentialr$   __all__r%   r&   r)   r   r1   r   r   r0   r.   <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 l l l l l l l l l l = = = = = = \ \ \ \ \ \ k k k k k k,
-A
 A
 A
 A
 A
/ A
 A
 A
HA
 A
 A
 A
 A
' A
 A
 A
H
 
 
 
 
 
 
 
0
 
 
 
 
 
 
 
0
 
 
 
 
 
 
 
0
 
 
 
 
 
 
 
 
 
r0   