§
    ÂiÃ'  ã                   óØ   — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	Z	 ej
        e¦  «        ZdZ G d„ dej        ¦  «        Z G d	„ d
ej        ¦  «        Zd„ Z G d„ de¦  «        ZdS )zTransport adapter for httplib2.é    )Úabsolute_importN)Ú
exceptions)Ú	transport)ÚreadÚseekÚtellc                   óZ   — e Zd ZdZd„ Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         ZdS )Ú	_Responsezžhttplib2 transport response adapter.

    Args:
        response (httplib2.Response): The raw httplib2 response.
        data (bytes): The response body.
    c                 ó"   — || _         || _        d S ©N)Ú	_responseÚ_data)ÚselfÚresponseÚdatas      ú^/var/www/html/jarvis.com/web/backend/venv/lib/python3.11/site-packages/google_auth_httplib2.pyÚ__init__z_Response.__init__(   s   € Ø!ˆŒØˆŒ
ˆ
ˆ
ó    c                 ó   — | j         j        S )zint: The HTTP status code.)r   Ústatus©r   s    r   r   z_Response.status,   s   € ð Œ~Ô$Ð$r   c                 ó*   — t          | j        ¦  «        S )z-Mapping[str, str]: The HTTP response headers.)Údictr   r   s    r   Úheadersz_Response.headers1   s   € õ �D”NÑ#Ô#Ð#r   c                 ó   — | j         S )zbytes: The response body.)r   r   s    r   r   z_Response.data6   s   € ð ŒzÐr   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   r   r   © r   r   r
   r
       s~   € € € € € ðð ðð ð ð ð%ð %ñ „Xð%ð ð$ð $ñ „Xð$ð ðð ñ „Xðð ð r   r
   c                   ó"   — e Zd ZdZd„ Z	 dd„ZdS )ÚRequesta…  httplib2 request adapter.

    This class is used internally for making requests using various transports
    in a consistent way. If you use :class:`AuthorizedHttp` you do not need
    to construct or use this class directly.

    This class can be useful if you want to manually refresh a
    :class:`~google.auth.credentials.Credentials` instance::

        import google_auth_httplib2
        import httplib2

        http = httplib2.Http()
        request = google_auth_httplib2.Request(http)

        credentials.refresh(request)

    Args:
        http (httplib2.Http): The underlying http object to use to make
            requests.
    c                 ó   — || _         d S r   )Úhttp)r   r%   s     r   r   zRequest.__init__S   s   € ØˆŒ	ˆ	ˆ	r   ÚGETNc                 ó@  — |�t                                d¦  «         	 t                                d||¦  «          | j        j        |f|||dœ|¤Ž\  }}t          ||¦  «        S # t          j        t          j        j	        f$ r}	t          j        |	¦  «        ‚d}	~	ww xY w)a3  Make an HTTP request using httplib2.

        Args:
            url (str): The URI to be requested.
            method (str): The HTTP method to use for the request. Defaults
                to 'GET'.
            body (bytes): The payload / body in HTTP request.
            headers (Mapping[str, str]): Request headers.
            timeout (Optional[int]): The number of seconds to wait for a
                response from the server. This is ignored by httplib2 and will
                issue a warning.
            kwargs: Additional arguments passed throught to the underlying
                :meth:`httplib2.Http.request` method.

        Returns:
            google.auth.transport.Response: The HTTP response.

        Raises:
            google.auth.exceptions.TransportError: If any exception occurred.
        Nzvhttplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.zMaking request: %s %s)ÚmethodÚbodyr   )Ú_LOGGERÚwarningÚdebugr%   Úrequestr
   Úhttplib2ÚHttpLib2ErrorÚclientÚHTTPExceptionr   ÚTransportError)
r   Úurlr(   r)   r   ÚtimeoutÚkwargsr   r   Úexcs
             r   Ú__call__zRequest.__call__V   sÉ   € ð. ÐÝ�OŠOðPñô ð ð
		1Ý�MŠMÐ1°6¸3Ñ?Ô?Ð?Ø.˜TœYÔ.ØðØ"¨°wðð ØBHðð ‰NˆH�dõ ˜X tÑ,Ô,Ð,øõ Ô&­¬Ô(AÐBð 	1ð 	1ð 	1ÝÔ+¨CÑ0Ô0Ð0øøøøð	1øøøs   žAA$ Á$ BÂBÂB)r&   NNN)r   r   r   r   r   r7   r!   r   r   r#   r#   <   sH   € € € € € ðð ð,ð ð ð CGð&1ð &1ð &1ð &1ð &1ð &1r   r#   c                  ó(   — t          j        ¦   «         S )z)Returns a default httplib2.Http instance.)r.   ÚHttpr!   r   r   Ú_make_default_httpr:      s   € åŒ=‰?Œ?Ðr   c                   ó6  — e Zd ZdZdej        ej        fd„Zd„ Zddde	j
        dfd„Zdd„Zed„ ¦   «         Zej        d	„ ¦   «         Zed
