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
Represents a JSON value. `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 is an invalid state.Protobuf type
google.protobuf.Value-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream -
Field Summary
Fields inherited from class GeneratedMessageLite.Builder
instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRepresents a JSON boolean (`true` or `false` literal in JSON).Represents a JSON array.Represents a JSON `null`.Represents a JSON number.Represents a JSON string.Represents a JSON object.booleanRepresents a JSON boolean (`true` or `false` literal in JSON).Represents a JSON array.Represents a JSON `null`.intRepresents a JSON `null`.doubleRepresents a JSON number.Represents a JSON string.Represents a JSON string.Represents a JSON object.booleanRepresents a JSON boolean (`true` or `false` literal in JSON).booleanRepresents a JSON array.booleanRepresents a JSON `null`.booleanRepresents a JSON number.booleanRepresents a JSON string.booleanRepresents a JSON object.mergeListValue(ListValue value) Represents a JSON array.mergeStructValue(Struct value) Represents a JSON object.setBoolValue(boolean value) Represents a JSON boolean (`true` or `false` literal in JSON).setListValue(ListValue value) Represents a JSON array.setListValue(ListValue.Builder builderForValue) Represents a JSON array.setNullValue(NullValue value) Represents a JSON `null`.setNullValueValue(int value) Represents a JSON `null`.setNumberValue(double value) Represents a JSON number.setStringValue(String value) Represents a JSON string.setStringValueBytes(ByteString value) Represents a JSON string.setStructValue(Struct value) Represents a JSON object.setStructValue(Struct.Builder builderForValue) Represents a JSON object.Methods inherited from class GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
getKindCase
- Specified by:
getKindCasein interfaceValueOrBuilder
-
clearKind
-
hasNullValue
public boolean hasNullValue()Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Specified by:
hasNullValuein interfaceValueOrBuilder- Returns:
- Whether the nullValue field is set.
-
getNullValueValue
public int getNullValueValue()Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValueValuein interfaceValueOrBuilder- Returns:
- The enum numeric value on the wire for nullValue.
-
setNullValueValue
Represents a JSON `null`.
.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 JSON `null`.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValuein interfaceValueOrBuilder- Returns:
- The nullValue.
-
setNullValue
Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Parameters:
value- The nullValue to set.- Returns:
- This builder for chaining.
- Throws:
IllegalArgumentException- if UNRECOGNIZED is provided.
-
clearNullValue
Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Returns:
- This builder for chaining.
-
hasNumberValue
public boolean hasNumberValue()Represents a JSON number. Must not be `NaN`, `Infinity` or `-Infinity`, since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.
double number_value = 2;- Specified by:
hasNumberValuein interfaceValueOrBuilder- Returns:
- Whether the numberValue field is set.
-
getNumberValue
public double getNumberValue()Represents a JSON number. Must not be `NaN`, `Infinity` or `-Infinity`, since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.
double number_value = 2;- Specified by:
getNumberValuein interfaceValueOrBuilder- Returns:
- The numberValue.
-
setNumberValue
Represents a JSON number. Must not be `NaN`, `Infinity` or `-Infinity`, since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.
double number_value = 2;- Parameters:
value- The numberValue to set.- Returns:
- This builder for chaining.
-
clearNumberValue
Represents a JSON number. Must not be `NaN`, `Infinity` or `-Infinity`, since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.
double number_value = 2;- Returns:
- This builder for chaining.
-
hasStringValue
public boolean hasStringValue()Represents a JSON string.
string string_value = 3;- Specified by:
hasStringValuein interfaceValueOrBuilder- Returns:
- Whether the stringValue field is set.
-
getStringValue
Represents a JSON string.
string string_value = 3;- Specified by:
getStringValuein interfaceValueOrBuilder- Returns:
- The stringValue.
-
getStringValueBytes
Represents a JSON string.
string string_value = 3;- Specified by:
getStringValueBytesin interfaceValueOrBuilder- Returns:
- The bytes for stringValue.
-
setStringValue
Represents a JSON string.
string string_value = 3;- Parameters:
value- The stringValue to set.- Returns:
- This builder for chaining.
-
clearStringValue
Represents a JSON string.
string string_value = 3;- Returns:
- This builder for chaining.
-
setStringValueBytes
Represents a JSON string.
string string_value = 3;- Parameters:
value- The bytes for stringValue to set.- Returns:
- This builder for chaining.
-
hasBoolValue
public boolean hasBoolValue()Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4;- Specified by:
hasBoolValuein interfaceValueOrBuilder- Returns:
- Whether the boolValue field is set.
-
getBoolValue
public boolean getBoolValue()Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4;- Specified by:
getBoolValuein interfaceValueOrBuilder- Returns:
- The boolValue.
-
setBoolValue
Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4;- Parameters:
value- The boolValue to set.- Returns:
- This builder for chaining.
-
clearBoolValue
Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4;- Returns:
- This builder for chaining.
-
hasStructValue
public boolean hasStructValue()Represents a JSON object.
.google.protobuf.Struct struct_value = 5;- Specified by:
hasStructValuein interfaceValueOrBuilder- Returns:
- Whether the structValue field is set.
-
getStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5;- Specified by:
getStructValuein interfaceValueOrBuilder- Returns:
- The structValue.
-
setStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5; -
setStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5; -
mergeStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5; -
clearStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5; -
hasListValue
public boolean hasListValue()Represents a JSON array.
.google.protobuf.ListValue list_value = 6;- Specified by:
hasListValuein interfaceValueOrBuilder- Returns:
- Whether the listValue field is set.
-
getListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6;- Specified by:
getListValuein interfaceValueOrBuilder- Returns:
- The listValue.
-
setListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6; -
setListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6; -
mergeListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6; -
clearListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6;
-