class

GoogleCloudStorage::BucketRetentionPolicy

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, effective_time : Time | Nil = nil, is_locked : Bool | Nil = nil, retention_period : String | Nil = nil)

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

effective_time

Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.

Source
effective_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] effective_time Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

is_locked

Once locked, an object retention policy cannot be modified.

Source
is_locked=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] is_locked Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
retention_period

The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.

Source
retention_period=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] retention_period Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source