
    Áj                    (   d dl 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
 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 ddlmZ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'm(Z(m)Z)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z9m:Z:m;Z; ddl<m=Z=m>Z> d	dl?m@Z@mAZAmBZBmCZCmDZDmEZE ddlFmGZG ddlHmIZI ddlJmKZK ddlLmMZM ddlNmOZO ddgZP G d de0      ZQ G d de1      ZR G d d      ZS G d  d!      ZT G d" d#      ZU G d$ d%      ZVy)&    )annotations)DictListUnionIterableOptional)datetime)chain)LiteralN   )_legacy_response   )EventsAsyncEventsEventsWithRawResponseAsyncEventsWithRawResponseEventsWithStreamingResponse AsyncEventsWithStreamingResponse)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)is_givenpath_templatemaybe_transformstrip_not_givenasync_maybe_transform)	ResourcesAsyncResourcesResourcesWithRawResponseAsyncResourcesWithRawResponseResourcesWithStreamingResponse#AsyncResourcesWithStreamingResponse)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncBidirectionalPageCursorAsyncBidirectionalPageCursor)session_list_paramssession_create_paramssession_update_params)AsyncPaginatormake_request_options)ThreadsAsyncThreadsThreadsWithRawResponseAsyncThreadsWithRawResponseThreadsWithStreamingResponse!AsyncThreadsWithStreamingResponse)AnthropicBetaParam)BetaManagedAgentsSession)BetaManagedAgentsDeletedSession)!BetaManagedAgentsBudgetLimitParam)(BetaManagedAgentsSessionAgentUpdateParamSessionsAsyncSessionsc                     e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Ze	e	e	e	e	e	e	ddde
d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 dd
Ze	e	e	e	e	e	ddde
d
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)r?   c                ,    t        | j                        S N)r   _clientselfs    Q/tmp/pip-target-k_scjv0h/lib/python/anthropic/resources/beta/sessions/sessions.pyeventszSessions.events;   s    dll##    c                ,    t        | j                        S rC   )r"   rD   rE   s    rG   	resourceszSessions.resources?   s    &&rI   c                ,    t        | j                        S rC   )r4   rD   rE   s    rG   threadszSessions.threadsC   s    t||$$rI   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
        )SessionsWithRawResponserE   s    rG   with_raw_responsezSessions.with_raw_responseG   s     't,,rI   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
        )SessionsWithStreamingResponserE   s    rG   with_streaming_responsez Sessions.with_streaming_responseQ   s     -T22rI   Nbudgetinitial_eventsmetadatarK   title	vault_idsbetasextra_headersextra_query
extra_bodytimeoutc               2   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                  dt        ||||||||dt        j                        t        |
|||      t              S )	  Create Session

        Args:
          agent: Agent identifier.

        Accepts the `agent` ID string, which pins the latest version
              for the session, or an `agent` object with both id and version specified.

          environment_id: ID of the `environment` defining the container configuration for this session.

          budget: A hard spend ceiling. The session stops issuing new model requests once the
              tracked list cost reaches `max_list_cost`.

          initial_events: Initial events to send to the `session` at creation, processed in order.
              Supports `user.message` and `user.define_outcome` events. Maximum 50 events.

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

          resources: Resources (e.g. repositories, files) to mount into the session's container.

          title: Human-readable session title.

          vault_ids: Vault IDs for stored credentials the agent can use during the session.

          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  2   K   | ]  }t        |        y wrC   str.0es     rG   	<genexpr>z"Sessions.create.<locals>.<genexpr>        5Lc!f5L   managed-agents-2026-04-01/v1/sessions?beta=trueagentenvironment_idrW   rX   rY   rK   rZ   r[   r]   r^   r_   r`   bodyoptionscast_to)r    r   joinr
   r   _postr   r0   SessionCreateParamsr3   r;   rF   rq   rr   rW   rX   rY   rK   rZ   r[   r\   r]   r^   r_   r`   s                 rG   createzSessions.createZ   s    l	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zz$ "&4$&4 (!*"!*	 &99 )+Q[el -%  
 	
rI   r\   r]   r^   r_   r`   c          
     $   |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        	      S )
  
        Get Session

        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 rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z$Sessions.retrieve.<locals>.<genexpr>   rl   rm   rn   #/v1/sessions/{session_id}?beta=true
