+
     IicA  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHtHt ]P8                  ! ]4      t]! 4       t^<t ^
t!R t" ! R R4      t# ! R R4      t$R# )    N)parsers)create_request_object)get_current_datetime)HTTPClientError)get_global_history_recorder)first_non_none_response)handle_checksum_body)URLLib3Session)StreamingBody)get_environ_proxiesis_valid_endpoint_urlis_valid_ipv6_endpoint_urlc                s   RV P                   RV P                  RRVP                  //pVR,          R8  d   V P                  VR&   V# VP                  '       d   V P
                  VR&   V# VP                  '       d4   VR,          P                  R4      p\        V P
                  V4      VR&   V# V P                  VR&   V# )a  Convert an HTTP response object to a request dict.

This converts the HTTP response object to a dictionary.

:type http_response: botocore.awsrequest.AWSResponse
:param http_response: The HTTP response from an AWS service request.

:rtype: dict
:return: A response dictionary which will contain the following keys:
    * headers (dict)
    * status_code (int)
    * body (string or file-like object)

headersstatus_codecontextoperation_name,  bodyzcontent-length)	r   r   nameZcontenthas_event_stream_outputZrawhas_streaming_outputgetr	   )http_responseoperation_modelresponse_dictZlength   &&  6/usr/lib/python3.14/site-packages/botocore/endpoint.pyconvert_to_response_dictr   +   s      	=((}00o22
M ]#s* - 5 5f  
	0	0	0 - 1 1f  
	-	-	-y)--.>? -m.?.? Hf  !. 5 5f    c                   s   a  ] tR t^Mt o RtRR ltR tR tR tRR lt	R t
R	 tR
 tR tRR ltR tR tR tR tRR ltR tRtV tR# )Endpointa  
Represents an endpoint for a particular service in a specific
region.  Only an endpoint can make requests.

:ivar service: The Service object that describes this endpoints
    service.
:ivar host: The fully qualified endpoint hostname.
:ivar session: The session object.
Nc                s    W n         W0n        Wn        \        P                  ! 4       V n        Vf   \        P                  ! 4       pW@n        WPn	        V P                  f   \        4       V n	        R # R # N)_endpoint_prefix_event_emitterhost	threadingZLock_lockr   ZResponseParserFactory_response_parser_factoryhttp_sessionr   )selfr"   endpoint_prefixevent_emitterresponse_parser_factoryr&   s   &&&&&&r   __init__ZEndpoint.__init__X   s`     !0+	^^%
"*&-&C&C&E#(?%($ . 0D %r   c                s:    V P                    R V P                   R2# )Z(Z))r    r"   r'      &r   __repr__ZEndpoint.__repr__k   s     ''($))A66r   c                s:    V P                   P                  4        R # r   )r&   closer,   r-   r   r/   ZEndpoint.closen   s    !r   c                sR    \         P                  R VV4       V P                  W!4      # )z%Making request for %s with params: %s)loggerdebug_send_request)r'   r   request_dicts   &&&r   make_requestZEndpoint.make_requestq   s*    3	

 !!,@@r   c                sV   \        V4      pV'       d   \        VP                  VP                  .4      Vn        VP
                  P                  P                  4       pR V RVP                   2pV P                  P                  VVVP                  R7       V P                  V4      pV# )zrequest-created..)requestr   )r   Zanyr   r   Zstream_outputservice_model
service_id	hyphenizer   r!   emitprepare_request)r'   Zparamsr   r6   r8   
event_nameZprepared_requests   &&&    r   create_requestZEndpoint.create_requesty   s    '/$'#88#;;%G! )66AAKKMJ+J<q9M9M8NOJ$$.33 % 
  //8r   c                s    VP                  4        F0  w  r#\        V\        4      '       g   K  VP                  R 4      W&   K2  	  R# )zutf-8N)ZitemsZ
