Class: Google::Apis::StoragebatchoperationsV1::ObjectRetention
- Inherits:
-
Object
- Object
- Google::Apis::StoragebatchoperationsV1::ObjectRetention
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/storagebatchoperations_v1/classes.rb,
lib/google/apis/storagebatchoperations_v1/representations.rb,
lib/google/apis/storagebatchoperations_v1/representations.rb
Overview
Describes options for object retention update.
Instance Attribute Summary collapse
-
#retain_until_time ⇒ String
Required.
-
#retention_mode ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ObjectRetention
constructor
A new instance of ObjectRetention.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ObjectRetention
Returns a new instance of ObjectRetention.
955 956 957 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 955 def initialize(**args) update!(**args) end |
Instance Attribute Details
#retain_until_time ⇒ String
Required. The object's retention expiration time, during which, the object is
protected from being deleted or overwritten. The time must be specified in RFC
3339 format, for example YYYY-MM-DD'T'HH:MM:SS'Z' or YYYY-MM-DD'T'HH:MM:SS.
SS'Z'. To clear an object's retention, both retentionMode and
retainUntilTime must be left unset (omitted). Setting retentionMode to
RETENTION_MODE_UNSPECIFIED is treated as a no-op. Unlike an unset field, it
doesn't modify or clear the retention settings.
Corresponds to the JSON property retainUntilTime
948 949 950 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 948 def retain_until_time @retain_until_time end |
#retention_mode ⇒ String
Required. The retention mode.
Corresponds to the JSON property retentionMode
953 954 955 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 953 def retention_mode @retention_mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
960 961 962 963 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 960 def update!(**args) @retain_until_time = args[:retain_until_time] if args.key?(:retain_until_time) @retention_mode = args[:retention_mode] if args.key?(:retention_mode) end |