
    i-p                       d dl mZ d dl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(m)Z) ddl*m+Z+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddgZ3 G d de          Z4 G d de          Z5 G d d          Z6 G d d          Z7 G d d          Z8 G d d          Z9dS )    )annotations)DictListOptional)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)user_profile_list_paramsuser_profile_create_paramsuser_profile_update_params)AsyncPaginatormake_request_options)AnthropicBetaParam)BetaUserProfile)BetaUserProfileEnrollmentURLUserProfilesAsyncUserProfilesc            	          e Zd Zed(d            Zed)d            Zee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eeedddedd-d%Zedddedd.d'ZdS )/r&   returnUserProfilesWithRawResponsec                     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    p/home/agentuser/.hermes/hermes-agent/venv/lib/python3.11/site-packages/anthropic/resources/beta/user_profiles.pywith_raw_responsezUserProfiles.with_raw_response   s     +4000    !UserProfilesWithStreamingResponsec                     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
        )r2   r-   s    r/   with_streaming_responsez$UserProfiles.with_streaming_response&   s     1666r1   Nexternal_idmetadatabetasextra_headersextra_query
extra_bodytimeoutr7   Optional[str] | Omitr8   Dict[str, str] | Omitr9   List[AnthropicBetaParam] | Omitr:   Headers | Noner;   Query | Noner<   Body | Noner=   'float | httpx.Timeout | None | NotGivenr$   c          
     X   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          ||dt          j                  t          ||||          t                    S )	  
        Create User Profile

        Args:
          external_id: Platform's own identifier for this user. Not enforced unique. Maximum 255
              characters.

          metadata: Free-form key-value data to attach to this user profile. Maximum 16 keys, with
              keys up to 64 characters and values up to 512 characters. Values must be
              non-empty strings.

          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
        anthropic-beta,c              3  4   K   | ]}t          |          V  d S Nstr.0es     r/   	<genexpr>z&UserProfiles.create.<locals>.<genexpr>T   (      5L5Lc!ff5L5L5L5L5L5Lr1   user-profiles-2026-03-24/v1/user_profiles?beta=truer7   r8   r:   r;   r<   r=   bodyoptionscast_to)r   r   joinr   r   _postr   r   UserProfileCreateParamsr"   r$   r.   r7   r8   r9   r:   r;   r<   r=   s           r/   createzUserProfiles.create/   s    D	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_zz) #. (  +B  )+Q[el   $  
 
 	
r1   r9   r:   r;   r<   r=   user_profile_idrL   c          
     f   |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 User Profile

        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
        >Expected a non-empty value for `user_profile_id` but received rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z(UserProfiles.retrieve.<locals>.<genexpr>   rQ   r1   rR   -/v1/user_profiles/{user_profile_id}?beta=truer`   rU   rX   rY   

ValueErrorr   r   rZ   r   r   _getr   r"   r$   r.   r`   r9   r:   r;   r<   r=   s          r/   retrievezUserProfiles.retrievek   s    4  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_yyI[jkkk(+Q[el   $  
 
 	
r1   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 )a  
        Update User Profile

        Args:
          external_id: If present, replaces the stored external_id. Omit to leave unchanged. Maximum
              255 characters.

          metadata: Key-value pairs to merge into the stored metadata. Keys provided overwrite
              existing values. To remove a key, set its value to an empty string. Keys not
              provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and
              values up to 512 characters.

          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
        rc   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z&UserProfiles.update.<locals>.<genexpr>   rQ   r1   rR   re   rf   rT   rU   rV   )ri   r   r   rZ   r   r   r[   r   r   r    UserProfileUpdateParamsr"   r$   	r.   r`   r7   r8   r9   r:   r;   r<   r=   s	            r/   updatezUserProfiles.update   s#   H  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_zzI[jkkk #. (  +B  )+Q[el   $  
 
 	
r1   limitorderpager9   r:   r;   r<   r=   rt   
int | Omitru   Literal['asc', 'desc'] | Omitrv   
str | OmitSyncPageCursor[BetaUserProfile]c               |   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          t                   t          ||||t          |||dt          j                            t                    S )	  
        List User Profiles

        Args:
          limit: Query parameter for limit

          order: Query parameter for order

          page: Query parameter for page

          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
        rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z$UserProfiles.list.<locals>.<genexpr>   rQ   r1   rR   rS   rt   ru   rv   r:   r;   r<   r=   queryrv   rX   model)r   r   rZ   r   r   _get_api_listr   r$   r"   r   r   UserProfileListParams	r.   rt   ru   rv   r9   r:   r;   r<   r=   s	            r/   listzUserProfiles.list   s    D	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_!!)0(+'%%!&!& $ 
 -B    "# " 
 
 	
r1   r%   c          
     f   |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 )
  
        Create Enrollment URL

        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
        rc   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z5UserProfiles.create_enrollment_url.<locals>.<genexpr>:  rQ   r1   rR   </v1/user_profiles/{user_profile_id}/enrollment_url?beta=truerf   rU   rg   
