aws-sdk-cloudwatch 1.120.0

AWS SDK for Amazon CloudWatch
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_put_log_alarm_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::put_log_alarm::PutLogAlarmInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.alarm_name {
        encoder.str("AlarmName").str(var_1.as_str());
    }
    if let Some(var_2) = &input.alarm_description {
        encoder.str("AlarmDescription").str(var_2.as_str());
    }
    if let Some(var_3) = &input.scheduled_query_configuration {
        encoder.str("ScheduledQueryConfiguration");
        crate::protocol_serde::shape_scheduled_query_configuration::ser_scheduled_query_configuration(encoder, var_3)?;
    }
    if let Some(var_4) = &input.action_log_line_count {
        encoder.str("ActionLogLineCount").integer(*var_4);
    }
    if let Some(var_5) = &input.action_log_line_role_arn {
        encoder.str("ActionLogLineRoleArn").str(var_5.as_str());
    }
    if let Some(var_6) = &input.actions_enabled {
        encoder.str("ActionsEnabled").boolean(*var_6);
    }
    if let Some(var_7) = &input.ok_actions {
        encoder.str("OKActions");
        encoder.array((*var_7).len());
        for item_8 in var_7 {
            {
                encoder.str(item_8.as_str());
            }
        }
    }
    if let Some(var_9) = &input.alarm_actions {
        encoder.str("AlarmActions");
        encoder.array((*var_9).len());
        for item_10 in var_9 {
            {
                encoder.str(item_10.as_str());
            }
        }
    }
    if let Some(var_11) = &input.insufficient_data_actions {
        encoder.str("InsufficientDataActions");
        encoder.array((*var_11).len());
        for item_12 in var_11 {
            {
                encoder.str(item_12.as_str());
            }
        }
    }
    if let Some(var_13) = &input.query_results_to_evaluate {
        encoder.str("QueryResultsToEvaluate").integer(*var_13);
    }
    if let Some(var_14) = &input.query_results_to_alarm {
        encoder.str("QueryResultsToAlarm").integer(*var_14);
    }
    if let Some(var_15) = &input.threshold {
        encoder.str("Threshold").double(*var_15);
    }
    if let Some(var_16) = &input.comparison_operator {
        encoder.str("ComparisonOperator").str(var_16.as_str());
    }
    if let Some(var_17) = &input.treat_missing_data {
        encoder.str("TreatMissingData").str(var_17.as_str());
    }
    if let Some(var_18) = &input.tags {
        encoder.str("Tags");
        encoder.array((*var_18).len());
        for item_19 in var_18 {
            {
                crate::protocol_serde::shape_tag::ser_tag(encoder, item_19)?;
            }
        }
    }
    encoder.end();
    Ok(())
}