aws-sdk-ses 1.105.0

AWS SDK for Amazon Simple Email Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_send_email_input_input_input(
    input: &crate::operation::send_email::SendEmailInput,
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "SendEmail", "2010-12-01");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("Source");
    if let Some(var_2) = &input.source {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("Destination");
    if let Some(var_4) = &input.destination {
        crate::protocol_serde::shape_destination::ser_destination(scope_3, var_4)?;
    }
    #[allow(unused_mut)]
    let mut scope_5 = writer.prefix("Message");
    if let Some(var_6) = &input.message {
        crate::protocol_serde::shape_message::ser_message(scope_5, var_6)?;
    }
    #[allow(unused_mut)]
    let mut scope_7 = writer.prefix("ReplyToAddresses");
    if let Some(var_8) = &input.reply_to_addresses {
        let mut list_10 = scope_7.start_list(false, None);
        for item_9 in var_8 {
            #[allow(unused_mut)]
            let mut entry_11 = list_10.entry();
            entry_11.string(item_9);
        }
        list_10.finish();
    }
    #[allow(unused_mut)]
    let mut scope_12 = writer.prefix("ReturnPath");
    if let Some(var_13) = &input.return_path {
        scope_12.string(var_13);
    }
    #[allow(unused_mut)]
    let mut scope_14 = writer.prefix("SourceArn");
    if let Some(var_15) = &input.source_arn {
        scope_14.string(var_15);
    }
    #[allow(unused_mut)]
    let mut scope_16 = writer.prefix("ReturnPathArn");
    if let Some(var_17) = &input.return_path_arn {
        scope_16.string(var_17);
    }
    #[allow(unused_mut)]
    let mut scope_18 = writer.prefix("Tags");
    if let Some(var_19) = &input.tags {
        let mut list_21 = scope_18.start_list(false, None);
        for item_20 in var_19 {
            #[allow(unused_mut)]
            let mut entry_22 = list_21.entry();
            crate::protocol_serde::shape_message_tag::ser_message_tag(entry_22, item_20)?;
        }
        list_21.finish();
    }
    #[allow(unused_mut)]
    let mut scope_23 = writer.prefix("ConfigurationSetName");
    if let Some(var_24) = &input.configuration_set_name {
        scope_23.string(var_24);
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}