aws-sdk-ses 1.99.0

AWS SDK for Amazon Simple Email Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_send_data_point(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::SendDataPoint, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::SendDataPoint::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("Timestamp") /* Timestamp com.amazonaws.ses#SendDataPoint$Timestamp */ =>  {
                let var_1 =
                    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.ses#Timestamp`)"))
                        ?
                    )
                ;
                builder = builder.set_timestamp(var_1);
            }
            ,
            s if s.matches("DeliveryAttempts") /* DeliveryAttempts com.amazonaws.ses#SendDataPoint$DeliveryAttempts */ =>  {
                let var_2 =
                    Some(
                         {
                            <i64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ses#Counter`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_delivery_attempts(var_2);
            }
            ,
            s if s.matches("Bounces") /* Bounces com.amazonaws.ses#SendDataPoint$Bounces */ =>  {
                let var_3 =
                    Some(
                         {
                            <i64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ses#Counter`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_bounces(var_3);
            }
            ,
            s if s.matches("Complaints") /* Complaints com.amazonaws.ses#SendDataPoint$Complaints */ =>  {
                let var_4 =
                    Some(
                         {
                            <i64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ses#Counter`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_complaints(var_4);
            }
            ,
            s if s.matches("Rejects") /* Rejects com.amazonaws.ses#SendDataPoint$Rejects */ =>  {
                let var_5 =
                    Some(
                         {
                            <i64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ses#Counter`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_rejects(var_5);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}