aws-sdk-snowball 1.105.0

AWS SDK for Amazon Import/Export Snowball
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_cluster_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::create_cluster::CreateClusterInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.job_type {
        encoder.str("JobType").str(var_1.as_str());
    }
    if let Some(var_2) = &input.resources {
        encoder.str("Resources");
        crate::protocol_serde::shape_job_resource::ser_job_resource(encoder, var_2)?;
    }
    if let Some(var_3) = &input.on_device_service_configuration {
        encoder.str("OnDeviceServiceConfiguration");
        crate::protocol_serde::shape_on_device_service_configuration::ser_on_device_service_configuration(encoder, var_3)?;
    }
    if let Some(var_4) = &input.description {
        encoder.str("Description").str(var_4.as_str());
    }
    if let Some(var_5) = &input.address_id {
        encoder.str("AddressId").str(var_5.as_str());
    }
    if let Some(var_6) = &input.kms_key_arn {
        encoder.str("KmsKeyARN").str(var_6.as_str());
    }
    if let Some(var_7) = &input.role_arn {
        encoder.str("RoleARN").str(var_7.as_str());
    }
    if let Some(var_8) = &input.snowball_type {
        encoder.str("SnowballType").str(var_8.as_str());
    }
    if let Some(var_9) = &input.shipping_option {
        encoder.str("ShippingOption").str(var_9.as_str());
    }
    if let Some(var_10) = &input.notification {
        encoder.str("Notification");
        crate::protocol_serde::shape_notification::ser_notification(encoder, var_10)?;
    }
    if let Some(var_11) = &input.forwarding_address_id {
        encoder.str("ForwardingAddressId").str(var_11.as_str());
    }
    if let Some(var_12) = &input.tax_documents {
        encoder.str("TaxDocuments");
        crate::protocol_serde::shape_tax_documents::ser_tax_documents(encoder, var_12)?;
    }
    if let Some(var_13) = &input.remote_management {
        encoder.str("RemoteManagement").str(var_13.as_str());
    }
    if let Some(var_14) = &input.initial_cluster_size {
        encoder.str("InitialClusterSize").integer(*var_14);
    }
    if let Some(var_15) = &input.force_create_jobs {
        encoder.str("ForceCreateJobs").boolean(*var_15);
    }
    if let Some(var_16) = &input.long_term_pricing_ids {
        encoder.str("LongTermPricingIds");
        encoder.array((*var_16).len());
        for item_17 in var_16 {
            {
                encoder.str(item_17.as_str());
            }
        }
    }
    if let Some(var_18) = &input.snowball_capacity_preference {
        encoder.str("SnowballCapacityPreference").str(var_18.as_str());
    }
    encoder.end();
    Ok(())
}