aws-sdk-fsx 1.111.0

AWS SDK for Amazon FSx
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_ontap_volume_configuration(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::CreateOntapVolumeConfiguration,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.junction_path {
        object.key("JunctionPath").string(var_1.as_str());
    }
    if let Some(var_2) = &input.security_style {
        object.key("SecurityStyle").string(var_2.as_str());
    }
    if let Some(var_3) = &input.size_in_megabytes {
        object.key("SizeInMegabytes").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
        );
    }
    if let Some(var_4) = &input.storage_efficiency_enabled {
        object.key("StorageEfficiencyEnabled").boolean(*var_4);
    }
    if let Some(var_5) = &input.storage_virtual_machine_id {
        object.key("StorageVirtualMachineId").string(var_5.as_str());
    }
    if let Some(var_6) = &input.tiering_policy {
        #[allow(unused_mut)]
        let mut object_7 = object.key("TieringPolicy").start_object();
        crate::protocol_serde::shape_tiering_policy::ser_tiering_policy(&mut object_7, var_6)?;
        object_7.finish();
    }
    if let Some(var_8) = &input.ontap_volume_type {
        object.key("OntapVolumeType").string(var_8.as_str());
    }
    if let Some(var_9) = &input.snapshot_policy {
        object.key("SnapshotPolicy").string(var_9.as_str());
    }
    if let Some(var_10) = &input.copy_tags_to_backups {
        object.key("CopyTagsToBackups").boolean(*var_10);
    }
    if let Some(var_11) = &input.snaplock_configuration {
        #[allow(unused_mut)]
        let mut object_12 = object.key("SnaplockConfiguration").start_object();
        crate::protocol_serde::shape_create_snaplock_configuration::ser_create_snaplock_configuration(&mut object_12, var_11)?;
        object_12.finish();
    }
    if let Some(var_13) = &input.volume_style {
        object.key("VolumeStyle").string(var_13.as_str());
    }
    if let Some(var_14) = &input.aggregate_configuration {
        #[allow(unused_mut)]
        let mut object_15 = object.key("AggregateConfiguration").start_object();
        crate::protocol_serde::shape_create_aggregate_configuration::ser_create_aggregate_configuration(&mut object_15, var_14)?;
        object_15.finish();
    }
    if let Some(var_16) = &input.size_in_bytes {
        object.key("SizeInBytes").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_16).into()),
        );
    }
    Ok(())
}