isinstancestrZencode)r'   r   ZkeyZvaluer   r   _encode_headersZEndpoint._encode_headers   s1    !--/JC%%%$||G4 *r   c                sX    V P                  VP                  4       VP                  4       # r   )r?   r   Zpreparer'   r6      &&r   r;   ZEndpoint.prepare_request   s!    W__-  r   c                s    \        4       p\        P                  P                  VR 4      pWQ,
          pV\        P                  ! VR7      ,           V,           pVP	                  R4      # )z%a, %d %b %Y %H:%M:%S %Z)Zsecondsz%Y%m%dT%H%M%SZ)r   datetimeZstrptimeZ	timedeltaZstrftime)r'   response_received_timestampZdate_headerread_timeoutZlocal_timestampZdate_conversionZestimated_skewttls   &&&&    r   _calculate_ttlZEndpoint._calculate_ttl   sg     /0"++443
 )F  67 	
 ||,--r   c                s(   V^ ,          P                   P                  R4      pVP                  R4      pV'       d.   V'       g$    \        4       pV P                  VVV4      VR&   R# R# R#   \         d    \
        P                  RRR7        R# i ; i)r    ZDatehas_streaming_inputrE   z9Exception received when updating retries context with TTLTZexc_infoN)r   r   r   rF   	Exceptionr0   r1   )r'   retries_contextrD   success_responseZresponse_date_headerrG   rC   s   &&&&   r   _set_ttlZEndpoint._set_ttl   s    /2::>>vF-112GH(;.B.D+)-)<)</( *& )<  O!  s    A+ +"BBc                s    VP                  R / 4      pW$R&   RV9  d"   \        \        P                  ! 4       4      VR&   V'       d(   VR,          P                  pV P                  WEV4       R# R# )Zretriesattemptzinvocation-idZclient_configN)Z
setdefaultr>   uuidZuuid4rD   rL   )r'   r   rM   rK   rJ   rD   s   &&&&  r   _update_retries_contextZ Endpoint._update_retries_context   s`    !,,Y;%,	"/1/24::</@OO,"?3@@LMM/9IJ r   c                s   ^pVR,          pV P                  WC4       V P                  W4      pV P                  WRV4      w  rgV P                  VVVVV4      '       dS   V^,          pV P                  WCV4       VP	                  4        V P                  W4      pV P                  WRV4      w  rgKm  Ve+   RV^,          9   d   V^,
          pVV^,          R,          R&   Ve   VhV# )i   r   ZResponseMetadataZRetryAttempts)rO   r=   _get_response_needs_retryZreset_stream)	r'   r3   r   attemptsr   r6   rK   	exceptionZtotal_retriess	   &&&      r   r2   ZEndpoint._send_request   s   y)$$W7%%lD&*&8&8g'
# 
 
 MH((<LM
   ")),HG*.*<*<'+'i ("&6q&99 %qLM Q 23OD  O##r   c                s   V P                  WV4      w  rER RRRRVRV/pVe   Vw  rxWR&   \        Wr4      VR &   VP                  P                  P	                  4       p	V P
                  P                  ! RV	 RVP                   23/ VB  WE3# )r   Nparsed_responser   rS   zresponse-received.r5   )_do_get_responser   r7   r8   r9   r!   r:   r   )
r'   r6   r   r   rK   rS   Zkwargs_to_emitr   rT   r8   s
   &&&&      r   rP   ZEndpoint._get_response   s     '+&;&;g'
# Ttw	
 '-=*M0?,-.F/N?+ %22==GGI
   Ao.B.B-CD	
	
  **r   c                s    \         P                  R V4       \        P                  RRVP                  RVP
                  RVP                  RVP                  RVP                  /4       VP                  P                  P                  4       pRV RVP                   2pV P                  P                  WQR	7      p\        V4      pVf   V P!                  V4      p\'        Yr4      p	\)        TT	TT4       T	P+                  4       p
TP,                  T
R&   \        P                  RT
4       TP                  P.                  p/ pT P                  P                  RT RTP                   2TT	TR7       T P0                  P3                  T4      pTP5                  YP6                  4      pTP9                  T4       TP:                  R8  d   T P=                  T	TTT4       \        P                  RT4       Y~3R
3#   \"         d   pR
T3u R
p?# R
p?i\$         d&   p\         P                  RRR7       R
T3u R
p?# R
p?ii ; i)zSending http request: %sZHTTP_REQUESTmethodr   Z	streamingurlr   zbefore-send.r5   )r6   Nz-Exception received when sending HTTP request.TrH   ZHTTP_RESPONSEzbefore-parse.)r   r   customized_response_dictr   ZPARSED_RESPONSE)r0   r1   history_recorderZrecordrV   r   rG   rW   r   r7   r8   r9   r   r!   r:   r   _sendr   rI   r   r   Zcopyr   Zresolved_protocolr%   Zcreate_parserparseZoutput_shapeupdater   _add_modeled_error_fields)r'   r6   r   r   r8   r<   	responsesr   Zer   Zhttp_response_record_dictZprotocolrX   parserrT   s   &&&&           r   rU   ZEndpoint._do_get_response  sF   	LL3W=##gnnw!D!D7;;GLL	 )66AAKKMJ'
|1_5I5I4JKJ++000MI3I>M$ $

