Class: Google::Apis::SpannerV1::Ack

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

Overview

Arguments to ack operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Ack

Returns a new instance of Ack.



48
49
50
# File 'lib/google/apis/spanner_v1/classes.rb', line 48

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

Instance Attribute Details

#ignore_not_foundBoolean Also known as: ignore_not_found?

By default, an attempt to ack a message that does not exist will fail with a NOT_FOUND error. With ignore_not_found set to true, the ack will succeed even if the message does not exist. This is useful for unconditionally acking a message, even if it is missing or has already been acked. Corresponds to the JSON property ignoreNotFound

Returns:

  • (Boolean)


35
36
37
# File 'lib/google/apis/spanner_v1/classes.rb', line 35

def ignore_not_found
  @ignore_not_found
end

#keyArray<Object>

Required. The primary key of the message to be acked. Corresponds to the JSON property key

Returns:

  • (Array<Object>)


41
42
43
# File 'lib/google/apis/spanner_v1/classes.rb', line 41

def key
  @key
end

#queueString

Required. The queue where the message to be acked is stored. Corresponds to the JSON property queue

Returns:

  • (String)


46
47
48
# File 'lib/google/apis/spanner_v1/classes.rb', line 46

def queue
  @queue
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



53
54
55
56
57
# File 'lib/google/apis/spanner_v1/classes.rb', line 53

def update!(**args)
  @ignore_not_found = args[:ignore_not_found] if args.key?(:ignore_not_found)
  @key = args[:key] if args.key?(:key)
  @queue = args[:queue] if args.key?(:queue)
end