#[allow(clippy::needless_question_mark)]
pub fn de_instance_status_details(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::InstanceStatusDetails, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::InstanceStatusDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("impairedSince") => {
let var_1 =
Some(
::aws_smithy_types::DateTime::from_str(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
)
.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_impaired_since(var_1);
}
,
s if s.matches("name") => {
let var_2 =
Some(
Result::<crate::types::StatusName, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::StatusName::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_name(var_2);
}
,
s if s.matches("status") => {
let var_3 =
Some(
Result::<crate::types::StatusType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::StatusType::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}