
    &`i                     <    d dl Z d dlmZmZ 	 dad Zd Zd Zd ZdS )    N)MessageToDictMessageToJsonc                  b    t           "t          j        t                    j        } d| v a t           S )zDCache the inspect result to avoid doing it for every single message.Nincluding_default_value_fields)!_protobuf_has_old_arg_name_cachedinspect	signaturer   
parameters)paramss    p/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/_private/protobuf_compat.py_protobuf_has_old_arg_namer      s/     )0"=11<,LPV,V),,    c                     d}d}|| v rt          | d|           || v r&t                      r|                     |          | |<   | S )a@  
    Protobuf version 5.26.0rc2 renamed argument for `MessageToDict` and `MessageToJson`:
    `including_default_value_fields` -> `always_print_fields_with_no_presence`.
    See https://github.com/protocolbuffers/protobuf/commit/06e7caba58ede0220b110b89d08f329e5f8a7537#diff-8de817c14d6a087981503c9aea38730b1b3e98f4e306db5ff9d525c7c304f234L129  # noqa: E501

    We choose to always use the new argument name. If user used the old arg, we raise an
    error.

    If protobuf does not have the new arg name but have the old arg name, we rename our
    arg to the old one.
    r   $always_print_fields_with_no_presencez is deprecated, please use )
ValueErrorr   pop)kwargsold_arg_namenew_arg_names      r   +rename_always_print_fields_with_no_presencer      sg     4L9LvLSS\SSTTTv"<">">%zz,77|Mr   c                  8    t          |          }t          | i |S N)r   r   argsr   s     r   message_to_dictr   -   "    8@@F$)&)))r   c                  8    t          |          }t          | i |S r   )r   r   r   s     r   message_to_jsonr   2   r   r   )	r   google.protobuf.json_formatr   r   r   r   r   r   r    r   r   <module>r!      sy     D D D D D D D D
 %) !- - -  .* * *
* * * * *r   