Ë
    U¼Sf~K  ã                   óØ  — U d Z ddlmZ ddlmZ ddlZddlmZ ddlmZ ddl	Z	ddl
mZ 	 ddlZ	 ddlmZ i Zeeef   ed
<   i Zeeef   ed<   i Ze�#ej0                  D ]  Zeeej4                  d   <   Œ  G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ dee¬«      Z  G d„ de «      Z! G d„ de!«      Z" G d„ de!«      Z# G d„ de!«      Z$ G d„ d e!«      Z% G d!„ d"e «      Z& G d#„ d$e&«      Z' G d%„ d&e'«      Z( G d'„ d(e'«      Z) G d)„ d*e'«      Z* G d+„ d,e&«      Z+ G d-„ d.e+«      Z, G d/„ d0e&«      Z- G d1„ d2e-«      Z. G d3„ d4e&«      Z/ G d5„ d6e&«      Z0 G d7„ d8e&«      Z1 G d9„ d:e1«      Z2 G d;„ d<e1«      Z3 G d=„ d>e&«      Z4 G d?„ d@e&«      Z5 G dA„ dBe&«      Z6 G dC„ dDe&«      Z7 G dE„ dFe7«      Z8 G dG„ dHe&«      Z9 G dI„ dJe «      Z: G dK„ dLe:«      Z; G dM„ dNe:«      Z< G dO„ dPe:«      Z= G dQ„ dRe:«      Z> G dS„ dTe:«      Z? G dU„ dVe:«      Z@ G dW„ dXe:«      ZA G dY„ dZeA«      ZBd[„ ZCd\„ ZDd]„ ZEd^„ ZFd_„ ZGd`„ ZHda„ ZIdb„ ZJy# e$ r  e	j                   d	e«       dZY �Œ$w xY w# e$ r dZY �Œ2w xY w)cz½Exceptions raised by Google API core & clients.

This module provides base classes for all errors raised by libraries based
on :mod:`google.api_core`, including both HTTP and gRPC clients.
é    )Úabsolute_import)Úunicode_literalsN)ÚDict)ÚUnion)Úerror_details_pb2)Ú
rpc_statuszCPlease install grpcio-status to obtain helpful grpc error messages.Ú_HTTP_CODE_TO_EXCEPTIONÚ_GRPC_CODE_TO_EXCEPTIONc                   ó   — e Zd ZdZy)ÚGoogleAPIErrorz;Base class for all exceptions raised by Google API Clients.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úYC:\Users\user\Documents\project_loop\venv\Lib\site-packages\google/api_core/exceptions.pyr   r   ;   s   „ ÙEàr   r   c                   ó   — e Zd ZdZy)ÚDuplicateCredentialArgsz,Raised when multiple credentials are passed.Nr   r   r   r   r   r   A   s   „ Ù6àr   r   c                   ó8   ‡ — e Zd ZdZˆ fd„Zed„ «       Zd„ Zˆ xZS )Ú
RetryErrorzÝRaised when a function has exhausted all of its available retries.

    Args:
        message (str): The exception message.
        cause (Exception): The last exception raised when retrying the
            function.
    c                 óH   •— t         t        | �  |«       || _        || _        y ©N)Úsuperr   Ú__init__ÚmessageÚ_cause)Úselfr   ÚcauseÚ	__class__s      €r   r   zRetryError.__init__P   s    ø€ ÜŒj˜$Ñ(¨Ô1ØˆŒØˆ�r   c                 ó   — | j                   S )z5The last exception raised when retrying the function.)r   ©r   s    r   r    zRetryError.causeU   s   € ð �{‰{Ðr   c                 óN   — dj                  | j                  | j                  «      S )Nz{}, last exception: {})Úformatr   r    r#   s    r   Ú__str__zRetryError.__str__Z   s   € Ø'×.Ñ.¨t¯|©|¸T¿Z¹ZÓHÐHr   )	r   r   r   r   r   Úpropertyr    r&   Ú__classcell__©r!   s   @r   r   r   G   s'   ø„ ñôð
 ñó ðöIr   r   c                   ó   — e Zd ZdZd„ Zy)Ú_GoogleAPICallErrorMetaz8Metaclass for registering GoogleAPICallError subclasses.c                 óæ   — t         j                  | |||«      }|j                  � t        j	                  |j                  |«       |j
                  � t        j	                  |j
                  |«       |S r   )ÚtypeÚ__new__Úcoder	   Ú
