aws-sdk-elasticache 1.110.0

AWS SDK for Amazon ElastiCache
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_cache_node_update_status(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    depth: u32,
) -> ::std::result::Result<crate::types::CacheNodeUpdateStatus, ::aws_smithy_xml::decode::XmlDecodeError> {
    if depth >= 128u32 {
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
    }
    #[allow(unused_mut)]
    let mut builder = crate::types::CacheNodeUpdateStatus::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("CacheNodeId") /* CacheNodeId com.amazonaws.elasticache#CacheNodeUpdateStatus$CacheNodeId */ =>  {
                let var_1 =
                    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_cache_node_id(var_1);
            }
            ,
            s if s.matches("NodeUpdateStatus") /* NodeUpdateStatus com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateStatus */ =>  {
                let var_2 =
                    Some(
                        Result::<crate::types::NodeUpdateStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::NodeUpdateStatus::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_node_update_status(var_2);
            }
            ,
            s if s.matches("NodeDeletionDate") /* NodeDeletionDate com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeDeletionDate */ =>  {
                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.elasticache#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_node_deletion_date(var_3);
            }
            ,
            s if s.matches("NodeUpdateStartDate") /* NodeUpdateStartDate com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateStartDate */ =>  {
                let var_4 =
                    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.elasticache#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_node_update_start_date(var_4);
            }
            ,
            s if s.matches("NodeUpdateEndDate") /* NodeUpdateEndDate com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateEndDate */ =>  {
                let var_5 =
                    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.elasticache#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_node_update_end_date(var_5);
            }
            ,
            s if s.matches("NodeUpdateInitiatedBy") /* NodeUpdateInitiatedBy com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateInitiatedBy */ =>  {
                let var_6 =
                    Some(
                        Result::<crate::types::NodeUpdateInitiatedBy, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::NodeUpdateInitiatedBy::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_node_update_initiated_by(var_6);
            }
            ,
            s if s.matches("NodeUpdateInitiatedDate") /* NodeUpdateInitiatedDate com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateInitiatedDate */ =>  {
                let var_7 =
                    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.elasticache#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_node_update_initiated_date(var_7);
            }
            ,
            s if s.matches("NodeUpdateStatusModifiedDate") /* NodeUpdateStatusModifiedDate com.amazonaws.elasticache#CacheNodeUpdateStatus$NodeUpdateStatusModifiedDate */ =>  {
                let var_8 =
                    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.elasticache#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_node_update_status_modified_date(var_8);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}