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.



2630
2631
2632
# File 'lib/google/apis/storage_v1/classes.rb', line 2630

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)


2623
2624
2625
# File 'lib/google/apis/storage_v1/classes.rb', line 2623

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)


2628
2629
2630
# File 'lib/google/apis/storage_v1/classes.rb', line 2628

def retain_until_time
  @retain_until_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2635
2636
2637
2638
# File 'lib/google/apis/storage_v1/classes.rb', line 2635

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