Class: Google::Apis::DatastoreV1beta3::Mutation

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Mutation

Returns a new instance of Mutation.



1416
1417
1418
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1416

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

Instance Attribute Details

#base_versionFixnum

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

Returns:

  • (Fixnum)


1386
1387
1388
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1386

def base_version
  @base_version
end

#deleteGoogle::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



1393
1394
1395
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1393

def delete
  @delete
end

#insertGoogle::Apis::DatastoreV1beta3::Entity

A Datastore data object. Must not exceed 1 MiB - 4 bytes. Corresponds to the JSON property insert



1398
1399
1400
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1398

def insert
  @insert
end

#updateGoogle::Apis::DatastoreV1beta3::Entity

A Datastore data object. Must not exceed 1 MiB - 4 bytes. Corresponds to the JSON property update



1403
1404
1405
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1403

def update
  @update
end

#update_timeString

The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts. Corresponds to the JSON property updateTime

Returns:

  • (String)


1409
1410
1411
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1409

def update_time
  @update_time
end

#upsertGoogle::Apis::DatastoreV1beta3::Entity

A Datastore data object. Must not exceed 1 MiB - 4 bytes. Corresponds to the JSON property upsert



1414
1415
1416
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1414

def upsert
  @upsert
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1421
1422
1423
1424
1425
1426
1427
1428
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1421

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)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upsert = args[:upsert] if args.key?(:upsert)
end