Class: Google::Apis::DatastoreV1beta2::CommitRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/datastore_v1beta2/classes.rb,
generated/google/apis/datastore_v1beta2/representations.rb,
generated/google/apis/datastore_v1beta2/representations.rb

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

Returns a new instance of CommitRequest.



146
147
148
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 146

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

Instance Attribute Details

#ignore_read_onlyBoolean Also known as: ignore_read_only?

Corresponds to the JSON property ignoreReadOnly

Returns:

  • (Boolean)


127
128
129
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 127

def ignore_read_only
  @ignore_read_only
end

#modeString

The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. Corresponds to the JSON property mode

Returns:

  • (String)


133
134
135
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 133

def mode
  @mode
end

#mutationGoogle::Apis::DatastoreV1beta2::Mutation

A set of changes to apply. Corresponds to the JSON property mutation



138
139
140
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 138

def mutation
  @mutation
end

#transactionString

The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL. Corresponds to the JSON property transaction

Returns:

  • (String)


144
145
146
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 144

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



151
152
153
154
155
156
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 151

def update!(**args)
  @ignore_read_only = args[:ignore_read_only] if args.key?(:ignore_read_only)
  @mode = args[:mode] if args.key?(:mode)
  @mutation = args[:mutation] if args.key?(:mutation)
  @transaction = args[:transaction] if args.key?(:transaction)
end