Class: Google::Apis::PubsubV1::Snapshot

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pubsub_v1/classes.rb,
generated/google/apis/pubsub_v1/representations.rb,
generated/google/apis/pubsub_v1/representations.rb

Overview

A snapshot resource.

ALPHA: This feature is part of an alpha release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Snapshot

Returns a new instance of Snapshot



810
811
812
# File 'generated/google/apis/pubsub_v1/classes.rb', line 810

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

Instance Attribute Details

#expire_timeString

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

Returns:

  • (String)


793
794
795
# File 'generated/google/apis/pubsub_v1/classes.rb', line 793

def expire_time
  @expire_time
end

#labelsHash<String,String>

See Creating and managing labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


798
799
800
# File 'generated/google/apis/pubsub_v1/classes.rb', line 798

def labels
  @labels
end

#nameString

The name of the snapshot. Corresponds to the JSON property name

Returns:

  • (String)


803
804
805
# File 'generated/google/apis/pubsub_v1/classes.rb', line 803

def name
  @name
end

#topicString

The name of the topic from which this snapshot is retaining messages. Corresponds to the JSON property topic

Returns:

  • (String)


808
809
810
# File 'generated/google/apis/pubsub_v1/classes.rb', line 808

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



815
816
817
818
819
820
# File 'generated/google/apis/pubsub_v1/classes.rb', line 815

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