Class: Google::Apis::DatastoreV1::MutationResult
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::MutationResult
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1/classes.rb,
generated/google/apis/datastore_v1/representations.rb,
generated/google/apis/datastore_v1/representations.rb
Overview
The result of applying a mutation.
Instance Attribute Summary collapse
-
#conflict_detected ⇒ Boolean
(also: #conflict_detected?)
Whether a conflict was detected for this mutation.
-
#key ⇒ Google::Apis::DatastoreV1::Key
A unique identifier for an entity.
-
#version ⇒ Fixnum
The version of the entity on the server after processing the mutation.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MutationResult
constructor
A new instance of MutationResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MutationResult
Returns a new instance of MutationResult.
1416 1417 1418 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 1416 def initialize(**args) update!(**args) end |
Instance Attribute Details
#conflict_detected ⇒ Boolean 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
1397 1398 1399 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 1397 def conflict_detected @conflict_detected end |
#key ⇒ Google::Apis::DatastoreV1::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
1405 1406 1407 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 1405 def key @key end |
#version ⇒ Fixnum
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
1414 1415 1416 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 1414 def version @version end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1421 1422 1423 1424 1425 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 1421 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 |