setdefaultÚgrpc_status_coder
   )ÚmcsÚnameÚbasesÚ
class_dictÚclss        r   r.   z_GoogleAPICallErrorMeta.__new__a   s[   € Ü�l‰l˜3  e¨ZÓ8ˆØ�8‰8ÐÜ#×.Ñ.¨s¯x©x¸Ô=Ø×ÑÐ+Ü#×.Ñ.¨s×/CÑ/CÀSÔIØˆ
r   N)r   r   r   r   r.   r   r   r   r+   r+   ^   s
   „ ÙBór   r+   c                   ó¬   ‡ — e Zd ZU dZdZeedf   ed<   	 dZ	 dˆ fd„	Z	d„ Z
ed„ «       Zed„ «       Zed„ «       Zed	„ «       Zed
„ «       Zed„ «       Zˆ xZS )ÚGoogleAPICallErrora  Base class for exceptions raised by calling API methods.

    Args:
        message (str): The exception message.
        errors (Sequence[Any]): An optional list of error details.
        details (Sequence[Any]): An optional list of objects defined in google.rpc.error_details.
        response (Union[requests.Request, grpc.Call]): The response or
            gRPC call metadata.
        error_info (Union[error_details_pb2.ErrorInfo, None]): An optional object containing error info
            (google.rpc.error_details.ErrorInfo).
    Nr/   c                 ót   •— t         t        | �  |«       || _        	 || _        || _        || _        || _        y r   )r   r8   r   r   Ú_errorsÚ_detailsÚ	_responseÚ_error_info)r   r   ÚerrorsÚdetailsÚresponseÚ
error_infor!   s         €r   r   zGoogleAPICallError.__init__‡   s:   ø€ ÜÔ  $Ñ0°Ô9ØˆŒØ)ØˆŒØˆŒØ!ˆŒØ%ˆÕr   c                 ó¢  — dj                  | j                  | j                  «      }| j                  rdj                  || j                  «      }|S | j                  rm| j                  D �cg c]5  }t        |d«      r't        |d«      r|j                  › d|j                  › �‘Œ7 }}|r!dj                  |dj                  |«      «      }|S c c}w )Nz{} {}r/   r   z: ú
)r%   r/   r   r?   r>   ÚhasattrÚjoin)r   Ú	error_msgÚerrorr>   s       r   r&   zGoogleAPICallError.__str__�   s¸   € Ø—N‘N 4§9¡9¨d¯l©lÓ;ˆ	Ø�<Š<ØŸ™ y°$·,±,Ó?ˆIð Ðð �{Š{ð "&§¡öàÜ˜u fÔ-´'¸%ÀÔ2Kð —z‘z�l " U§]¡] OÒ4ð�ð ñ
 Ø '§¡¨y¸$¿)¹)ÀFÓ:KÓ L�IØÐùòs   Á+:Cc                 óJ   — | j                   r| j                   j                  S dS )zýThe reason of the error.

        Reference:
            https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto#L112

        Returns:
            Union[str, None]: An optional string containing reason of the error.
        N)r=   Úreasonr#   s    r   rI   zGoogleAPICallError.reason¡   ó#   € ð +/×*:Ò*:ˆt×Ñ×&Ñ&ÐDÀÐDr   c                 óJ   — | j                   r| j                   j                  S dS )a5  The logical grouping to which the "reason" belongs.

        Reference:
            https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto#L112

        Returns:
            Union[str, None]: An optional string containing a logical grouping to which the "reason" belongs.
        N)r=   Údomainr#   s    r   rL   zGoogleAPICallError.domain­   rJ   r   c                 óJ   — | j                   r| j                   j                  S dS )a.  Additional structured details about this error.

        Reference:
            https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto#L112

        Returns:
            Union[Dict[str, str], None]: An optional object containing structured details about the error.
        N)r=   Úmetadatar#   s    r   rN   zGoogleAPICallError.metadata¹   s#   € ð -1×,<Ò,<ˆt×Ñ×(Ñ(ÐFÀ$ÐFr   c                 ó,   — t        | j                  «      S )zuDetailed error information.

        Returns:
            Sequence[Any]: A list of additional error details.
        )Úlistr:   r#   s    r   r>   zGoogleAPICallError.errorsÅ   s   € ô �D—L‘LÓ!Ð!r   c                 ó,   — t        | j                  «      S )al  Information contained in google.rpc.status.details.

        Reference:
            https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
            https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto

        Returns:
            Sequence[Any]: A list of structured objects from error_details.proto
        )rP   r;   r#   s    r   r?   zGoogleAPICallError.detailsÎ   s   € ô �D—M‘MÓ"Ð"r   c                 ó   — | j                   S )zYOptional[Union[requests.Request, grpc.Call]]: The response or
        gRPC call metadata.)r<   r#   s    r   r@   zGoogleAPICallError.responseÛ   s   € ð �~‰~Ðr   )r   r   NN)r   r   r   r   r/   r   ÚintÚ__annotations__r1   r   r&   r'   rI   rL   rN   r>   r?   r@   r(   r)   s   @r   r8   r8   j   s·   ø… ñ
