Struct aws_sdk_s3::model::LifecycleRuleAndOperator
source · #[non_exhaustive]pub struct LifecycleRuleAndOperator { /* private fields */ }
Expand description
This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator.
Implementations§
source§impl LifecycleRuleAndOperator
impl LifecycleRuleAndOperator
sourcepub fn prefix(&self) -> Option<&str>
pub fn prefix(&self) -> Option<&str>
Prefix identifying one or more objects to which the rule applies.
All of these tags must exist in the object's tag set in order for the rule to apply.
sourcepub fn object_size_greater_than(&self) -> i64
pub fn object_size_greater_than(&self) -> i64
Minimum object size to which the rule applies.
sourcepub fn object_size_less_than(&self) -> i64
pub fn object_size_less_than(&self) -> i64
Maximum object size to which the rule applies.
source§impl LifecycleRuleAndOperator
impl LifecycleRuleAndOperator
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LifecycleRuleAndOperator
.
Examples found in repository?
src/xml_deser.rs (line 6622)
6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689
pub fn deser_structure_crate_model_lifecycle_rule_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LifecycleRuleAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LifecycleRuleAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") /* Prefix com.amazonaws.s3#LifecycleRuleAndOperator$Prefix */ => {
let var_361 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_361);
}
,
s if s.matches("Tag") /* Tags com.amazonaws.s3#LifecycleRuleAndOperator$Tags */ => {
let var_362 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_363 = builder.tags.take().unwrap_or_default();
list_363.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_363
})
?
)
;
builder = builder.set_tags(var_362);
}
,
s if s.matches("ObjectSizeGreaterThan") /* ObjectSizeGreaterThan com.amazonaws.s3#LifecycleRuleAndOperator$ObjectSizeGreaterThan */ => {
let var_364 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeGreaterThanBytes`)"))
}
?
)
;
builder = builder.set_object_size_greater_than(var_364);
}
,
s if s.matches("ObjectSizeLessThan") /* ObjectSizeLessThan com.amazonaws.s3#LifecycleRuleAndOperator$ObjectSizeLessThan */ => {
let var_365 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeLessThanBytes`)"))
}
?
)
;
builder = builder.set_object_size_less_than(var_365);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LifecycleRuleAndOperator
impl Clone for LifecycleRuleAndOperator
source§fn clone(&self) -> LifecycleRuleAndOperator
fn clone(&self) -> LifecycleRuleAndOperator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more