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
instance, isBuilt
Modifier and Type | Method and Description |
---|---|
Struct.Builder |
clearFields() |
boolean |
containsFields(String key)
Unordered map of dynamically typed values.
|
Map<String,Value> |
getFields()
Deprecated.
|
int |
getFieldsCount()
Unordered map of dynamically typed values.
|
Map<String,Value> |
getFieldsMap()
Unordered map of dynamically typed values.
|
Value |
getFieldsOrDefault(String key,
Value defaultValue)
Unordered map of dynamically typed values.
|
Value |
getFieldsOrThrow(String key)
Unordered map of dynamically typed values.
|
Struct.Builder |
putAllFields(Map<String,Value> values)
Unordered map of dynamically typed values.
|
Struct.Builder |
putFields(String key,
Value value)
Unordered map of dynamically typed values.
|
Struct.Builder |
removeFields(String key)
Unordered map of dynamically typed values.
|
build, buildPartial, clear, clone, copyOnWrite, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom
addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultInstanceForType, isInitialized
public int getFieldsCount()
StructOrBuilder
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
getFieldsCount
in interface StructOrBuilder
public boolean containsFields(String key)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
containsFields
in interface StructOrBuilder
public Struct.Builder clearFields()
public Struct.Builder removeFields(String key)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
@Deprecated public Map<String,Value> getFields()
getFieldsMap()
instead.getFields
in interface StructOrBuilder
public Map<String,Value> getFieldsMap()
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
getFieldsMap
in interface StructOrBuilder
public Value getFieldsOrDefault(String key, Value defaultValue)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
getFieldsOrDefault
in interface StructOrBuilder
public Value getFieldsOrThrow(String key)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
getFieldsOrThrow
in interface StructOrBuilder
public Struct.Builder putFields(String key, Value value)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
public Struct.Builder putAllFields(Map<String,Value> values)
Unordered map of dynamically typed values.
map<string, .google.protobuf.Value> fields = 1;
Copyright © 2008–2016 Google. All rights reserved.