File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/google/protobuf/__pycache__/message.cpython-310.pyc
Back
o �h�6 � @ sT d Z dZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�Zd d� ZdS ) z6Contains an abstract base class for protocol messages.z#robinson@google.com (Will Robinson)c @ � e Zd ZdZdS )�Errorz Base error type for this module.N��__name__� __module__�__qualname__�__doc__� r r �J/usr/local/CyberCP/lib/python3.10/site-packages/google/protobuf/message.pyr � r c @ r )�DecodeErrorz-Exception raised when deserializing messages.Nr r r r r r r r c @ r )�EncodeErrorz+Exception raised when serializing messages.Nr r r r r r r r c @ s e Zd ZdZg ZdZd?dd�Zdd� Zdd� Zd d � Z dd� Z d d� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Zd3d4� Zed5d6� �Z d7d8� Z!d9d:� Z"d;d<� Z#d=d>� Z$dS )@�Messagez�Abstract 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 C s t | �� }|�| � |S �N)�type� MergeFrom)�self�memo�cloner r r �__deepcopy__6 s zMessage.__deepcopy__c C � t �)z9Recursively compares two messages by value and structure.��NotImplementedError�r � other_msgr r r �__eq__; � zMessage.__eq__c C s | |k S r r r r r r �__ne__? s zMessage.__ne__c C s t d��)Nzunhashable object)� TypeError�r r r r �__hash__C s zMessage.__hash__c C r �z7Outputs a human-readable representation of the message.r r r r r �__str__F r zMessage.__str__c C r r r r r r r �__unicode__J r zMessage.__unicode__c C r )aW 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. r )r �field_name_or_keyr r r �__contains__N s zMessage.__contains__c C r )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. r r r r r r j s zMessage.MergeFromc C s"