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.
-
#conflict_resolution_strategy ⇒ String
The strategy to use when a conflict is detected.
-
#delete ⇒ Google::Apis::DatastoreV1beta3::Key
A unique identifier for an entity.
-
#insert ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object.
-
#property_mask ⇒ Google::Apis::DatastoreV1beta3::PropertyMask
The set of arbitrarily nested property paths used to restrict an operation to only a subset of properties in an entity.
-
#property_transforms ⇒ Array<Google::Apis::DatastoreV1beta3::PropertyTransform>
Optional.
-
#update ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object.
-
#update_time ⇒ String
The update time of the entity that this mutation is being applied to.
-
#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.
1595 1596 1597 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1595 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
1545 1546 1547 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1545 def base_version @base_version end |
#conflict_resolution_strategy ⇒ String
The strategy to use when a conflict is detected. Defaults to SERVER_VALUE.
If this is set, then conflict_detection_strategy must also be set.
Corresponds to the JSON property conflictResolutionStrategy
1551 1552 1553 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1551 def conflict_resolution_strategy @conflict_resolution_strategy 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
1558 1559 1560 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1558 def delete @delete end |
#insert ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property insert
1563 1564 1565 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1563 def insert @insert end |
#property_mask ⇒ Google::Apis::DatastoreV1beta3::PropertyMask
The set of arbitrarily nested property paths used to restrict an operation to
only a subset of properties in an entity.
Corresponds to the JSON property propertyMask
1569 1570 1571 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1569 def property_mask @property_mask end |
#property_transforms ⇒ Array<Google::Apis::DatastoreV1beta3::PropertyTransform>
Optional. The transforms to perform on the entity. This field can be set only
when the operation is insert, update, or upsert. If present, the
transforms are be applied to the entity regardless of the property mask, in
order, after the operation.
Corresponds to the JSON property propertyTransforms
1577 1578 1579 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1577 def property_transforms @property_transforms end |
#update ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property update
1582 1583 1584 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1582 def update @update end |
#update_time ⇒ String
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
1588 1589 1590 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1588 def update_time @update_time end |
#upsert ⇒ Google::Apis::DatastoreV1beta3::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property upsert
1593 1594 1595 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1593 def upsert @upsert end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1600 def update!(**args) @base_version = args[:base_version] if args.key?(:base_version) @conflict_resolution_strategy = args[:conflict_resolution_strategy] if args.key?(:conflict_resolution_strategy) @delete = args[:delete] if args.key?(:delete) @insert = args[:insert] if args.key?(:insert) @property_mask = args[:property_mask] if args.key?(:property_mask) @property_transforms = args[:property_transforms] if args.key?(:property_transforms) @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 |