Class: Google::Apis::StorageV1::Bucket::Autoclass

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

Overview

The bucket's Autoclass configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Autoclass

Returns a new instance of Autoclass.



482
483
484
# File 'lib/google/apis/storage_v1/classes.rb', line 482

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

Instance Attribute Details

#enabledBoolean Also known as: enabled?

Whether or not Autoclass is enabled on this bucket Corresponds to the JSON property enabled

Returns:

  • (Boolean)


460
461
462
# File 'lib/google/apis/storage_v1/classes.rb', line 460

def enabled
  @enabled
end

#terminal_storage_classString

The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. Corresponds to the JSON property terminalStorageClass

Returns:

  • (String)


468
469
470
# File 'lib/google/apis/storage_v1/classes.rb', line 468

def terminal_storage_class
  @terminal_storage_class
end

#terminal_storage_class_update_timeDateTime

A date and time in RFC 3339 format representing the time of the most recent update to "terminalStorageClass". Corresponds to the JSON property terminalStorageClassUpdateTime

Returns:

  • (DateTime)


474
475
476
# File 'lib/google/apis/storage_v1/classes.rb', line 474

def terminal_storage_class_update_time
  @terminal_storage_class_update_time
end

#toggle_timeDateTime

A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. Corresponds to the JSON property toggleTime

Returns:

  • (DateTime)


480
481
482
# File 'lib/google/apis/storage_v1/classes.rb', line 480

def toggle_time
  @toggle_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



487
488
489
490
491
492
# File 'lib/google/apis/storage_v1/classes.rb', line 487

def update!(**args)
  @enabled = args[:enabled] if args.key?(:enabled)
  @terminal_storage_class = args[:terminal_storage_class] if args.key?(:terminal_storage_class)
  @terminal_storage_class_update_time = args[:terminal_storage_class_update_time] if args.key?(:terminal_storage_class_update_time)
  @toggle_time = args[:toggle_time] if args.key?(:toggle_time)
end