Cloud Firestore V1beta1 Client - Class Value (1.31.0)

Reference documentation and code samples for the Cloud Firestore V1beta1 Client class Value.

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

Generated from protobuf message google.firestore.v1beta1.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. Precise only to microseconds. When stored, any additional precision is rounded down.

↳ string_value string

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

↳ bytes_value string

A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

↳ reference_value string

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

↳ geo_point_value Google\Type\LatLng

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

↳ array_value Google\Cloud\Firestore\V1beta1\ArrayValue

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

↳ map_value Google\Cloud\Firestore\V1beta1\MapValue

A map value.

getNullValue

A null value.

Returns
TypeDescription
int

setNullValue

A null value.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBooleanValue

A boolean value.

Returns
TypeDescription
bool

setBooleanValue

A boolean value.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getIntegerValue

An integer value.

Returns
TypeDescription
int|string

setIntegerValue

An integer value.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getDoubleValue

A double value.

Returns
TypeDescription
float

setDoubleValue

A double value.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getTimestampValue

A timestamp value.

Precise only to microseconds. When stored, any additional precision is rounded down.

Returns
TypeDescription
Google\Protobuf\Timestamp

setTimestampValue

A timestamp value.

Precise only to microseconds. When stored, any additional precision is rounded down.

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

getStringValue

A string value.

The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

Returns
TypeDescription
string

setStringValue

A string value.

The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBytesValue

A bytes value.

Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

Returns
TypeDescription
string

setBytesValue

A bytes value.

Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getReferenceValue

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

Returns
TypeDescription
string

setReferenceValue

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGeoPointValue

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

Returns
TypeDescription
Google\Type\LatLng

setGeoPointValue

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

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

getArrayValue

An array value.

Cannot directly contain another array value, though can contain an map which contains another array.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\ArrayValue

setArrayValue

An array value.

Cannot directly contain another array value, though can contain an map which contains another array.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\ArrayValue
Returns
TypeDescription
$this

getMapValue

A map value.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\MapValue

setMapValue

A map value.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\MapValue
Returns
TypeDescription
$this

getValueType

Returns
TypeDescription
string