aws-sdk-workspacesinstances 1.25.0

AWS SDK for Amazon Workspaces Instances
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_ebs_block_device(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::EbsBlockDevice,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.volume_type {
        object.key("VolumeType").string(var_1.as_str());
    }
    if let Some(var_2) = &input.encrypted {
        object.key("Encrypted").boolean(*var_2);
    }
    if let Some(var_3) = &input.kms_key_id {
        object.key("KmsKeyId").string(var_3.as_str());
    }
    if let Some(var_4) = &input.iops {
        object.key("Iops").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
        );
    }
    if let Some(var_5) = &input.throughput {
        object.key("Throughput").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
        );
    }
    if let Some(var_6) = &input.volume_size {
        object.key("VolumeSize").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_6).into()),
        );
    }
    Ok(())
}