Class: Google::Apis::DatastoreV1beta2::Mutation

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

A set of changes to apply.

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) ⇒ Mutation

Returns a new instance of Mutation.



548
549
550
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 548

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

Instance Attribute Details

#deleteArray<Google::Apis::DatastoreV1beta2::Key>

Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only. Corresponds to the JSON property delete



516
517
518
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 516

def delete
  @delete
end

#forceBoolean Also known as: force?

Ignore a user specified read-only period. Optional. Corresponds to the JSON property force

Returns:

  • (Boolean)


521
522
523
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 521

def force
  @force
end

#insertArray<Google::Apis::DatastoreV1beta2::Entity>

Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only. Corresponds to the JSON property insert



528
529
530
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 528

def insert
  @insert
end

#insert_auto_idArray<Google::Apis::DatastoreV1beta2::Entity>

Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only. Corresponds to the JSON property insertAutoId



534
535
536
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 534

def insert_auto_id
  @insert_auto_id
end

#updateArray<Google::Apis::DatastoreV1beta2::Entity>

Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only. Corresponds to the JSON property update



540
541
542
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 540

def update
  @update
end

#upsertArray<Google::Apis::DatastoreV1beta2::Entity>

Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only. Corresponds to the JSON property upsert



546
547
548
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 546

def upsert
  @upsert
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



553
554
555
556
557
558
559
560
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 553

def update!(**args)
  @delete = args[:delete] if args.key?(:delete)
  @force = args[:force] if args.key?(:force)
  @insert = args[:insert] if args.key?(:insert)
  @insert_auto_id = args[:insert_auto_id] if args.key?(:insert_auto_id)
  @update = args[:update] if args.key?(:update)
  @upsert = args[:upsert] if args.key?(:upsert)
end