o
    ùT·j‘E  ã                   @  sT  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„ deƒZ.G dd„ deƒZ/G dd„ dƒZ0G dd„ dƒZ1G dd„ dƒZ2G dd„ dƒZ3dS )é    )Ú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                   @  óp   e Zd Zed&dd„ƒZed'dd„ƒZeeeddded	œd(dd„Zdddedœd)d!d"„Z	dddedœd*d$d%„Z
dS )+r!   ÚreturnÚCertificatesWithRawResponsec                 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
        )r%   ©Úself© r*   ú|/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/admin/organization/projects/certificates.pyÚwith_raw_response   ó   zCertificates.with_raw_responseÚ!CertificatesWithStreamingResponsec                 C  r&   ©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
        )r.   r(   r*   r*   r+   Úwith_streaming_response(   ó   z$Certificates.with_streaming_responseN©ÚafterÚlimitÚorderÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚ
project_idÚstrr3   ú
str | Omitr4   ú
int | Omitr5   úLiteral['asc', 'desc'] | Omitr6   úHeaders | Noner7   úQuery | Noner8   úBody | Noner9   ú(float | httpx2.Timeout | None | NotGivenú3SyncConversationCursorPage[CertificateListResponse]c          	      C  óT   |s	t d|›�ƒ‚| jtd|d�tt t||||t|||dœtjƒddid�td�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©r:   )r3   r4   r5   Úadmin_api_key_authT)r6   r7   r8   r9   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)	Ú
ValueErrorÚ_get_api_listr   r   r   r   r   r   ÚCertificateListParams©	r)   r:   r3   r4   r5   r6   r7   r8   r9   r*   r*   r+   Úlist1   ó*   %
ýúóîzCertificates.list©r6   r7   r8   r9   Úcertificate_idsúSequenceNotStr[str]ú%SyncPage[CertificateActivateResponse]c                C  óR   |s	t d|›�ƒ‚| jtd|d�tt td|itjƒt||||ddid�td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
        rF   z9/organization/projects/{project_id}/certificates/activaterG   rU   rH   T©r6   r7   r8   r9   rJ   Úpost©rK   ÚbodyrL   rM   Úmethod)	rN   rO   r   r   r   r   r   ÚCertificateActivateParamsr   ©r)   r:   rU   r6   r7   r8   r9   r*   r*   r+   Úactivatem   ó$   

ÿûòzCertificates.activateú'SyncPage[CertificateDeactivateResponse]c                C  rX   ©
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
        rF   z;/organization/projects/{project_id}/certificates/deactivaterG   rU   rH   TrZ   r[   r\   )	rN   rO   r   r   r    r   r   ÚCertificateDeactivateParamsr   r`   r*   r*   r+   Ú
deactivateš   rb   zCertificates.deactivate)r$   r%   )r$   r.   )r:   r;   r3   r<   r4   r=   r5   r>   r6   r?   r7   r@   r8   rA   r9   rB   r$   rC   )r:   r;   rU   rV   r6   r?   r7   r@   r8   rA   r9   rB   r$   rW   )r:   r;   rU   rV   r6   r?   r7   r@   r8   rA   r9   rB   r$   rc   ©Ú__name__Ú
__module__Ú__qualname__r   r,   r0   r   r   rR   ra   rf   r*   r*   r*   r+   r!      ó.    	ôCö4öc                   @  r#   )+r"   r$   Ú AsyncCertificatesWithRawResponsec                 C  r&   r'   )rl   r(   r*   r*   r+   r,   É   r-   z#AsyncCertificates.with_raw_responseÚ&AsyncCertificatesWithStreamingResponsec                 C  r&   r/   )rm   r(   r*   r*   r+   r0   Ó   r1   z)AsyncCertificates.with_streaming_responseNr2   r:   r;   r3   r<   r4   r=   r5   r>   r6   r?   r7   r@   r8   rA   r9   rB   ú]AsyncPaginator[CertificateListResponse, AsyncConversationCursorPage[CertificateListResponse]]c          	      C  rD   rE   )	rN   rO   r   r   r   r   r   r   rP   rQ   r*   r*   r+   rR   Ü   rS   zAsyncCertificates.listrT   rU   rV   úSAsyncPaginator[CertificateActivateResponse, AsyncPage[CertificateActivateResponse]]c                C  rX   rY   )	rN   rO   r   r   r   r   r   r_   r   r`   r*   r*   r+   ra     rb   zAsyncCertificates.activateúWAsyncPaginator[CertificateDeactivateResponse, AsyncPage[CertificateDeactivateResponse]]c                C  rX   rd   )	rN   rO   r   r   r    r   r   re   r   r`   r*   r*   r+   rf   E  rb   zAsyncCertificates.deactivate)r$   rl   )r$   rm   )r:   r;   r3   r<   r4   r=   r5   r>   r6   r?   r7   r@   r8   rA   r9   rB   r$   rn   )r:   r;   rU   rV   r6   r?   r7   r@   r8   rA   r9   rB   r$   ro   )r:   r;   rU   rV   r6   r?   r7   r@   r8   rA   r9   rB   r$   rp   rg   r*   r*   r*   r+   r"   È   rk   c                   @  ó   e Zd Zddd„ZdS )	r%   Úcertificatesr!   r$   ÚNonec                 C  ó4   || _ t |j¡| _t |j¡| _t |j¡| _d S ©N)Ú_certificatesr   Úto_raw_response_wrapperrR   ra   rf   ©r)   rr   r*   r*   r+   Ú__init__t  ó   ÿÿ
ÿz$CertificatesWithRawResponse.__init__N©rr   r!   r$   rs   ©rh   ri   rj   ry   r*   r*   r*   r+   r%   s  ó    r%   c                   @  rq   )	rl   rr   r"   r$   rs   c                 C  rt   ru   )rv   r   Úasync_to_raw_response_wrapperrR   ra   rf   rx   r*   r*   r+   ry   ƒ  rz   z)AsyncCertificatesWithRawResponse.__init__N©rr   r"   r$   rs   r|   r*   r*   r*   r+   rl   ‚  r}   rl   c                   @  rq   )	r.   rr   r!   r$   rs   c                 C  ó.   || _ t|jƒ| _t|jƒ| _t|jƒ| _d S ru   )rv   r   rR   ra   rf   rx   r*   r*   r+   ry   ’  ó   ÿÿ
ÿz*CertificatesWithStreamingResponse.__init__Nr{   r|   r*   r*   r*   r+   r.   ‘  r}   r.   c                   @  rq   )	rm   rr   r"   r$   rs   c                 C  r€   ru   )rv   r   rR   ra   rf   rx   r*   r*   r+   ry   ¡  r�   z/AsyncCertificatesWithStreamingResponse.__init__Nr   r|   r*   r*   r*   r+   rm      r}   rm   )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%   rl   r.   rm   r*   r*   r*   r+   Ú<module>   s0   ( , ,