BucketRetentionPolicy class

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

BucketRetentionPolicy({DateTime? effectiveTime, bool? isLocked, String? retentionPeriod})
BucketRetentionPolicy.fromJson(Map json_)

Properties

effectiveTime DateTime?
Server-determined value that indicates the time from which policy was enforced and effective.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isLocked bool?
Once locked, an object retention policy cannot be modified.
getter/setter pair
retentionPeriod String?
The duration in seconds that objects need to be retained.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited