Class Value
- All Implemented Interfaces:
MessageLite, MessageLiteOrBuilder, ValueOrBuilder
@Generated
public final class Value
extends GeneratedMessageLite<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 ClassesModifier and TypeClassDescriptionstatic final classRepresents a JSON value.static enumNested classes/interfaces inherited from class GeneratedMessageLite
GeneratedMessageLite.DefaultInstanceBasedParser<T>, GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>, GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType, BuilderType>, GeneratedMessageLite.ExtensionDescriptor, GeneratedMessageLite.GeneratedExtension<ContainingType, Type>, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedFormNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final Valueprivate Objectprivate intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFieldsFields inherited from class AbstractMessageLite
memoizedHashCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidRepresents a JSON boolean (`true` or `false` literal in JSON).private voidprivate voidRepresents a JSON array.private voidRepresents a JSON `null`.private voidRepresents a JSON number.private voidRepresents a JSON string.private voidRepresents a JSON object.protected final ObjectdynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke.booleanRepresents a JSON boolean (`true` or `false` literal in JSON).static ValueRepresents 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.private voidmergeListValue(ListValue value) Represents a JSON array.private voidmergeStructValue(Struct value) Represents a JSON object.static Value.Builderstatic Value.BuildernewBuilder(Value prototype) static ValueparseDelimitedFrom(InputStream input) static ValueparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ValueparseFrom(byte[] data) static ValueparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static ValueparseFrom(ByteString data) static ValueparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static ValueparseFrom(CodedInputStream input) static ValueparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static ValueparseFrom(InputStream input) static ValueparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ValueparseFrom(ByteBuffer data) static ValueparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()private voidsetBoolValue(boolean value) Represents a JSON boolean (`true` or `false` literal in JSON).private voidsetListValue(ListValue value) Represents a JSON array.private voidsetNullValue(NullValue value) Represents a JSON `null`.private voidsetNullValueValue(int value) Represents a JSON `null`.private voidsetNumberValue(double value) Represents a JSON number.private voidsetStringValue(String value) Represents a JSON string.private voidsetStringValueBytes(ByteString value) Represents a JSON string.private voidsetStructValue(Struct value) Represents a JSON object.Methods inherited from class GeneratedMessageLite
buildMessageInfo, clearMemoizedHashCode, clearMemoizedSerializedSize, computeHashCode, createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstance, getDefaultInstanceForType, getMemoizedHashCode, getMemoizedSerializedSize, getMethodOrDie, getParserForType, getSerializedSize, getSerializedSize, hashCode, hashCodeIsNotMemoized, invokeOrDie, isInitialized, isMutable, makeImmutable, markImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newMutableInstance, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, setMemoizedHashCode, setMemoizedSerializedSize, toBuilder, toString, writeToMethods inherited from class AbstractMessageLite
addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
kindCase_
private int kindCase_ -
kind_
-
NULL_VALUE_FIELD_NUMBER
public static final int NULL_VALUE_FIELD_NUMBER- See Also:
-
NUMBER_VALUE_FIELD_NUMBER
public static final int NUMBER_VALUE_FIELD_NUMBER- See Also:
-
STRING_VALUE_FIELD_NUMBER
public static final int STRING_VALUE_FIELD_NUMBER- See Also:
-
BOOL_VALUE_FIELD_NUMBER
public static final int BOOL_VALUE_FIELD_NUMBER- See Also:
-
STRUCT_VALUE_FIELD_NUMBER
public static final int STRUCT_VALUE_FIELD_NUMBER- See Also:
-
LIST_VALUE_FIELD_NUMBER
public static final int LIST_VALUE_FIELD_NUMBER- See Also:
-
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Value
private Value()
-
-
Method Details
-
getKindCase
- Specified by:
getKindCasein interfaceValueOrBuilder
-
clearKind
private void 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.
-
getNullValue
Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValuein interfaceValueOrBuilder- Returns:
- The nullValue.
-
setNullValueValue
private void setNullValueValue(int value) Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Parameters:
value- The enum numeric value on the wire for nullValue to set.
-
setNullValue
Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1;- Parameters:
value- The nullValue to set.- Throws:
IllegalArgumentException- if UNRECOGNIZED is provided.
-
clearNullValue
private void clearNullValue()Represents a JSON `null`.
.google.protobuf.NullValue null_value = 1; -
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
private void setNumberValue(double value) 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.
-
clearNumberValue
private void 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; -
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.
-
clearStringValue
private void clearStringValue()Represents a JSON string.
string string_value = 3; -
setStringValueBytes
Represents a JSON string.
string string_value = 3;- Parameters:
value- The bytes for stringValue to set.
-
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
private void setBoolValue(boolean value) Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4;- Parameters:
value- The boolValue to set.
-
clearBoolValue
private void clearBoolValue()Represents a JSON boolean (`true` or `false` literal in JSON).
bool bool_value = 4; -
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; -
mergeStructValue
Represents a JSON object.
.google.protobuf.Struct struct_value = 5; -
clearStructValue
private void 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; -
mergeListValue
Represents a JSON array.
.google.protobuf.ListValue list_value = 6; -
clearListValue
private void clearListValue()Represents a JSON array.
.google.protobuf.ListValue list_value = 6; -
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Value parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Value parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Value parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Value parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Value parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Value parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) Description copied from class:GeneratedMessageLiteA method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke. These different kinds of operations are required to implement message-level operations for builders in the runtime. This method bundles those operations to reduce the generated methods count.NEW_INSTANCEreturns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE.IS_INITIALIZEDreturnsnullfor false and the default instance for true. It doesn't use or modify any memoized value.GET_MEMOIZED_IS_INITIALIZEDreturns the memoizedisInitializedbyte value.SET_MEMOIZED_IS_INITIALIZEDsets the memoizedisInitializedbyte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.NEW_BUILDERreturns aBuilderTypeinstance.
For use by generated code only.
- Specified by:
dynamicMethodin classGeneratedMessageLite<Value, Value.Builder>
-
getDefaultInstance
-
parser
-