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.



877
878
879
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 877

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)


868
869
870
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 868

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)


875
876
877
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 875

def publish_time
  @publish_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



882
883
884
885
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 882

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