aws-sdk-cloudformation 1.111.0

AWS SDK for AWS CloudFormation
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_hook_target(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::HookTarget, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::HookTarget::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("TargetType") /* TargetType com.amazonaws.cloudformation#HookTarget$TargetType */ =>  {
                let var_1 =
                    Some(
                        Result::<crate::types::HookTargetType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::HookTargetType::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_target_type(var_1);
            }
            ,
            s if s.matches("TargetTypeName") /* TargetTypeName com.amazonaws.cloudformation#HookTarget$TargetTypeName */ =>  {
                let var_2 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_target_type_name(var_2);
            }
            ,
            s if s.matches("TargetId") /* TargetId com.amazonaws.cloudformation#HookTarget$TargetId */ =>  {
                let var_3 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_target_id(var_3);
            }
            ,
            s if s.matches("Action") /* Action com.amazonaws.cloudformation#HookTarget$Action */ =>  {
                let var_4 =
                    Some(
                        Result::<crate::types::HookTargetAction, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::HookTargetAction::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_action(var_4);
            }
            ,
            _ => {}
        }
    }
    Ok(crate::serde_util::hook_target_correct_errors(builder).build())
}