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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_modify_ipam_pool_input_input_input(
    input: &crate::operation::modify_ipam_pool::ModifyIpamPoolInput,
) -> 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, "ModifyIpamPool", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("DryRun");
    if let Some(var_2) = &input.dry_run {
        scope_1.boolean(*var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("IpamPoolId");
    if let Some(var_4) = &input.ipam_pool_id {
        scope_3.string(var_4);
    }
    #[allow(unused_mut)]
    let mut scope_5 = writer.prefix("Description");
    if let Some(var_6) = &input.description {
        scope_5.string(var_6);
    }
    #[allow(unused_mut)]
    let mut scope_7 = writer.prefix("AutoImport");
    if let Some(var_8) = &input.auto_import {
        scope_7.boolean(*var_8);
    }
    #[allow(unused_mut)]
    let mut scope_9 = writer.prefix("AllocationMinNetmaskLength");
    if let Some(var_10) = &input.allocation_min_netmask_length {
        scope_9.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_10).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_11 = writer.prefix("AllocationMaxNetmaskLength");
    if let Some(var_12) = &input.allocation_max_netmask_length {
        scope_11.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_12).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_13 = writer.prefix("AllocationDefaultNetmaskLength");
    if let Some(var_14) = &input.allocation_default_netmask_length {
        scope_13.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_14).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_15 = writer.prefix("ClearAllocationDefaultNetmaskLength");
    if let Some(var_16) = &input.clear_allocation_default_netmask_length {
        scope_15.boolean(*var_16);
    }
    #[allow(unused_mut)]
    let mut scope_17 = writer.prefix("AddAllocationResourceTag");
    if let Some(var_18) = &input.add_allocation_resource_tags {
        let mut list_20 = scope_17.start_list(true, Some("item"));
        for item_19 in var_18 {
            #[allow(unused_mut)]
            let mut entry_21 = list_20.entry();
            crate::protocol_serde::shape_request_ipam_resource_tag::ser_request_ipam_resource_tag(entry_21, item_19)?;
        }
        list_20.finish();
    }
    #[allow(unused_mut)]
    let mut scope_22 = writer.prefix("RemoveAllocationResourceTag");
    if let Some(var_23) = &input.remove_allocation_resource_tags {
        let mut list_25 = scope_22.start_list(true, Some("item"));
        for item_24 in var_23 {
            #[allow(unused_mut)]
            let mut entry_26 = list_25.entry();
            crate::protocol_serde::shape_request_ipam_resource_tag::ser_request_ipam_resource_tag(entry_26, item_24)?;
        }
        list_25.finish();
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}