
    b\jk                    t   S SK Jr  S SK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$  SSK%J&r&J'r'  SSK(J)r)  SSK*J+r+  SS/r, " S S\5      r- " S S\5      r. " S S5      r/ " S S5      r0 " S S5      r1 " S S5      r2g)    )annotations)List)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)certificate_list_paramscertificate_create_params)AnthropicBetaParam)BetaTunnelCertificateCertificatesAsyncCertificatesc            	      *   \ 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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
)CertificatesWithRawResponseselfs    c/var/www/website/venv/lib/python3.13/site-packages/anthropic/resources/beta/tunnels/certificates.pywith_raw_responseCertificates.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
)!CertificatesWithStreamingResponser(   s    r*   with_streaming_response$Certificates.with_streaming_response$   s     166r-   Nbetasextra_headersextra_query
extra_bodytimeoutc               n   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[        SU0[        R                  5      [        XEXgS	9[        S
9$ )  The Tunnels API is in research preview.

It requires the
`anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
deprecation period. It supersedes the Admin API endpoints at
`/v1/organizations/tunnels`, which remain available during a migration window.

Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's
server certificate against this CA when it terminates the inner TLS session. A
tunnel holds at most two non-archived certificates.

Args:
  ca_certificate_pem: PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no
      private-key material. Maximum 8KB.

  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
8Expected a non-empty value for `tunnel_id` but received anthropic-beta,c              3  8   #    U  H  n[        U5      v   M     g 7fNstr.0es     r*   	<genexpr>&Certificates.create.<locals>.<genexpr>X        5Lec!ffe   mcp-tunnels-2026-06-22./v1/tunnels/{tunnel_id}/certificates?beta=true	tunnel_idca_certificate_pemr5   r6   r7   r8   bodyoptionscast_to)
ValueErrorr   r   joinr   r   _postr   r   r   CertificateCreateParamsr   r    r)   rL   rM   r4   r5   r6   r7   r8   s           r*   createCertificates.create-   s    L WXaWdeff	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]zzJV_` %'9:<U<m<m )+Q[ *  	
 		
r-   c          
     f   U(       d  [        SU< 35      e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US9[        XEXgS	9[        S
9$ )w  The Tunnels API is in research preview.

It requires the
`anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
deprecation period. It supersedes the Admin API endpoints at
`/v1/organizations/tunnels`, which remain available during a migration window.

Fetches a tunnel certificate 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
r;   =Expected a non-empty value for `certificate_id` but received r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   (Certificates.retrieve.<locals>.<genexpr>   rG   rH   rI   ?/v1/tunnels/{tunnel_id}/certificates/{certificate_id}?beta=truerL   certificate_idrN   rQ   rR   
rS   r   r   rT   r   r   _getr   r   r    r)   ra   rL   r4   r5   r6   r7   r8   s           r*   retrieveCertificates.retrievek   s    B WXaWdeff\]k\nopp	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]yyQ#-
 )+Q[ *  

 
	
r-   include_archivedlimitpager4   r5   r6   r7   r8   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	[        UUUS.[        R                  5      S	9[        S
9$ )  The Tunnels API is in research preview.

It requires the
`anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
deprecation period. It supersedes the Admin API endpoints at
`/v1/organizations/tunnels`, which remain available during a migration window.

Lists the certificates registered on a tunnel. Archived certificates are
excluded unless include_archived is set.

Args:
  include_archived: Whether to include archived certificates in the results. Defaults to false.

  limit: Maximum number of certificates to return per page. Defaults to 20, maximum 1000.

  page: Opaque pagination cursor from a previous `list_tunnel_certificates` 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
r;   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   $Certificates.list.<locals>.<genexpr>   rG   rH   rI   rJ   rK   ri   rj   rk   r5   r6   r7   r8   queryrk   rQ   model)rS   r   r   rT   r   r   _get_api_listr   r   r    r   r   r   CertificateListParams
r)   rL   ri   rj   rk   r4   r5   r6   r7   r8   s
             r*   listCertificates.list   s    T WXaWdeff	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]!!JV_` 56(+'%%,<!& $
 ,AA (# " 
 	
r-   c          
     f   U(       d  [        SU< 35      e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US9[        XEXgS	9[        S
9$ )K  The Tunnels API is in research preview.

It requires the
`anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
deprecation period. It supersedes the Admin API endpoints at
`/v1/organizations/tunnels`, which remain available during a migration window.

Archives a tunnel certificate, removing it from the set Anthropic trusts for the
tunnel. The certificate record is retained. Archiving the last non-archived
certificate is permitted; the tunnel rejects MCP traffic until a new certificate
is added.

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;   r\   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   'Certificates.archive.<locals>.<genexpr>  rG   rH   rI   G/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive?beta=truer`   rN   rb   
rS   r   r   rT   r   r   rU   r   r   r    re   s           r*   archiveCertificates.archive   s    H WXaWdeff\]k\nopp	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]zzY#-
 )+Q[ *  

 
	
r-    )returnr'   )r   r0   rL   rA   rM   rA   r4   List[AnthropicBetaParam] | Omitr5   Headers | Noner6   Query | Noner7   Body | Noner8   'float | httpx.Timeout | None | NotGivenr   r    ra   rA   rL   rA   r4   r   r5   r   r6   r   r7   r   r8   r   r   r    )rL   rA   ri   bool | Omitrj   
int | Omitrk   
str | Omitr4   r   r5   r   r6   r   r7   r   r8   r   r   z%SyncPageCursor[BetaTunnelCertificate]__name__
__module____qualname____firstlineno__r   r+   r1   r   r   rX   rf   rx   r   __static_attributes__r   r-   r*   r!   r!      s   1 1 7 7 26 )-$("&;D<
<
  	<

 /<
 &<
 "<
  <
 9<
 
<
F 26 )-$("&;D:
:
 	:

 /:
 &:
 ":
  :
 9:
 
:
@ )- 15 )-$("&;DI
I
 &	I

 I
 I
 /I
 &I
 "I
  I
 9I
 
/I
` 26 )-$("&;D=
=
 	=

 /=
 &=
 "=
  =
 9=
 
=
 =
r-   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rg)r"   i2  c                    [        U 5      $ r&   ) AsyncCertificatesWithRawResponser(   s    r*   r+   #AsyncCertificates.with_raw_response3  s     055r-   c                    [        U 5      $ r/   )&AsyncCertificatesWithStreamingResponser(   s    r*   r1   )AsyncCertificates.with_streaming_response=  s     6d;;r-   Nr3   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[        SU0[        R                  5      I S	h  vN [        XEXgS
9[        S9I S	h  vN $  N N7f)r:   r;   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   +AsyncCertificates.create.<locals>.<genexpr>q  rG   rH   rI   rJ   rK   rM   NrN   rO   )rS   r   r   rT   r   r   rU   r   r   r   rV   r   r    rW   s           r*   rX   AsyncCertificates.createF  s     L WXaWdeff	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]ZZJV_`,%'9:<U<m<m  )+Q[ *   	
 	
 		
	
s$   B*C,C	
-CCCCc          
       #    U(       d  [        SU< 35      e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US9[        XEXgS	9[        S
9I Sh  vN $  N7f)r[   r;   r\   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   -AsyncCertificates.retrieve.<locals>.<genexpr>  rG   rH   rI   r_   r`   rN   rb   Nrc   re   s           r*   rf   AsyncCertificates.retrieve  s     B WXaWdeff\]k\nopp	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]YYQ#-
 )+Q[ *  

 

 
	
 

   B6B?8B=9B?rh   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	[        UUUS.[        R                  5      S	9[        S
9$ )rm   r;   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   )AsyncCertificates.list.<locals>.<genexpr>  rG   rH   rI   rJ   rK   rp   rq   rs   )rS   r   r   rT   r   r   ru   r   r   r    r   r   r   rv   rw   s
             r*   rx   AsyncCertificates.list  s    T WXaWdeff	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]!!JV_` !67(+'%%,<!& $
 ,AA (# " 
 	
r-   c          
       #    U(       d  [        SU< 35      e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US9[        XEXgS	9[        S
9I Sh  vN $  N7f)r{   r;   r\   r<   r=   c              3  8   #    U  H  n[        U5      v   M     g 7fr?   r@   rB   s     r*   rE   ,AsyncCertificates.archive.<locals>.<genexpr>6  rG   rH   rI   r~   r`   rN   rb   Nr   re   s           r*   r   AsyncCertificates.archive  s     H WXaWdeff\]k\nopp	
$ '*hhu5Le5LOgNh/i&j"	
 "	
 *+C]H[Y[]ZZY#-
 )+Q[ *   

 

 
	
 

r   r   )r   r   )r   r   r   r   )rL   rA   ri   r   rj   r   rk   r   r4   r   r5   r   r6   r   r7   r   r8   r   r   zMAsyncPaginator[BetaTunnelCertificate, AsyncPageCursor[BetaTunnelCertificate]]r   r   r-   r*   r"   r"   2  s   6 6 < < 26 )-$("&;D<
<
  	<

 /<
 &<
 "<
  <
 9<
 
<
F 26 )-$("&;D:
:
 	:

 /:
 &:
 ":
  :
 9:
 
:
@ )- 15 )-$("&;DI
I
 &	I

 I
 I
 /I
 &I
 "I
  I
 9I
 
WI
` 26 )-$("&;D=
=
 	=

 /=
 &=
 "=
  =
 9=
 
=
 =
r-   c                      \ rS rSrSS jrSrg)r'   iK  c                8   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        g r?   )_certificatesr   to_raw_response_wrapperrX   rf   rx   r   r)   certificatess     r*   __init__$CertificatesWithRawResponse.__init__L  sz    )&>>
 )@@!!
 %<<
	 (??  
r-   r   r   rX   rx   rf   Nr   r!   r   Noner   r   r   r   r   r   r   r-   r*   r'   r'   K      
r-   r'   c                      \ rS rSrSS jrSrg)r   i]  c                8   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        g r?   )r   r   async_to_raw_response_wrapperrX   rf   rx   r   r   s     r*   r   )AsyncCertificatesWithRawResponse.__init__^  sz    )&DD
 )FF!!
 %BB
	 (EE  
r-   r   Nr   r"   r   r   r   r   r-   r*   r   r   ]  r   r-   r   c                      \ rS rSrSS jrSrg)r0   io  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r?   )r   r   rX   rf   rx   r   r   s     r*   r   *CertificatesWithStreamingResponse.__init__p  sb    )2
 5!!
 1
	 4  
r-   r   Nr   r   r   r-   r*   r0   r0   o  r   r-   r0   c                      \ rS rSrSS jrSrg)r   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r?   )r   r   rX   rf   rx   r   r   s     r*   r   /AsyncCertificatesWithStreamingResponse.__init__  sb    )8
 ;!!
 7
	 :  
r-   r   Nr   r   r   r-   r*   r   r     r   r-   r   )3
__future__r   typingr   	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.tunnelsr   r   types.anthropic_beta_paramr   *types.beta.tunnels.beta_tunnel_certificater    __all__r!   r"   r'   r   r0   r   r   r-   r*   <module>r      s    #    ! L L L g g ' ; Z : A U = P.
/V
? V
rV
( V
r
 
$
 
$
 
$
 
r-   