Class: Google::Apis::StorageV1::Bucket::Lifecycle

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

Overview

The bucket's lifecycle configuration. See lifecycle management for more information.

Defined Under Namespace

Classes: Rule

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

Returns a new instance of Lifecycle



359
360
361
# File 'generated/google/apis/storage_v1/classes.rb', line 359

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

Instance Attribute Details

#ruleArray<Google::Apis::StorageV1::Bucket::Lifecycle::Rule>

A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. Corresponds to the JSON property rule



357
358
359
# File 'generated/google/apis/storage_v1/classes.rb', line 357

def rule
  @rule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



364
365
366
# File 'generated/google/apis/storage_v1/classes.rb', line 364

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