aws-sdk-assurance 1.0.0

AWS SDK for AWS Assurance
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_assign_permission_set_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::assign_permission_set::AssignPermissionSetInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.environment_arn {
        encoder.str("environmentArn").str(var_1.as_str());
    }
    if let Some(var_2) = &input.principal_type {
        encoder.str("principalType").str(var_2.as_str());
    }
    if let Some(var_3) = &input.principal_id {
        encoder.str("principalId").str(var_3.as_str());
    }
    if let Some(var_4) = &input.permission_set_id {
        encoder.str("permissionSetId").str(var_4.as_str());
    }
    if let Some(var_5) = &input.scopes {
        encoder.str("scopes");
        encoder.array((*var_5).len());
        for item_6 in var_5 {
            {
                crate::protocol_serde::shape_assignment_scope::ser_assignment_scope(encoder, item_6)?;
            }
        }
    }
    encoder.end();
    Ok(())
}