session_idrs   rv   rw   

ValueErrorr    r   rx   r
   r   _getr   r3   r;   rF   r   r\   r]   r^   r_   r`   s          rG   retrievezSessions.retrieve   s    4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`yy?JW(+Q[el -  
 	
rI   
rq   rW   rY   rZ   r[   r\   r]   r^   r_   r`   c       
        b   |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        |||||dt        j                        t        ||	|
|	      t        
      S )  Update Session

        Args:
          agent: Mid-session agent configuration update.

        Only `tools` and `mcp_servers` are
              updatable. Full replacement: the provided array becomes the new value. To
              preserve existing entries, GET the session, modify the array, and POST it back.

          budget: A hard spend ceiling. The session stops issuing new model requests once the
              tracked list cost reaches `max_list_cost`.

          metadata: Metadata patch. Set a key to a string to upsert it, or to null to delete it.
              Omit the field to preserve.

          title: Human-readable session title.

          vault_ids: Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests
              setting this field are rejected. Reserved for future use.

          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
        r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z"Sessions.update.<locals>.<genexpr>  rl   rm   rn   r   r   rq   rW   rY   rZ   r[   rs   rt   )r   r    r   rx   r
   r   ry   r   r   r1   SessionUpdateParamsr3   r;   rF   r   rq   rW   rY   rZ   r[   r\   r]   r^   r_   r`   s               rG   updatezSessions.update   s    ^ XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zz?JW "$ ("!* &99	 )+Q[el -  
 	
rI   agent_idagent_versioncreated_at_gtcreated_at_gtecreated_at_ltcreated_at_ltedeployment_idinclude_archivedlimitmemory_store_idorderpagestatusesr\   r]   r^   r_   r`   c               T   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                  dt        t           t        ||||t        |||||||||	|
|||dt        j                              t              S )	  
        List Sessions

        Args:
          agent_id: Filter sessions created with this agent ID.

          agent_version: Filter by agent version. Only applies when agent_id is also set.

          created_at_gt: Return sessions created after this time (exclusive).

          created_at_gte: Return sessions created at or after this time (inclusive).

          created_at_lt: Return sessions created before this time (exclusive).

          created_at_lte: Return sessions created at or before this time (inclusive).

          deployment_id: Filter sessions created by this deployment ID.

          include_archived: When true, includes archived sessions. Default: false (exclude archived).

          limit: Maximum number of results to return.

          memory_store_id: Filter sessions whose resources contain a memory_store with this memory store
              ID.

          order: Sort direction for results, ordered by created_at. Defaults to desc (newest
              first).

          page: Opaque pagination cursor from a previous response.

          statuses: Filter by session status. Repeat the parameter to match any of multiple
              statuses.

          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   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z Sessions.list.<locals>.<genexpr>s  rl   rm   rn   ro   r   r   r   r   r   r   r   r   r   r   r   r   r   r]   r^   r_   r`   queryr   rv   model)r    r   rx   r
   r   _get_api_listr-   r;   r3   r   r/   SessionListParamsrF   r   r   r   r   r   r   r   r   r   r   r   r   r   r\   r]   r^   r_   r`   s                      rG   listzSessions.list-  s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!$,-EF(+'%%$,)6)6*8)6*8)6,<!&+:!& $$, (99!0 +7 " 
 	
rI   c          
     $   |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        	      S )
  
        Delete Session

        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
        r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z"Sessions.delete.<locals>.<genexpr>  rl   rm   rn   r   r   rs   r   
r   r    r   rx   r
   r   _deleter   r3   r<   r   s          rG   deletezSessions.delete  s    4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`||?JW(+Q[el 4  
 	
rI   c          
     $   |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        	      S )
  
        Archive Session

        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
        r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z#Sessions.archive.<locals>.<genexpr>  rl   rm   rn   +/v1/sessions/{session_id}/archive?beta=truer   rs   r   
r   r    r   rx   r
   r   ry   r   r3   r;   r   s          rG   archivezSessions.archive  s    4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzGT^_(+Q[el -  
 	
rI   )returnr   )r   r"   )r   r4   )r   rP   )r   rT   rq   zsession_create_params.Agentrr   rg   rW   z(BetaManagedAgentsBudgetLimitParam | OmitrX   z3Iterable[session_create_params.InitialEvent] | OmitrY   zDict[str, str] | OmitrK   z/Iterable[session_create_params.Resource] | OmitrZ   Optional[str] | Omitr[   SequenceNotStr[str] | Omitr\   List[AnthropicBetaParam] | Omitr]   Headers | Noner^   Query | Noner_   Body | Noner`   'float | httpx.Timeout | None | NotGivenr   r;   r   rg   r\   r   r]   r   r^   r   r_   r   r`   r   r   r;   r   rg   rq   z/BetaManagedAgentsSessionAgentUpdateParam | OmitrW   z2Optional[BetaManagedAgentsBudgetLimitParam] | OmitrY   z)Optional[Dict[str, Optional[str]]] | OmitrZ   r   r[   r   r\   r   r]   r   r^   r   r_   r   r`   r   r   r;   )&r   
str | Omitr   
int | Omitr   Union[str, datetime] | Omitr   r   r   r   r   r   r   r   r   bool | Omitr   r   r   r   r   Literal['asc', 'desc'] | Omitr   r   r   EList[Literal['rescheduling', 'running', 'idle', 'terminated']] | Omitr\   r   r]   r   r^   r   r_   r   r`   r   r   z5SyncBidirectionalPageCursor[BetaManagedAgentsSession]r   rg   r\   r   r]   r   r^   r   r_   r   r`   r   r   r<   __name__
__module____qualname__r(   rH   rK   rM   rQ   rU   r   r   r|   r   r   r   r   r    rI   rG   r?   r?   :   s   $ $ ' ' % % - - 3 3 <@NR*.EI&*0415 )-$("&;D#T
 +T
 	T

 9T
 LT
 (T
 CT
 $T
 .T
 /T
 &T
 "T
   !T
" 9#T
$ 
"%T
t 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
"-
f BFEI>B&*0415 )-$("&;DL
L
 ?	L

 CL
 <L
 $L
 .L
 /L
 &L
 "L
  L
 9L
  
"!L
b  $$(596:596:$((, &*/3Z^15 )-$("&;D-j
 j
 "	j

 3j
 4j
 3j
 4j
 "j
 &j
 j
 $j
 -j
 j
 Xj
  /!j
& &'j
( ")j
*  +j
, 9-j
. 
?/j
` 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
)-
f 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
"-
rI   c                     e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Ze	e	e	e	e	e	e	ddde
d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 dd
Ze	e	e	e	e	e	ddde
d
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	ddde
d		 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)r@   c                ,    t        | j                        S rC   )r   rD   rE   s    rG   rH   zAsyncSessions.events  s    4<<((rI   c                ,    t        | j                        S rC   )r#   rD   rE   s    rG   rK   zAsyncSessions.resources  s    dll++rI   c                ,    t        | j                        S rC   )r5   rD   rE   s    rG   rM   zAsyncSessions.threads  s    DLL))rI   c                    t        |       S rO   )AsyncSessionsWithRawResponserE   s    rG   rQ   zAsyncSessions.with_raw_response  s     ,D11rI   c                    t        |       S rS   )"AsyncSessionsWithStreamingResponserE   s    rG   rU   z%AsyncSessions.with_streaming_response  s     2$77rI   NrV   c               b  K   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                  dt        ||||||||dt        j                         d{   t        |
|||      t        	       d{   S 7 $7 w)
rb   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z'AsyncSessions.create.<locals>.<genexpr>Q  rl   rm   rn   ro   rp   Nrs   rt   )r    r   rx   r
   r   ry   r!   r0   rz   r3   r;   r{   s                 rG   r|   zAsyncSessions.create  s     l	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZ$,"&4$&4 (!*"!*	 &99  )+Q[el -%   
 
 	

s$   BB/B+
B/&B-'B/-B/r}   c          
     @  K   |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        	       d
{   S 7 w)r   r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z)AsyncSessions.retrieve.<locals>.<genexpr>  rl   rm   rn   r   r   rs   r   Nr   r   s          rG   r   zAsyncSessions.retrieven  s     4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`YY?JW(+Q[el -  
 
 	
 
   BBBBr   c       
          K   |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        |||||dt        j                         d	{   t        ||	|
|
      t               d	{   S 7 $7 w)r   r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z'AsyncSessions.update.<locals>.<genexpr>  rl   rm   rn   r   r   r   Nrs   rt   )r   r    r   rx   r
   r   ry   r   r!   r1   r   r3   r;   r   s               rG   r   zAsyncSessions.update  s    ^ XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZ?JW,"$ ("!* &99	 	 )+Q[el -   
 
 	
	
s$   BCC
C>C?CCr   c               T   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                  dt        t           t        ||||t        |||||||||	|
|||dt        j                              t              S )	r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z%AsyncSessions.list.<locals>.<genexpr>1  rl   rm   rn   ro   r   r   r   )r    r   rx   r
   r   r   r.   r;   r3   r   r/   r   r   s                      rG   r   zAsyncSessions.list  s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!$-.FG(+'%%$,)6)6*8)6*8)6,<!&+:!& $$, (99!0 +7 " 
 	
rI   c          
     @  K   |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        	       d
{   S 7 w)r   r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z'AsyncSessions.delete.<locals>.<genexpr>v  rl   rm   rn   r   r   rs   r   Nr   r   s          rG   r   zAsyncSessions.deleteW  s     4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`\\?JW(+Q[el 4 " 
 
 	
 
r   c          
     @  K   |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        	       d
{   S 7 w)r   r   rc   rd   c              3  2   K   | ]  }t        |        y wrC   rf   rh   s     rG   rk   z(AsyncSessions.archive.<locals>.<genexpr>  rl   rm   rn   r   r   rs   r   Nr   r   s          rG   r   zAsyncSessions.archive  s     4 XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZGT^_(+Q[el -   
 
 	
 
r   )r   r   )r   r#   )r   r5   )r   r   )r   r   r   r   r   )&r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r\   r   r]   r   r^   r   r_   r   r`   r   r   z`AsyncPaginator[BetaManagedAgentsSession, AsyncBidirectionalPageCursor[BetaManagedAgentsSession]]r   r   r   rI   rG   r@   r@     s   ) ) , , * * 2 2 8 8 <@NR*.EI&*0415 )-$("&;D#T
 +T
 	T

 9T
 LT
 (T
 CT
 $T
 .T
 /T
 &T
 "T
   !T
" 9#T
$ 
"%T
t 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
"-
f BFEI>B&*0415 )-$("&;DL
L
 ?	L

 CL
 <L
 $L
 .L
 /L
 &L
 "L
  L
 9L
  
"!L
b  $$(596:596:$((, &*/3Z^15 )-$("&;D-j
 j
 "	j

 3j
 4j
 3j
 4j
 "j
 &j
 j
 $j
 -j
 j
 Xj
  /!j
& &'j
( ")j
*  +j
, 9-j
. 
j/j
` 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
)-
f 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
"-
rI   c                  J    e Zd ZddZedd       Zedd       Zed	d       Zy)
rP   c                   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        y rC   )		_sessionsr   to_raw_response_wrapperr|   r   r   r   r   r   rF   sessionss     rG   __init__z SessionsWithRawResponse.__init__  s    !&>>OO
 )@@
 '>>OO
 %<<MM
	 '>>OO
 (??
rI   c                @    t        | j                  j                        S rC   )r   r   rH   rE   s    rG   rH   zSessionsWithRawResponse.events  s    $T^^%:%:;;rI   c                @    t        | j                  j                        S rC   )r$   r   rK   rE   s    rG   rK   z!SessionsWithRawResponse.resources  s    '(@(@AArI   c                @    t        | j                  j                        S rC   )r6   r   rM   rE   s    rG   rM   zSessionsWithRawResponse.threads  s    %dnn&<&<==rI   Nr   r?   r   None)r   r   )r   r$   )r   r6   r   r   r   r   r(   rH   rK   rM   r   rI   rG   rP   rP     sE    
, < < B B > >rI   rP   c                  J    e Zd ZddZedd       Zedd       Zed	d       Zy)
r   c                   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        y rC   )	r   r   async_to_raw_response_wrapperr|   r   r   r   r   r   r   s     rG   r   z%AsyncSessionsWithRawResponse.__init__  s    !&DDOO
 )FF
 'DDOO
 %BBMM
	 'DDOO
 (EE
rI   c                @    t        | j                  j                        S rC   )r   r   rH   rE   s    rG   rH   z#AsyncSessionsWithRawResponse.events  s    )$..*?*?@@rI   c                @    t        | j                  j                        S rC   )r%   r   rK   rE   s    rG   rK   z&AsyncSessionsWithRawResponse.resources  s    ,T^^-E-EFFrI   c                @    t        | j                  j                        S rC   )r7   r   rM   rE   s    rG   rM   z$AsyncSessionsWithRawResponse.threads  s    *4>>+A+ABBrI   Nr   r@   r   r   )r   r   )r   r%   )r   r7   r   r   rI   rG   r   r     sI    
, A A G G C CrI   r   c                  J    e Zd ZddZedd       Zedd       Zed	d       Zy)
rT   c                J   || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        t        |j                        | _        t        |j                        | _        y rC   )r   r+   r|   r   r   r   r   r   r   s     rG   r   z&SessionsWithStreamingResponse.__init__  s    !2OO
 5
 3OO
 1MM
	 3OO
 4
rI   c                @    t        | j                  j                        S rC   )r   r   rH   rE   s    rG   rH   z$SessionsWithStreamingResponse.events  s    *4>>+@+@AArI   c                @    t        | j                  j                        S rC   )r&   r   rK   rE   s    rG   rK   z'SessionsWithStreamingResponse.resources  s    -dnn.F.FGGrI   c                @    t        | j                  j                        S rC   )r8   r   rM   rE   s    rG   rM   z%SessionsWithStreamingResponse.threads  s    +DNN,B,BCCrI   Nr   )r   r   )r   r&   )r   r8   r   r   rI   rG   rT   rT     sI    
, B B H H D DrI   rT   c                  J    e Zd ZddZedd       Zedd       Zed	d       Zy)
r   c                J   || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        t        |j                        | _        t        |j                        | _        y rC   )r   r,   r|   r   r   r   r   r   r   s     rG   r   z+AsyncSessionsWithStreamingResponse.__init__#  s    !8OO
 ;
 9OO
 7MM
	 9OO
 :
rI   c                @    t        | j                  j                        S rC   )r   r   rH   rE   s    rG   rH   z)AsyncSessionsWithStreamingResponse.events9  s    /0E0EFFrI   c                @    t        | j                  j                        S rC   )r'   r   rK   rE   s    rG   rK   z,AsyncSessionsWithStreamingResponse.resources=  s    24>>3K3KLLrI   c                @    t        | j                  j                        S rC   )r9   r   rM   rE   s    rG   rM   z*AsyncSessionsWithStreamingResponse.threadsA  s    01G1GHHrI   Nr   )r   r   )r   r'   )r   r9   r   r   rI   rG   r   r   "  sI    
, G G M M I IrI   r   )W
__future__r   typingr   r   r   r   r   r	   	itertoolsr
   typing_extensionsr   httpx r   rH   r   r   r   r   r   r   _typesr   r   r   r   r   r   r   r   _utilsr   r   r   r    r!   rK   r"   r#   r$   r%   r&   r'   _compatr(   	_resourcer)   r*   	_responser+   r,   
paginationr-   r.   
types.betar/   r0   r1   _base_clientr2   r3   threads.threadsr4   r5   r6   r7   r8   r9   types.anthropic_beta_paramr:   &types.beta.beta_managed_agents_sessionr;   .types.beta.beta_managed_agents_deleted_sessionr<   1types.beta.beta_managed_agents_budget_limit_paramr=   9types.beta.beta_managed_agents_session_agent_update_paramr>   __all__r?   r@   rP   r   rT   r   r   rI   rG   <module>r     s    # 8 8   %  !  ] \ \ g g  ( ; Z T 
 B  > O ^ c r
'{
 {
|{
$ {
|!> !>H!C !CH!D !DH!I !IrI   