
    YjE                    x   d dl mZ d dlmZ d dlZddlmZ ddlmZm	Z	m
Z
mZmZmZmZmZ ddlmZmZ ddlmZ dd	lmZmZ dd
lmZmZ ddlmZmZmZmZ ddl m!Z!m"Z" ddl#m$Z$m%Z%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddgZ- G d de      Z. G d de      Z/ G d d      Z0 G d d      Z1 G d d      Z2 G d d      Z3y)    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)path_template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_activate_paramscertificate_deactivate_params)CertificateListResponse)CertificateActivateResponse)CertificateDeactivateResponseCertificatesAsyncCertificatesc                      e Zd Zed	d       Zed
d       Zeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
y)r"   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/openai/openai-python#accessing-raw-response-data-eg-headers
        )CertificatesWithRawResponseselfs    x/var/www/html/vmm-quimica/venv/lib/python3.12/site-packages/openai/resources/admin/organization/projects/certificates.pywith_raw_responsezCertificates.with_raw_response   s     +400    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/openai/openai-python#with_streaming_response
        )!CertificatesWithStreamingResponser(   s    r*   with_streaming_responsez$Certificates.with_streaming_response(   s     166r,   Nafterlimitorderextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  t        d|      t        t           t        ||||t        |||dt        j                        ddi      t              S 	a  
        List certificates for this project.

        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
        9Expected a non-empty value for `project_id` but received z0/organization/projects/{project_id}/certificates
project_id)r2   r3   r4   admin_api_key_authT)r5   r6   r7   r8   querysecurity)pageoptionsmodel)	
ValueError_get_api_listr   r   r   r   r   r   CertificateListParams	r)   r=   r2   r3   r4   r5   r6   r7   r8   s	            r*   listzCertificates.list1   s    J XYcXfghh!!LYcd+,CD(+'%%!&!&!&
 ,AA /5 *% " 
 	
r,   r5   r6   r7   r8   c                   |st        d|      | j                  t        d|      t        t           t        d|it        j                        t        ||||ddi      t        d	      S 
a  
        Activate certificates at the project 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
        r;   z9/organization/projects/{project_id}/certificates/activater<   certificate_idsr>   Tr5   r6   r7   r8   r@   postrA   bodyrB   rC   method)	rD   rE   r   r   r    r   r   CertificateActivateParamsr   r)   r=   rL   r5   r6   r7   r8   s          r*   activatezCertificates.activatem   s    4 XYcXfghh!!Ublm56 "O46Q6k6k )+'%.5 . " 
 	
r,   c                   |st        d|      | j                  t        d|      t        t           t        d|it        j                        t        ||||ddi      t        d	      S 
a  Deactivate certificates at the project 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
        r;   z;/organization/projects/{project_id}/certificates/deactivater<   rL   r>   TrM   rN   rO   )	rD   rE   r   r   r!   r   r   CertificateDeactivateParamsr   rS   s          r*   
deactivatezCertificates.deactivate   s    4 XYcXfghh!!Wdno78 "O46S6o6o )+'%.5 0 " 
 	
r,   )returnr'   )rY   r/   )r=   strr2   
str | Omitr3   
int | Omitr4   Literal['asc', 'desc'] | Omitr5   Headers | Noner6   Query | Noner7   Body | Noner8   (float | httpx2.Timeout | None | NotGivenrY   z3SyncConversationCursorPage[CertificateListResponse])r=   rZ   rL   SequenceNotStr[str]r5   r^   r6   r_   r7   r`   r8   ra   rY   z%SyncPage[CertificateActivateResponse])r=   rZ   rL   rb   r5   r^   r6   r_   r7   r`   r8   ra   rY   z'SyncPage[CertificateDeactivateResponse]__name__
__module____qualname__r   r+   r0   r   r   rH   rT   rX    r,   r*   r"   r"      sN   1 1 7 7 ! /3 )-$("&<E:
:
 	:

 :
 -:
 &:
 ":
  :
 ::
 
=:
F )-$("&<E+
+
 -	+
 &+
 "+
  +
 :+
 
/+
h )-$("&<E+
+
 -	+
 &+
 "+
  +
 :+
 
1+
r,   c                      e Zd Zed	d       Zed
d       Zeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
y)r#   c                    t        |       S r&   ) AsyncCertificatesWithRawResponser(   s    r*   r+   z#AsyncCertificates.with_raw_response   s     055r,   c                    t        |       S r.   )&AsyncCertificatesWithStreamingResponser(   s    r*   r0   z)AsyncCertificates.with_streaming_response   s     6d;;r,   Nr1   c                   |st        d|      | j                  t        d|      t        t           t        ||||t        |||dt        j                        ddi      t              S r:   )	rD   rE   r   r   r   r   r   r   rF   rG   s	            r*   rH   zAsyncCertificates.list   s    J XYcXfghh!!LYcd,-DE(+'%%!&!&!&
 ,AA /5 *% " 
 	
