Class: Google::Apis::DatastoreV1beta3::Entity
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1beta3::Entity
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1beta3/classes.rb,
generated/google/apis/datastore_v1beta3/representations.rb,
generated/google/apis/datastore_v1beta3/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#key ⇒ Google::Apis::DatastoreV1beta3::Key
A unique identifier for an entity.
-
#properties ⇒ Hash<String,Google::Apis::DatastoreV1beta3::Value>
The entity's properties.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Entity
constructor
A new instance of Entity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Entity
Returns a new instance of Entity
249 250 251 |
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 249 def initialize(**args) update!(**args) end |
Instance Attribute Details
#key ⇒ Google::Apis::DatastoreV1beta3::Key
A unique identifier for an entity.
If a key's partition ID or any of its path kinds or names are
reserved/read-only, the key is reserved/read-only.
A reserved/read-only key is forbidden in certain documented contexts.
Corresponds to the JSON property key
237 238 239 |
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 237 def key @key end |
#properties ⇒ Hash<String,Google::Apis::DatastoreV1beta3::Value>
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 ""
.
Corresponds to the JSON property properties
247 248 249 |
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 247 def properties @properties end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
254 255 256 257 |
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 254 def update!(**args) @key = args[:key] if args.key?(:key) @properties = args[:properties] if args.key?(:properties) end |