parameters: (cls, name, bases, dictionary)
docstring: Here we perform the majority of our work on the class.
      We add enum getters, an __init__ method, implementations
      of all Message methods, and properties for all fields
      in the protocol type.
  
      Args:
        name: Name of the class (ignored, but required by the
          metaclass protocol).
        bases: Base classes of the class we're constructing.
          (Should be message.Message).  We ignore this field, but
          it's required by the metaclass protocol
        dictionary: The class dictionary of the class we're
          constructing.  dictionary[_DESCRIPTOR_KEY] must contain
          a Descriptor object describing this protocol message
          type.
docstring_summary: Here we perform the majority of our work on the class.
      We add enum getters, an __init__ method, implementations
      of all Message methods, and properties for all fields
      in the protocol type.
docstring_tokens: Here we perform the majority of our work on the class . We add enum getters an __init__ method implementations of all Message methods and properties for all fields in the protocol type .
function: def __init__(cls, name, bases, dictionary):
      """Here we perform the majority of our work on the class.
      We add enum getters, an __init__ method, implementations
      of all Message methods, and properties for all fields
      in the protocol type.
  
      Args:
        name: Name of the class (ignored, but required by the
          metaclass protocol).
        bases: Base classes of the class we're constructing.
          (Should be message.Message).  We ignore this field, but
          it's required by the metaclass protocol
        dictionary: The class dictionary of the class we're
          constructing.  dictionary[_DESCRIPTOR_KEY] must contain
          a Descriptor object describing this protocol message
          type.
      """
      descriptor = dictionary[GeneratedProtocolMessageType._DESCRIPTOR_KEY]
      cls._decoders_by_tag = {}
      cls._extensions_by_name = {}
      cls._extensions_by_number = {}
      if (descriptor.has_options and
          descriptor.GetOptions().message_set_wire_format):
        cls._decoders_by_tag[decoder.MESSAGE_SET_ITEM_TAG] = (
            decoder.MessageSetItemDecoder(cls._extensions_by_number), None)
  
      # Attach stuff to each FieldDescriptor for quick lookup later on.
      for field in descriptor.fields:
        _AttachFieldHelpers(cls, field)
  
      descriptor._concrete_class = cls  # pylint: disable=protected-access
      _AddEnumValues(descriptor, cls)
      _AddInitMethod(descriptor, cls)
      _AddPropertiesForFields(descriptor, cls)
      _AddPropertiesForExtensions(descriptor, cls)
      _AddStaticMethods(cls)
      _AddMessageMethods(descriptor, cls)
      _AddPrivateHelperMethods(descriptor, cls)
      copyreg.pickle(cls, lambda obj: (cls, (), obj.__getstate__()))
  
      superclass = super(GeneratedProtocolMessageType, cls)
      superclass.__init__(name, bases, dictionary)
function_tokens: def __init__ ( cls , name , bases , dictionary ) : descriptor = dictionary [ GeneratedProtocolMessageType . _DESCRIPTOR_KEY ] cls . _decoders_by_tag = { } cls . _extensions_by_name = { } cls . _extensions_by_number = { } if ( descriptor . has_options and descriptor . GetOptions ( ) . message_set_wire_format ) : cls . _decoders_by_tag [ decoder . MESSAGE_SET_ITEM_TAG ] = ( decoder . MessageSetItemDecoder ( cls . _extensions_by_number ) , None ) # Attach stuff to each FieldDescriptor for quick lookup later on. for field in descriptor . fields : _AttachFieldHelpers ( cls , field ) descriptor . _concrete_class = cls # pylint: disable=protected-access _AddEnumValues ( descriptor , cls ) _AddInitMethod ( descriptor , cls ) _AddPropertiesForFields ( descriptor , cls ) _AddPropertiesForExtensions ( descriptor , cls ) _AddStaticMethods ( cls ) _AddMessageMethods ( descriptor , cls ) _AddPrivateHelperMethods ( descriptor , cls ) copyreg . pickle ( cls , lambda obj : ( cls , ( ) , obj . __getstate__ ( ) ) ) superclass = super ( GeneratedProtocolMessageType , cls ) superclass . __init__ ( name , bases , dictionary )