Class Struct.Builder

public static final class Struct.Builder extends GeneratedMessageLite.Builder<Struct,Struct.Builder> implements StructOrBuilder


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

Implements

StructOrBuilder

Methods

clearFields()

public Struct.Builder clearFields()
Returns
TypeDescription
Struct.Builder

containsFields(String key)

public boolean containsFields(String key)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getFields()

public Map<String,Value> getFields()

Use #getFieldsMap() instead.

Returns
TypeDescription
Map<String,Value>

getFieldsCount()

public int getFieldsCount()


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Returns
TypeDescription
int

getFieldsMap()

public Map<String,Value> getFieldsMap()


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Returns
TypeDescription
Map<String,Value>

getFieldsOrDefault(String key, Value defaultValue)

public Value getFieldsOrDefault(String key, Value defaultValue)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameters
NameDescription
keyString
defaultValueValue
Returns
TypeDescription
Value

getFieldsOrThrow(String key)

public Value getFieldsOrThrow(String key)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
Value

putAllFields(Map<String,Value> values)

public Struct.Builder putAllFields(Map<String,Value> values)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
NameDescription
valuesMap<String,Value>
Returns
TypeDescription
Struct.Builder

putFields(String key, Value value)

public Struct.Builder putFields(String key, Value value)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameters
NameDescription
keyString
valueValue
Returns
TypeDescription
Struct.Builder

removeFields(String key)

public Struct.Builder removeFields(String key)


Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
Struct.Builder