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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_load_balancer_input_input_input(
    input: &crate::operation::create_load_balancer::CreateLoadBalancerInput,
) -> 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, "CreateLoadBalancer", "2015-12-01");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("Name");
    if let Some(var_2) = &input.name {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("Subnets");
    if let Some(var_4) = &input.subnets {
        let mut list_6 = scope_3.start_list(false, None);
        for item_5 in var_4 {
            #[allow(unused_mut)]
            let mut entry_7 = list_6.entry();
            entry_7.string(item_5);
        }
        list_6.finish();
    }
    #[allow(unused_mut)]
    let mut scope_8 = writer.prefix("SubnetMappings");
    if let Some(var_9) = &input.subnet_mappings {
        let mut list_11 = scope_8.start_list(false, None);
        for item_10 in var_9 {
            #[allow(unused_mut)]
            let mut entry_12 = list_11.entry();
            crate::protocol_serde::shape_subnet_mapping::ser_subnet_mapping(entry_12, item_10)?;
        }
        list_11.finish();
    }
    #[allow(unused_mut)]
    let mut scope_13 = writer.prefix("SecurityGroups");
    if let Some(var_14) = &input.security_groups {
        let mut list_16 = scope_13.start_list(false, None);
        for item_15 in var_14 {
            #[allow(unused_mut)]
            let mut entry_17 = list_16.entry();
            entry_17.string(item_15);
        }
        list_16.finish();
    }
    #[allow(unused_mut)]
    let mut scope_18 = writer.prefix("Scheme");
    if let Some(var_19) = &input.scheme {
        scope_18.string(var_19.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_20 = writer.prefix("Tags");
    if let Some(var_21) = &input.tags {
        let mut list_23 = scope_20.start_list(false, None);
        for item_22 in var_21 {
            #[allow(unused_mut)]
            let mut entry_24 = list_23.entry();
            crate::protocol_serde::shape_tag::ser_tag(entry_24, item_22)?;
        }
        list_23.finish();
    }
    #[allow(unused_mut)]
    let mut scope_25 = writer.prefix("Type");
    if let Some(var_26) = &input.r#type {
        scope_25.string(var_26.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_27 = writer.prefix("IpAddressType");
    if let Some(var_28) = &input.ip_address_type {
        scope_27.string(var_28.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_29 = writer.prefix("CustomerOwnedIpv4Pool");
    if let Some(var_30) = &input.customer_owned_ipv4_pool {
        scope_29.string(var_30);
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}