
    Áj	                        d dl 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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)    )annotations   )_legacy_response)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)MessagesAsyncMessagesr   r   c                      e Zd Zej                  Zej
                  Zej                  Zej                  Zej                  Ze	dd       Z
e	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
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        )MessagesWithRawResponseselfs    J/tmp/pip-target-k_scjv0h/lib/python/anthropic/lib/vertex/_beta_messages.pywith_raw_responsezMessages.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/anthropics/anthropic-sdk-python#with_streaming_response
        )MessagesWithStreamingResponser   s    r   with_streaming_responsez Messages.with_streaming_response   s     -T22r   N)returnr   )r   r   )__name__
__module____qualname__FirstPartyMessagesAPIcreateparsestreamtool_runnercount_tokensr   r   r    r   r   r   r      s_    "))F!''E"))F'33K(55L- - 3 3r   c                      e Zd Zej                  Zej
                  Zej                  Zej                  Zej                  Ze	dd       Z
e	dd       Zy)r   c                    t        |       S r   )AsyncMessagesWithRawResponser   s    r   r   zAsyncMessages.with_raw_response0   s     ,D11r   c                    t        |       S r   )"AsyncMessagesWithStreamingResponser   s    r   r   z%AsyncMessages.with_streaming_response:   s     2$77r   N)r   r'   )r   r)   )r   r   r   FirstPartyAsyncMessagesAPIr   r    r!   r"   r#   r   r   r   r$   r   r   r   r   )   s_    '..F&,,E'..F,88K-::L2 2 8 8r   c                      e Zd ZddZy)r   c                Z    || _         t        j                  |j                        | _        y N)	_messagesr   to_raw_response_wrapperr   r   messagess     r   __init__z MessagesWithRawResponse.__init__E   s"    !&>>OO
r   Nr1   r   r   Noner   r   r   r2   r$   r   r   r   r   D       
r   r   c                      e Zd ZddZy)r'   c                Z    || _         t        j                  |j                        | _        y r-   )r.   r   async_to_raw_response_wrapperr   r0   s     r   r2   z%AsyncMessagesWithRawResponse.__init__N   s"    !&DDOO
r   Nr1   r   r   r4   r5   r$   r   r   r'   r'   M   r6   r   r'   c                      e Zd ZddZy)r   c                F    || _         t        |j                        | _        y r-   )r.   r	   r   r0   s     r   r2   z&MessagesWithStreamingResponse.__init__W   s    !2OO
r   Nr3   r5   r$   r   r   r   r   V   r6   r   r   c                      e Zd ZddZy)r)   c                F    || _         t        |j                        | _        y r-   )r.   r
   r   r0   s     r   r2   z+AsyncMessagesWithStreamingResponse.__init__`   s    !8OO
r   Nr:   r5   r$   r   r   r)   r)   _   r6   r   r)   N)
__future__r    r   _compatr   	_resourcer   r   	_responser	   r
   resources.betar   r   r   r*   __all__r   r'   r   r)   r$   r   r   <module>rF      sd    #   & : Y l
'3 368$ 86
 

 

 

 
r   