aws-sdk-iam 1.109.0

AWS SDK for AWS Identity and Access Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_entity_details(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::EntityDetails, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::EntityDetails::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("EntityInfo") /* EntityInfo com.amazonaws.iam#EntityDetails$EntityInfo */ =>  {
                let var_1 =
                    Some(
                        crate::protocol_serde::shape_entity_info::de_entity_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_entity_info(var_1);
            }
            ,
            s if s.matches("LastAuthenticated") /* LastAuthenticated com.amazonaws.iam#EntityDetails$LastAuthenticated */ =>  {
                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.iam#dateType`)"))
                        ?
                    )
                ;
                builder = builder.set_last_authenticated(var_2);
            }
            ,
            _ => {}
        }
    }
    Ok(crate::serde_util::entity_details_correct_errors(builder).build())
}