
    b\j                        S SK Jr  S SKrS SKJr  S SKJr  S SKrSSK	J
r
JrJrJrJr  SSKJr  SSKJr  SS	KJr   " S
 S5      rg)    )annotationsN)Any)override   )BodyQueryHeadersNotGiven	not_given)is_given)
model_copy)FinalRequestOptionsc                     \ rS rSrSrSSSS.           SS jjr\SS j5       r\SS	 j5       r\SS
 j5       r	\SS j5       r
\SS j5       r\SS j5       r\SS j5       r\\\\\\S.             SS jjr\SS j5       rSrg)
APIRequest   zA view over the request that the client is about to execute.

Treat instances as immutable; use `copy()` to derive a modified request.
FNr   )stream
stream_clsretries_takenc               @    Xl         X l        X0l        X@l        XPl        g Noptionscast_tor   r   r   )selfr   r   r   r   r   s         H/var/www/website/venv/lib/python3.13/site-packages/anthropic/_request.py__init__APIRequest.__init__   s#     $*	    c                .    U R                   R                  $ r   )r   methodr   s    r   r    APIRequest.method(       ||"""r   c                .    U R                   R                  $ r   )r   urlr!   s    r   r%   APIRequest.url,   s    ||r   c                V    U R                   R                  n[        U5      (       a  U$ 0 $ r   )r   headersr   )r   r(   s     r   r(   APIRequest.headers0   s&    ,,&&"7++w33r   c                .    U R                   R                  $ r   )r   paramsr!   s    r   query_paramsAPIRequest.query_params5   r#   r   c                .    U R                   R                  $ r   )r   	json_datar!   s    r   jsonAPIRequest.json9   s    ||%%%r   c                .    U R                   R                  $ r   )r   timeoutr!   s    r   r3   APIRequest.timeout=   s    ||###r   c                .    U R                   R                  $ r   )r   max_retriesr!   s    r   r6   APIRequest.max_retriesA   s    ||'''r   )r    r%   r(   r+   bodyr3   c                  [        U R                  5      n[        R                  " UR                  5      Ul        [        R                  " UR
                  5      Ul        [        R                  " UR                  5      Ul        [        UR                  5      (       a  [        UR                  5      Ul        [        U5      (       a  Xl
        [        U5      (       a  X'l        [        U5      (       a  X7l        [        U5      (       a  XGl        [        U[        5      (       d  XWl        [        U[        5      (       d  Xgl        [        UU R                   U R"                  U R$                  U R&                  S9$ )Nr   )r   r   _copydeepcopyr/   
extra_jsonr+   r   r(   dictr    r%   
isinstancer
   r3   r   r   r   r   r   )r   r    r%   r(   r+   r8   r3   r   s           r   copyAPIRequest.copyE   s    T\\*!NN7+<+<="^^G,>,>?7GOO$$"7??3GOF#NC==KG%OF#N$)) $'8,,%OLL;;,,
 	
r   c                \    SU R                   < SU R                  < SU R                  < S3$ )Nz<APIRequest method=z url=z stream=>)r    r%   r   r!   s    r   __repr__APIRequest.__repr__p   s*    $T[[O5HT[[O[\]]r   )r   r   r   r   r   )r   r   r   r   r   boolr   ztype[Any] | Noner   intreturnNone)rG   str)rG   r	   )rG   r   )rG   zBody | None)rG   'float | httpx.Timeout | None | NotGiven)rG   zint | NotGiven)r    str | NotGivenr%   rK   r(   zHeaders | NotGivenr+   zQuery | NotGivenr8   zBody | NotGivenr3   rJ   rG   r   )__name__
__module____qualname____firstlineno____doc__r   propertyr    r%   r(   r,   r0   r3   r6   r   r?   r   rC   __static_attributes__ r   r   r   r      sU    '+ % 	
  %  
& # #     4 4 # # & & $ $ ( ( "+'&/#, );D)
 )
 	)

 $)
 !)
 )
 9)
 
)
V ^ ^r   r   )
__future__r   r?   r:   typingr   typing_extensionsr   httpx_typesr   r   r	   r
   r   _utilsr   _compatr   _modelsr   r   rS   r   r   <module>r\      s1    "   &  = =   (c^ c^r   