o
    ùT·jÌ$  ã                   @  s  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 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 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ƒZ!G dd„ dƒZ"G dd„ dƒZ#G dd„ dƒZ$dS )é    )Úannotations)ÚLiteralNé   )Ú_legacy_response)ÚBodyÚQueryÚHeadersÚNotGivenÚ	not_given)Úmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)Úmake_request_options)Údata_retention_update_params)ÚOrganizationDataRetentionÚDataRetentionÚAsyncDataRetentionc                   @  óT   e Zd Zeddd„ƒZe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ÚDataRetentionWithRawResponsec                 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   úu/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/admin/organization/data_retention.pyÚwith_raw_response   ó   zDataRetention.with_raw_responseÚ"DataRetentionWithStreamingResponsec                 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%DataRetention.with_streaming_responseN©Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutr'   úHeaders | Noner(   úQuery | Noner)   úBody | Noner*   ú(float | httpx2.Timeout | None | NotGivenr   c             	   C  s"   | j dt||||ddid�td�S )ú/Retrieves organization data retention controls.ú/organization/data_retentionÚadmin_api_key_authT©r'   r(   r)   r*   Úsecurity©ÚoptionsÚcast_to©Ú_getr   r   ©r   r'   r(   r)   r*   r   r   r   Úretrieve*   s   û÷zDataRetention.retrieveÚretention_typeú�Literal['zero_data_retention', 'modified_abuse_monitoring', 'enhanced_zero_data_retention', 'enhanced_modified_abuse_monitoring']c             
   C  s0   | j dtd|itjƒt||||ddid�td�S )áª  
        Updates organization data retention controls.

        Args:
          retention_type: The desired organization data retention type.

          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
        r0   r;   r1   Tr2   ©Úbodyr5   r6   )Ú_postr   r   ÚDataRetentionUpdateParamsr   r   ©r   r;   r'   r(   r)   r*   r   r   r   ÚupdateA   s   
ÿûôzDataRetention.update)r   r   )r   r"   ©
r'   r+   r(   r,   r)   r-   r*   r.   r   r   ©r;   r<   r'   r+   r(   r,   r)   r-   r*   r.   r   r   ©	Ú__name__Ú
__module__Ú__qualname__r   r    r$   r
   r:   rC   r   r   r   r   r      ó    	ø"òc                   @  r   )r   r   Ú!AsyncDataRetentionWithRawResponsec                 C  r   r   )rK   r   r   r   r   r    p   r!   z$AsyncDataRetention.with_raw_responseÚ'AsyncDataRetentionWithStreamingResponsec                 C  r   r#   )rL   r   r   r   r   r$   z   r%   z*AsyncDataRetention.with_streaming_responseNr&   r'   r+   r(   r,   r)   r-   r*   r.   r   c             	   Ã  s*   �| j dt||||ddid�td�I dH S )r/   r0   r1   Tr2   r4   Nr7   r9   r   r   r   r:   ƒ   s   €û÷zAsyncDataRetention.retriever;   r<   c             
   Ã  s>   �| j dtd|itjƒI dH t||||ddid�td�I dH S )r=   r0   r;   Nr1   Tr2   r>   )r@   r   r   rA   r   r   rB   r   r   r   rC   š   s   €
ÿûôzAsyncDataRetention.update)r   rK   )r   rL   rD   rE   rF   r   r   r   r   r   o   rJ   c                   @  ó   e Zd Zddd„ZdS )	r   Údata_retentionr   r   ÚNonec                 C  ó&   || _ t |j¡| _t |j¡| _d S ©N)Ú_data_retentionr   Úto_raw_response_wrapperr:   rC   ©r   rN   r   r   r   Ú__init__É   ó   ÿ
ÿz%DataRetentionWithRawResponse.__init__N©rN   r   r   rO   ©rG   rH   rI   rU   r   r   r   r   r   È   ó    r   c                   @  rM   )	rK   rN   r   r   rO   c                 C  rP   rQ   )rR   r   Úasync_to_raw_response_wrapperr:   rC   rT   r   r   r   rU   Õ   rV   z*AsyncDataRetentionWithRawResponse.__init__N©rN   r   r   rO   rX   r   r   r   r   rK   Ô   rY   rK   c                   @  rM   )	r"   rN   r   r   rO   c                 C  ó"   || _ t|jƒ| _t|jƒ| _d S rQ   )rR   r   r:   rC   rT   r   r   r   rU   á   ó   ÿ
ÿz+DataRetentionWithStreamingResponse.__init__NrW   rX   r   r   r   r   r"   à   rY   r"   c                   @  rM   )	rL   rN   r   r   rO   c                 C  r\   rQ   )rR   r   r:   rC   rT   r   r   r   rU   í   r]   z0AsyncDataRetentionWithStreamingResponse.__init__Nr[   rX   r   r   r   r   rL   ì   rY   rL   )%Ú
__future__r   Útyping_extensionsr   Úhttpx2Ú r   Ú_typesr   r   r   r	   r
   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú_base_clientr   Útypes.admin.organizationr   Ú4types.admin.organization.organization_data_retentionr   Ú__all__r   r   r   rK   r"   rL   r   r   r   r   Ú<module>   s&   YY