Class: Google::Apis::DatastoreV1beta3::MutationResult

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

The result of applying a mutation.

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

Returns a new instance of MutationResult



1195
1196
1197
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1195

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

Instance Attribute Details

#conflict_detectedBoolean Also known as: conflict_detected?

Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation. Corresponds to the JSON property conflictDetected

Returns:

  • (Boolean)


1175
1176
1177
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1175

def conflict_detected
  @conflict_detected
end

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



1184
1185
1186
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1184

def key
  @key
end

#versionFixnum

The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity. Corresponds to the JSON property version

Returns:

  • (Fixnum)


1193
1194
1195
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1193

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1200
1201
1202
1203
1204
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1200

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