aws-sdk-sts 1.102.0

AWS SDK for AWS Security Token Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_get_web_identity_token_input_input_input(
    input: &crate::operation::get_web_identity_token::GetWebIdentityTokenInput,
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "GetWebIdentityToken", "2011-06-15");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("Audience");
    if let Some(var_2) = &input.audience {
        let mut list_4 = scope_1.start_list(false, None);
        for item_3 in var_2 {
            #[allow(unused_mut)]
            let mut entry_5 = list_4.entry();
            entry_5.string(item_3);
        }
        list_4.finish();
    }
    #[allow(unused_mut)]
    let mut scope_6 = writer.prefix("DurationSeconds");
    if let Some(var_7) = &input.duration_seconds {
        scope_6.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_7).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_8 = writer.prefix("SigningAlgorithm");
    if let Some(var_9) = &input.signing_algorithm {
        scope_8.string(var_9);
    }
    #[allow(unused_mut)]
    let mut scope_10 = writer.prefix("Tags");
    if let Some(var_11) = &input.tags {
        let mut list_13 = scope_10.start_list(false, None);
        for item_12 in var_11 {
            #[allow(unused_mut)]
            let mut entry_14 = list_13.entry();
            crate::protocol_serde::shape_tag::ser_tag(entry_14, item_12)?;
        }
        list_13.finish();
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}