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.



78
79
80
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 78

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



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

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)


76
77
78
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 76

def partition
  @partition
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



83
84
85
86
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 83

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