
    s0jq                       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 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gZ G d de      Z G d de      Z G d d      Z G d d      Z G d d      Z G d d      Zy)    )annotationsN   )_legacy_response)BodyQueryHeadersNotGiven	not_given)path_template)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)SafetyAlertAlertsAsyncAlertsc                  Z    e Zd Zedd       Ze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
        )AlertsWithRawResponseselfs    V/home/Script/Script_env/lib/python3.12/site-packages/openai/resources/safety/alerts.pywith_raw_responsezAlerts.with_raw_response   s     %T**    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
        )AlertsWithStreamingResponser   s    r   with_streaming_responsezAlerts.with_streaming_response   s     +400r   Nextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  t        d|      t        ||||ddi      t              S )  
        Get a safety alert belonging to the authenticated API project.

        Args:
          id: Project safety alert ID

          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
        1Expected a non-empty value for `id` but received /safety/alerts/{id}idbearer_authTr#   r$   r%   r&   securityoptionscast_to
ValueError_getr   r   r   r   r,   r#   r$   r%   r&   s         r   retrievezAlerts.retrieve'   s^    2 PQSPVWXXyy/B7(+'%'.    

 
	
r   )returnr   )r8   r    r,   strr#   zHeaders | Noner$   zQuery | Noner%   zBody | Noner&   z(float | httpx2.Timeout | None | NotGivenr8   r   __name__
__module____qualname__r   r   r!   r
   r7    r   r   r   r      su    + + 1 1 )-$("&<E%
%
 &%
 "%
  %
 :%
 
%
r   c                  Z    e Zd Zedd       Zedd       Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    t        |       S r   )AsyncAlertsWithRawResponser   s    r   r   zAsyncAlerts.with_raw_responseP   s     *$//r   c                    t        |       S r   ) AsyncAlertsWithStreamingResponser   s    r   r!   z#AsyncAlerts.with_streaming_responseZ   s     055r   Nr"   c                  K   |st        d|      | j                  t        d|      t        ||||ddi      t               d{   S 7 w)	r(   r)   r*   r+   r-   Tr.   r0   Nr3   r6   s         r   r7   zAsyncAlerts.retrievec   sl     2 PQSPVWXXYY/B7(+'%'.    

 

 
	
 

s   AA	A
A)r8   rB   )r8   rD   r9   r;   r?   r   r   r   r   O   su    0 0 6 6 )-$("&<E%
%
 &%
 "%
  %
 :%
 
%
r   c                      e Zd ZddZy)r   c                Z    || _         t        j                  |j                        | _        y N)_alertsr   to_raw_response_wrapperr7   r   alertss     r   __init__zAlertsWithRawResponse.__init__   s"    (@@OO
r   NrL   r   r8   Noner<   r=   r>   rM   r?   r   r   r   r          
r   r   c                      e Zd ZddZy)rB   c                Z    || _         t        j                  |j                        | _        y rH   )rI   r   async_to_raw_response_wrapperr7   rK   s     r   rM   z#AsyncAlertsWithRawResponse.__init__   s"    (FFOO
r   NrL   r   r8   rO   rP   r?   r   r   rB   rB      rQ   r   rB   c                      e Zd ZddZy)r    c                F    || _         t        |j                        | _        y rH   )rI   r   r7   rK   s     r   rM   z$AlertsWithStreamingResponse.__init__   s    4OO
r   NrN   rP   r?   r   r   r    r       rQ   r   r    c                      e Zd ZddZy)rD   c                F    || _         t        |j                        | _        y rH   )rI   r   r7   rK   s     r   rM   z)AsyncAlertsWithStreamingResponse.__init__   s    :OO
r   NrU   rP   r?   r   r   rD   rD      rQ   r   rD   ) 
__future__r   httpx2 r   _typesr   r   r   r	   r
   _utilsr   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.safety.safety_alertr   __all__r   r   r   rB   r    rD   r?   r   r   <module>re      su    #    ? ? # & : Y 0 4]
#9
_ 9
x9
" 9
x
 

 

 

 
r   