7 3 1
 			
 %2$6$6$8!00 	"+. 	1JK"00BB#%   J<q)=)=(>?+'%=	 	! 	
 ..<<XF ,,77
 	78 $$+**	 	 1?C/55e  	!9 	LL?$   !9		s6   CG8 8H?HH?H?H?H:4H?:H?c                s    VP                  R / 4      P                  R4      pVf   R# VP                  pVP                  V4      pVf   R# VP                  W4      pVP	                  V4       R# )ZErrorZCodeN)r   r7   Zshape_for_error_coder[   r\   )	r'   r   rT   r   r_   Z
error_coder7   Zerror_shapeZmodeled_parses	   &&&&&    r   r]   Z"Endpoint._add_modeled_error_fieldsL  sj     %(("599&A
'55#88D]@}-r   c           
     s0   VP                   P                  P                  4       pR V RVP                   2pV P                  P                  VVV VVVVR7      p\        V4      p	V	f   R# \        P                  RV	4       \        P                  ! V	4       R# )zneeds-retry.r5   )responseZendpointZ	operationrR   caught_exceptionr3   Fz3Response received to retry, sleeping for %s secondsT)r7   r8   r9   r   r!   r:   r   r0   r1   timeZsleep)
r'   rR   r   r3   r`   ra   r8   r<   r^   Zhandler_responses
   &&&&&&    r   rQ   ZEndpoint._needs_retry^  s     %22==GGI
#J<q1E1E0FG
'',,%-% - 
	 39=# LLE  JJ'(r   c                s8    V P                   P                  V4      # r   )r&   Zsendr@   rA   r   rZ   ZEndpoint._send~  s      %%g..r   )r    r!   r$   r%   r"   r&   )NNr   )__name__
__module____qualname____firstlineno__Z__doc__r+   r.   r/   r4   r=   r?   r;   rF   rL   rO   r2   rP   rU   r]   rQ   rZ   __static_attributes____classdictcell__Z__classdict__   @r   r   r   M   se     1&7"A &5!."K'$R+8E6N.$@/ /r   r   c            	       sN   a  ] tR tRt o R tRR]]]RRRR3	R ltR t	R t
RtV tR# )EndpointCreatori  c                s    Wn         R # r   r!   )r'   r)   rA   r   r+   ZEndpointCreator.__init__  s    +r   Nc           
     s@   \        V4      '       g    \        V4      '       g   \        R V 24      hV	f   V P                  V4      p	VP                  p\
        P                  RW4       V! VV	V P                  V4      VV
VVR7      p\        VVV P                  VVR7      # )zInvalid endpoint: zSetting %s timeout as %s)timeoutproxiesverifymax_pool_connectionssocket_optionsclient_certproxies_config)r(   r)   r*   r&   )
r   r   Z
ValueError_get_proxiesr(   r0   r1   _get_verify_valuer   r!   )r'   r7   Zregion_nameZendpoint_urlro   r*   rm   rp   Zhttp_session_clsrn   rq   rr   rs   r(   r&   s   &&&&&&&&&&&&&  r   create_endpointZEndpointCreator.create_endpoint  s     %
 
,\::1,@AA?''5G'77/J'))&1!5)#)
 +--$;%
 	
r   c                s    \        V4      # r   )r
   )r'   rW   rA   r   rt   ZEndpointCreator._get_proxies  s     #3''r   c                sN    Ve   V# \         P                  P                  RR4      # )NZREQUESTS_CA_BUNDLET)osZenvironr   )r'   ro   rA   r   ru   Z!EndpointCreator._get_verify_value  s'     M zz~~2D99r   rl   )rc   rd   re   rf   r+   DEFAULT_TIMEOUTMAX_POOL_CONNECTIONSr   rv   rt   ru   rg   rh   ri   rj   r   rk   rk     s<     ,  $1')
V(
: :r   rk   )%rB   Zloggingrw   r#   rb   rN   Zbotocorer   Zbotocore.awsrequestr   Zbotocore.compatr   Zbotocore.exceptionsr   Zbotocore.historyr   Zbotocore.hooksr   Zbotocore.httpchecksumr   Zbotocore.httpsessionr   Zbotocore.responser	   Zbotocore.utilsr
   r   r   Z	getLoggerrc   r0   rY   rx   ry   r   r   rk   ) r   r   <module>rz      s      	     5 0 / 8 2 6 / +  
		8	$.0  Dr/ r/j	?: ?:r   