ri   r   r   rZ   r   r   r[   r   r"   r%   rk   s          r/   create_enrollment_urlz"UserProfiles.create_enrollment_url  s   4  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_zzN`o   )+Q[el   1  
 
 	
r1   )r)   r*   )r)   r2   r7   r>   r8   r?   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   r$   r`   rL   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   r$   r`   rL   r7   r>   r8   r?   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   r$   )rt   rw   ru   rx   rv   ry   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   rz   r`   rL   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   r%   __name__
__module____qualname__r   r0   r5   r   r   r^   rl   rr   r   r    r1   r/   r&   r&      s`       1 1 1 _1 7 7 7 _7 -1*.15 )-$("&;D:
 :
 :
 :
 :
 :
@ 26 )-$("&;D-
 -
 -
 -
 -
 -
f -1*.15 )-$("&;D>
 >
 >
 >
 >
 >
F !/315 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
J 26 )-$("&;D/
 /
 /
 /
 /
 /
 /
 /
r1   c            	          e Zd Zed(d            Zed)d            Zee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eeedddedd-d%Zedddedd.d'ZdS )/r'   r)    AsyncUserProfilesWithRawResponsec                     t          |           S r,   )r   r-   s    r/   r0   z#AsyncUserProfiles.with_raw_responseN  s     0555r1   &AsyncUserProfilesWithStreamingResponsec                     t          |           S r4   )r   r-   s    r/   r5   z)AsyncUserProfiles.with_streaming_responseX  s     6d;;;r1   Nr6   r7   r>   r8   r?   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r$   c          
     t  K   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          ||dt          j                   d{V t          ||||          t          	           d{V S )
rF   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z+AsyncUserProfiles.create.<locals>.<genexpr>  rQ   r1   rR   rS   rT   NrU   rV   )r   r   rZ   r   r   r[   r   r   r\   r"   r$   r]   s           r/   r^   zAsyncUserProfiles.createa  s1     D	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_ZZ),#. (  +B        )+Q[el   $   
 
 
 
 
 
 
 
 	
r1   r_   r`   rL   c          
     v  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          ||||          t          	           d
{V S )rb   rc   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z-AsyncUserProfiles.retrieve.<locals>.<genexpr>  rQ   r1   rR   re   rf   rU   rg   Nrh   rk   s          r/   rl   zAsyncUserProfiles.retrieve  s     4  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_YYI[jkkk(+Q[el   $  
 
 
 
 
 
 
 
 	
r1   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 )rn   rc   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z+AsyncUserProfiles.update.<locals>.<genexpr>  rQ   r1   rR   re   rf   rT   NrU   rV   )ri   r   r   rZ   r   r   r[   r   r   r    rp   r"   r$   rq   s	            r/   rr   zAsyncUserProfiles.update  sc     H  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_ZZI[jkkk,#. (  +B        )+Q[el   $   
 
 
 
 
 
 
 
 	
r1   rs   rt   rw   ru   rx   rv   ry   AAsyncPaginator[BetaUserProfile, AsyncPageCursor[BetaUserProfile]]c               |   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          t                   t          ||||t          |||dt          j                            t                    S )	r|   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z)AsyncUserProfiles.list.<locals>.<genexpr>1  rQ   r1   rR   rS   r~   r   r   )r   r   rZ   r   r   r   r   r$   r"   r   r   r   r   s	            r/   r   zAsyncUserProfiles.list  s    D	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_!!) 1(+'%%!&!& $ 
 -B    "# " 
 
 	
