Class Value (2.19.0)

public final class Value extends GeneratedMessageV3 implements ValueOrBuilder

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

Protobuf type google.datastore.v1.Value

Implements

ValueOrBuilder

Static Fields

ARRAY_VALUE_FIELD_NUMBER

public static final int ARRAY_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

BLOB_VALUE_FIELD_NUMBER

public static final int BLOB_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

BOOLEAN_VALUE_FIELD_NUMBER

public static final int BOOLEAN_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

DOUBLE_VALUE_FIELD_NUMBER

public static final int DOUBLE_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

ENTITY_VALUE_FIELD_NUMBER

public static final int ENTITY_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

EXCLUDE_FROM_INDEXES_FIELD_NUMBER

public static final int EXCLUDE_FROM_INDEXES_FIELD_NUMBER
Field Value
TypeDescription
int

GEO_POINT_VALUE_FIELD_NUMBER

public static final int GEO_POINT_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

INTEGER_VALUE_FIELD_NUMBER

public static final int INTEGER_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

KEY_VALUE_FIELD_NUMBER

public static final int KEY_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

MEANING_FIELD_NUMBER

public static final int MEANING_FIELD_NUMBER
Field Value
TypeDescription
int

NULL_VALUE_FIELD_NUMBER

public static final int NULL_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

STRING_VALUE_FIELD_NUMBER

public static final int STRING_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

TIMESTAMP_VALUE_FIELD_NUMBER

public static final int TIMESTAMP_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Value getDefaultInstance()
Returns
TypeDescription
Value

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Value.Builder newBuilder()
Returns
TypeDescription
Value.Builder

newBuilder(Value prototype)

public static Value.Builder newBuilder(Value prototype)
Parameter
NameDescription
prototypeValue
Returns
TypeDescription
Value.Builder

parseDelimitedFrom(InputStream input)

public static Value parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Value parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Value parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Value parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Value parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Value parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Value parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Value parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Value parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Value parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Value parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Value parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Value> parser()
Returns
TypeDescription
Parser<Value>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getArrayValue()

public ArrayValue getArrayValue()

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
TypeDescription
ArrayValue

The arrayValue.

getArrayValueOrBuilder()

public ArrayValueOrBuilder getArrayValueOrBuilder()

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
TypeDescription
ArrayValueOrBuilder

getBlobValue()

public ByteString getBlobValue()

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
TypeDescription
ByteString

The blobValue.

getBooleanValue()

public boolean getBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
TypeDescription
boolean

The booleanValue.

getDefaultInstanceForType()

public Value getDefaultInstanceForType()
Returns
TypeDescription
Value

getDoubleValue()

public double getDoubleValue()

A double value.

double double_value = 3;

Returns
TypeDescription
double

The doubleValue.

getEntityValue()

public Entity getEntityValue()

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
TypeDescription
Entity

The entityValue.

getEntityValueOrBuilder()

public EntityOrBuilder getEntityValueOrBuilder()

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
TypeDescription
EntityOrBuilder

getExcludeFromIndexes()

public boolean getExcludeFromIndexes()

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

bool exclude_from_indexes = 19;

Returns
TypeDescription
boolean

The excludeFromIndexes.

getGeoPointValue()

public LatLng getGeoPointValue()

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

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
com.google.type.LatLng

The geoPointValue.

getGeoPointValueOrBuilder()

public LatLngOrBuilder getGeoPointValueOrBuilder()

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

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
com.google.type.LatLngOrBuilder

getIntegerValue()

public long getIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
TypeDescription
long

The integerValue.

getKeyValue()

public Key getKeyValue()

A key value.

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

Returns
TypeDescription
Key

The keyValue.

getKeyValueOrBuilder()

public KeyOrBuilder getKeyValueOrBuilder()

A key value.

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

Returns
TypeDescription
KeyOrBuilder

getMeaning()

public int getMeaning()

The meaning field should only be populated for backwards compatibility.

int32 meaning = 14;

Returns
TypeDescription
int

The meaning.

getNullValue()

public NullValue getNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
NullValue

The nullValue.

getNullValueValue()

public int getNullValueValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for nullValue.

getParserForType()

public Parser<Value> getParserForType()
Returns
TypeDescription
Parser<Value>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStringValue()

public String getStringValue()

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
TypeDescription
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

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
TypeDescription
ByteString

The bytes for stringValue.

getTimestampValue()

public Timestamp getTimestampValue()

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
TypeDescription
Timestamp

The timestampValue.

getTimestampValueOrBuilder()

public TimestampOrBuilder getTimestampValueOrBuilder()

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
TypeDescription
TimestampOrBuilder

getValueTypeCase()

public Value.ValueTypeCase getValueTypeCase()
Returns
TypeDescription
Value.ValueTypeCase

hasArrayValue()

public boolean hasArrayValue()

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
TypeDescription
boolean

Whether the arrayValue field is set.

hasBlobValue()

public boolean hasBlobValue()

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
TypeDescription
boolean

Whether the blobValue field is set.

hasBooleanValue()

public boolean hasBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
TypeDescription
boolean

Whether the booleanValue field is set.

hasDoubleValue()

public boolean hasDoubleValue()

A double value.

double double_value = 3;

Returns
TypeDescription
boolean

Whether the doubleValue field is set.

hasEntityValue()

public boolean hasEntityValue()

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
TypeDescription
boolean

Whether the entityValue field is set.

hasGeoPointValue()

public boolean hasGeoPointValue()

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

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
boolean

Whether the geoPointValue field is set.

hasIntegerValue()

public boolean hasIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
TypeDescription
boolean

Whether the integerValue field is set.

hasKeyValue()

public boolean hasKeyValue()

A key value.

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

Returns
TypeDescription
boolean

Whether the keyValue field is set.

hasNullValue()

public boolean hasNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
boolean

Whether the nullValue field is set.

hasStringValue()

public boolean hasStringValue()

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
TypeDescription
boolean

Whether the stringValue field is set.

hasTimestampValue()

public boolean hasTimestampValue()

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
TypeDescription
boolean

Whether the timestampValue field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Value.Builder newBuilderForType()
Returns
TypeDescription
Value.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Value.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Value.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Value.Builder toBuilder()
Returns
TypeDescription
Value.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException