aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_snapshot_schedule_input_input_input(
    input: &crate::operation::create_snapshot_schedule::CreateSnapshotScheduleInput,
) -> ::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, "CreateSnapshotSchedule", "2012-12-01");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("ScheduleDefinitions");
    if let Some(var_2) = &input.schedule_definitions {
        let mut list_4 = scope_1.start_list(false, Some("ScheduleDefinition"));
        for item_3 in var_2 {
            #[allow(unused_mut)]
            let mut entry_5 = list_4.entry();
            entry_5.string(item_3);
        }
        list_4.finish();
    }
    #[allow(unused_mut)]
    let mut scope_6 = writer.prefix("ScheduleIdentifier");
    if let Some(var_7) = &input.schedule_identifier {
        scope_6.string(var_7);
    }
    #[allow(unused_mut)]
    let mut scope_8 = writer.prefix("ScheduleDescription");
    if let Some(var_9) = &input.schedule_description {
        scope_8.string(var_9);
    }
    #[allow(unused_mut)]
    let mut scope_10 = writer.prefix("Tags");
    if let Some(var_11) = &input.tags {
        let mut list_13 = scope_10.start_list(false, Some("Tag"));
        for item_12 in var_11 {
            #[allow(unused_mut)]
            let mut entry_14 = list_13.entry();
            crate::protocol_serde::shape_tag::ser_tag(entry_14, item_12)?;
        }
        list_13.finish();
    }
    #[allow(unused_mut)]
    let mut scope_15 = writer.prefix("DryRun");
    if let Some(var_16) = &input.dry_run {
        scope_15.boolean(*var_16);
    }
    #[allow(unused_mut)]
    let mut scope_17 = writer.prefix("NextInvocations");
    if let Some(var_18) = &input.next_invocations {
        scope_17.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_18).into()),
        );
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}