Class: Google::Apis::DatastoreV1beta2::Entity

Inherits:
Object
  • Object
show all
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

An entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Entity


223
224
225
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 223

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#keyGoogle::Apis::DatastoreV1beta2::Key

A unique identifier for an entity. Corresponds to the JSON property key


216
217
218
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 216

def key
  @key
end

#propertiesHash<String,Google::Apis::DatastoreV1beta2::Property>

The entity's properties. Corresponds to the JSON property properties


221
222
223
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 221

def properties
  @properties
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


228
229
230
231
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 228

def update!(**args)
  @key = args[:key] if args.key?(:key)
  @properties = args[:properties] if args.key?(:properties)
end