Struct aws_sdk_ec2::model::monitoring::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Monitoring
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn state(self, input: MonitoringState) -> Self
pub fn state(self, input: MonitoringState) -> Self
Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
sourcepub fn set_state(self, input: Option<MonitoringState>) -> Self
pub fn set_state(self, input: Option<MonitoringState>) -> Self
Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
Examples found in repository?
src/xml_deser.rs (line 62669)
62651 62652 62653 62654 62655 62656 62657 62658 62659 62660 62661 62662 62663 62664 62665 62666 62667 62668 62669 62670 62671 62672 62673 62674 62675 62676
pub fn deser_structure_crate_model_monitoring(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Monitoring, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Monitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#Monitoring$State */ => {
let var_3057 =
Some(
Result::<crate::model::MonitoringState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::MonitoringState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_3057);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Monitoring
pub fn build(self) -> Monitoring
Consumes the builder and constructs a Monitoring
.
Examples found in repository?
src/xml_deser.rs (line 62675)
62651 62652 62653 62654 62655 62656 62657 62658 62659 62660 62661 62662 62663 62664 62665 62666 62667 62668 62669 62670 62671 62672 62673 62674 62675 62676
pub fn deser_structure_crate_model_monitoring(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Monitoring, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Monitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#Monitoring$State */ => {
let var_3057 =
Some(
Result::<crate::model::MonitoringState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::MonitoringState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_3057);
}
,
_ => {}
}
}
Ok(builder.build())
}