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.



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

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)


432
433
434
# File 'lib/google/apis/storage_v1/classes.rb', line 432

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)


440
441
442
# File 'lib/google/apis/storage_v1/classes.rb', line 440

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)


446
447
448
# File 'lib/google/apis/storage_v1/classes.rb', line 446

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)


452
453
454
# File 'lib/google/apis/storage_v1/classes.rb', line 452

def toggle_time
  @toggle_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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