
    _j                       S SK Jr  S SKJrJrJr  S SKJr  S SKrSSK	J
r
  SSKJrJrJrJrJrJrJr  SSKJrJrJrJrJr  SS	KJr  SS
KJrJr  SSKJrJ r   SSK!J"r"J#r#  SSK$J%r%J&r&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-  SSK.J/r/  SSK0J%r%  SSK1J2r2  SS/r3 " S S\5      r4 " S S\5      r5 " S S5      r6 " S S5      r7 " S S5      r8 " S S5      r9g)    )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)BetaCloudConfigParamsenvironment_list_paramsenvironment_create_paramsenvironment_update_params)AsyncPaginatormake_request_options)AnthropicBetaParam)BetaEnvironment)r   )BetaEnvironmentDeleteResponseEnvironmentsAsyncEnvironmentsc            
         \ rS rSr\SS j5       r\SS j5       r\\\\SSS\S.                   SS jjr	\SSS\S.             SS jjr
\\\\\SSS\S	.	                     SS
 jjr\\\\SSS\S.                 SS jjr\SSS\S.             SS jjr\SSS\S.             SS jjrSrg)r&       c                    [        U 5      $ z
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
)EnvironmentsWithRawResponseselfs    Z/home/rurouni/.local/lib/python3.13/site-packages/anthropic/resources/beta/environments.pywith_raw_responseEnvironments.with_raw_response!   s     +400    c                    [        U 5      $ 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
)!EnvironmentsWithStreamingResponser-   s    r/   with_streaming_response$Environments.with_streaming_response+   s     166r2   Nconfigdescriptionmetadatabetasextra_headersextra_query
extra_bodytimeoutc       	        8   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        UUUUS.[        R                  5      [        XgXS9[        S9$ )	  
Create a new environment with the specified configuration.

Args:
  name: Human-readable name for the environment

  config: Request params for `cloud` environment configuration.

      Fields default to null; on update, omitted fields preserve the existing value.

  description: Optional description of the environment

  metadata: User-provided metadata key-value pairs

  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  8   #    U  H  n[        U5      v   M     g 7fNstr.0es     r/   	<genexpr>&Environments.create.<locals>.<genexpr>^        5Lec!ffe   managed-agents-2026-04-01/v1/environments?beta=truenamer9   r:   r;   r=   r>   r?   r@   bodyoptionscast_to)r   r   joinr   r   _postr   r   EnvironmentCreateParamsr"   r$   
r.   rS   r9   r:   r;   r<   r=   r>   r?   r@   s
             r/   createEnvironments.create4   s    N	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zz(  $#. (	 *AA )+Q[ $  
 	
r2   r<   r=   r>   r?   r@   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
l  
Retrieve a specific environment by ID.

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 `environment_id` but received rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   (Environments.retrieve.<locals>.<genexpr>   rN   rO   rP   +/v1/environments/{environment_id}?beta=trueenvironment_idrT   rW   rX   

ValueErrorr   r   rY   r   r   _getr   r"   r$   r.   rg   r<   r=   r>   r?   r@   s          r/   retrieveEnvironments.retrievew   s    4 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`yyGXfg(+Q[ $  
 	
r2   	r9   r:   r;   rS   r<   r=   r>   r?   r@   c       	        t   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUUS.[        R                  5      [        XxXS	9[        S
9$ )  
Update an existing environment's configuration.

Args:
  config: Request params for `cloud` environment configuration.

      Fields default to null; on update, omitted fields preserve the existing value.

  description: Updated description of the environment

  metadata: User-provided metadata key-value pairs. Set a value to null or empty string to
      delete the key.

  name: Updated name for the environment

  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
rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   &Environments.update.<locals>.<genexpr>   rN   rO   rP   re   rf   r9   r:   r;   rS   rT   rU   )rj   r   r   rY   r   r   rZ   r   r   r    EnvironmentUpdateParamsr"   r$   r.   rg   r9   r:   r;   rS   r<   r=   r>   r?   r@   s              r/   updateEnvironments.update   s    R \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzGXfg $#. ( 	 *AA )+Q[ $  
 	
r2   include_archivedlimitpager<   r=   r>   r?   r@   c               R   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        [           [        UUUU[        UUUS.[        R                  5      S9[        S9$ )	a  
List environments with pagination support.

Args:
  include_archived: Include archived environments in the response

  limit: Maximum number of environments to return

  page: Opaque cursor from previous response for pagination. Pass the `next_page` value
      from the previous 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
rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   $Environments.list.<locals>.<genexpr>  rN   rO   rP   rQ   rz   r{   r|   r=   r>   r?   r@   queryr|   rW   model)r   r   rY   r   r   _get_api_listr   r$   r"   r   r   EnvironmentListParams	r.   rz   r{   r|   r<   r=   r>   r?   r@   s	            r/   listEnvironments.list   s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!(0(+'%%,<!& $
 ,AA "# " 
 	
r2   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
  Delete an environment by ID.

Returns a confirmation of the deletion.

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
rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   &Environments.delete.<locals>.<genexpr>O  rN   rO   rP   re   rf   rT   rh   
rj   r   r   rY   r   r   _deleter   r"   r%   rl   s          r/   deleteEnvironments.delete/  s    6 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`||GXfg(+Q[ 2  
 	
r2   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
  Archive an environment by ID.

Archived environments cannot be used to create new
sessions.

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
rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   'Environments.archive.<locals>.<genexpr>  rN   rO   rP   3/v1/environments/{environment_id}/archive?beta=truerf   rT   rh   
rj   r   r   rY   r   r   rZ   r   r"   r$   rl   s          r/   archiveEnvironments.archive_  s    8 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzO`no(+Q[ $  
 	
r2    )returnr,   )r   r5   rS   rH   r9   &Optional[BetaCloudConfigParams] | Omitr:   Optional[str] | Omitr;   zDict[str, str] | Omitr<   List[AnthropicBetaParam] | Omitr=   Headers | Noner>   Query | Noner?   Body | Noner@   'float | httpx.Timeout | None | NotGivenr   r$   rg   rH   r<   r   r=   r   r>   r   r?   r   r@   r   r   r$   rg   rH   r9   r   r:   r   r;   zDict[str, Optional[str]] | OmitrS   r   r<   r   r=   r   r>   r   r?   r   r@   r   r   r$   )rz   bool | Omitr{   
int | Omitr|   r   r<   r   r=   r   r>   r   r?   r   r@   r   r   zSyncPageCursor[BetaEnvironment]rg   rH   r<   r   r=   r   r>   r   r?   r   r@   r   r   r%   __name__
__module____qualname____firstlineno__r   r0   r6   r   r   r]   rm   rw   r   r   r   __static_attributes__r   r2   r/   r&   r&       s   1 1 7 7 :>,0*.15 )-$("&;DA
 A
 7	A

 *A
 (A
 /A
 &A
 "A
  A
 9A
 
A
N 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
-
f :>,048%)15 )-$("&;DE
E
 7	E

 *E
 2E
 #E
 /E
 &E
 "E
  E
 9E
 
E
T )- %)15 )-$("&;D@
 &@
 	@

 #@
 /@
 &@
 "@
  @
 9@
 
)@
L 26 )-$("&;D.
.
 /	.
 &.
 ".
  .
 9.
 
'.
h 26 )-$("&;D/
/
 /	/
 &/
 "/
  /
 9/
 
/
 /
r2   c            
         \ rS rSr\SS j5       r\SS j5       r\\\\SSS\S.                   SS jjr	\SSS\S.             SS jjr
\\\\\SSS\S	.	                     SS
 jjr\\\\SSS\S.                 SS jjr\SSS\S.             SS jjr\SSS\S.             SS jjrSrg)r'   i  c                    [        U 5      $ r+   ) AsyncEnvironmentsWithRawResponser-   s    r/   r0   #AsyncEnvironments.with_raw_response  s     055r2   c                    [        U 5      $ r4   )&AsyncEnvironmentsWithStreamingResponser-   s    r/   r6   )AsyncEnvironments.with_streaming_response  s     6d;;r2   Nr8   c       	        h  #    0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        UUUUS.[        R                  5      I Sh  vN [        XgXS9[        S	9I Sh  vN $  N N7f)
rB   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   +AsyncEnvironments.create.<locals>.<genexpr>  rN   rO   rP   rQ   rR   NrT   rU   )r   r   rY   r   r   rZ   r   r   r[   r"   r$   r\   s
             r/   r]   AsyncEnvironments.create  s     N	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZ(, $#. (	 *AA  )+Q[ $   
 
 	

s$   BB2B.
B2)B0*B20B2r_   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)ra   rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   -AsyncEnvironments.retrieve.<locals>.<genexpr>  rN   rO   rP   re   rf   rT   rh   Nri   rl   s          r/   rm   AsyncEnvironments.retrieve  s     4 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`YYGXfg(+Q[ $  
 
 	
 
   BB(!B&"B(ro   c       	          #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUUS.[        R                  5      I S	h  vN [        XxXS
9[        S9I S	h  vN $  N N7f)rq   rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   +AsyncEnvironments.update.<locals>.<genexpr>E  rN   rO   rP   re   rf   rt   NrT   rU   )rj   r   r   rY   r   r   rZ   r   r   r    ru   r"   r$   rv   s              r/   rw   AsyncEnvironments.update  s     R \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZGXfg,$#. ( 	 *AA  )+Q[ $   
 
 	

s$   B-C/C
0CCCCry   c               R   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        [           [        UUUU[        UUUS.[        R                  5      S9[        S9$ )	r~   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   )AsyncEnvironments.list.<locals>.<genexpr>  rN   rO   rP   rQ   r   r   r   )r   r   rY   r   r   r   r   r$   r"   r   r   r   r   s	            r/   r   AsyncEnvironments.list^  s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!( 1(+'%%,<!& $
 ,AA "# " 
 	
r2   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)r   rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   +AsyncEnvironments.delete.<locals>.<genexpr>  rN   rO   rP   re   rf   rT   rh   Nr   rl   s          r/   r   AsyncEnvironments.delete  s     6 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`\\GXfg(+Q[ 2 " 
 
 	
 
r   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)r   rb   rC   rD   c              3  8   #    U  H  n[        U5      v   M     g 7frF   rG   rI   s     r/   rL   ,AsyncEnvironments.archive.<locals>.<genexpr>  rN   rO   rP   r   rf   rT   rh   Nr   rl   s          r/   r   AsyncEnvironments.archive  s     8 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZO`no(+Q[ $   
 
 	
 
r   r   )r   r   )r   r   r   r   r   )rz   r   r{   r   r|   r   r<   r   r=   r   r>   r   r?   r   r@   r   r   zAAsyncPaginator[BetaEnvironment, AsyncPageCursor[BetaEnvironment]]r   r   r   r2   r/   r'   r'     s   6 6 < < :>,0*.15 )-$("&;DA
 A
 7	A

 *A
 (A
 /A
 &A
 "A
  A
 9A
 
A
N 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
-
f :>,048%)15 )-$("&;DE
E
 7	E

 *E
 2E
 #E
 /E
 &E
 "E
  E
 9E
 
E
T )- %)15 )-$("&;D@
 &@
 	@

 #@
 /@
 &@
 "@
  @
 9@
 
K@
L 26 )-$("&;D.
.
 /	.
 &.
 ".
  .
 9.
 
'.
h 26 )-$("&;D/
/
 /	/
 &/
 "/
  /
 9/
 
/
 /
r2   c                      \ rS rSrSS jrSrg)r,   i  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g rF   )	_environmentsr	   to_raw_response_wrapperr]   rm   rw   r   r   r   r.   environmentss     r/   __init__$EnvironmentsWithRawResponse.__init__  s    )&>>
 )@@!!
 '>>
 %<<
	 '>>
 (??  
r2   r   r   r]   r   r   rm   rw   Nr   r&   r   Noner   r   r   r   r   r   r   r2   r/   r,   r,         
r2   r,   c                      \ rS rSrSS jrSrg)r   i  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g rF   )	r   r	   async_to_raw_response_wrapperr]   rm   rw   r   r   r   r   s     r/   r   )AsyncEnvironmentsWithRawResponse.__init__  s    )&DD
 )FF!!
 'DD
 %BB
	 'DD
 (EE  
r2   r   Nr   r'   r   r   r   r   r2   r/   r   r     r   r2   r   c                      \ rS rSrSS jrSrg)r5   i2  c                H   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g rF   )r   r   r]   rm   rw   r   r   r   r   s     r/   r   *EnvironmentsWithStreamingResponse.__init__3  s    )2
 5!!
 3
 1
	 3
 4  
r2   r   Nr   r   r   r2   r/   r5   r5   2  r   r2   r5   c                      \ rS rSrSS jrSrg)r   iJ  c                H   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g rF   )r   r   r]   rm   rw   r   r   r   r   s     r/   r   /AsyncEnvironmentsWithStreamingResponse.__init__K  s    )8
 ;!!
 9
 7
	 9
 :  
r2   r   Nr   r   r   r2   r/   r   r   J  r   r2   r   ):
__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   
types.betar   r   r   r    _base_clientr!   r"   types.anthropic_beta_paramr#   types.beta.beta_environmentr$   #types.beta.beta_cloud_config_params+types.beta.beta_environment_delete_responser%   __all__r&   r'   r,   r   r5   r   r   r2   r/   <module>r      s    # ' '     K K K f f & : Y 9  A < : H X.
/n
? n
bn
( n
b
 
0
 
0
 
0
 
r2   