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.



950
951
952
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 950

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)


941
942
943
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 941

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)


948
949
950
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 948

def publish_time
  @publish_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



955
956
957
958
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 955

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