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_resource_change(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::ResourceChange, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::ResourceChange::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("PolicyAction") /* PolicyAction com.amazonaws.cloudformation#ResourceChange$PolicyAction */ =>  {
                let var_1 =
                    Some(
                        Result::<crate::types::PolicyAction, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::PolicyAction::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_policy_action(var_1);
            }
            ,
            s if s.matches("Action") /* Action com.amazonaws.cloudformation#ResourceChange$Action */ =>  {
                let var_2 =
                    Some(
                        Result::<crate::types::ChangeAction, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::ChangeAction::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_action(var_2);
            }
            ,
            s if s.matches("LogicalResourceId") /* LogicalResourceId com.amazonaws.cloudformation#ResourceChange$LogicalResourceId */ =>  {
                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_logical_resource_id(var_3);
            }
            ,
            s if s.matches("PhysicalResourceId") /* PhysicalResourceId com.amazonaws.cloudformation#ResourceChange$PhysicalResourceId */ =>  {
                let var_4 =
                    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_physical_resource_id(var_4);
            }
            ,
            s if s.matches("ResourceType") /* ResourceType com.amazonaws.cloudformation#ResourceChange$ResourceType */ =>  {
                let var_5 =
                    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_resource_type(var_5);
            }
            ,
            s if s.matches("Replacement") /* Replacement com.amazonaws.cloudformation#ResourceChange$Replacement */ =>  {
                let var_6 =
                    Some(
                        Result::<crate::types::Replacement, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::Replacement::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_replacement(var_6);
            }
            ,
            s if s.matches("Scope") /* Scope com.amazonaws.cloudformation#ResourceChange$Scope */ =>  {
                let var_7 =
                    Some(
                        crate::protocol_serde::shape_scope::de_scope(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_scope(var_7);
            }
            ,
            s if s.matches("ResourceDriftStatus") /* ResourceDriftStatus com.amazonaws.cloudformation#ResourceChange$ResourceDriftStatus */ =>  {
                let var_8 =
                    Some(
                        Result::<crate::types::StackResourceDriftStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::StackResourceDriftStatus::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_resource_drift_status(var_8);
            }
            ,
            s if s.matches("ResourceDriftIgnoredAttributes") /* ResourceDriftIgnoredAttributes com.amazonaws.cloudformation#ResourceChange$ResourceDriftIgnoredAttributes */ =>  {
                let var_9 =
                    Some(
                        crate::protocol_serde::shape_resource_drift_ignored_attributes::de_resource_drift_ignored_attributes(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_resource_drift_ignored_attributes(var_9);
            }
            ,
            s if s.matches("Details") /* Details com.amazonaws.cloudformation#ResourceChange$Details */ =>  {
                let var_10 =
                    Some(
                        crate::protocol_serde::shape_resource_change_details::de_resource_change_details(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_details(var_10);
            }
            ,
            s if s.matches("ChangeSetId") /* ChangeSetId com.amazonaws.cloudformation#ResourceChange$ChangeSetId */ =>  {
                let var_11 =
                    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_change_set_id(var_11);
            }
            ,
            s if s.matches("ModuleInfo") /* ModuleInfo com.amazonaws.cloudformation#ResourceChange$ModuleInfo */ =>  {
                let var_12 =
                    Some(
                        crate::protocol_serde::shape_module_info::de_module_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_module_info(var_12);
            }
            ,
            s if s.matches("BeforeContext") /* BeforeContext com.amazonaws.cloudformation#ResourceChange$BeforeContext */ =>  {
                let var_13 =
                    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_before_context(var_13);
            }
            ,
            s if s.matches("AfterContext") /* AfterContext com.amazonaws.cloudformation#ResourceChange$AfterContext */ =>  {
                let var_14 =
                    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_after_context(var_14);
            }
            ,
            s if s.matches("PreviousDeploymentContext") /* PreviousDeploymentContext com.amazonaws.cloudformation#ResourceChange$PreviousDeploymentContext */ =>  {
                let var_15 =
                    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_previous_deployment_context(var_15);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}