aws_sdk_ssooidc/protocol_serde/
shape_create_token_with_iam_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
35
36
37
38
39
40
41
42
43
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_token_with_iam_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::create_token_with_iam::CreateTokenWithIamInput,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.assertion {
        object.key("assertion").string(var_1.as_str());
    }
    if let Some(var_2) = &input.client_id {
        object.key("clientId").string(var_2.as_str());
    }
    if let Some(var_3) = &input.code {
        object.key("code").string(var_3.as_str());
    }
    if let Some(var_4) = &input.grant_type {
        object.key("grantType").string(var_4.as_str());
    }
    if let Some(var_5) = &input.redirect_uri {
        object.key("redirectUri").string(var_5.as_str());
    }
    if let Some(var_6) = &input.refresh_token {
        object.key("refreshToken").string(var_6.as_str());
    }
    if let Some(var_7) = &input.requested_token_type {
        object.key("requestedTokenType").string(var_7.as_str());
    }
    if let Some(var_8) = &input.scope {
        let mut array_9 = object.key("scope").start_array();
        for item_10 in var_8 {
            {
                array_9.value().string(item_10.as_str());
            }
        }
        array_9.finish();
    }
    if let Some(var_11) = &input.subject_token {
        object.key("subjectToken").string(var_11.as_str());
    }
    if let Some(var_12) = &input.subject_token_type {
        object.key("subjectTokenType").string(var_12.as_str());
    }
    Ok(())
}