Class: Google::Apis::PubsubV1::Snapshot
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::Snapshot
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
A snapshot resource. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.
Instance Attribute Summary collapse
-
#expire_time ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Optional.
-
#topic ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Snapshot
constructor
A new instance of Snapshot.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Snapshot
Returns a new instance of Snapshot.
1454 1455 1456 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1454 def initialize(**args) update!(**args) end |
Instance Attribute Details
#expire_time ⇒ String
Optional. The snapshot is guaranteed to exist up until this time. A newly-
created snapshot expires no later than 7 days from the time of its creation.
Its exact lifetime is determined at creation by the existing backlog in the
source subscription. Specifically, the lifetime of the snapshot is 7 days - (
age of oldest unacked message in the subscription). For example, consider a
subscription whose oldest unacked message is 3 days old. If a snapshot is
created from this subscription, the snapshot -- which will always capture this
3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The
service will refuse to create a snapshot that would expire in less than 1 hour
after creation.
Corresponds to the JSON property expireTime
1436 1437 1438 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1436 def expire_time @expire_time end |
#labels ⇒ Hash<String,String>
Optional. See Creating and managing labels.
Corresponds to the JSON property labels
1442 1443 1444 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1442 def labels @labels end |
#name ⇒ String
Optional. The name of the snapshot.
Corresponds to the JSON property name
1447 1448 1449 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1447 def name @name end |
#topic ⇒ String
Optional. The name of the topic from which this snapshot is retaining messages.
Corresponds to the JSON property topic
1452 1453 1454 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1452 def topic @topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1459 1460 1461 1462 1463 1464 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1459 def update!(**args) @expire_time = args[:expire_time] if args.key?(:expire_time) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @topic = args[:topic] if args.key?(:topic) end |