#[allow(clippy::needless_question_mark)]
pub fn de_supported_engine_lifecycle(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::SupportedEngineLifecycle, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::SupportedEngineLifecycle::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LifecycleSupportName") => {
let var_1 =
Some(
Result::<crate::types::LifecycleSupportName, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::LifecycleSupportName::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_lifecycle_support_name(var_1);
}
,
s if s.matches("LifecycleSupportStartDate") => {
let var_2 =
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.rds#TStamp`)"))
?
)
;
builder = builder.set_lifecycle_support_start_date(var_2);
}
,
s if s.matches("LifecycleSupportEndDate") => {
let var_3 =
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.rds#TStamp`)"))
?
)
;
builder = builder.set_lifecycle_support_end_date(var_3);
}
,
_ => {}
}
}
Ok(crate::serde_util::supported_engine_lifecycle_correct_errors(builder).build())
}