aws_sdk_secretsmanager/protocol_serde/
shape_get_random_password_input.rs

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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_get_random_password_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::get_random_password::GetRandomPasswordInput,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.password_length {
        object.key("PasswordLength").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
        );
    }
    if let Some(var_2) = &input.exclude_characters {
        object.key("ExcludeCharacters").string(var_2.as_str());
    }
    if let Some(var_3) = &input.exclude_numbers {
        object.key("ExcludeNumbers").boolean(*var_3);
    }
    if let Some(var_4) = &input.exclude_punctuation {
        object.key("ExcludePunctuation").boolean(*var_4);
    }
    if let Some(var_5) = &input.exclude_uppercase {
        object.key("ExcludeUppercase").boolean(*var_5);
    }
    if let Some(var_6) = &input.exclude_lowercase {
        object.key("ExcludeLowercase").boolean(*var_6);
    }
    if let Some(var_7) = &input.include_space {
        object.key("IncludeSpace").boolean(*var_7);
    }
    if let Some(var_8) = &input.require_each_included_type {
        object.key("RequireEachIncludedType").boolean(*var_8);
    }
    Ok(())
}