§
    Âi°  ã                   ó"  — d Z ddlZddlZddlmZ ddlZddlmZ ddlmZ  G d„ d ej	        dd	¦  «        ej
        ¦  «        Zd
„ Zd„ ZddgZej        d         dk    r.ej        d         dk    rddlmZ e                     d¦  «         dS dS dS )z;Reference implementation for status mapping in gRPC Python.é    N)Ú
status_pb2é   )ÚGRPC_DETAILS_METADATA_KEY)Úcode_to_grpc_status_codec                   ó   — e Zd ZdS )Ú_StatusN)Ú__name__Ú
__module__Ú__qualname__© ó    ú`/var/www/html/jarvis.com/web/backend/venv/lib/python3.11/site-packages/grpc_status/rpc_status.pyr   r      s   € € € € € ð 	€Dr   r   ©ÚcodeÚdetailsÚtrailing_metadatac                 ó  — |                       ¦   «         €dS |                       ¦   «         D ]ß\  }}|t          k    rÏt          j                             |¦  «        }|                      ¦   «         j        d         |j        k    r:t          dt          |j        ¦  «        ›d|                      ¦   «         ›d�¦  «        ‚|  	                    ¦   «         |j
        k    r-t          d|j
        ›d|  	                    ¦   «         ›d�¦  «        ‚|c S ŒàdS )a¡  Returns a google.rpc.status.Status message corresponding to a given grpc.Call.

    This is an EXPERIMENTAL API.

    Args:
      call: A grpc.Call instance.

    Returns:
      A google.rpc.status.Status message representing the status of the RPC.

    Raises:
      ValueError: If the gRPC call's code or details are inconsistent with the
        status code and message inside of the google.rpc.status.Status.
    Nr   zCode in Status proto (z) doesn't match status code (ú)zMessage in Status proto (z ) doesn't match status details ()r   r   r   ÚStatusÚ
FromStringr   ÚvalueÚ
ValueErrorr   r   Úmessage)ÚcallÚkeyr   Úrich_statuss       r   Ú	from_callr   !   s  € ð ×ÒÑÔÐ'ØˆtØ×,Ò,Ñ.Ô.ð ð ‰
ˆˆUØÕ+Ò+Ð+Ý$Ô+×6Ò6°uÑ=Ô=ˆKØ�yŠy‰{Œ{Ô  Ô# {Ô'7Ò7Ð7Ý �jå/°Ô0@ÑAÔAÐAÐAÀ4Ç9Â9Á;Ä;À;À;ðPñô ð ð �|Š|‰~Œ~ Ô!4Ò4Ð4Ý �jà*Ô2Ð2Ð2°D·L²L±N´N°N°NðDñô ð ð ÐÐÐð ,ð ˆ4r   c                 óˆ   — t          t          | j        ¦  «        | j        t          |                      ¦   «         ff¬¦  «        S )ad  Convert a google.rpc.status.Status message to grpc.Status.

    This is an EXPERIMENTAL API.

    Args:
      status: a google.rpc.status.Status message representing the non-OK status
        to terminate the RPC with and communicate it to the client.

    Returns:
      A grpc.Status instance representing the input google.rpc.status.Status message.
    r   )r   r   r   r   r   ÚSerializeToString)Ústatuss    r   Ú	to_statusr!   C   sF   € õ Ý% f¤kÑ2Ô2Ø”å&¨×(@Ò(@Ñ(BÔ(BÐCð
ðñ ô ð r   r   r!   é   é   )Ú_asyncÚaio)Ú__doc__ÚcollectionsÚsysÚ
google.rpcr   ÚgrpcÚ_commonr   r   Ú
namedtupler   r   r   r!   Ú__all__Úversion_infoÚ r$   r%   Úappendr   r   r   ú<module>r1      s/  ðð BÐ Aà Ð Ð Ð Ø 
€
€
€
à !Ð !Ð !Ð !Ð !Ð !Ø €€€à .Ð .Ð .Ð .Ð .Ð .Ø -Ð -Ð -Ð -Ð -Ð -ð	ð 	ð 	ð 	ð 	Ø€KÔ˜9Ð&NÑOÔOØ„Kñ	ô 	ð 	ðð ð ðDð ð ð, Øð€ð
 Ô�AÔ˜!ÒÐ Ô 0°Ô 3°qÒ 8Ð 8ØÐÐÐÐÐà‡N‚N�5ÑÔÐÐÐð ÐÐ 8Ð 8r   