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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_update_matchmaking_configuration_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::update_matchmaking_configuration::UpdateMatchmakingConfigurationInput,
) -> Result<(), ::aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_1) = &input.name {
        object.key("Name").string(var_1.as_str());
    }
    if let Some(var_2) = &input.description {
        object.key("Description").string(var_2.as_str());
    }
    if let Some(var_3) = &input.game_session_queue_arns {
        let mut array_4 = object.key("GameSessionQueueArns").start_array();
        for item_5 in var_3 {
            {
                array_4.value().string(item_5.as_str());
            }
        }
        array_4.finish();
    }
    if let Some(var_6) = &input.request_timeout_seconds {
        object.key("RequestTimeoutSeconds").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_6).into()),
        );
    }
    if let Some(var_7) = &input.acceptance_timeout_seconds {
        object.key("AcceptanceTimeoutSeconds").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_7).into()),
        );
    }
    if let Some(var_8) = &input.acceptance_required {
        object.key("AcceptanceRequired").boolean(*var_8);
    }
    if let Some(var_9) = &input.rule_set_name {
        object.key("RuleSetName").string(var_9.as_str());
    }
    if let Some(var_10) = &input.notification_target {
        object.key("NotificationTarget").string(var_10.as_str());
    }
    if let Some(var_11) = &input.additional_player_count {
        object.key("AdditionalPlayerCount").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_11).into()),
        );
    }
    if let Some(var_12) = &input.custom_event_data {
        object.key("CustomEventData").string(var_12.as_str());
    }
    if let Some(var_13) = &input.game_properties {
        let mut array_14 = object.key("GameProperties").start_array();
        for item_15 in var_13 {
            {
                #[allow(unused_mut)]
                let mut object_16 = array_14.value().start_object();
                crate::protocol_serde::shape_game_property::ser_game_property(&mut object_16, item_15)?;
                object_16.finish();
            }
        }
        array_14.finish();
    }
    if let Some(var_17) = &input.game_session_data {
        object.key("GameSessionData").string(var_17.as_str());
    }
    if let Some(var_18) = &input.backfill_mode {
        object.key("BackfillMode").string(var_18.as_str());
    }
    if let Some(var_19) = &input.flex_match_mode {
        object.key("FlexMatchMode").string(var_19.as_str());
    }
    Ok(())
}