
    _jk                       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Jr  SSK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 J!r!J"r"  SSK#J$r$J%r%  SSK&J'r'J(r(J)r)J*r*J+r+J,r,  SSK-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4  SSK5J6r6  SS/r7 " S S\5      r8 " S S\5      r9 " S S5      r: " S S5      r; " S S5      r< " S S5      r=g)     )annotations)List)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPageSyncConversationCursorPageAsyncConversationCursorPage)AsyncPaginatormake_request_options)certificate_list_paramscertificate_create_paramscertificate_update_paramscertificate_activate_paramscertificate_retrieve_paramscertificate_deactivate_params)Certificate)CertificateListResponse)CertificateDeleteResponse)CertificateActivateResponse)CertificateDeactivateResponse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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/openai/openai-python#accessing-raw-response-data-eg-headers
)CertificatesWithRawResponseselfs    e/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/admin/organization/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/openai/openai-python#with_streaming_response
)!CertificatesWithStreamingResponser0   s    r2   with_streaming_response$Certificates.with_streaming_response.   s     166r5   Nnameextra_headersextra_query
extra_bodytimeoutc               ~    U R                  S[        UUS.[        R                  5      [	        UUUUSS0S9[
        S9$ )  Upload a certificate to the organization.

This does **not** automatically
activate the certificate.

Organizations can upload up to 50 certificates.

Args:
  certificate: The certificate content in PEM format

  name: An optional name for the certificate

  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
/organization/certificatescertificater<   admin_api_key_authTr=   r>   r?   r@   securitybodyoptionscast_to)_postr   r   CertificateCreateParamsr   r$   r1   rE   r<   r=   r>   r?   r@   s          r2   createCertificates.create7   s_    @ zz( #.  *AA )+'%.5  !  
 	
r5   includer=   r>   r?   r@   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUU[	        SU0[
        R                  5      SS0S9[        S9$ )	&  
Get a certificate that has been uploaded to the organization.

You can get a certificate regardless of whether it is active or not.

Args:
  include: A list of additional fields to include in the response. Currently the only
      supported value is `content` to fetch the PEM content of the certificate.

  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 `certificate_id` but received +/organization/certificates/{certificate_id}certificate_idrS   rF   Tr=   r>   r?   r@   queryrH   rK   rL   )
ValueError_getr   r   r   r"   CertificateRetrieveParamsr$   r1   rY   rS   r=   r>   r?   r@   s          r2   retrieveCertificates.retrievej   su    : \]k\noppyyGXfg(+'%%y'&:<W<q<qr.5    
 	
r5   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        SU0[        R
                  5      [        UUUUSS0S9[        S9$ )	h  Modify a certificate.

Note that only the name can be modified.

Args:
  name: The updated name for the certificate

  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
rV   rW   rX   r<   rF   TrG   rI   )r]   rM   r   r   r    CertificateUpdateParamsr   r$   r1   rY   r<   r=   r>   r?   r@   s          r2   updateCertificates.update   st    6 \]k\noppzzGXfg &$1J1b1bc(+'%.5    
 	
r5   afterlimitorderr=   r>   r?   r@   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ aX  
List uploaded certificates for this organization.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  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   )rj   rk   rl   rF   TrZ   )pagerK   model)_get_api_listr   r%   r   r   r   CertificateListParamsr1   rj   rk   rl   r=   r>   r?   r@   s           r2   listCertificates.list   sm    H !!(+,CD(+'%%!&!&!&
 ,AA /5 *% " 
 	
r5   r=   r>   r?   r@   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )p  
Delete a certificate from the organization.

The certificate must be inactive for the organization and all projects.

Args:
  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
rV   rW   rX   rF   TrG   r\   r]   _deleter   r   r&   r1   rY   r=   r>   r?   r@   s         r2   deleteCertificates.delete   s_    2 \]k\nopp||GXfg(+'%.5 .  

 
	
r5   c                   U R                  S[        [           [        SU0[        R
                  5      [        UUUUSS0S9[        SS9$ a{  
Activate certificates at the organization level.

You can atomically and idempotently activate up to 10 certificates at a time.

Args:
  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
z#/organization/certificates/activatecertificate_idsrF   TrG   postro   rJ   rK   rp   method)rq   r   r'   r   r!   CertificateActivateParamsr   r1   r   r=   r>   r?   r@   s         r2   activateCertificates.activate   sg    2 !!156 "O46Q6k6k )+'%.5 . " 
 	
r5   c                   U R                  S[        [           [        SU0[        R
                  5      [        UUUUSS0S9[        SS9$ a  
Deactivate certificates at the organization level.

You can atomically and idempotently deactivate up to 10 certificates at a time.

Args:
  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
z%/organization/certificates/deactivater   rF   TrG   r   r   )rq   r   r(   r   r#   CertificateDeactivateParamsr   r   s         r2   
deactivateCertificates.deactivateJ  sg    2 !!378 "O46S6o6o )+'%.5 0 " 
 	
r5    )returnr/   )r   r8   rE   strr<   
str | Omitr=   Headers | Noner>   Query | Noner?   Body | Noner@   'float | httpx.Timeout | None | NotGivenr   r$   rY   r   rS   zList[Literal['content']] | Omitr=   r   r>   r   r?   r   r@   r   r   r$   rY   r   r<   r   r=   r   r>   r   r?   r   r@   r   r   r$   )rj   r   rk   
int | Omitrl   Literal['asc', 'desc'] | Omitr=   r   r>   r   r?   r   r@   r   r   z3SyncConversationCursorPage[CertificateListResponse]rY   r   r=   r   r>   r   r?   r   r@   r   r   r&   )r   SequenceNotStr[str]r=   r   r>   r   r?   r   r@   r   r   z%SyncPage[CertificateActivateResponse])r   r   r=   r   r>   r   r?   r   r@   r   r   z'SyncPage[CertificateDeactivateResponse]__name__
__module____qualname____firstlineno__r   r3   r9   r   r   rP   ra   rg   rt   r|   r   r   __static_attributes__r   r5   r2   r)   r)   #   s   1 1 7 7   )-$("&;D1
 1
 	1
 &1
 "1
  1
 91
 
1
n 48 )-$("&;D*
*
 1	*
 &*
 "*
  *
 9*
 
*
`   )-$("&;D(
(
 	(
 &(
 "(
  (
 9(
 
(
Z ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
=7
~ )-$("&;D%
%
 &%
 "%
  %
 9%
 
#%
Z )-$("&;D(
 -(
 &(
 "(
  (
 9(
 
/(
` )-$("&;D(
 -(
 &(
 "(
  (
 9(
 
1(
 (
r5   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SS\S.           SS jjrSrg)r*   iu  c                    [        U 5      $ r.   ) AsyncCertificatesWithRawResponser0   s    r2   r3   #AsyncCertificates.with_raw_responsev  s     055r5   c                    [        U 5      $ r7   )&AsyncCertificatesWithStreamingResponser0   s    r2   r9   )AsyncCertificates.with_streaming_response  s     6d;;r5   Nr;   c                  #    U R                  S[        UUS.[        R                  5      I Sh  vN [	        UUUUSS0S9[
        S9I Sh  vN $  N! N7f)rB   rC   rD   NrF   TrG   rI   )rM   r   r   rN   r   r$   rO   s          r2   rP   AsyncCertificates.create  sv     @ ZZ(,#.  *AA  )+'%.5  !   
 
 	

s!   -AA
AAAArR   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUU[	        SU0[
        R                  5      I Sh  vN SS0S9[        S	9I Sh  vN $  N N7f)
rU   rV   rW   rX   rS   NrF   TrZ   r\   )r]   r^   r   r   r   r"   r_   r$   r`   s          r2   ra   AsyncCertificates.retrieve  s     : \]k\noppYYGXfg(+'%1(*E*_*_  /5	    
 
 	

s$   AA2A.A2)A0*A20A2c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        SU0[        R
                  5      I Sh  vN [        UUUUSS0S9[        S	9I Sh  vN $  N! N7f)
rd   rV   rW   rX   r<   NrF   TrG   rI   )r]   rM   r   r   r    re   r   r$   rf   s          r2   rg   AsyncCertificates.update  s     6 \]k\noppZZGXfg,fd^=V=n=noo(+'%.5     
 
 	
o
s$   A
A2A.
A2)A0*A20A2ri   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ rn   )rq   r   r%   r   r   r   rr   rs   s           r2   rt   AsyncCertificates.list  sm    H !!(,-DE(+'%%!&!&!&
 ,AA /5 *% " 
 	
r5   rv   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	rx   rV   rW   rX   rF   TrG   r\   Nry   r{   s         r2   r|   AsyncCertificates.deleteM  sl     2 \]k\nopp\\GXfg(+'%.5 . " 

 

 
	
 

s   AAAAc                   U R                  S[        [           [        SU0[        R
                  5      [        UUUUSS0S9[        SS9$ r   )rq   r   r'   r   r!   r   r   r   s         r2   r   AsyncCertificates.activatet  sg    2 !!167 "O46Q6k6k )+'%.5 . " 
 	
r5   c                   U R                  S[        [           [        SU0[        R
                  5      [        UUUUSS0S9[        SS9$ r   )rq   r   r(   r   r#   r   r   r   s         r2   r   AsyncCertificates.deactivate  sg    2 !!389 "O46S6o6o )+'%.5 0 " 
 	
r5   r   )r   r   )r   r   r   r   r   )rj   r   rk   r   rl   r   r=   r   r>   r   r?   r   r@   r   r   z]AsyncPaginator[CertificateListResponse, AsyncConversationCursorPage[CertificateListResponse]]r   )r   r   r=   r   r>   r   r?   r   r@   r   r   zSAsyncPaginator[CertificateActivateResponse, AsyncPage[CertificateActivateResponse]])r   r   r=   r   r>   r   r?   r   r@   r   r   zWAsyncPaginator[CertificateDeactivateResponse, AsyncPage[CertificateDeactivateResponse]]r   r   r5   r2   r*   r*   u  s   6 6 < <   )-$("&;D1
 1
 	1
 &1
 "1
  1
 91
 
1
n 48 )-$("&;D,
,
 1	,
 &,
 ",
  ,
 9,
 
,
d   )-$("&;D(
(
 	(
 &(
 "(
  (
 9(
 
(
Z ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
g7
~ )-$("&;D%
%
 &%
 "%
  %
 9%
 
#%
Z )-$("&;D(
 -(
 &(
 "(
  (
 9(
 
](
` )-$("&;D(
 -(
 &(
 "(
  (
 9(
 
a(
 (
r5   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        [        R                  " UR                  5      U l	        g N)
_certificatesr   to_raw_response_wrapperrP   ra   rg   rt   r|   r   r   r1   certificatess     r2   __init__$CertificatesWithRawResponse.__init__  s    )&>>
 )@@!!
 '>>
 %<<
	 '>>
 )@@!!
 +BB##
r5   r   r   rP   r   r|   rt   ra   rg   Nr   r)   r   Noner   r   r   r   r   r   r   r5   r2   r/   r/         
r5   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        [        R                  " UR                  5      U l	        g r   )
r   r   async_to_raw_response_wrapperrP   ra   rg   rt   r|   r   r   r   s     r2   r   )AsyncCertificatesWithRawResponse.__init__  s    )&DD
 )FF!!
 'DD
 %BB
	 'DD
 )FF!!
 +HH##
r5   r   Nr   r*   r   r   r   r   r5   r2   r   r     r   r5   r   c                      \ rS rSrSS jrSrg)r8   i  c                |   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        [        UR                  5      U l        g r   )	r   r   rP   ra   rg   rt   r|   r   r   r   s     r2   r   *CertificatesWithStreamingResponse.__init__   s    )2
 5!!
 3
 1
	 3
 5!!
 7##
r5   r   Nr   r   r   r5   r2   r8   r8     r   r5   r8   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        [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r   )	r   r   rP   ra   rg   rt   r|   r   r   r   s     r2   r   /AsyncCertificatesWithStreamingResponse.__init__  s    )8
 ;!!
 9
 7
	 9
 ;!!
 =##
r5   r   Nr   r   r   r5   r2   r   r     r   r5   r   )>
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   r   r   _base_clientr   r   types.admin.organizationr   r   r    r!   r"   r#   $types.admin.organization.certificater$   2types.admin.organization.certificate_list_responser%   4types.admin.organization.certificate_delete_responser&   6types.admin.organization.certificate_activate_responser'   8types.admin.organization.certificate_deactivate_responser(   __all__r)   r*   r/   r   r8   r   r   r5   r2   <module>r      s    #  %  ! \ \ \ L L ' ; Z g g A  A Z ^ b f.
/O
? O
d
Q
( Q
h

 
6
 
6
 
6
 
r5   