#[non_exhaustive]pub struct Condition {
pub age_days: Option<i32>,
pub created_before: Option<Date>,
pub is_live: Option<bool>,
pub num_newer_versions: Option<i32>,
pub matches_storage_class: Vec<String>,
pub days_since_custom_time: Option<i32>,
pub custom_time_before: Option<Date>,
pub days_since_noncurrent_time: Option<i32>,
pub noncurrent_time_before: Option<Date>,
pub matches_prefix: Vec<String>,
pub matches_suffix: Vec<String>,
/* private fields */
}Expand description
A condition of an object which triggers some action.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.age_days: Option<i32>Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition.
created_before: Option<Date>Optional. This condition is satisfied when an object is created before midnight of the specified date in UTC.
is_live: Option<bool>Relevant only for versioned objects. If the value is
true, this condition matches live objects; if the value
is false, it matches archived objects.
num_newer_versions: Option<i32>Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.
matches_storage_class: Vec<String>Optional. Objects having any of the storage classes specified by this
condition are matched. Values include MULTI_REGIONAL, REGIONAL,
NEARLINE, COLDLINE, STANDARD, and
DURABLE_REDUCED_AVAILABILITY.
days_since_custom_time: Option<i32>Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer.
custom_time_before: Option<Date>Optional. An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.
days_since_noncurrent_time: Option<i32>This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. The value of the field must be a nonnegative integer. If it’s zero, the object version becomes eligible for Lifecycle action as soon as it becomes noncurrent.
noncurrent_time_before: Option<Date>Optional. This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.
matches_prefix: Vec<String>Optional. List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.
matches_suffix: Vec<String>Optional. List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.
Implementations§
Source§impl Condition
impl Condition
pub fn new() -> Self
Sourcepub fn set_age_days<T>(self, v: T) -> Self
pub fn set_age_days<T>(self, v: T) -> Self
Sets the value of age_days.
Sourcepub fn set_or_clear_age_days<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_age_days<T>(self, v: Option<T>) -> Self
Sets or clears the value of age_days.
Sourcepub fn set_created_before<T>(self, v: T) -> Self
pub fn set_created_before<T>(self, v: T) -> Self
Sets the value of created_before.
Sourcepub fn set_or_clear_created_before<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_created_before<T>(self, v: Option<T>) -> Self
Sets or clears the value of created_before.
Sourcepub fn set_is_live<T>(self, v: T) -> Self
pub fn set_is_live<T>(self, v: T) -> Self
Sets the value of is_live.
Sourcepub fn set_or_clear_is_live<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_is_live<T>(self, v: Option<T>) -> Self
Sets or clears the value of is_live.
Sourcepub fn set_num_newer_versions<T>(self, v: T) -> Self
pub fn set_num_newer_versions<T>(self, v: T) -> Self
Sets the value of num_newer_versions.
Sourcepub fn set_or_clear_num_newer_versions<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_num_newer_versions<T>(self, v: Option<T>) -> Self
Sets or clears the value of num_newer_versions.
Sourcepub fn set_matches_storage_class<T, V>(self, v: T) -> Self
pub fn set_matches_storage_class<T, V>(self, v: T) -> Self
Sets the value of matches_storage_class.
Sourcepub fn set_days_since_custom_time<T>(self, v: T) -> Self
pub fn set_days_since_custom_time<T>(self, v: T) -> Self
Sets the value of days_since_custom_time.
Sourcepub fn set_or_clear_days_since_custom_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_days_since_custom_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of days_since_custom_time.
Sourcepub fn set_custom_time_before<T>(self, v: T) -> Self
pub fn set_custom_time_before<T>(self, v: T) -> Self
Sets the value of custom_time_before.
Sourcepub fn set_or_clear_custom_time_before<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_time_before<T>(self, v: Option<T>) -> Self
Sets or clears the value of custom_time_before.
Sourcepub fn set_days_since_noncurrent_time<T>(self, v: T) -> Self
pub fn set_days_since_noncurrent_time<T>(self, v: T) -> Self
Sets the value of days_since_noncurrent_time.
Sourcepub fn set_or_clear_days_since_noncurrent_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_days_since_noncurrent_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of days_since_noncurrent_time.
Sourcepub fn set_noncurrent_time_before<T>(self, v: T) -> Self
pub fn set_noncurrent_time_before<T>(self, v: T) -> Self
Sets the value of noncurrent_time_before.
Sourcepub fn set_or_clear_noncurrent_time_before<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_noncurrent_time_before<T>(self, v: Option<T>) -> Self
Sets or clears the value of noncurrent_time_before.
Sourcepub fn set_matches_prefix<T, V>(self, v: T) -> Self
pub fn set_matches_prefix<T, V>(self, v: T) -> Self
Sets the value of matches_prefix.
Sourcepub fn set_matches_suffix<T, V>(self, v: T) -> Self
pub fn set_matches_suffix<T, V>(self, v: T) -> Self
Sets the value of matches_suffix.
Trait Implementations§
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request