Class: Google::Apis::PubsubV1::ExpirationPolicy

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 policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).

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) ⇒ ExpirationPolicy

Returns a new instance of ExpirationPolicy.



239
240
241
# File 'generated/google/apis/pubsub_v1/classes.rb', line 239

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

Instance Attribute Details

#ttlString

Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. The definition of "activity" depends on the type of the associated resource. The minimum and maximum allowed values for ttl depend on the type of the associated resource, as well. If ttl is not set, the associated resource never expires. Corresponds to the JSON property ttl

Returns:

  • (String)


237
238
239
# File 'generated/google/apis/pubsub_v1/classes.rb', line 237

def ttl
  @ttl
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



244
245
246
# File 'generated/google/apis/pubsub_v1/classes.rb', line 244

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