google.protobuf.struct_pb2

Generated protocol buffer code.

class google.protobuf.struct_pb2.ListValue(**kwargs)
ByteSize()
Clear()
ClearExtension(extension_handle)

Clears the contents of a given extension.

Parameters:

extension_handle – The handle for the extension to clear.

ClearField(field_name)
CopyFrom(other_msg)

Copies the content of the specified message into the current message.

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

Parameters:

other_msg (Message) – A message to copy into the current one.

DESCRIPTOR = <google.protobuf.descriptor.Descriptor object>
DiscardUnknownFields()
FindInitializationErrors()

Finds required fields which are not initialized.

Returns:

A list of strings. Each string is a path to an uninitialized field from the top-level message, e.g. “foo.bar[5].baz”.

static FromString(s)
HasExtension(extension_handle)

Checks if a certain extension is present for this message.

Extensions are retrieved using the Extensions mapping (if present).

Parameters:

extension_handle – The handle for the extension to check.

Returns:

Whether the extension is present for this message.

Return type:

bool

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.

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)
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)
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()
VALUES_FIELD_NUMBER = 1
WhichOneof(oneof_name)

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

add_list()

Appends and returns a list value as the next value in the list.

add_struct()

Appends and returns a struct value as the next value in the list.

append(value)
extend(elem_seq)
items()
property values
class google.protobuf.struct_pb2.Struct(**kwargs)
ByteSize()
Clear()
ClearExtension(extension_handle)

Clears the contents of a given extension.

Parameters:

extension_handle – The handle for the extension to clear.

ClearField(field_name)
CopyFrom(other_msg)

Copies the content of the specified message into the current message.

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

Parameters:

other_msg (Message) – A message to copy into the current one.

DESCRIPTOR = <google.protobuf.descriptor.Descriptor object>
DiscardUnknownFields()
FIELDS_FIELD_NUMBER = 1
class FieldsEntry(**kwargs)
ByteSize()
Clear()
ClearExtension(extension_handle)

Clears the contents of a given extension.

Parameters:

extension_handle – The handle for the extension to clear.

ClearField(field_name)
CopyFrom(other_msg)

Copies the content of the specified message into the current message.

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

Parameters:

other_msg (Message) – A message to copy into the current one.

DESCRIPTOR = <google.protobuf.descriptor.Descriptor object>
DiscardUnknownFields()
FindInitializationErrors()

Finds required fields which are not initialized.

Returns:

A list of strings. Each string is a path to an uninitialized field from the top-level message, e.g. “foo.bar[5].baz”.

static FromString(s)
HasExtension(extension_handle)

Checks if a certain extension is present for this message.

Extensions are retrieved using the Extensions mapping (if present).

Parameters:

extension_handle – The handle for the extension to check.

Returns:

Whether the extension is present for this message.

Return type:

bool

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.

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.

KEY_FIELD_NUMBER = 1
ListFields()
MergeFrom(msg)
MergeFromString(serialized)
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)
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()
VALUE_FIELD_NUMBER = 2
WhichOneof(oneof_name)

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

property key
property value
FindInitializationErrors()

Finds required fields which are not initialized.

Returns:

A list of strings. Each string is a path to an uninitialized field from the top-level message, e.g. “foo.bar[5].baz”.

static FromString(s)
HasExtension(extension_handle)

Checks if a certain extension is present for this message.

Extensions are retrieved using the Extensions mapping (if present).

Parameters:

extension_handle – The handle for the extension to check.

Returns:

Whether the extension is present for this message.

Return type:

bool

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.

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)
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)
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
get_or_create_list(key)

Returns a list for this key, creating if it didn’t exist already.

get_or_create_struct(key)

Returns a struct for this key, creating if it didn’t exist already.

items()
keys()
update(dictionary)
values()
class google.protobuf.struct_pb2.Value(**kwargs)
BOOL_VALUE_FIELD_NUMBER = 4
ByteSize()
Clear()
ClearExtension(extension_handle)

Clears the contents of a given extension.

Parameters:

extension_handle – The handle for the extension to clear.

ClearField(field_name)
CopyFrom(other_msg)

Copies the content of the specified message into the current message.

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

Parameters:

other_msg (Message) – A message to copy into the current one.

DESCRIPTOR = <google.protobuf.descriptor.Descriptor object>
DiscardUnknownFields()
FindInitializationErrors()

Finds required fields which are not initialized.

Returns:

A list of strings. Each string is a path to an uninitialized field from the top-level message, e.g. “foo.bar[5].baz”.

static FromString(s)
HasExtension(extension_handle)

Checks if a certain extension is present for this message.

Extensions are retrieved using the Extensions mapping (if present).

Parameters:

extension_handle – The handle for the extension to check.

Returns:

Whether the extension is present for this message.

Return type:

bool

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.

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.

LIST_VALUE_FIELD_NUMBER = 6
ListFields()
MergeFrom(msg)
MergeFromString(serialized)
NULL_VALUE_FIELD_NUMBER = 1
NUMBER_VALUE_FIELD_NUMBER = 2
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)
STRING_VALUE_FIELD_NUMBER = 3
STRUCT_VALUE_FIELD_NUMBER = 5
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 bool_value
property list_value
property null_value
property number_value
property string_value
property struct_value