Class: Google::Apis::PubsubliteV1::PartitionCursor

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

A pair of a Cursor and the partition it is for.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PartitionCursor

Returns a new instance of PartitionCursor.



462
463
464
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 462

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



455
456
457
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 455

def cursor
  @cursor
end

#partitionFixnum

The partition this is for. Corresponds to the JSON property partition

Returns:

  • (Fixnum)


460
461
462
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 460

def partition
  @partition
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



467
468
469
470
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 467

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