pub struct BucketRetentionPolicy {
pub effective_time: Option<DateTime<Utc>>,
pub is_locked: Option<bool>,
pub retention_period: Option<i64>,
}
Expand description
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.
This type is not used in any activity, and only used as part of another schema.
Fields§
§effective_time: Option<DateTime<Utc>>
Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.
is_locked: Option<bool>
Once locked, an object retention policy cannot be modified.
retention_period: Option<i64>
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.
Trait Implementations§
Source§impl Clone for BucketRetentionPolicy
impl Clone for BucketRetentionPolicy
Source§fn clone(&self) -> BucketRetentionPolicy
fn clone(&self) -> BucketRetentionPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BucketRetentionPolicy
impl Debug for BucketRetentionPolicy
Source§impl Default for BucketRetentionPolicy
impl Default for BucketRetentionPolicy
Source§fn default() -> BucketRetentionPolicy
fn default() -> BucketRetentionPolicy
Source§impl<'de> Deserialize<'de> for BucketRetentionPolicy
impl<'de> Deserialize<'de> for BucketRetentionPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for BucketRetentionPolicy
impl Serialize for BucketRetentionPolicy
impl NestedType for BucketRetentionPolicy
impl Part for BucketRetentionPolicy
Auto Trait Implementations§
impl Freeze for BucketRetentionPolicy
impl RefUnwindSafe for BucketRetentionPolicy
impl Send for BucketRetentionPolicy
impl Sync for BucketRetentionPolicy
impl Unpin for BucketRetentionPolicy
impl UnwindSafe for BucketRetentionPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more