Class: Google::Apis::PubsubliteV1::CommitCursorRequest

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

Overview

Request for CommitCursor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommitCursorRequest

Returns a new instance of CommitCursorRequest.



65
66
67
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 65

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

Instance Attribute Details

#cursorGoogle::Apis::PubsubliteV1::Cursor

A cursor that describes the position of a message within a topic partition. Corresponds to the JSON property cursor



57
58
59
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 57

def cursor
  @cursor
end

#partitionFixnum

The partition for which to update the cursor. Partitions are zero indexed, so partition must be in the range [0, topic.num_partitions). Corresponds to the JSON property partition

Returns:

  • (Fixnum)


63
64
65
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 63

def partition
  @partition
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



70
71
72
73
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 70

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