Package com.google.protobuf
Class Value.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<Value,Value.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<Value,Value.Builder>
com.google.protobuf.Value.Builder
- All Implemented Interfaces:
MessageLite.Builder
,MessageLiteOrBuilder
,ValueOrBuilder
,Cloneable
- Enclosing class:
Value
public static final class Value.Builder
extends GeneratedMessageLite.Builder<Value,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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRepresents 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.Represents a repeated `Value`.Represents a null value.int
Represents a null value.double
Represents a double value.Represents a string value.Represents a string 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.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
(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.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
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
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;
-
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;
-