Class: Google::Apis::DatastoreV1beta2::Key
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1beta2::Key
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1beta2/classes.rb,
generated/google/apis/datastore_v1beta2/representations.rb,
generated/google/apis/datastore_v1beta2/representations.rb
Overview
A unique identifier for an entity.
Instance Attribute Summary collapse
-
#partition_id ⇒ Google::Apis::DatastoreV1beta2::PartitionId
An identifier for a particular subset of entities.
-
#path ⇒ Array<Google::Apis::DatastoreV1beta2::KeyPathElement>
The entity path.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Key
constructor
A new instance of Key.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Key
Returns a new instance of Key
380 381 382 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 380 def initialize(**args) update!(**args) end |
Instance Attribute Details
#partition_id ⇒ Google::Apis::DatastoreV1beta2::PartitionId
An identifier for a particular subset of entities.
Entities are partitioned into various subsets, each used by different datasets
and different namespaces within a dataset and so forth.
Corresponds to the JSON property partitionId
364 365 366 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 364 def partition_id @partition_id end |
#path ⇒ Array<Google::Apis::DatastoreV1beta2::KeyPathElement>
The entity path. An entity path consists of one or more elements composed of a
kind and a string or numerical identifier, which identify entities. The first
element identifies a root entity, the second element identifies a child of the
root entity, the third element a child of the second entity, and so forth. The
entities identified by all prefixes of the path are called the element's
ancestors. An entity path is always fully complete: ALL of the entity's
ancestors are required to be in the path along with the entity identifier
itself. The only exception is that in some documented cases, the identifier in
the last path element (for the entity) itself may be omitted. A path can never
be empty. The path can have at most 100 elements.
Corresponds to the JSON property path
378 379 380 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 378 def path @path end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
385 386 387 388 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 385 def update!(**args) @partition_id = args[:partition_id] if args.key?(:partition_id) @path = args[:path] if args.key?(:path) end |