Struct aws_sdk_s3::model::lifecycle_rule_and_operator::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for LifecycleRuleAndOperator
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn prefix(self, input: impl Into<String>) -> Self
pub fn prefix(self, input: impl Into<String>) -> Self
Prefix identifying one or more objects to which the rule applies.
sourcepub fn set_prefix(self, input: Option<String>) -> Self
pub fn set_prefix(self, input: Option<String>) -> Self
Prefix identifying one or more objects to which the rule applies.
Examples found in repository?
src/xml_deser.rs (line 6635)
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())
}
Appends an item to tags
.
To override the contents of this collection use set_tags
.
All of these tags must exist in the object's tag set in order for the rule to apply.
All of these tags must exist in the object's tag set in order for the rule to apply.
Examples found in repository?
src/xml_deser.rs (line 6652)
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())
}
sourcepub fn object_size_greater_than(self, input: i64) -> Self
pub fn object_size_greater_than(self, input: i64) -> Self
Minimum object size to which the rule applies.
sourcepub fn set_object_size_greater_than(self, input: Option<i64>) -> Self
pub fn set_object_size_greater_than(self, input: Option<i64>) -> Self
Minimum object size to which the rule applies.
Examples found in repository?
src/xml_deser.rs (line 6667)
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())
}
sourcepub fn object_size_less_than(self, input: i64) -> Self
pub fn object_size_less_than(self, input: i64) -> Self
Maximum object size to which the rule applies.
sourcepub fn set_object_size_less_than(self, input: Option<i64>) -> Self
pub fn set_object_size_less_than(self, input: Option<i64>) -> Self
Maximum object size to which the rule applies.
Examples found in repository?
src/xml_deser.rs (line 6682)
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())
}
sourcepub fn build(self) -> LifecycleRuleAndOperator
pub fn build(self) -> LifecycleRuleAndOperator
Consumes the builder and constructs a LifecycleRuleAndOperator
.
Examples found in repository?
src/xml_deser.rs (line 6688)
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())
}