Class: Google::Apis::DatastoreV1::Mutation
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::Mutation
- 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
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.
-
#update ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
-
#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.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Mutation
Returns a new instance of Mutation
928 929 930 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 928 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
910 911 912 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 910 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
896 897 898 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 896 def delete @delete end |
#insert ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
An entity is limited to 1 megabyte when stored. That roughly
corresponds to a limit of 1 megabyte for the serialized form of this
message.
Corresponds to the JSON property insert
904 905 906 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 904 def insert @insert end |
#update ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
An entity is limited to 1 megabyte when stored. That roughly
corresponds to a limit of 1 megabyte for the serialized form of this
message.
Corresponds to the JSON property update
918 919 920 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 918 def update @update end |
#upsert ⇒ Google::Apis::DatastoreV1::Entity
A Datastore data object.
An entity is limited to 1 megabyte when stored. That roughly
corresponds to a limit of 1 megabyte for the serialized form of this
message.
Corresponds to the JSON property upsert
926 927 928 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 926 def upsert @upsert end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
933 934 935 936 937 938 939 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 933 def update!(**args) @delete = args[:delete] if args.key?(:delete) @insert = args[:insert] if args.key?(:insert) @base_version = args[:base_version] if args.key?(:base_version) @update = args[:update] if args.key?(:update) @upsert = args[:upsert] if args.key?(:upsert) end |