Class: Google::Apis::DatastoreV1::Mutation
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::Mutation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/datastore_v1/classes.rb,
lib/google/apis/datastore_v1/representations.rb,
lib/google/apis/datastore_v1/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.
-
#delete ⇒ Google::Apis::DatastoreV1::Key
A unique identifier for an entity.
-
#insert ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
-
#property_mask ⇒ Google::Apis::DatastoreV1::PropertyMask
The set of arbitrarily nested property paths used to restrict an operation to only a subset of properties in an entity.
-
#update ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
-
#update_time ⇒ String
The update time of the entity that this mutation is being applied to.
-
#upsert ⇒ Google::Apis::DatastoreV1::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.
1864 1865 1866 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1864 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
1828 1829 1830 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1828 def base_version @base_version end |
#delete ⇒ 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 delete
1835 1836 1837 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1835 def delete @delete end |
#insert ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property insert
1840 1841 1842 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1840 def insert @insert end |
#property_mask ⇒ Google::Apis::DatastoreV1::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
1846 1847 1848 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1846 def property_mask @property_mask end |
#update ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property update
1851 1852 1853 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1851 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
1857 1858 1859 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1857 def update_time @update_time end |
#upsert ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object. Must not exceed 1 MiB - 4 bytes.
Corresponds to the JSON property upsert
1862 1863 1864 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1862 def upsert @upsert end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1869 1870 1871 1872 1873 1874 1875 1876 1877 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 1869 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) @property_mask = args[:property_mask] if args.key?(:property_mask) @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 |