
    q	hE:                     n    S r SrSr " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      rS r	g)z6Contains an abstract base class for protocol messages.z#robinson@google.com (Will Robinson))
Extensionsc                       \ rS rSrSrSrg)Error   z Base error type for this module. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       I/var/www/html/env/lib/python3.13/site-packages/google/protobuf/message.pyr   r      s    (r   r   c                       \ rS rSrSrSrg)DecodeError   z-Exception raised when deserializing messages.r   Nr   r   r   r   r   r      s    5r   r   c                       \ rS rSrSrSrg)EncodeError   z+Exception raised when serializing messages.r   Nr   r   r   r   r   r      s    3r   r   c                      ^  \ rS rSrSr/ rSrS$S jrU 4S jrS r	S r
S rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r \!S 5       r"S r#S  r$S! r%S" r&S#r'U =r($ )%Message"   zAbstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol
compiler.  These generated types subclass Message and implement the methods
shown below.
Nc                 H    [        U 5      " 5       nUR                  U 5        U$ N)type	MergeFrom)selfmemoclones      r   __deepcopy__Message.__deepcopy__9   s    JLE	OODLr   c                 V  > [        [        TU ]	  5       5      nU R                  b8  U R                  R                   H  nUR                  UR                  5        M      [         H  nX1;  a  M
   [        X5        M     [        U5      $ ! [         a    UR                  U5         MC  f = f)z7Provides the list of all accessible Message attributes.)setsuper__dir__
DESCRIPTORfieldsaddname _INCONSISTENT_MESSAGE_ATTRIBUTESgetattrAttributeErrorremovesorted)r   message_attributesfield	attribute	__class__s       r   r%   Message.__dir__>   s    UW_./
 "??))%uzz* *
 6			,- 	 6 $%%  -!!),-s   /B		B('B(c                     [         e)z9Recursively compares two messages by value and structure.NotImplementedErrorr   	other_msgs     r   __eq__Message.__eq__U       
r   c                     X:X  + $ r   r   r7   s     r   __ne__Message.__ne__Y   s      r   c                     [        S5      e)Nzunhashable object)	TypeErrorr   s    r   __hash__Message.__hash__]   s    
'
((r   c                     [         ez7Outputs a human-readable representation of the message.r5   rA   s    r   __str__Message.__str__`   r;   r   c                     [         erE   r5   rA   s    r   __unicode__Message.__unicode__d   r;   r   c                     [         e)a  Checks if a certain field is set for the message.

Has presence fields return true if the field is set, false if the field is
not set. Fields without presence do raise `ValueError` (this includes
repeated fields, map fields, and implicit presence fields).

If field_name is not defined in the message descriptor, `ValueError` will
be raised.
Note: WKT Struct checks if the key is contained in fields. ListValue checks
if the item is contained in the list.

Args:
  field_name_or_key: For Struct, the key (str) of the fields map. For
    ListValue, any type that may be contained in the list. For other
    messages, name of the field (str) to check for presence.

Returns:
  bool: For Struct, whether the item is contained in fields. For ListValue,
        whether the item is contained in the list. For other message,
        whether a value has been set for the named field.

Raises:
  ValueError: For normal messages,  if the `field_name_or_key` is not a
              member of this message or `field_name_or_key` is not a string.
r5   )r   field_name_or_keys     r   __contains__Message.__contains__h   s
    4 r   c                     [         e)a  Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current
message. Singular fields that are set in the specified message overwrite
the corresponding fields in the current message. Repeated fields are
appended. Singular sub-messages and groups are recursively merged.

Args:
  other_msg (Message): A message to merge into the current message.
r5   r7   s     r   r   Message.MergeFrom   s
     r   c                 P    XL a  gU R                  5         U R                  U5        g)zCopies the content of the specified message into the current message.

The method clears the current message and then merges the specified
message using MergeFrom.

Args:
  other_msg (Message): A message to copy into the current one.
N)Clearr   r7   s     r   CopyFromMessage.CopyFrom   s"     JJLNN9r   c                     [         e)z,Clears all data that was set in the message.r5   rA   s    r   rR   Message.Clear   r;   r   c                     [         e)a  Mark this as present in the parent.

This normally happens automatically when you assign a field of a
sub-message, but sometimes you want to make the sub-message
present while keeping it empty.  If you find yourself using this,
you may want to reconsider your design.
r5   rA   s    r   SetInParentMessage.SetInParent   
     r   c                     [         e)zChecks if the message is initialized.

Returns:
  bool: The method returns True if the message is initialized (i.e. all of
  its required fields are set).
r5   rA   s    r   IsInitializedMessage.IsInitialized   s
     r   c                     [         e)a  Merges serialized protocol buffer data into this message.

When we find a field in `serialized` that is already present
in this message:

-   If it's a "repeated" field, we append to the end of our list.
-   Else, if it's a scalar, we overwrite our field.
-   Else, (it's a nonrepeated composite), we recursively merge
    into the existing composite.

Args:
  serialized (bytes): Any object that allows us to call
    ``memoryview(serialized)`` to access a string of bytes using the
    buffer interface.

Returns:
  int: The number of bytes read from `serialized`.
  For non-group messages, this will always be `len(serialized)`,
  but for messages which are actually groups, this will
  generally be less than `len(serialized)`, since we must
  stop when we reach an ``END_GROUP`` tag.  Note that if
  we *do* stop because of an ``END_GROUP`` tag, the number
  of bytes returned does not include the bytes
  for the ``END_GROUP`` tag information.

Raises:
  DecodeError: if the input cannot be parsed.
r5   r   
serializeds     r   MergeFromStringMessage.MergeFromString   s
    > r   c                 D    U R                  5         U R                  U5      $ )zParse serialized protocol buffer data in binary form into this message.

Like :func:`MergeFromString()`, except we clear the object first.

Raises:
  message.DecodeError if the input cannot be parsed.
)rR   ra   r_   s     r   ParseFromStringMessage.ParseFromString   s     	JJL
++r   c                     [         e)a  Serializes the protocol message to a binary string.

Keyword Args:
  deterministic (bool): If true, requests deterministic serialization
    of the protobuf, with predictable ordering of map keys.

Returns:
  A binary string representation of the message if all of the required
  fields in the message are set (i.e. the message is initialized).

Raises:
  EncodeError: if the message isn't initialized (see :func:`IsInitialized`).
r5   r   kwargss     r   SerializeToStringMessage.SerializeToString   
     r   c                     [         e)aj  Serializes the protocol message to a binary string.

This method is similar to SerializeToString but doesn't check if the
message is initialized.

Keyword Args:
  deterministic (bool): If true, requests deterministic serialization
    of the protobuf, with predictable ordering of map keys.

Returns:
  bytes: A serialized representation of the partial message.
r5   rg   s     r   SerializePartialToString Message.SerializePartialToString   
     r   c                     [         e)a  Returns a list of (FieldDescriptor, value) tuples for present fields.

A message field is non-empty if HasField() would return true. A singular
primitive field is non-empty if HasField() would return true in proto2 or it
is non zero in proto3. A repeated field is non-empty if it contains at least
one element. The fields are ordered by field number.

Returns:
  list[tuple(FieldDescriptor, value)]: field descriptors and values
  for all fields in the message which are not empty. The values vary by
  field type.
r5   rA   s    r   
ListFieldsMessage.ListFields  ro   r   c                     [         e)a  Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the
field_name is not defined in the message descriptor, :exc:`ValueError` will
be raised.

Args:
  field_name (str): The name of the field to check for presence.

Returns:
  bool: Whether a value has been set for the named field.

Raises:
  ValueError: if the `field_name` is not a member of this message.
r5   r   
field_names     r   HasFieldMessage.HasField&  
      r   c                     [         e)aB  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:
  field_name (str): The name of the field to check for presence.

Raises:
  ValueError: if the `field_name` is not a member of this message.
r5   rt   s     r   
ClearFieldMessage.ClearField8  s
     r   c                     [         e)a%  Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Args:
  oneof_group (str): the name of the oneof group to check.

Returns:
  str or None: The name of the group that is set, or None.

Raises:
  ValueError: no group with the given name exists
r5   )r   oneof_groups     r   
WhichOneofMessage.WhichOneofF  rk   r   c                     [         e)a  Checks if a certain extension is present for this message.

Extensions are retrieved using the :attr:`Extensions` mapping (if present).

Args:
  field_descriptor: The field descriptor for the extension to check.

Returns:
  bool: Whether the extension is present for this message.

Raises:
  KeyError: if the extension is repeated. Similar to repeated fields,
    there is no separate notion of presence: a "not present" repeated
    extension is an empty list.
r5   r   field_descriptors     r   HasExtensionMessage.HasExtensionV  rx   r   c                     [         e)zvClears the contents of a given extension.

Args:
  field_descriptor: The field descriptor for the extension to clear.
r5   r   s     r   ClearExtensionMessage.ClearExtensionh  
     r   c                     [         e)zeReturns the UnknownFieldSet.

Returns:
  UnknownFieldSet: The unknown fields stored in this message.
r5   rA   s    r   UnknownFieldsMessage.UnknownFieldsp  r   r   c                     [         e)zdClears all fields in the :class:`UnknownFieldSet`.

This operation is recursive for nested message.
r5   rA   s    r   DiscardUnknownFieldsMessage.DiscardUnknownFieldsx  s
    
 r   c                     [         e)zReturns the serialized size of this message.

Recursively calls ByteSize() on all contained messages.

Returns:
  int: The number of bytes required to serialize this message.
r5   rA   s    r   ByteSizeMessage.ByteSize  rZ   r   c                     [         er   r5   )clsss     r   
FromStringMessage.FromString  r;   r   c                     [         e)a  Internal method used by the protocol message implementation.
Clients should not call this directly.

Sets a listener that this message will call on certain state transitions.

The purpose of this method is to register back-edges from children to
parents at runtime, for the purpose of setting "has" bits and
byte-size-dirty bits in the parent and ancestor objects whenever a child or
descendant object is modified.

If the client wants to disconnect this Message from the object tree, she
explicitly sets callback to None.

If message_listener is None, unregisters any existing listener.  Otherwise,
message_listener must implement the MessageListener interface in
internal/message_listener.py, and we discard any listener registered
via a previous _SetListener() call.
r5   )r   message_listeners     r   _SetListenerMessage._SetListener  s
    & r   c                 0    [        U R                  5       S9$ )Support the pickle protocol.)r`   )dictrm   rA   s    r   __getstate__Message.__getstate__  s    488:;;r   c                     U R                  5         US   n[        U[        5      (       d  UR                  S5      nU R	                  U5        g)r   r`   latin1N)__init__
isinstancebytesencoderd   )r   stater`   s      r   __setstate__Message.__setstate__  sB    MMO|$J j%(($$X.j$r   c                     U R                   nUR                  c  [        U 5      SU R                  5       4$ Un[        UR
                  4U R                  5       4$ )Nr   )r&   containing_typer   r   _InternalConstructMessage	full_name)r   message_descriptor	containers      r   
__reduce__Message.__reduce__  s]    ))1$ZT..000 #I%	(;(;'=! !r   r   r   ))r   r	   r
   r   r   	__slots__r&   r    r%   r9   r=   rB   rF   rI   rM   r   rS   rR   rX   r\   ra   rd   ri   rm   rq   rv   rz   r~   r   r   r   r   r   classmethodr   r   r   r   r   r   __classcell__)r2   s   @r   r   r   "   s     ) *
&.!)8B	, >$ $  *<%	! 	!r   r   c                 V    SSK Jn  UR                  5       R                  U 5      " 5       $ )zConstructs a nested message.    )symbol_database)google.protobufr   Default	GetSymbol)r   r   s     r   r   r     s"    -		 	 	"	,	,Y	7	99r   N)
r   
__author__r*   	Exceptionr   r   r   objectr   r   r   r   r   <module>r      sM    =2
#2  I 
% 
% 
W!f W!t:r   