Class: Google::Apis::StorageV1::Object::Retention

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

A collection of object level retention parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Retention

Returns a new instance of Retention.



2602
2603
2604
# File 'lib/google/apis/storage_v1/classes.rb', line 2602

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

Instance Attribute Details

#modeString

The bucket's object retention mode, can only be Unlocked or Locked. Corresponds to the JSON property mode

Returns:

  • (String)


2595
2596
2597
# File 'lib/google/apis/storage_v1/classes.rb', line 2595

def mode
  @mode
end

#retain_until_timeDateTime

A time in RFC 3339 format until which object retention protects this object. Corresponds to the JSON property retainUntilTime

Returns:

  • (DateTime)


2600
2601
2602
# File 'lib/google/apis/storage_v1/classes.rb', line 2600

def retain_until_time
  @retain_until_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2607
2608
2609
2610
# File 'lib/google/apis/storage_v1/classes.rb', line 2607

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