Class Value (2.23.0)

publicfinalclass ValueextendsGeneratedMessageV3implementsValueOrBuilder

A message that can hold any of the supported value types and associated metadata.

Protobuf type google.datastore.v1.Value

Implements

ValueOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ARRAY_VALUE_FIELD_NUMBER

publicstaticfinalintARRAY_VALUE_FIELD_NUMBER
Field Value
Type Description
int

BLOB_VALUE_FIELD_NUMBER

publicstaticfinalintBLOB_VALUE_FIELD_NUMBER
Field Value
Type Description
int

BOOLEAN_VALUE_FIELD_NUMBER

publicstaticfinalintBOOLEAN_VALUE_FIELD_NUMBER
Field Value
Type Description
int

DOUBLE_VALUE_FIELD_NUMBER

publicstaticfinalintDOUBLE_VALUE_FIELD_NUMBER
Field Value
Type Description
int

ENTITY_VALUE_FIELD_NUMBER

publicstaticfinalintENTITY_VALUE_FIELD_NUMBER
Field Value
Type Description
int

EXCLUDE_FROM_INDEXES_FIELD_NUMBER

publicstaticfinalintEXCLUDE_FROM_INDEXES_FIELD_NUMBER
Field Value
Type Description
int

GEO_POINT_VALUE_FIELD_NUMBER

publicstaticfinalintGEO_POINT_VALUE_FIELD_NUMBER
Field Value
Type Description
int

INTEGER_VALUE_FIELD_NUMBER

publicstaticfinalintINTEGER_VALUE_FIELD_NUMBER
Field Value
Type Description
int

KEY_VALUE_FIELD_NUMBER

publicstaticfinalintKEY_VALUE_FIELD_NUMBER
Field Value
Type Description
int

MEANING_FIELD_NUMBER

publicstaticfinalintMEANING_FIELD_NUMBER
Field Value
Type Description
int

NULL_VALUE_FIELD_NUMBER

publicstaticfinalintNULL_VALUE_FIELD_NUMBER
Field Value
Type Description
int

STRING_VALUE_FIELD_NUMBER

publicstaticfinalintSTRING_VALUE_FIELD_NUMBER
Field Value
Type Description
int

TIMESTAMP_VALUE_FIELD_NUMBER

publicstaticfinalintTIMESTAMP_VALUE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticValuegetDefaultInstance()
Returns
Type Description
Value

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticValue.BuildernewBuilder()
Returns
Type Description
Value.Builder

newBuilder(Value prototype)

publicstaticValue.BuildernewBuilder(Valueprototype)
Parameter
Name Description
prototype Value
Returns
Type Description
Value.Builder

parseDelimitedFrom(InputStream input)

publicstaticValueparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticValueparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticValueparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticValueparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticValueparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticValueparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticValueparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Value>parser()
Returns
Type Description
Parser<Value>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getArrayValue()

publicArrayValuegetArrayValue()

An array value. Cannot contain another array value. A Value instance that sets field array_value must not set fields meaning or exclude_from_indexes.

.google.datastore.v1.ArrayValue array_value = 9;

Returns
Type Description
ArrayValue

The arrayValue.

getArrayValueOrBuilder()

publicArrayValueOrBuildergetArrayValueOrBuilder()

An array value. Cannot contain another array value. A Value instance that sets field array_value must not set fields meaning or exclude_from_indexes.

.google.datastore.v1.ArrayValue array_value = 9;

Returns
Type Description
ArrayValueOrBuilder

getBlobValue()

publicByteStringgetBlobValue()

A blob value. May have at most 1,000,000 bytes. When exclude_from_indexes is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.

bytes blob_value = 18;

Returns
Type Description
ByteString

The blobValue.

getBooleanValue()

publicbooleangetBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
Type Description
boolean

The booleanValue.

getDefaultInstanceForType()

publicValuegetDefaultInstanceForType()
Returns
Type Description
Value

getDoubleValue()

publicdoublegetDoubleValue()

A double value.

double double_value = 3;

Returns
Type Description
double

The doubleValue.

getEntityValue()

publicEntitygetEntityValue()

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.

.google.datastore.v1.Entity entity_value = 6;

Returns
Type Description
Entity

The entityValue.

getEntityValueOrBuilder()

publicEntityOrBuildergetEntityValueOrBuilder()

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.

.google.datastore.v1.Entity entity_value = 6;

