aws_sdk_elasticloadbalancingv2/protocol_serde/
shape_forward_action_config.rs1#[allow(unused_mut)]
3pub fn ser_forward_action_config(
4 mut writer: ::aws_smithy_query::QueryValueWriter,
5 input: &crate::types::ForwardActionConfig,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
7 #[allow(unused_mut)]
8 let mut scope_1 = writer.prefix("TargetGroups");
9 if let Some(var_2) = &input.target_groups {
10 let mut list_4 = scope_1.start_list(false, None);
11 for item_3 in var_2 {
12 #[allow(unused_mut)]
13 let mut entry_5 = list_4.entry();
14 crate::protocol_serde::shape_target_group_tuple::ser_target_group_tuple(entry_5, item_3)?;
15 }
16 list_4.finish();
17 }
18 #[allow(unused_mut)]
19 let mut scope_6 = writer.prefix("TargetGroupStickinessConfig");
20 if let Some(var_7) = &input.target_group_stickiness_config {
21 crate::protocol_serde::shape_target_group_stickiness_config::ser_target_group_stickiness_config(scope_6, var_7)?;
22 }
23 Ok(())
24}
25
26#[allow(clippy::needless_question_mark)]
27pub fn de_forward_action_config(
28 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
29) -> ::std::result::Result<crate::types::ForwardActionConfig, ::aws_smithy_xml::decode::XmlDecodeError> {
30 #[allow(unused_mut)]
31 let mut builder = crate::types::ForwardActionConfig::builder();
32 while let Some(mut tag) = decoder.next_tag() {
33 match tag.start_el() {
34 s if s.matches("TargetGroups") => {
35 let var_8 =
36 Some(
37 crate::protocol_serde::shape_target_group_list::de_target_group_list(&mut tag)
38 ?
39 )
40 ;
41 builder = builder.set_target_groups(var_8);
42 }
43 ,
44 s if s.matches("TargetGroupStickinessConfig") => {
45 let var_9 =
46 Some(
47 crate::protocol_serde::shape_target_group_stickiness_config::de_target_group_stickiness_config(&mut tag)
48 ?
49 )
50 ;
51 builder = builder.set_target_group_stickiness_config(var_9);
52 }
53 ,
54 _ => {}
55 }
56 }
57 Ok(builder.build())
58}