Class: Google::Apis::StorageV1::Object::Retention
- Inherits:
-
Object
- Object
- Google::Apis::StorageV1::Object::Retention
- 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
-
#mode ⇒ String
The bucket's object retention mode, can only be Unlocked or Locked.
-
#retain_until_time ⇒ DateTime
A time in RFC 3339 format until which object retention protects this object.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Retention
constructor
A new instance of Retention.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#mode ⇒ String
The bucket's object retention mode, can only be Unlocked or Locked.
Corresponds to the JSON property mode
2595 2596 2597 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2595 def mode @mode end |
#retain_until_time ⇒ DateTime
A time in RFC 3339 format until which object retention protects this object.
Corresponds to the JSON property retainUntilTime
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 |