Class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action

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 action to take.

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

Returns a new instance of Action.



456
457
458
# File 'generated/google/apis/storage_v1/classes.rb', line 456

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

Instance Attribute Details

#storage_classString

Target storage class. Required iff the type of the action is SetStorageClass. Corresponds to the JSON property storageClass

Returns:

  • (String)


449
450
451
# File 'generated/google/apis/storage_v1/classes.rb', line 449

def storage_class
  @storage_class
end

#typeString

Type of the action. Currently, only Delete and SetStorageClass are supported. Corresponds to the JSON property type

Returns:

  • (String)


454
455
456
# File 'generated/google/apis/storage_v1/classes.rb', line 454

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



461
462
463
464
# File 'generated/google/apis/storage_v1/classes.rb', line 461

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