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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(unused_mut)]
pub fn ser_http_header_condition_config(
    mut writer: ::aws_smithy_query::QueryValueWriter,
    input: &crate::types::HttpHeaderConditionConfig,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("HttpHeaderName");
    if let Some(var_2) = &input.http_header_name {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("Values");
    if let Some(var_4) = &input.values {
        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();
    }
    Ok(())
}

#[allow(clippy::needless_question_mark)]
pub fn de_http_header_condition_config(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::HttpHeaderConditionConfig, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::HttpHeaderConditionConfig::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("HttpHeaderName") /* HttpHeaderName com.amazonaws.elasticloadbalancingv2#HttpHeaderConditionConfig$HttpHeaderName */ =>  {
                let var_8 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_http_header_name(var_8);
            }
            ,
            s if s.matches("Values") /* Values com.amazonaws.elasticloadbalancingv2#HttpHeaderConditionConfig$Values */ =>  {
                let var_9 =
                    Some(
                        crate::protocol_serde::shape_list_of_string::de_list_of_string(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_values(var_9);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}