Cloud Datastore V1 Client - Class Value (1.17.1)

Reference documentation and code samples for the Cloud Datastore V1 Client class Value.

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

Generated from protobuf message google.datastore.v1.Value

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ null_value int

A null value.

↳ boolean_value bool

A boolean value.

↳ integer_value int|string

An integer value.

↳ double_value float

A double value.

↳ timestamp_value Google\Protobuf\Timestamp

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

↳ key_value Google\Cloud\Datastore\V1\Key

A key value.

↳ string_value string

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.

↳ blob_value string

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.

↳ geo_point_value Google\Type\LatLng

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

↳ entity_value Google\Cloud\Datastore\V1\Entity

An entity value. - May have no key. - May have a key with an incomplete key path. - May have a reserved/read-only key.

↳ array_value Google\Cloud\Datastore\V1\ArrayValue

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.

↳ meaning int

The meaning field should only be populated for backwards compatibility.

↳ exclude_from_indexes bool

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

getNullValue

A null value.

Generated from protobuf field .google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
int

hasNullValue

setNullValue

A null value.

Generated from protobuf field .google.protobuf.NullValue null_value = 11;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBooleanValue

A boolean value.

Generated from protobuf field bool boolean_value = 1;

Returns
TypeDescription
bool

hasBooleanValue

setBooleanValue

A boolean value.

Generated from protobuf field bool boolean_value = 1;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getIntegerValue

An integer value.

Generated from protobuf field int64 integer_value = 2;

Returns
TypeDescription
int|string

hasIntegerValue

setIntegerValue

An integer value.

Generated from protobuf field int64 integer_value = 2;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getDoubleValue

A double value.

Generated from protobuf field double double_value = 3;

Returns
TypeDescription
float

hasDoubleValue

setDoubleValue

A double value.

Generated from protobuf field double double_value = 3;

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getTimestampValue

A timestamp value.

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

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasTimestampValue

setTimestampValue

A timestamp value.

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

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10;

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getKeyValue

A key value.

Generated from protobuf field .google.datastore.v1.Key key_value = 5;

Returns
TypeDescription
Google\Cloud\Datastore\V1\Key|null

hasKeyValue

setKeyValue

A key value.

Generated from protobuf field .google.datastore.v1.Key key_value = 5;

Parameter
NameDescription
var Google\Cloud\Datastore\V1\Key
Returns
TypeDescription
$this

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.

Generated from protobuf field string string_value = 17;

Returns
TypeDescription
string

hasStringValue

setStringValue

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.

Generated from protobuf field string string_value = 17;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

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.

Generated from protobuf field bytes blob_value = 18;

Returns
TypeDescription
string

hasBlobValue

setBlobValue

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.

Generated from protobuf field bytes blob_value = 18;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGeoPointValue

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

Generated from protobuf field .google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
Google\Type\LatLng|null

hasGeoPointValue

setGeoPointValue

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

Generated from protobuf field .google.type.LatLng geo_point_value = 8;

Parameter
NameDescription
var Google\Type\LatLng
Returns
TypeDescription
$this

getEntityValue

An entity value.

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

Generated from protobuf field .google.datastore.v1.Entity entity_value = 6;

Returns
TypeDescription
Google\Cloud\Datastore\V1\Entity|null

hasEntityValue

setEntityValue

An entity value.

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

Generated from protobuf field .google.datastore.v1.Entity entity_value = 6;

Parameter
NameDescription
var Google\Cloud\Datastore\V1\Entity
Returns
TypeDescription
$this

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.

Generated from protobuf field .google.datastore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
Google\Cloud\Datastore\V1\ArrayValue|null

hasArrayValue

setArrayValue

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.

Generated from protobuf field .google.datastore.v1.ArrayValue array_value = 9;

Parameter
NameDescription
var Google\Cloud\Datastore\V1\ArrayValue
Returns
TypeDescription
$this

getMeaning

The meaning field should only be populated for backwards compatibility.

Generated from protobuf field int32 meaning = 14;

Returns
TypeDescription
int

setMeaning

The meaning field should only be populated for backwards compatibility.

Generated from protobuf field int32 meaning = 14;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getExcludeFromIndexes

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

Generated from protobuf field bool exclude_from_indexes = 19;

Returns
TypeDescription
bool

setExcludeFromIndexes

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

Generated from protobuf field bool exclude_from_indexes = 19;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getValueType

Returns
TypeDescription
string