ð "€Dˆ%��T�	Ñ
Ó!ðð Ððõ&òð" ñ	Eó ð	Eð ñ	Eó ð	Eð ñ	Gó ð	Gð ñ"ó ð"ð ñ
#ó ð
#ð ñó ôr   r8   )Ú	metaclassc                   ó   — e Zd ZdZy)ÚRedirectionz8Base class for for all redirection (HTTP 3xx) responses.Nr   r   r   r   rW   rW   â   s   „ ÚBr   rW   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚMovedPermanentlyz7Exception mapping a ``301 Moved Permanently`` response.N)r   r   r   r   ÚhttpÚclientÚMOVED_PERMANENTLYr/   r   r   r   rY   rY   æ   ó   „ ÙAà�;‰;×(Ñ(�Dr   rY   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚNotModifiedz2Exception mapping a ``304 Not Modified`` response.N)r   r   r   r   rZ   r[   ÚNOT_MODIFIEDr/   r   r   r   r_   r_   ì   ó   „ Ù<à�;‰;×#Ñ#�Dr   r_   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚTemporaryRedirectz8Exception mapping a ``307 Temporary Redirect`` response.N)r   r   r   r   rZ   r[   ÚTEMPORARY_REDIRECTr/   r   r   r   rc   rc   ò   ó   „ ÙBà�;‰;×)Ñ)�Dr   rc   c                   ó   — e Zd ZdZdZy)ÚResumeIncompletez¿Exception mapping a ``308 Resume Incomplete`` response.

    .. note:: :attr:`http.client.PERMANENT_REDIRECT` is ``308``, but Google
        APIs differ in their use of this status code.
    i4  N)r   r   r   r   r/   r   r   r   rg   rg   ø   s   „ ñð �Dr   rg   c                   ó   — e Zd ZdZy)ÚClientErrorz5Base class for all client error (HTTP 4xx) responses.Nr   r   r   r   ri   ri     s   „ Ú?r   ri   c                   ó<   — e Zd ZdZej
                  j                  Zy)Ú
BadRequestz1Exception mapping a ``400 Bad Request`` response.N)r   r   r   r   rZ   r[   ÚBAD_REQUESTr/   r   r   r   rk   rk     ó   „ Ù;à�;‰;×"Ñ"�Dr   rk   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚInvalidArgumentzCException mapping a :attr:`grpc.StatusCode.INVALID_ARGUMENT` error.N)r   r   r   r   ÚgrpcÚ
StatusCodeÚINVALID_ARGUMENTr1   r   r   r   ro   ro     s    „ ÙMà;?Ð;K�t—‘×7Ñ7ÑÐQUÑr   ro   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚFailedPreconditionzJException mapping a :attr:`grpc.StatusCode.FAILED_PRECONDITION`
    error.N)r   r   r   r   rp   rq   ÚFAILED_PRECONDITIONr1   r   r   r   rt   rt     s%   „ ñð ?CÐ>N�t—‘×:Ñ:ÑÐTXÑr   rt   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)Ú
OutOfRangez?Exception mapping a :attr:`grpc.StatusCode.OUT_OF_RANGE` error.N)r   r   r   r   rp   rq   ÚOUT_OF_RANGEr1   r   r   r   rw   rw     s   „ ÙIà7;Ð7G�t—‘×3Ñ3ÑÈTÑr   rw   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚUnauthorizedz2Exception mapping a ``401 Unauthorized`` response.N)r   r   r   r   rZ   r[   ÚUNAUTHORIZEDr/   r   r   r   rz   rz     ra   r   rz   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚUnauthenticatedzBException mapping a :attr:`grpc.StatusCode.UNAUTHENTICATED` error.N)r   r   r   r   rp   rq   ÚUNAUTHENTICATEDr1   r   r   r   r}   r}   %  s    „ ÙLà:>Ð:J�t—‘×6Ñ6ÑÐPTÑr   r}   c                   ó<   — e Zd ZdZej
                  j                  Zy)Ú	Forbiddenz/Exception mapping a ``403 Forbidden`` response.N)r   r   r   r   rZ   r[   Ú	FORBIDDENr/   r   r   r   r€   r€   +  s   „ Ù9à�;‰;× Ñ �Dr   r€   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚPermissionDeniedzDException mapping a :attr:`grpc.StatusCode.PERMISSION_DENIED` error.N)r   r   r   r   rp   rq   ÚPERMISSION_DENIEDr1   r   r   r   rƒ   rƒ   1  ó    „ ÙNà<@Ð<L�t—‘×8Ñ8ÑÐRVÑr   rƒ   c                   ór   — e Zd ZdZej
                  j                  Ze�ej                  j                  Z
