aws_sdk_ec2/protocol_serde/
shape_image_criterion_request.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(unused_mut)]
3pub fn ser_image_criterion_request(
4    mut writer: ::aws_smithy_query::QueryValueWriter,
5    input: &crate::types::ImageCriterionRequest,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
7    #[allow(unused_mut)]
8    let mut scope_1 = writer.prefix("ImageProvider");
9    if let Some(var_2) = &input.image_providers {
10        if !var_2.is_empty() {
11            let mut list_4 = scope_1.start_list(true, Some("item"));
12            for item_3 in var_2 {
13                #[allow(unused_mut)]
14                let mut entry_5 = list_4.entry();
15                entry_5.string(item_3);
16            }
17            list_4.finish();
18        }
19    }
20    #[allow(unused_mut)]
21    let mut scope_6 = writer.prefix("MarketplaceProductCode");
22    if let Some(var_7) = &input.marketplace_product_codes {
23        if !var_7.is_empty() {
24            let mut list_9 = scope_6.start_list(true, Some("item"));
25            for item_8 in var_7 {
26                #[allow(unused_mut)]
27                let mut entry_10 = list_9.entry();
28                entry_10.string(item_8);
29            }
30            list_9.finish();
31        }
32    }
33    #[allow(unused_mut)]
34    let mut scope_11 = writer.prefix("ImageName");
35    if let Some(var_12) = &input.image_names {
36        if !var_12.is_empty() {
37            let mut list_14 = scope_11.start_list(true, Some("item"));
38            for item_13 in var_12 {
39                #[allow(unused_mut)]
40                let mut entry_15 = list_14.entry();
41                entry_15.string(item_13);
42            }
43            list_14.finish();
44        }
45    }
46    #[allow(unused_mut)]
47    let mut scope_16 = writer.prefix("DeprecationTimeCondition");
48    if let Some(var_17) = &input.deprecation_time_condition {
49        crate::protocol_serde::shape_deprecation_time_condition_request::ser_deprecation_time_condition_request(scope_16, var_17)?;
50    }
51    #[allow(unused_mut)]
52    let mut scope_18 = writer.prefix("CreationDateCondition");
53    if let Some(var_19) = &input.creation_date_condition {
54        crate::protocol_serde::shape_creation_date_condition_request::ser_creation_date_condition_request(scope_18, var_19)?;
55    }
56    Ok(())
57}