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.



228
229
230
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 228

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)


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

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



226
227
228
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 226

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



233
234
235
236
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 233

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