ydZ
y)ÚNotFoundz`Exception mapping a ``404 Not Found`` response or a
    :attr:`grpc.StatusCode.NOT_FOUND` error.N)r   r   r   r   rZ   r[   Ú	NOT_FOUNDr/   rp   rq   r1   r   r   r   r‡   r‡   7  s2   „ ñ0ð �;‰;× Ñ €DØ48Ð4D�t—‘×0Ñ0ÑÈ$Ñr   r‡   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚMethodNotAllowedz8Exception mapping a ``405 Method Not Allowed`` response.N)r   r   r   r   rZ   r[   ÚMETHOD_NOT_ALLOWEDr/   r   r   r   rŠ   rŠ   ?  re   r   rŠ   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚConflictz.Exception mapping a ``409 Conflict`` response.N)r   r   r   r   rZ   r[   ÚCONFLICTr/   r   r   r   r�   r�   E  s   „ Ù8à�;‰;×Ñ�Dr   r�   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚAlreadyExistszAException mapping a :attr:`grpc.StatusCode.ALREADY_EXISTS` error.N)r   r   r   r   rp   rq   ÚALREADY_EXISTSr1   r   r   r   r�   r�   K  s   „ ÙKà9=Ð9I�t—‘×5Ñ5ÑÈtÑr   r�   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚAbortedz:Exception mapping a :attr:`grpc.StatusCode.ABORTED` error.N)r   r   r   r   rp   rq   ÚABORTEDr1   r   r   r   r“   r“   Q  ó   „ ÙDà26Ð2B�t—‘×.Ñ.ÑÈÑr   r“   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚLengthRequiredz5Exception mapping a ``411 Length Required`` response.N)r   r   r   r   rZ   r[   ÚLENGTH_REQUIREDr/   r   r   r   r—   r—   W  ó   „ Ù?à�;‰;×&Ñ&�Dr   r—   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚPreconditionFailedz9Exception mapping a ``412 Precondition Failed`` response.N)r   r   r   r   rZ   r[   ÚPRECONDITION_FAILEDr/   r   r   r   r›   r›   ]  s   „ ÙCà�;‰;×*Ñ*�Dr   r›   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚRequestRangeNotSatisfiablezCException mapping a ``416 Request Range Not Satisfiable`` response.N)r   r   r   r   rZ   r[   ÚREQUESTED_RANGE_NOT_SATISFIABLEr/   r   r   r   rž   rž   c  s   „ ÙMà�;‰;×6Ñ6�Dr   rž   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚTooManyRequestsz7Exception mapping a ``429 Too Many Requests`` response.N)r   r   r   r   rZ   r[   ÚTOO_MANY_REQUESTSr/   r   r   r   r¡   r¡   i  r]   r   r¡   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚResourceExhaustedzEException mapping a :attr:`grpc.StatusCode.RESOURCE_EXHAUSTED` error.N)r   r   r   r   rp   rq   ÚRESOURCE_EXHAUSTEDr1   r   r   r   r¤   r¤   o  s    „ ÙOà=AÐ=M�t—‘×9Ñ9ÑÐSWÑr   r¤   c                   óJ   — e Zd ZdZdZe�ej                  j                  ZydZy)Ú	Cancelledz<Exception mapping a :attr:`grpc.StatusCode.CANCELLED` error.ió  N)	r   r   r   r   r/   rp   rq   Ú	CANCELLEDr1   r   r   r   r§   r§   u  s&   „ ÙFð €DØ48Ð4D�t—‘×0Ñ0ÑÈ$Ñr   r§   c                   ó   — e Zd ZdZy)ÚServerErrorzBase for 5xx responses.Nr   r   r   r   rª   rª   ~  s   „ Ú!r   rª   c                   ór   — e Zd ZdZej
                  j                  Ze�ej                  j                  ZydZy)ÚInternalServerErrorzlException mapping a ``500 Internal Server Error`` response. or a
    :attr:`grpc.StatusCode.INTERNAL` error.N)r   r   r   r   rZ   r[   ÚINTERNAL_SERVER_ERRORr/   rp   rq   ÚINTERNALr1   r   r   r   r¬   r¬   ‚  s2   „ ñ/ð �;‰;×,Ñ,€DØ37Ð3C�t—‘×/Ñ/ÑÈÑr   r¬   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚUnknownz:Exception mapping a :attr:`grpc.StatusCode.UNKNOWN` error.N)r   r   r   r   rp   rq   ÚUNKNOWNr1   r   r   r   r°   r°   Š  r•   r   r°   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚDataLossz<Exception mapping a :attr:`grpc.StatusCode.DATA_LOSS` error.N)r   r   r   r   rp   rq   Ú	DATA_LOSSr1   r   r   r   r³   r³   �  s   „ ÙFà48Ð4D�t—‘×0Ñ0ÑÈ$Ñr   r³   c                   ór   — e Zd ZdZej
                  j                  Ze�ej                  j                  ZydZy)ÚMethodNotImplementedzjException mapping a ``501 Not Implemented`` response or a
    :attr:`grpc.StatusCode.UNIMPLEMENTED` error.N)r   r   r   r   rZ   r[   ÚNOT_IMPLEMENTEDr/   rp   rq   ÚUNIMPLEMENTEDr1   r   r   r   r¶   r¶   –  s2   „ ñ4ð �;‰;×&Ñ&€DØ8<Ð8H�t—‘×4Ñ4ÑÈdÑr   r¶   c                   ó<   — e Zd ZdZej
                  j                  Zy)Ú
BadGatewayz1Exception mapping a ``502 Bad Gateway`` response.N)r   r   r   r   rZ   r[   ÚBAD_GATEWAYr/   r   r   r   rº   rº   ž  rm   r   rº   c                   ór   — e Zd ZdZej
                  j                  Ze�ej                  j                  ZydZy)ÚServiceUnavailablezlException mapping a ``503 Service Unavailable`` response or a
    :attr:`grpc.StatusCode.UNAVAILABLE` error.N)r   r   r   r   rZ   r[   ÚSERVICE_UNAVAILABLEr/   rp   rq   ÚUNAVAILABLEr1   r   r   r   r½   r½   ¤  s2   „ ñ2ð �;‰;×*Ñ*€DØ6:Ð6F�t—‘×2Ñ2ÑÈDÑr   r½   c                   ó<   — e Zd ZdZej
                  j                  Zy)ÚGatewayTimeoutz5Exception mapping a ``504 Gateway Timeout`` response.N)r   r   r   r   rZ   r[   ÚGATEWAY_TIMEOUTr/   r   r   r   rÁ   rÁ   ¬  r™   r   rÁ   c                   óF   — e Zd ZdZe�ej
                  j                  ZydZy)ÚDeadlineExceededzDException mapping a :attr:`grpc.StatusCode.DEADLINE_EXCEEDED` error.N)r   r   r   r   rp   rq   ÚDEADLINE_EXCEEDEDr1   r   r   r   rÄ   rÄ   ²  r…   r   rÄ   c                 ó6   — t         j                  | t        «      S )zÙReturn the exception class for a specific HTTP status code.

    Args:
        status_code (int): The HTTP status code.

    Returns:
        :func:`type`: the appropriate subclass of :class:`GoogleAPICallError`.
    )r	   Úgetr8   ©Ústatus_codes    r   Úexception_class_for_http_statusrÊ   ¸  ó   € ô #×&Ñ& {Ô4FÓGÐGr   c                 óT   — t        | «      } ||fi |¤Ž}|j                  €| |_        |S )a“  Create a :class:`GoogleAPICallError` from an HTTP status code.

    Args:
        status_code (int): The HTTP status code.
        message (str): The exception message.
        kwargs: Additional arguments passed to the :class:`GoogleAPICallError`
            constructor.

    Returns:
        GoogleAPICallError: An instance of the appropriate subclass of
            :class:`GoogleAPICallError`.
    )rÊ   r/   ©rÉ   r   ÚkwargsÚerror_classrG   s        r   Úfrom_http_statusrÐ   Ä  s3   € ô 2°+Ó>€KÙ˜Ñ* 6Ñ*€Eà‡z�zÐØ ˆŒ
à€Lr   c                 ó&  — 	 | j                  «       }|j                  di «      j                  dd«      }|j                  di «      j                  dd«      }|j                  di «      j                  dd«      }t	        t        d„ |«      «      }|r|d   nd	}d
j                  | j                  j                  | j                  j                  |¬«      }t        | j                  |||| |¬«      }|S # t        $ r dd| j                  xs dii}Y Œýw xY w)aS  Create a :class:`GoogleAPICallError` from a :class:`requests.Response`.

    Args:
        response (requests.Response): The HTTP response.

    Returns:
        GoogleAPICallError: An instance of the appropriate subclass of
            :class:`GoogleAPICallError`, with the message and errors populated
            from the response.
    rG   r   zunknown errorr>   r   r?   c                 ó,   — | j                  dd«      dk(  S )Nz@typeÚ z(type.googleapis.com/google.rpc.ErrorInfo)rÇ   )Údetails    r   ú<lambda>z$from_http_response.<locals>.<lambda>ð  s   € ˜6Ÿ:™: g¨rÓ2Ø9ñ:€ r   r   Nz{method} {url}: {error})ÚmethodÚurlrG   ©r>   r?   r@   rA   )ÚjsonÚ
ValueErrorÚtextrÇ   rP   Úfilterr%   ÚrequestrÖ   r×   rÐ   rÉ   )r@   ÚpayloadÚerror_messager>   r?   rA   r   Ú	exceptions           r   Úfrom_http_responserá   Ú  s"  € ðKØ—-‘-“/ˆð —K‘K ¨Ó,×0Ñ0°¸OÓL€MØ�[‰[˜ "Ó%×)Ñ)¨(°BÓ7€Fà�k‰k˜' 2Ó&×*Ñ*¨9°bÓ9€GÜÜñ:àó	
ó€Jñ #-�˜A’°$€Jà'×.Ñ.Ø×Ñ×&Ñ&Ø×Ñ× Ñ Øð /ó €Gô !Ø×ÑØØØØØô€Ið Ðøô= ò KØ˜Y¨¯©Ò(H¸ÐIÐJŠðKús   ‚C0 Ã0DÄDc                 ó6   — t         j                  | t        «      S )zíReturn the exception class for a specific :class:`grpc.StatusCode`.

    Args:
        status_code (grpc.StatusCode): The gRPC status code.

    Returns:
        :func:`type`: the appropriate subclass of :class:`GoogleAPICallError`.
    )r
   rÇ   r8   rÈ   s    r   Úexception_class_for_grpc_statusrã     rË   r   c                 ó    — t        | t        «      rt        j                  | | «      } t	        | «      } ||fi |¤Ž}|j
                  €| |_        |S )a²  Create a :class:`GoogleAPICallError` from a :class:`grpc.StatusCode`.

    Args:
        status_code (Union[grpc.StatusCode, int]): The gRPC status code.
        message (str): The exception message.
        kwargs: Additional arguments passed to the :class:`GoogleAPICallError`
            constructor.

    Returns:
        GoogleAPICallError: An instance of the appropriate subclass of
            :class:`GoogleAPICallError`.
    )Ú
isinstancerS   Ú_INT_TO_GRPC_CODErÇ   rã   r1   rÍ   s        r   Úfrom_grpc_statusrç     sR   € ô �+œsÔ#Ü'×+Ñ+¨K¸ÓEˆä1°+Ó>€KÙ˜Ñ* 6Ñ*€Eà×ÑÐ%Ø!,ˆÔà€Lr   c                 ó6   — t        | d«      xr t        | d«      S )Nr/   r?   )rD   )Úrpc_excs    r   Ú_is_informative_grpc_errorrê   .  s   € Ü�7˜FÓ#ÒC¬°¸Ó(CÐCr   c           
      ó¨  ‡— 	 t        j                  | «      }|sg d fS t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g
}d }g }|j                  D ]t  Št        t!        ˆfd„|«      «      }t#        |«      dk(  r‰}n |d   «       }‰j%                  |«       |j'                  |«       t)        |t        j                  «      sŒs|}Œv ||fS # t        $ r g d fcY S w xY w)Nc                 ó:   •— ‰j                  | j                  «      S r   )ÚIsÚ
DESCRIPTOR)ÚxrÔ   s    €r   rÕ   z+_parse_grpc_error_details.<locals>.<lambda>K  s   ø€ ˜VŸY™Y q§|¡|Ó4€ r   r   )r   Ú	from_callÚNotImplementedErrorr   rk   ÚPreconditionFailureÚQuotaFailureÚ	ErrorInfoÚ	RetryInfoÚResourceInfoÚRequestInfoÚ	DebugInfoÚHelpÚLocalizedMessager?   rP   rÜ   ÚlenÚUnpackÚappendrå   )ré   ÚstatusÚpossible_errorsrA   Úerror_detailsÚmatched_detail_clsÚinforÔ   s          @r   Ú_parse_grpc_error_detailsr  2  s;  ø€ ðÜ×%Ñ% gÓ.ˆñ Ø�4ˆxˆô 	×$Ñ$Ü×-Ñ-Ü×&Ñ&Ü×#Ñ#Ü×#Ñ#Ü×&Ñ&Ü×%Ñ%Ü×#Ñ#Ü×ÑÜ×*Ñ*ð€Oð €JØ€MØ—.‘.ò ˆÜ!ÜÓ4°oÓFó
Ðô Ð!Ó" aÒ'Ø‰Dà(Ð% aÑ(Ó*ˆDØ�M‰M˜$ÔØ×Ñ˜TÔ"Ü�dÔ-×7Ñ7Õ8Ø‰Jðð ˜*Ð$Ð$øôC ò Ø�4ˆxŠðús   ƒE ÅEÅEc                 ó   — t         �t        | t         j                  «      st        | «      r<t	        | «      \  }}t        | j                  «       | j                  «       | f|| |¬«      S t        t        | «      | f| ¬«      S )a  Create a :class:`GoogleAPICallError` from a :class:`grpc.RpcError`.

    Args:
        rpc_exc (grpc.RpcError): The gRPC error.

    Returns:
        GoogleAPICallError: An instance of the appropriate subclass of
            :class:`GoogleAPICallError`.
    rØ   )r>   r@   )
rp   rå   ÚCallrê   r  rç   r/   r?   r8   Ústr)ré   r?   Úerr_infos      r   Úfrom_grpc_errorr  Y  ss   € ô 	ÐœZ¨´·±Ô;Ü	# GÔ	,Ü5°gÓ>Ñˆ�ÜØ�L‰L‹NØ�O‰OÓØ�:ØØØô
ð 	
ô "¤# g£,¸°zÈGÔTÐTr   )Kr   Ú
__future__r   r   Úhttp.clientrZ   Útypingr   r   ÚwarningsÚ
google.rpcr   rp   Úgrpc_statusr   ÚImportErrorÚwarnÚImportWarningr	   rS   Ú	ExceptionrT   r
   ræ   rq   rï   Úvaluer   r   r   r-   r+   r8   rW   rY   r_   rc   rg   ri   rk   ro   rt   rw   rz   r}   r€   rƒ   r‡   rŠ   r�   r�   r“   r—   r›   rž   r¡   r¤   r§   rª   r¬   r°   r³   r¶   rº   r½   rÁ   rÄ   rÊ   rÐ   rá   rã   rç   rê   r  r  r   r   r   ú<module>r     s  ðòõ 'Ý 'ã Ý Ý Û å (ðÛðÝ*ð 13Ð ˜˜c 9˜nÑ-Ó 2Ø02Ð ˜˜c 9˜nÑ-Ó 2ð
 Ð ØÐØ�_‰_ò *ˆØ()Ð˜!Ÿ'™' !™*Ò%ð*ô	�Yô 	ô	˜nô 	ôI�ô Iô.	˜dô 	ôu˜Ð3Jõ uôpCÐ$ô Cô)�{ô )ô$�+ô $ô*˜ô *ô�{ô ô@Ð$ô @ô#�ô #ôV�jô VôY˜ô YôR�ô Rô$�;ô $ôU�lô Uô!�ô !ôW�yô WôOˆ{ô Oô*�{ô *ô ˆ{ô  ôT�Hô TôMˆhô Mô'�[ô 'ô+˜ô +ô7 ô 7ô)�kô )ôX˜ô XôO�ô Oô"Ð$ô "ôN˜+ô NôMˆkô MôOˆ{ô OôS˜;ô Sô#�ô #ôQ˜ô Qô'�[ô 'ôW�~ô Wò	Hòò,+ò\	Hòò4Dò$%óNUøðk ò Øˆ�‰ØQØô	
ð ‹
ðûð ò ØƒDðús.   «I °H= È=IÉI ÉIÉI ÉI)É(I)