r1   r%   c          
     v  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          ||||          t          	           d
{V S )r   rc   rG   rH   c              3  4   K   | ]}t          |          V  d S rJ   rK   rM   s     r/   rP   z:AsyncUserProfiles.create_enrollment_url.<locals>.<genexpr>l  rQ   r1   rR   r   rf   rU   rg   Nr   rk   s          r/   r   z'AsyncUserProfiles.create_enrollment_urlM  s%     4  	sq^mqqrrr	
$'#chhu5L5Le5L5L5LOiNj/k/k&l&l&l" 	
 "	
 *+E_-J][]_ZZN`o   )+Q[el   1   
 
 
 
 
 
 
 
 	
r1   )r)   r   )r)   r   r   r   r   )rt   rw   ru   rx   rv   ry   r9   r@   r:   rA   r;   rB   r<   rC   r=   rD   r)   r   r   r   r   r1   r/   r'   r'   M  s`       6 6 6 _6 < < < _< -1*.15 )-$("&;D:
 :
 :
 :
 :
 :
@ 26 )-$("&;D-
 -
 -
 -
 -
 -
f -1*.15 )-$("&;D>
 >
 >
 >
 >
 >
F !/315 )-$("&;D?
 ?
 ?
 ?
 ?
 ?
J 26 )-$("&;D/
 /
 /
 /
 /
 /
 /
 /
r1   c                      e Zd ZddZdS )r*   user_profilesr&   r)   Nonec                @   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S rJ   )_user_profilesr
   to_raw_response_wrapperr^   rl   rr   r   r   r.   r   s     r/   __init__z$UserProfilesWithRawResponse.__init__  s    +&> 
 
 )@"
 
 '> 
 
 %<
 
	 &6%M/&
 &
"""r1   Nr   r&   r)   r   r   r   r   r   r   r1   r/   r*   r*     (        
 
 
 
 
 
r1   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 rJ   )r   r
   async_to_raw_response_wrapperr^   rl   rr   r   r   r   s     r/   r   z)AsyncUserProfilesWithRawResponse.__init__  s    +&D 
 
 )F"
 
 'D 
 
 %B
 
	 &6%S/&
 &
"""r1   Nr   r'   r)   r   r   r   r1   r/   r   r     r   r1   r   c                      e Zd ZddZdS )r2   r   r&   r)   r   c                   || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S rJ   )r   r   r^   rl   rr   r   r   r   s     r/   r   z*UserProfilesWithStreamingResponse.__init__  s    +2 
 
 5"
 
 3 
 
 1
 
	 &B/&
 &
"""r1   Nr   r   r   r1   r/   r2   r2     r   r1   r2   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 rJ   )r   r   r^   rl   rr   r   r   r   s     r/   r   z/AsyncUserProfilesWithStreamingResponse.__init__  s    +8 
 
 ;"
 
 9 
 
 7
 
	 &H/&
 &
"""r1   Nr   r   r   r1   r/   r   r     r   r1   r   ):
__future__r   typingr   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   
types.betar   r   r    _base_clientr!   r"   types.anthropic_beta_paramr#   types.beta.beta_user_profiler$   +types.beta.beta_user_profile_enrollment_urlr%   __all__r&   r'   r*   r   r2   r   r   r1   r/   <module>r      s   # " " " " " ' ' ' ' ' ' ' ' ' '       % % % % % %              K K K K K K K K K K K K K K K K K K f f f f f f f f f f f f f f & & & & & & : : : : : : : : Y Y Y Y Y Y Y Y 9 9 9 9 9 9 9 9 j j j j j j j j j j @ @ @ @ @ @ @ @ < < < < < < ; ; ; ; ; ; W W W W W W.
/o
 o
 o
 o
 o
? o
 o
 o
d	o
 o
 o
 o
 o
( o
 o
 o
d	
 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
*
 
 
 
 
 
 
 
 
 
r1   