1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_update_ontap_volume_configuration(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::UpdateOntapVolumeConfiguration,
) -> 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.tiering_policy {
        #[allow(unused_mut)]
        let mut object_6 = object.key("TieringPolicy").start_object();
        crate::protocol_serde::shape_tiering_policy::ser_tiering_policy(&mut object_6, var_5)?;
        object_6.finish();
    }
    if let Some(var_7) = &input.snapshot_policy {
        object.key("SnapshotPolicy").string(var_7.as_str());
    }
    if let Some(var_8) = &input.copy_tags_to_backups {
        object.key("CopyTagsToBackups").boolean(*var_8);
    }
    if let Some(var_9) = &input.snaplock_configuration {
        #[allow(unused_mut)]
        let mut object_10 = object.key("SnaplockConfiguration").start_object();
        crate::protocol_serde::shape_update_snaplock_configuration::ser_update_snaplock_configuration(&mut object_10, var_9)?;
        object_10.finish();
    }
    if let Some(var_11) = &input.size_in_bytes {
        object.key("SizeInBytes").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_11).into()),
        );
    }
    Ok(())
}