„ ¦   «         Zej        d„ ¦   «         Zed„ ¦   «         Zej        d„ ¦   «         Zed„ ¦   «         Zej        d„ ¦   «         ZdS )ÚAuthorizedHttpa¢  A httplib2 HTTP class with credentials.

    This class is used to perform requests to API endpoints that require
    authorization::

        from google.auth.transport._httplib2 import AuthorizedHttp

        authed_http = AuthorizedHttp(credentials)

        response = authed_http.request(
            'https://www.googleapis.com/storage/v1/b')

    This class implements :meth:`request` in the same way as
    :class:`httplib2.Http` and can usually be used just like any other
    instance of :class:`httplib2.Http`.

    The underlying :meth:`request` implementation handles adding the
    credentials' headers to the request and refreshing credentials as needed.
    Nc                 ó�   — |€t          ¦   «         }|| _        || _        || _        || _        t          | j        ¦  «        | _        dS )a˜  
        Args:
            credentials (google.auth.credentials.Credentials): The credentials
                to add to the request.
            http (httplib2.Http): The underlying HTTP object to
                use to make requests. If not specified, a
                :class:`httplib2.Http` instance will be constructed.
            refresh_status_codes (Sequence[int]): Which HTTP status codes
                indicate that credentials should be refreshed and the request
                should be retried.
            max_refresh_attempts (int): The maximum number of times to attempt
                to refresh the credentials and retry the request.
        N)r:   r%   ÚcredentialsÚ_refresh_status_codesÚ_max_refresh_attemptsr#   Ú_request)r   r>   r%   Úrefresh_status_codesÚmax_refresh_attemptss        r   r   zAuthorizedHttp.__init__™   sJ   € ð* ˆ<Ý%Ñ'Ô'ˆDàˆŒ	Ø&ˆÔØ%9ˆÔ"Ø%9ˆÔ"õ   ¤	Ñ*Ô*ˆŒˆˆr   c                 ó8   — | j                              ¦   «          dS )zCalls httplib2's Http.closeN)r%   Úcloser   s    r   rE   zAuthorizedHttp.close¹   s   € àŒ	�ŠÑÔÐÐÐr   r&   c           	      ór  ‡— |                      dd¦  «        }|�|                     ¦   «         ni }	| j                             | j        |||	¦  «         d}
t          ˆfd„t          D ¦   «         ¦  «        r‰                     ¦   «         }
 | j        j	        ||f‰|	||dœ|¤Ž\  }}|j
        | j        v rƒ|| j        k     rxt                               d|j
        |dz   | j        ¦  «         | j                             | j        ¦  «         |
