Top Description Inners Fields Constructors Methods
com.google.protobuf

public final Class Struct

extends GeneratedMessageV3
implements StructOrBuilder
Class Inheritance
All Implemented Interfaces
com.google.protobuf.StructOrBuilder, com.google.protobuf.MessageOrBuilder, com.google.protobuf.MessageLiteOrBuilder

`Struct` represents a structured data value, consisting of fields
which map to dynamically typed values. In some languages, `Struct`
might be supported by a native representation. For example, in
scripting languages like JS a struct is represented as an
object. The details of that representation are described together
with the proto support for the language.
The JSON representation for `Struct` is JSON object.
Protobuf type google.protobuf.Struct

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Struct.Builder

`Struct` represents a structured data value, consisting of fields
which map to dynamically typed values.
private static class

Field Summary

Modifier and TypeField and Description
private static final Struct
private MapField<String, Value>
public static final int
private byte
private static final Parser<Struct>
private static final long
Inherited from com.google.protobuf.GeneratedMessageV3:
alwaysUseFieldBuildersunknownFields

Constructor Summary

AccessConstructor and Description
private
private
private
Struct(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsFields(String key)

Implements com.google.protobuf.StructOrBuilder.containsFields.

Unordered map of dynamically typed values.
public boolean
equals(final Object
object to be compared for equality with this message
obj
)

Overrides com.google.protobuf.AbstractMessage.equals.

Implements com.google.protobuf.Message.equals.

Compares the specified object with this message for equality.
public static Struct
public Struct
public static final Descriptors.Descriptor
public Map<String, Value>
public int
getFieldsCount()

Implements com.google.protobuf.StructOrBuilder.getFieldsCount.

Unordered map of dynamically typed values.
public Map<String, Value>
getFieldsMap()

Implements com.google.protobuf.StructOrBuilder.getFieldsMap.

Unordered map of dynamically typed values.
public Value
getFieldsOrDefault(String key, Value defaultValue)

Implements com.google.protobuf.StructOrBuilder.getFieldsOrDefault.

Unordered map of dynamically typed values.
public Value
getFieldsOrThrow(String key)

Implements com.google.protobuf.StructOrBuilder.getFieldsOrThrow.

Unordered map of dynamically typed values.
public Parser<Struct>
public int
getSerializedSize()

Overrides com.google.protobuf.GeneratedMessageV3.getSerializedSize.

Implements com.google.protobuf.MessageLite.getSerializedSize.

Get the number of bytes required to encode this message.
public final UnknownFieldSet
public int
hashCode()

Overrides com.google.protobuf.AbstractMessage.hashCode.

Implements com.google.protobuf.Message.hashCode.

Returns the hash code value for this message.
protected GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()

Implements abstract com.google.protobuf.GeneratedMessageV3.internalGetFieldAccessorTable.

Get the FieldAccessorTable for this type.
private MapField<String, Value>
protected MapField<K, V>
internalGetMapField(int number)

Overrides com.google.protobuf.GeneratedMessageV3.internalGetMapField.

Gets the map field with the given field number.
public final boolean
isInitialized()

Overrides com.google.protobuf.GeneratedMessageV3.isInitialized.

Implements com.google.protobuf.MessageLiteOrBuilder.isInitialized.

Returns true if all required fields in the message and all embedded messages are set, false otherwise.
public static Struct.Builder
public static Struct.Builder
newBuilder(Struct prototype)

public Struct.Builder
newBuilderForType()

Implements com.google.protobuf.Message.newBuilderForType, com.google.protobuf.MessageLite.newBuilderForType.

Constructs a new builder for a message of the same type as this message.
protected Struct.Builder
newBuilderForType(GeneratedMessageV3.BuilderParent parent)

Implements abstract com.google.protobuf.GeneratedMessageV3.newBuilderForType.

TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.
public static Struct
public static Struct
public static Struct
public static Struct
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Struct
public static Struct
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Struct
parseFrom(byte[] data)

public static Struct
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Struct
public static Struct
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Struct
public static Struct
public static Parser<Struct>
public Struct.Builder
toBuilder()

Implements com.google.protobuf.Message.toBuilder, com.google.protobuf.MessageLite.toBuilder.

Constructs a builder initialized with the current message.
public void
writeTo(CodedOutputStream output)

Overrides com.google.protobuf.GeneratedMessageV3.writeTo.

Implements com.google.protobuf.MessageLite.writeTo.

Serializes the message and writes it to output.
Inherited from com.google.protobuf.GeneratedMessageV3:
canUseUnsafecomputeStringSizecomputeStringSizeNoTagemptyBooleanListemptyDoubleListemptyFloatListemptyIntListemptyLongListenableAlwaysUseFieldBuildersForTestinggetAllFieldsgetAllFieldsRawgetDescriptorForTypegetFieldgetFieldRawgetOneofFieldDescriptorgetRepeatedFieldgetRepeatedFieldCounthasFieldhasOneofmakeExtensionsImmutablemutableCopymutableCopymutableCopymutableCopymutableCopynewBooleanListnewBuilderForTypenewDoubleListnewFloatListnewIntListnewLongListparseDelimitedWithIOExceptionparseDelimitedWithIOExceptionparseUnknownFieldparseUnknownFieldProto3parseWithIOExceptionparseWithIOExceptionparseWithIOExceptionparseWithIOExceptionserializeBooleanMapToserializeIntegerMapToserializeLongMapToserializeStringMapTowriteReplacewriteStringwriteStringNoTag