e.

Return type  :

    

[ bool ](https://docs.python.org/3/library/functions.html#bool "\(in Python
v3.10\)")

Raises  :

    

[ **KeyError** ](https://docs.python.org/3/library/exceptions.html#KeyError
"\(in Python v3.10\)") – 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.

` HasField ` (  _field_name_ )  ¶

    

` IsInitialized ` (  _errors=None_ )  ¶

    

Checks if all required fields of a message are set.

Parameters  :

    

**errors** – A list which, if provided, will be populated with the field paths
of all missing required fields.

Returns  :

    

True iff the specified message has all required fields set.

` ListFields ` (  )  ¶

    

` MergeFrom ` (  _msg_ )  ¶

    

` MergeFromString ` (  _serialized_ )  ¶

    

` NAME_FIELD_NUMBER ` _= 1_ ¶

    

` ONEOFS_FIELD_NUMBER ` _= 3_ ¶

    

` OPTIONS_FIELD_NUMBER ` _= 4_ ¶

    

` ParseFromString ` (  _serialized_ )  ¶

    

Parse serialized protocol buffer data into this message.

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

Raises  :

    

**message.DecodeError if the input cannot be parsed.** –

_static_ ` RegisterExtension ` (  _extension_handle_ )  ¶

    

` SOURCE_CONTEXT_FIELD_NUMBER ` _= 5_ ¶

    

` SYNTAX_FIELD_NUMBER ` _= 6_ ¶

    

` SerializePartialToString ` (  _**kwargs_ )  ¶

    

` SerializeToString ` (  _**kwargs_ )  ¶

    

` SetInParent ` (  )  ¶

    

Sets the _cached_byte_size_dirty bit to true, and propagates this to our
listener iff this was a state change.

` UnknownFields ` (  )  ¶

    

` WhichOneof ` (  _oneof_name_ )  ¶

    

Returns the name of the currently set field inside a oneof, or None.

_property_ ` fields ` ¶

    

_property_ ` name ` ¶

    

_property_ ` oneofs ` ¶

    

_property_ ` options ` ¶

    

_property_ ` source_context ` ¶

    

_property_ ` syntax ` ¶

    

###  [ Table of Contents ](../../index.html)

  * [ google.protobuf ](../protobuf.html)
  * [ google.protobuf.any_pb2 ](any_pb2.html)
  * [ google.protobuf.descriptor ](descriptor.html)
  * [ google.protobuf.descriptor_database ](descriptor_database.html)
  * [ google.protobuf.descriptor_pb2 ](descriptor_pb2.html)
  * [ google.protobuf.descriptor_pool ](descriptor_pool.html)
  * [ google.protobuf.duration_pb2 ](duration_pb2.html)
  * [ google.protobuf.empty_pb2 ](empty_pb2.html)
  * [ google.protobuf.field_mask_pb2 ](field_mask_pb2.html)
  * [ google.protobuf.internal.containers ](internal/containers.html)
  * [ google.protobuf.json_format ](json_format.html)
  * [ google.protobuf.message ](message.html)
  * [ google.protobuf.message_factory ](message_factory.html)
  * [ google.protobuf.proto_builder ](proto_builder.html)
  * [ google.protobuf.reflection ](reflection.html)
  * [ google.protobuf.service ](service.html)
  * [ google.protobuf.service_reflection ](service_reflection.html)
  * [ google.protobuf.struct_pb2 ](struct_pb2.html)
  * [ google.protobuf.symbol_database ](symbol_database.html)
  * [ google.protobuf.text_encoding ](text_encoding.html)
  * [ google.protobuf.text_format ](text_format.html)
  * [ google.protobuf.timestamp_pb2 ](timestamp_pb2.html)
  * google.protobuf.type_pb2 
  * [ google.protobuf.unknown_fields ](unknown_fields.html)
  * [ google.protobuf.wrappers_pb2 ](wrappers_pb2.html)

###  Related Topics

  * [ Documentation overview ](../../index.html)
    * Previous: [ google.protobuf.timestamp_pb2 ](timestamp_pb2.html "previous chapter")
    * Next: [ google.protobuf.unknown_fields ](unknown_fields.html "next chapter")

###  This Page

  * [ Show Source ](../../_sources/google/protobuf/type_pb2.rst.txt)

©2008, Google LLC. | Powered by [ Sphinx 2.3.1 ](http://sphinx-doc.org/) & [ Alabaster 0.7.12 ](https://github.com/bitprophet/alabaster) | [ Page source ](../../_sources/google/protobuf/type_pb2.rst.txt)