aws-sdk-xray 1.94.0

AWS SDK for AWS X-Ray
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_sampling_boost_statistics_document(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::SamplingBoostStatisticsDocument,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    {
        object.key("RuleName").string(input.rule_name.as_str());
    }
    {
        object.key("ServiceName").string(input.service_name.as_str());
    }
    {
        object
            .key("Timestamp")
            .date_time(&input.timestamp, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    {
        object.key("AnomalyCount").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((input.anomaly_count).into()),
        );
    }
    {
        object.key("TotalCount").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((input.total_count).into()),
        );
    }
    {
        object.key("SampledAnomalyCount").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((input.sampled_anomaly_count).into()),
        );
    }
    Ok(())
}