aws-sdk-groundstation 1.65.0

AWS SDK for AWS Ground Station
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_component_status_data(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::ComponentStatusData,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    {
        object.key("componentType").string(input.component_type.as_str());
    }
    {
        object.key("capabilityArn").string(input.capability_arn.as_str());
    }
    {
        object.key("status").string(input.status.as_str());
    }
    if let Some(var_1) = &input.bytes_sent {
        object.key("bytesSent").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
        );
    }
    if let Some(var_2) = &input.bytes_received {
        object.key("bytesReceived").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
        );
    }
    if let Some(var_3) = &input.packets_dropped {
        object.key("packetsDropped").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
        );
    }
    {
        object.key("dataflowId").string(input.dataflow_id.as_str());
    }
    Ok(())
}