
    (ph                     j    S r SSKrSSKJr  SSKJr  SSKJr  SSKJr   " S S\R                  5      r
g)	z8Create / interact with Google Cloud Storage connections.    N)_http)__version__)_helpers)create_trace_spanc                      ^  \ rS rSrSr\R                  " 5       rSrSU 4S jjr	\R                  r Sr U 4S jrSrU =r$ )	
Connection   a  A connection to Google Cloud Storage via the JSON REST API.

Mutual TLS will be enabled if the "GOOGLE_API_USE_CLIENT_CERTIFICATE"
environment variable is set to the exact string "true" (case-sensitive).

Mutual TLS is not compatible with any API endpoint or universe domain
override at this time. If such settings are enabled along with
"GOOGLE_API_USE_CLIENT_CERTIFICATE", a ValueError will be raised.

:type client: :class:`~google.cloud.storage.client.Client`
:param client: The client that owns the current connection.

:type client_info: :class:`~google.api_core.client_info.ClientInfo`
:param client_info: (Optional) instance used to generate user agent.

:type api_endpoint: str
:param api_endpoint: (Optional) api endpoint to use.
z#https://storage.mtls.googleapis.comc                   > [         [        U ]  X5        U=(       d    U R                  U l        U R
                  U l        US L U l        [        U R                  l
        U R                  R                  c  SU R                  l        S[         3nX@R                  R                  ;  a$  U R                  =R                  SU S3-  sl        g g )N zgcloud-python/ )superr   __init__DEFAULT_API_ENDPOINTAPI_BASE_URLDEFAULT_API_MTLS_ENDPOINTAPI_BASE_MTLS_URLALLOW_AUTO_SWITCH_TO_MTLS_URLr   _client_infoclient_library_version
user_agent)selfclientclient_infoapi_endpointagent_version	__class__s        M/var/www/html/venv/lib/python3.13/site-packages/google/cloud/storage/_http.pyr   Connection.__init__/   s    j$(=(ED,E,E!%!?!?-9T-A*3>0 ''/+-D((6 1 1 < <<((aa,@@( =    z*{api_base_url}/storage/{api_version}{path}c                   > UR                  SS 5      n[        R                  " 5       nXBS'   SU0n[        R                  " [
        [        U ]  /UQ70 UD6n[        SUU R                  UUS9   U(       a"   UR                  " S0 UD6nU(       a  U" U5      nU" 5       sS S S 5        $ ! [         a     N+f = f! , (       d  f       g = f)Nretryextra_api_infozgccl-invocation-idzStorage.Connection.api_request)name
attributesr   api_requestr!    )popr   _get_invocation_id	functoolspartialr   r   r%   r   _client"get_retry_policy_if_conditions_metAttributeError)r   argskwargsr!   invocation_idspan_attributescallr   s          r   r%   Connection.api_requestC   s    

7D) 335#0  -
   z4!DVtVvV1&<<
 !DDNvNE  ;D6
 
 & 
 
s0   .B87B(	B8(
B52B84B55B88
C)r   r   r   )NN)__name__
__module____qualname____firstlineno____doc__r   _get_default_storage_base_urlr   r   r   _API_VERSIONAPI_VERSIONAPI_URL_TEMPLATEr%   __static_attributes____classcell__)r   s   @r   r   r      sH    & $AAC EA ''KFC: r   r   )r8   r)   google.cloudr   google.cloud.storager   r   +google.cloud.storage._opentelemetry_tracingr   JSONConnectionr   r&   r   r   <module>rC      s-    ?   , ) IB%% Br   