Package com.google.protobuf
Class Value.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Value.Builder>
com.google.protobuf.Value.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,ValueOrBuilder
,Cloneable
- Enclosing class:
- Value
public static final class Value.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Value.Builder>
implements ValueOrBuilder
`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value.Protobuf type
google.protobuf.Value
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
clear()
Represents a boolean value.Represents a repeated `Value`.Represents a null value.Represents a double value.Represents a string value.Represents a structured value.boolean
Represents a boolean value.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Represents a repeated `Value`.Represents a repeated `Value`.Represents a repeated `Value`.Represents a null value.int
Represents a null value.double
Represents a double value.Represents a string value.com.google.protobuf.ByteString
Represents a string value.Represents a structured value.Represents a structured value.Represents a structured value.boolean
Represents a boolean value.boolean
Represents a repeated `Value`.boolean
Represents a null value.boolean
Represents a double value.boolean
Represents a string value.boolean
Represents a structured value.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeListValue
(ListValue value) Represents a repeated `Value`.mergeStructValue
(Struct value) Represents a structured value.setBoolValue
(boolean value) Represents a boolean value.setListValue
(ListValue value) Represents a repeated `Value`.setListValue
(ListValue.Builder builderForValue) Represents a repeated `Value`.setNullValue
(NullValue value) Represents a null value.setNullValueValue
(int value) Represents a null value.setNumberValue
(double value) Represents a double value.setStringValue
(String value) Represents a string value.setStringValueBytes
(com.google.protobuf.ByteString value) Represents a string value.setStructValue
(Struct value) Represents a structured value.setStructValue
(Struct.Builder builderForValue) Represents a structured value.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<Value.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<Value.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Value.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Value.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<Value.Builder>
-
mergeFrom
public Value.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Value.Builder>
- Throws:
IOException
-
getKindCase
- Specified by:
getKindCase
in interfaceValueOrBuilder
-
clearKind
-
hasNullValue
public boolean hasNullValue()Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Specified by:
hasNullValue
in interfaceValueOrBuilder
- Returns:
- Whether the nullValue field is set.
-
getNullValueValue
public int getNullValueValue()Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Specified by:
getNullValueValue
in interfaceValueOrBuilder
- Returns:
- The enum numeric value on the wire for nullValue.
-
setNullValueValue
Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Parameters:
value
- The enum numeric value on the wire for nullValue to set.- Returns:
- This builder for chaining.
-
getNullValue
Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Specified by:
getNullValue
in interfaceValueOrBuilder
- Returns:
- The nullValue.
-
setNullValue
Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Parameters:
value
- The nullValue to set.- Returns:
- This builder for chaining.
-
clearNullValue
Represents a null value.
.google.protobuf.NullValue null_value = 1;
- Returns:
- This builder for chaining.
-
hasNumberValue
public boolean hasNumberValue()Represents a double value.
double number_value = 2;
- Specified by:
hasNumberValue
in interfaceValueOrBuilder
- Returns:
- Whether the numberValue field is set.
-
getNumberValue
public double getNumberValue()Represents a double value.
double number_value = 2;
- Specified by:
getNumberValue
in interfaceValueOrBuilder
- Returns:
- The numberValue.
-
setNumberValue
Represents a double value.
double number_value = 2;
- Parameters:
value
- The numberValue to set.- Returns:
- This builder for chaining.
-
clearNumberValue
Represents a double value.
double number_value = 2;
- Returns:
- This builder for chaining.
-
hasStringValue
public boolean hasStringValue()Represents a string value.
string string_value = 3;
- Specified by:
hasStringValue
in interfaceValueOrBuilder
- Returns:
- Whether the stringValue field is set.
-
getStringValue
Represents a string value.
string string_value = 3;
- Specified by:
getStringValue
in interfaceValueOrBuilder
- Returns:
- The stringValue.
-
getStringValueBytes
public com.google.protobuf.ByteString getStringValueBytes()Represents a string value.
string string_value = 3;
- Specified by:
getStringValueBytes
in interfaceValueOrBuilder
- Returns:
- The bytes for stringValue.
-
setStringValue
Represents a string value.
string string_value = 3;
- Parameters:
value
- The stringValue to set.- Returns:
- This builder for chaining.
-
clearStringValue
Represents a string value.
string string_value = 3;
- Returns:
- This builder for chaining.
-
setStringValueBytes
Represents a string value.
string string_value = 3;
- Parameters:
value
- The bytes for stringValue to set.- Returns:
- This builder for chaining.
-
hasBoolValue
public boolean hasBoolValue()Represents a boolean value.
bool bool_value = 4;
- Specified by:
hasBoolValue
in interfaceValueOrBuilder
- Returns:
- Whether the boolValue field is set.
-
getBoolValue
public boolean getBoolValue()Represents a boolean value.
bool bool_value = 4;
- Specified by:
getBoolValue
in interfaceValueOrBuilder
- Returns:
- The boolValue.
-
setBoolValue
Represents a boolean value.
bool bool_value = 4;
- Parameters:
value
- The boolValue to set.- Returns:
- This builder for chaining.
-
clearBoolValue
Represents a boolean value.
bool bool_value = 4;
- Returns:
- This builder for chaining.
-
hasStructValue
public boolean hasStructValue()Represents a structured value.
.google.protobuf.Struct struct_value = 5;
- Specified by:
hasStructValue
in interfaceValueOrBuilder
- Returns:
- Whether the structValue field is set.
-
getStructValue
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
- Specified by:
getStructValue
in interfaceValueOrBuilder
- Returns:
- The structValue.
-
setStructValue
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
-
setStructValue
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
-
mergeStructValue
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
-
clearStructValue
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
-
getStructValueBuilder
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
-
getStructValueOrBuilder
Represents a structured value.
.google.protobuf.Struct struct_value = 5;
- Specified by:
getStructValueOrBuilder
in interfaceValueOrBuilder
-
hasListValue
public boolean hasListValue()Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
- Specified by:
hasListValue
in interfaceValueOrBuilder
- Returns:
- Whether the listValue field is set.
-
getListValue
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
- Specified by:
getListValue
in interfaceValueOrBuilder
- Returns:
- The listValue.
-
setListValue
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
-
setListValue
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
-
mergeListValue
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
-
clearListValue
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
-
getListValueBuilder
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
-
getListValueOrBuilder
Represents a repeated `Value`.
.google.protobuf.ListValue list_value = 6;
- Specified by:
getListValueOrBuilder
in interfaceValueOrBuilder
-