Class: Google::Apis::DatastoreV1beta3::Mutation
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1beta3::Mutation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/datastore_v1beta3/classes.rb,
lib/google/apis/datastore_v1beta3/representations.rb,
lib/google/apis/datastore_v1beta3/representations.rb
Overview
A mutation to apply to an entity.
Instance Attribute Summary collapse
-
#base_version ⇒ Fixnum
The version of the entity that this mutation is being applied to.
-
#delete ⇒ Google::Apis::DatastoreV1beta3::Key
A unique identifier for an entity.
-
#insert ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object.
-
#update ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object.
-
#upsert ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Mutation
constructor
A new instance of Mutation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Mutation
Returns a new instance of Mutation.
1200 1201 1202 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1200 def initialize(**args) update!(**args) end |
Instance Attribute Details
#base_version ⇒ Fixnum
The version of the entity that this mutation is being applied to. If this does
not match the current version on the server, the mutation conflicts.
Corresponds to the JSON property baseVersion
1170 1171 1172 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1170 def base_version @base_version end |
#delete ⇒ 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 delete
1177 1178 1179 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1177 def delete @delete end |
#insert ⇒ Google::Apis::DatastoreV1beta3::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.
Corresponds to the JSON property insert
1184 1185 1186 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1184 def insert @insert end |
#update ⇒ Google::Apis::DatastoreV1beta3::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.
Corresponds to the JSON property update
1191 1192 1193 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1191 def update @update end |
#upsert ⇒ Google::Apis::DatastoreV1beta3::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.
Corresponds to the JSON property upsert
1198 1199 1200 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1198 def upsert @upsert end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1205 1206 1207 1208 1209 1210 1211 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1205 def update!(**args) @base_version = args[:base_version] if args.key?(:base_version) @delete = args[:delete] if args.key?(:delete) @insert = args[:insert] if args.key?(:insert) @update = args[:update] if args.key?(:update) @upsert = args[:upsert] if args.key?(:upsert) end |