r,   rI   c                   |st        d|      | j                  t        d|      t        t           t        d|it        j                        t        ||||ddi      t        d	      S rK   )	rD   rE   r   r   r    r   r   rR   r   rS   s          r*   rT   zAsyncCertificates.activate  s    4 XYcXfghh!!Ublm67 "O46Q6k6k )+'%.5 . " 
 	
r,   c                   |st        d|      | j                  t        d|      t        t           t        d|it        j                        t        ||||ddi      t        d	      S rV   )	rD   rE   r   r   r!   r   r   rW   r   rS   s          r*   rX   zAsyncCertificates.deactivateE  s    4 XYcXfghh!!Wdno89 "O46S6o6o )+'%.5 0 " 
 	
r,   )rY   rj   )rY   rl   )r=   rZ   r2   r[   r3   r\   r4   r]   r5   r^   r6   r_   r7   r`   r8   ra   rY   z]AsyncPaginator[CertificateListResponse, AsyncConversationCursorPage[CertificateListResponse]])r=   rZ   rL   rb   r5   r^   r6   r_   r7   r`   r8   ra   rY   zSAsyncPaginator[CertificateActivateResponse, AsyncPage[CertificateActivateResponse]])r=   rZ   rL   rb   r5   r^   r6   r_   r7   r`   r8   ra   rY   zWAsyncPaginator[CertificateDeactivateResponse, AsyncPage[CertificateDeactivateResponse]]rc   rg   r,   r*   r#   r#      sQ   6 6 < < ! /3 )-$("&<E:
:
 	:

 :
 -:
 &:
 ":
  :
 ::
 
g:
F )-$("&<E+
+
 -	+
 &+
 "+
  +
 :+
 
]+
h )-$("&<E+
+
 -	+
 &+
 "+
  +
 :+
 
a+
r,   c                      e Zd ZddZy)r'   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y N)_certificatesr   to_raw_response_wrapperrH   rT   rX   r)   certificatess     r*   __init__z$CertificatesWithRawResponse.__init__t  s_    )$<<
	 )@@!!
 +BB##
r,   Nrv   r"   rY   Nonerd   re   rf   rw   rg   r,   r*   r'   r'   s      
r,   r'   c                      e Zd ZddZy)rj   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y rr   )rs   r   async_to_raw_response_wrapperrH   rT   rX   ru   s     r*   rw   z)AsyncCertificatesWithRawResponse.__init__  s_    )$BB
	 )FF!!
 +HH##
r,   Nrv   r#   rY   ry   rz   rg   r,   r*   rj   rj     r{   r,   rj   c                      e Zd ZddZy)r/   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y rr   )rs   r   rH   rT   rX   ru   s     r*   rw   z*CertificatesWithStreamingResponse.__init__  sM    )0
	 5!!
 7##
r,   Nrx   rz   rg   r,   r*   r/   r/     r{   r,   r/   c                      e Zd ZddZy)rl   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y rr   )rs   r   rH   rT   rX   ru   s     r*   rw   z/AsyncCertificatesWithStreamingResponse.__init__  sM    )6
	 ;!!
 =##
r,   Nr   rz   rg   r,   r*   rl   rl     r{   r,   rl   )4
__future__r   typing_extensionsr   httpx2 r   _typesr   r   r	   r
   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   r   r   _base_clientr   r   !types.admin.organization.projectsr   r   r   ;types.admin.organization.projects.certificate_list_responser   ?types.admin.organization.projects.certificate_activate_responser    Atypes.admin.organization.projects.certificate_deactivate_responser!   __all__r"   r#   r'   rj   r/   rl   rg   r,   r*   <module>r      s    # %  " ] ] ] 6 ( < [ h h B 
 e l p.
/h
? h
Vh
( h
V
 

 

 

 
r,   