Struct aws_sdk_s3control::model::activity_metrics::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ActivityMetrics
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn is_enabled(self, input: bool) -> Self
pub fn is_enabled(self, input: bool) -> Self
A container for whether the activity metrics are enabled.
sourcepub fn set_is_enabled(self, input: Option<bool>) -> Self
pub fn set_is_enabled(self, input: Option<bool>) -> Self
A container for whether the activity metrics are enabled.
Examples found in repository?
src/xml_deser.rs (line 5532)
5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539
pub fn deser_structure_crate_model_activity_metrics(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ActivityMetrics, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ActivityMetrics::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IsEnabled") /* IsEnabled com.amazonaws.s3control#ActivityMetrics$IsEnabled */ => {
let var_259 =
Some(
{
<bool 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 (boolean: `com.amazonaws.s3control#IsEnabled`)"))
}
?
)
;
builder = builder.set_is_enabled(var_259);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ActivityMetrics
pub fn build(self) -> ActivityMetrics
Consumes the builder and constructs a ActivityMetrics
.
Examples found in repository?
src/xml_deser.rs (line 5538)
5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539
pub fn deser_structure_crate_model_activity_metrics(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ActivityMetrics, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ActivityMetrics::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IsEnabled") /* IsEnabled com.amazonaws.s3control#ActivityMetrics$IsEnabled */ => {
let var_259 =
Some(
{
<bool 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 (boolean: `com.amazonaws.s3control#IsEnabled`)"))
}
?
)
;
builder = builder.set_is_enabled(var_259);
}
,
_ => {}
}
}
Ok(builder.build())
}