Class: Google::Apis::PubsubliteV1::TimeTarget

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 target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TimeTarget

Returns a new instance of TimeTarget.



557
558
559
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 557

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

Instance Attribute Details

#event_timeString

Request the cursor of the first message with event time greater than or equal to event_time. If messages are missing an event time, the publish time is used as a fallback. As event times are user supplied, subsequent messages may have event times less than event_time and should be filtered by the client, if necessary. Corresponds to the JSON property eventTime

Returns:

  • (String)


548
549
550
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 548

def event_time
  @event_time
end

#publish_timeString

Request the cursor of the first message with publish time greater than or equal to publish_time. All messages thereafter are guaranteed to have publish times >= publish_time. Corresponds to the JSON property publishTime

Returns:

  • (String)


555
556
557
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 555

def publish_time
  @publish_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



562
563
564
565
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 562

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