§
    YŠtj%  ã                   ó  — d Z ddlZddlmZmZmZ ddlmZ ddlmZ ddl	m
Z
  edd¬	¦  «        Zdd
ededefd„Zdee         dedefd„Zd
edej        ddfd„Zdee         dej        defd„Zd
e
defd„Zd
e
ddfd„Zd
e
deddfd„ZdS )z,Contains the Nextgen Pythonic protobuf APIs.é    N)ÚTextÚTypeÚTypeVar)Údecoder)Úencoder)ÚMessageÚ_MESSAGEr   )ÚboundÚmessageÚdeterministicÚreturnc                 ó.   — |                       |¬¦  «        S )a  Return the serialized proto.

  Args:
    message: The proto message to be serialized.
    deterministic: If true, requests deterministic serialization
        of the protobuf, with predictable ordering of map keys.

  Returns:
    A binary bytes representation of the message.
  )r   )ÚSerializeToString)r   r   s     úS/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/google/protobuf/proto.pyÚ	serializer      s   € ð 
×	"Ò	"°Ð	"Ñ	?Ô	?Ð?ó    Úmessage_classÚpayloadc                 óD   —  | ¦   «         }|                      |¦  «         |S )zæGiven a serialized data in binary form, deserialize it into a Message.

  Args:
    message_class: The message meta class.
    payload: A serialized bytes in binary form.

  Returns:
    A new message deserialized from payload.
  )ÚParseFromString)r   r   Únew_messages      r   Úparser   "   s)   € ð �‘”€+Ø×Ò˜gÑ&Ô&Ð&Ø	Ðr   Úoutputc                 óê   — |                       ¦   «         } t          j        ¦   «         |j        |¦  «         |                     t	          | ¦  «        ¦  «        }||k    rt          d||fz  ¦  «        ‚dS )a¢  Writes the size of the message as a varint and the serialized message.

  Writes the size of the message as a varint and then the serialized message.
  This allows more data to be written to the output after the message. Use
  parse_length_prefixed to parse messages written by this method.

  The output stream must be buffered, e.g. using
  https://docs.python.org/3/library/io.html#buffered-streams.

  Example usage:
    out = io.BytesIO()
    for msg in message_list:
      proto.serialize_length_prefixed(msg, out)

  Args:
    message: The protocol buffer message that should be serialized.
    output: BytesIO or custom buffered IO that data should be written to.
  z_Failed to write complete message (wrote: %d, expected: %d). Ensure output is using buffered IO.N)ÚByteSizer   Ú_VarintEncoderÚwriter   Ú	TypeError)r   r   ÚsizeÚout_sizes       r   Úserialize_length_prefixedr!   1   sƒ   € ð& 
×	Ò	Ñ	Ô	€$Ø…'ÔÑÔ˜6œ<¨Ñ.Ô.Ð.Ø�\Š\�) GÑ,Ô,Ñ-Ô-€(à�ÒÐÝ
ð	0Ø3;¸TÐ2Bñ	Cñô ð ð Ðr   Úinput_bytesc                 ó  — t          j        |¦  «        }|€dS  | ¦   «         }|dk    r|S |                     |                     |¦  «        ¦  «        }||k    r.t	          d                     |||j        j        ¦  «        ¦  «        ‚|S )a‚  Parse a message from input_bytes.

  Args:
    message_class: The protocol buffer message class that parser should parse.
    input_bytes: A buffered input.

  Example usage:
    while True:
      msg = proto.parse_length_prefixed(message_class, input_bytes)
      if msg is None:
        break
      ...

  Returns:
    A parsed message if successful. None if input_bytes is at EOF.
  Nr   zdTruncated message or non-buffered input_bytes: Expected {0} bytes but only {1} bytes parsed for {2}.)r   Ú_DecodeVarintr   ÚreadÚ
ValueErrorÚformatÚ
DESCRIPTORÚname)r   r"   r   r   Úparsed_sizes        r   Úparse_length_prefixedr+   O   sš   € õ& 
Ô	˜{Ñ	+Ô	+€$Ø	€\ð ˆ4àˆM‰OŒO€'à	ˆQ‚Y€YØ€Nà×'Ò'¨×(8Ò(8¸Ñ(>Ô(>Ñ?Ô?€+Ø�DÒÐÝ
ð	çŠv�d˜K¨Ô);Ô)@ÑAÔAñô ð ð
 
€.r   c                 ó*   — |                       ¦   «         S )z£Returns the serialized size of this message.

  Args:
    message: A proto message.

  Returns:
    int: The number of bytes required to serialize this message.
  )r   ©r   s    r   Ú	byte_sizer.   w   s   € ð 
×	Ò	Ñ	Ô	Ðr   c                 ó.   — |                       ¦   «          dS )zfClears all data that was set in the message.

  Args:
    message: The proto message to be cleared.
  N)ÚClearr-   s    r   Úclear_messager1   ƒ   s   € ð 
‡-‚-�/„/€/€/€/r   Ú
field_namec                 ó0   — |                       |¦  «         dS )ah  Clears the contents of a given field.

  Inside a oneof group, clears the field set. If the name neither refers to a
  defined field or oneof group, :exc:`ValueError` is raised.

  Args:
    message: The proto message.
    field_name (str): The name of the field to be cleared.

  Raises:
    ValueError: if the `field_name` is not a member of this message.
  N)Ú
ClearField)r   r2   s     r   Úclear_fieldr5   Œ   s   € ð 
×Ò�ZÑ Ô Ð Ð Ð r   )N)Ú__doc__ÚioÚtypingr   r   r   Úgoogle.protobuf.internalr   r   Úgoogle.protobuf.messager   r	   ÚboolÚbytesr   r   ÚBytesIOr!   r+   Úintr.   r1   r5   © r   r   ú<module>r@      s¶  ðð 3Ð 2à 	€	€	€	Ø &Ð &Ð &Ð &Ð &Ð &Ð &Ð &Ð &Ð &à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø +Ð +Ð +Ð +Ð +Ð +àˆ7�: YÐ/Ñ/Ô/€ð@ð @�xð @°ð @Àð @ð @ð @ð @ð˜˜hœð °%ð ¸Hð ð ð ð ð xð ¸¼ð Èð ð ð ð ð<%Ø˜”>ð%Ø02´
ð%àð%ð %ð %ð %ðP	�wð 	 3ð 	ð 	ð 	ð 	ð˜7ð  tð ð ð ð ð!˜ð !¨dð !°tð !ð !ð !ð !ð !ð !r   