Returns
Type Description
EntityOrBuilder

getExcludeFromIndexes()

publicbooleangetExcludeFromIndexes()

If the value should be excluded from all indexes including those defined explicitly.

bool exclude_from_indexes = 19;

Returns
Type Description
boolean

The excludeFromIndexes.

getGeoPointValue()

publicLatLnggetGeoPointValue()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
Type Description
com.google.type.LatLng

The geoPointValue.

getGeoPointValueOrBuilder()

publicLatLngOrBuildergetGeoPointValueOrBuilder()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
Type Description
com.google.type.LatLngOrBuilder

getIntegerValue()

publiclonggetIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
Type Description
long

The integerValue.

getKeyValue()

publicKeygetKeyValue()

A key value.

.google.datastore.v1.Key key_value = 5;

Returns
Type Description
Key

The keyValue.

getKeyValueOrBuilder()

publicKeyOrBuildergetKeyValueOrBuilder()

A key value.

.google.datastore.v1.Key key_value = 5;

Returns
Type Description
KeyOrBuilder

getMeaning()

publicintgetMeaning()

The meaning field should only be populated for backwards compatibility.

int32 meaning = 14;

Returns
Type Description
int

The meaning.

getNullValue()

publicNullValuegetNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
Type Description
NullValue

The nullValue.

getNullValueValue()

publicintgetNullValueValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
Type Description
int

The enum numeric value on the wire for nullValue.

getParserForType()

publicParser<Value>getParserForType()
Returns
Type Description
Parser<Value>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getStringValue()

publicStringgetStringValue()

A UTF-8 encoded string value. When exclude_from_indexes is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

string string_value = 17;

Returns
Type Description
String

The stringValue.

getStringValueBytes()

publicByteStringgetStringValueBytes()

A UTF-8 encoded string value. When exclude_from_indexes is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

string string_value = 17;

Returns
Type Description
ByteString

The bytes for stringValue.

getTimestampValue()

publicTimestampgetTimestampValue()

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
Type Description
Timestamp

The timestampValue.

getTimestampValueOrBuilder()

publicTimestampOrBuildergetTimestampValueOrBuilder()

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
Type Description
TimestampOrBuilder

getValueTypeCase()

publicValue.ValueTypeCasegetValueTypeCase()
Returns
Type Description
Value.ValueTypeCase

hasArrayValue()

publicbooleanhasArrayValue()

An array value. Cannot contain another array value. A Value instance that sets field array_value must not set fields meaning or exclude_from_indexes.

.google.datastore.v1.ArrayValue array_value = 9;

Returns
Type Description
boolean

Whether the arrayValue field is set.

hasBlobValue()

publicbooleanhasBlobValue()

A blob value. May have at most 1,000,000 bytes. When exclude_from_indexes is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.

bytes blob_value = 18;

Returns
Type Description
boolean

Whether the blobValue field is set.

hasBooleanValue()

publicbooleanhasBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
Type Description
boolean

Whether the booleanValue field is set.

hasDoubleValue()

publicbooleanhasDoubleValue()

A double value.

double double_value = 3;

Returns
Type Description
boolean

Whether the doubleValue field is set.

hasEntityValue()

publicbooleanhasEntityValue()

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.

.google.datastore.v1.Entity entity_value = 6;

Returns
Type Description
boolean

Whether the entityValue field is set.

hasGeoPointValue()

publicbooleanhasGeoPointValue()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
Type Description
boolean

Whether the geoPointValue field is set.

hasIntegerValue()

publicbooleanhasIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
Type Description
boolean

Whether the integerValue field is set.

hasKeyValue()

publicbooleanhasKeyValue()

A key value.

.google.datastore.v1.Key key_value = 5;

Returns
Type Description
boolean

Whether the keyValue field is set.

hasNullValue()

publicbooleanhasNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
Type Description
boolean

Whether the nullValue field is set.

hasStringValue()

publicbooleanhasStringValue()

A UTF-8 encoded string value. When exclude_from_indexes is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

string string_value = 17;

Returns
Type Description
boolean

Whether the stringValue field is set.

hasTimestampValue()

publicbooleanhasTimestampValue()

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
Type Description
boolean

Whether the timestampValue field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicValue.BuildernewBuilderForType()
Returns
Type Description
Value.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedValue.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Value.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicValue.BuildertoBuilder()
Returns
Type Description
Value.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.