Struct aws_sdk_s3::model::noncurrent_version_expiration::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for NoncurrentVersionExpiration
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn noncurrent_days(self, input: i32) -> Self
pub fn noncurrent_days(self, input: i32) -> Self
Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. The value must be a non-zero positive integer. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.
sourcepub fn set_noncurrent_days(self, input: Option<i32>) -> Self
pub fn set_noncurrent_days(self, input: Option<i32>) -> Self
Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. The value must be a non-zero positive integer. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.
Examples found in repository?
5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635
pub fn deser_structure_crate_model_noncurrent_version_expiration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NoncurrentVersionExpiration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NoncurrentVersionExpiration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NoncurrentDays") /* NoncurrentDays com.amazonaws.s3#NoncurrentVersionExpiration$NoncurrentDays */ => {
let var_312 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_noncurrent_days(var_312);
}
,
s if s.matches("NewerNoncurrentVersions") /* NewerNoncurrentVersions com.amazonaws.s3#NoncurrentVersionExpiration$NewerNoncurrentVersions */ => {
let var_313 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#VersionCount`)"))
}
?
)
;
builder = builder.set_newer_noncurrent_versions(var_313);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn newer_noncurrent_versions(self, input: i32) -> Self
pub fn newer_noncurrent_versions(self, input: i32) -> Self
Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide.
sourcepub fn set_newer_noncurrent_versions(self, input: Option<i32>) -> Self
pub fn set_newer_noncurrent_versions(self, input: Option<i32>) -> Self
Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide.
Examples found in repository?
5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635
pub fn deser_structure_crate_model_noncurrent_version_expiration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NoncurrentVersionExpiration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NoncurrentVersionExpiration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NoncurrentDays") /* NoncurrentDays com.amazonaws.s3#NoncurrentVersionExpiration$NoncurrentDays */ => {
let var_312 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_noncurrent_days(var_312);
}
,
s if s.matches("NewerNoncurrentVersions") /* NewerNoncurrentVersions com.amazonaws.s3#NoncurrentVersionExpiration$NewerNoncurrentVersions */ => {
let var_313 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#VersionCount`)"))
}
?
)
;
builder = builder.set_newer_noncurrent_versions(var_313);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> NoncurrentVersionExpiration
pub fn build(self) -> NoncurrentVersionExpiration
Consumes the builder and constructs a NoncurrentVersionExpiration
.
Examples found in repository?
5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635
pub fn deser_structure_crate_model_noncurrent_version_expiration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NoncurrentVersionExpiration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NoncurrentVersionExpiration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NoncurrentDays") /* NoncurrentDays com.amazonaws.s3#NoncurrentVersionExpiration$NoncurrentDays */ => {
let var_312 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_noncurrent_days(var_312);
}
,
s if s.matches("NewerNoncurrentVersions") /* NewerNoncurrentVersions com.amazonaws.s3#NoncurrentVersionExpiration$NewerNoncurrentVersions */ => {
let var_313 =
Some(
{
<i32 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 (integer: `com.amazonaws.s3#VersionCount`)"))
}
?
)
;
builder = builder.set_newer_noncurrent_versions(var_313);
}
,
_ => {}
}
}
Ok(builder.build())
}