Class: Google::Apis::PubsubliteV1::ComputeTimeCursorRequest

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

Compute the corresponding cursor for a publish or event time in a topic partition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ComputeTimeCursorRequest

Returns a new instance of ComputeTimeCursorRequest.



215
216
217
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 215

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

Instance Attribute Details

#partitionFixnum

Required. The partition for which we should compute the cursor. Corresponds to the JSON property partition

Returns:

  • (Fixnum)


207
208
209
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 207

def partition
  @partition
end

#targetGoogle::Apis::PubsubliteV1::TimeTarget

A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor. Corresponds to the JSON property target



213
214
215
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 213

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



220
221
222
223
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 220

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