�‰                     |
¦  «          | j	        ||f‰||||dz   dœ|¤ŽS ||fS )	z*Implementation of httplib2's Http.request.Ú_credential_refresh_attemptr   Nc              3   ó:   •K  — | ]}t          ‰|d ¦  «        V — Œd S r   )Úgetattr)Ú.0Ústream_propr)   s     €r   ú	<genexpr>z)AuthorizedHttp.request.<locals>.<genexpr>Ô   s/   øè è € ÐVÐV°K�w�t˜[¨$Ñ/Ô/ÐVÐVÐVÐVÐVÐVr   )r)   r   ÚredirectionsÚconnection_typez;Refreshing credentials due to a %s response. Attempt %s/%s.é   )r)   r   rM   rN   rG   )ÚpopÚcopyr>   Úbefore_requestrA   ÚallÚ_STREAM_PROPERTIESr   r%   r-   r   r?   r@   r*   ÚinfoÚrefreshr   )r   Úurir(   r)   r   rM   rN   r5   rG   Úrequest_headersÚbody_stream_positionr   Úcontents      `         r   r-   zAuthorizedHttp.request½   sª  ø€ ð '-§j¢jÐ1NÐPQÑ&RÔ&RÐ#ð -4Ð,?˜'Ÿ,š,™.œ.˜.ÀRˆàÔ×'Ò'¨¬°v¸sÀOÑTÔTÐTð  $ÐÝÐVÐVÐVÐVÕCUÐVÑVÔVÑVÔVð 	/Ø#'§9¢9¡;¤;Ð ð .˜DœIÔ-ØØð
ð Ø#Ø%Ø+ð
ð 
ð ð
ð 
Ñˆ�'ð  ŒO˜tÔ9Ð9Ð9Ø+¨dÔ.HÒHÐHå�LŠLØMØ”Ø+¨aÑ/ØÔ*ñ	ô ð ð Ô×$Ò$ T¤]Ñ3Ô3Ð3ð $Ð/Ø—	’	Ð.Ñ/Ô/Ð/ð  �4”<ØØð	ð ØØ)Ø /Ø,GÈ!Ñ,Kð	ð 	ð ð	ð 	ð 	ð ˜Ð Ð r   c                 óB   — | j                              ||||¬¦  «         dS )z'Proxy to httplib2.Http.add_certificate.)ÚpasswordN)r%   Úadd_certificate)r   ÚkeyÚcertÚdomainr\   s        r   r]   zAuthorizedHttp.add_certificate  s'   € àŒ	×!Ò! # t¨V¸hÐ!ÑGÔGÐGÐGÐGr   c                 ó   — | j         j        S )ú#Proxy to httplib2.Http.connections.©r%   Úconnectionsr   s    r   rd   zAuthorizedHttp.connections
  s   € ð ŒyÔ$Ð$r   c                 ó   — || j         _        dS )rb   Nrc   ©r   Úvalues     r   rd   zAuthorizedHttp.connections  s   € ð !&ˆŒ	ÔÐÐr   c                 ó   — | j         j        S )ú(Proxy to httplib2.Http.follow_redirects.©r%   Úfollow_redirectsr   s    r   rk   zAuthorizedHttp.follow_redirects  s   € ð ŒyÔ)Ð)r   c                 ó   — || j         _        dS )ri   Nrj   rf   s     r   rk   zAuthorizedHttp.follow_redirects  s   € ð &+ˆŒ	Ô"Ð"Ð"r   c                 ó   — | j         j        S )úProxy to httplib2.Http.timeout.©r%   r4   r   s    r   r4   zAuthorizedHttp.timeout  s   € ð ŒyÔ Ð r   c                 ó   — || j         _        dS )rn   Nro   rf   s     r   r4   zAuthorizedHttp.timeout#  s   € ð "ˆŒ	ÔÐÐr   c                 ó   — | j         j        S )ú&Proxy to httplib2.Http.redirect_codes.©r%   Úredirect_codesr   s    r   rt   zAuthorizedHttp.redirect_codes(  s   € ð ŒyÔ'Ð'r   c                 ó   — || j         _        dS )rr   Nrs   rf   s     r   rt   zAuthorizedHttp.redirect_codes-  s   € ð $)ˆŒ	Ô Ð Ð r   r   )r   r   r   r   r   ÚDEFAULT_REFRESH_STATUS_CODESÚDEFAULT_MAX_REFRESH_ATTEMPTSr   rE   r.   ÚDEFAULT_MAX_REDIRECTSr-   r]   r    rd   Úsetterrk   r4   rt   r!   r   r   r<   r<   „   s~  € € € € € ðð ð. Ø&ÔCØ&ÔCð+ð +ð +ð +ð@ð ð ð ØØØÔ3ØðG!ð G!ð G!ð G!ðRHð Hð Hð Hð ð%ð %ñ „Xð%ð Ôð&ð &ñ Ôð&ð ð*ð *ñ „Xð*ð Ôð+ð +ñ Ôð+ð ð!ð !ñ „Xð!ð „^ð"ð "ñ „^ð"ð ð(ð (ñ „Xð(ð Ôð)ð )ñ Ôð)ð )ð )r   r<   )r   Ú
__future__r   Úhttp.clientr%   ÚloggingÚgoogle.authr   r   r.   Ú	getLoggerr   r*   rT   ÚResponser
   r#   r:   Úobjectr<   r!   r   r   ú<module>r�      s+  ðð &Ð %à &Ð &Ð &Ð &Ð &Ð &à Ð Ð Ð Ø €€€à "Ð "Ð "Ð "Ð "Ð "Ø !Ð !Ð !Ð !Ð !Ð !Ø €€€ð ˆ'Ô
˜HÑ
%Ô
%€à-Ð ðð ð ð ð �	Ô"ñ ô ð ð8@1ð @1ð @1ð @1ð @1ˆiÔñ @1ô @1ð @1ðFð ð ð
l)ð l)ð l)ð l)ð l)�Vñ l)ô l)ð l)ð l)ð l)r   