Cloud Datastore V1 Client - Class Entity (1.17.1)

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

A Datastore data object.

An entity is limited to 1 megabyte when stored. That roughly corresponds to a limit of 1 megabyte for the serialized form of this message.

Generated from protobuf message google.datastore.v1.Entity

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ key Google\Cloud\Datastore\V1\Key

The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

↳ properties array|Google\Protobuf\Internal\MapField

The entity's properties. The map's keys are property names. A property name matching regex __.*__ is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be "".

getKey

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

Generated from protobuf field .google.datastore.v1.Key key = 1;

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

hasKey

clearKey

setKey

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

Generated from protobuf field .google.datastore.v1.Key key = 1;

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

getProperties

The entity's properties.

The map's keys are property names. A property name matching regex __.*__ is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be "".

Generated from protobuf field map<string, .google.datastore.v1.Value> properties = 3;

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setProperties

The entity's properties.

The map's keys are property names. A property name matching regex __.*__ is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be "".

Generated from protobuf field map<string, .google.datastore.v1.Value> properties = 3;

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this