AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_anomalies.rs

@@ -1,0 +150,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_anomalies_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::list_anomalies::ListAnomaliesOutput, crate::operation::list_anomalies::ListAnomaliesError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::list_anomalies::ListAnomaliesError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::list_anomalies::ListAnomaliesError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "OperationAbortedException" => crate::operation::list_anomalies::ListAnomaliesError::OperationAbortedException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        "ResourceNotFoundException" => crate::operation::list_anomalies::ListAnomaliesError::ResourceNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "ServiceUnavailableException" => crate::operation::list_anomalies::ListAnomaliesError::ServiceUnavailableException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   70         -
                output =
   71         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   72         -
                        .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                output.build()
   75         -
            };
   76         -
            if tmp.message.is_none() {
   77         -
                tmp.message = _error_message;
   78         -
            }
   79         -
            tmp
   80         -
        }),
   81         -
        _ => crate::operation::list_anomalies::ListAnomaliesError::generic(generic),
   82         -
    })
   83         -
}
   84         -
   85         -
#[allow(clippy::unnecessary_wraps)]
   86         -
pub fn de_list_anomalies_http_response(
   87         -
    _response_status: u16,
   88         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   89         -
    _response_body: &[u8],
   90         -
) -> std::result::Result<crate::operation::list_anomalies::ListAnomaliesOutput, crate::operation::list_anomalies::ListAnomaliesError> {
   91         -
    Ok({
   92         -
        #[allow(unused_mut)]
   93         -
        let mut output = crate::operation::list_anomalies::builders::ListAnomaliesOutputBuilder::default();
   94         -
        output = crate::protocol_serde::shape_list_anomalies::de_list_anomalies(_response_body, output)
   95         -
            .map_err(crate::operation::list_anomalies::ListAnomaliesError::unhandled)?;
   96         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   97         -
        output.build()
   98         -
    })
   99         -
}
  100         -
  101         -
pub fn ser_list_anomalies_input(
  102         -
    input: &crate::operation::list_anomalies::ListAnomaliesInput,
  103         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  104         -
    let mut out = String::new();
  105         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  106         -
    crate::protocol_serde::shape_list_anomalies_input::ser_list_anomalies_input_input(&mut object, input)?;
  107         -
    object.finish();
  108         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  109         -
}
  110         -
  111         -
pub(crate) fn de_list_anomalies(
  112         -
    _value: &[u8],
  113         -
    mut builder: crate::operation::list_anomalies::builders::ListAnomaliesOutputBuilder,
  114         -
) -> ::std::result::Result<
  115         -
    crate::operation::list_anomalies::builders::ListAnomaliesOutputBuilder,
  116         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  117         -
> {
  118         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  119         -
    let tokens = &mut tokens_owned;
  120         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  121         -
    loop {
  122         -
        match tokens.next().transpose()? {
  123         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  124         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  125         -
                "anomalies" => {
  126         -
                    builder = builder.set_anomalies(crate::protocol_serde::shape_anomalies::de_anomalies(tokens, _value)?);
  127         -
                }
  128         -
                "nextToken" => {
  129         -
                    builder = builder.set_next_token(
  130         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  131         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  132         -
                            .transpose()?,
  133         -
                    );
  134         -
                }
  135         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  136         -
            },
  137         -
            other => {
  138         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  139         -
                    "expected object key or end object, found: {other:?}"
  140         -
                )))
  141         -
            }
  142         -
        }
  143         -
    }
  144         -
    if tokens.next().is_some() {
  145         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  146         -
            "found more JSON tokens after completing parsing",
  147         -
        ));
  148         -
    }
  149         -
    Ok(builder)
  150         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_anomalies_input.rs

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_anomalies_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_anomalies::ListAnomaliesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.anomaly_detector_arn {
    7         -
        object.key("anomalyDetectorArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.suppression_state {
   10         -
        object.key("suppressionState").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.limit {
   13         -
        object.key("limit").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   16         -
        );
   17         -
    }
   18         -
    if let Some(var_4) = &input.next_token {
   19         -
        object.key("nextToken").string(var_4.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_integrations.rs

@@ -1,0 +115,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_integrations_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::list_integrations::ListIntegrationsOutput, crate::operation::list_integrations::ListIntegrationsError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::list_integrations::ListIntegrationsError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::list_integrations::ListIntegrationsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::list_integrations::ListIntegrationsError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_integrations::ListIntegrationsError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "ServiceUnavailableException" => crate::operation::list_integrations::ListIntegrationsError::ServiceUnavailableException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   40         -
                output =
   41         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   42         -
                        .map_err(crate::operation::list_integrations::ListIntegrationsError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        _ => crate::operation::list_integrations::ListIntegrationsError::generic(generic),
   52         -
    })
   53         -
}
   54         -
   55         -
#[allow(clippy::unnecessary_wraps)]
   56         -
pub fn de_list_integrations_http_response(
   57         -
    _response_status: u16,
   58         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   59         -
    _response_body: &[u8],
   60         -
) -> std::result::Result<crate::operation::list_integrations::ListIntegrationsOutput, crate::operation::list_integrations::ListIntegrationsError> {
   61         -
    Ok({
   62         -
        #[allow(unused_mut)]
   63         -
        let mut output = crate::operation::list_integrations::builders::ListIntegrationsOutputBuilder::default();
   64         -
        output = crate::protocol_serde::shape_list_integrations::de_list_integrations(_response_body, output)
   65         -
            .map_err(crate::operation::list_integrations::ListIntegrationsError::unhandled)?;
   66         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   67         -
        output.build()
   68         -
    })
   69         -
}
   70         -
   71         -
pub fn ser_list_integrations_input(
   72         -
    input: &crate::operation::list_integrations::ListIntegrationsInput,
   73         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   74         -
    let mut out = String::new();
   75         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   76         -
    crate::protocol_serde::shape_list_integrations_input::ser_list_integrations_input_input(&mut object, input)?;
   77         -
    object.finish();
   78         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   79         -
}
   80         -
   81         -
pub(crate) fn de_list_integrations(
   82         -
    _value: &[u8],
   83         -
    mut builder: crate::operation::list_integrations::builders::ListIntegrationsOutputBuilder,
   84         -
) -> ::std::result::Result<
   85         -
    crate::operation::list_integrations::builders::ListIntegrationsOutputBuilder,
   86         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   87         -
> {
   88         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   89         -
    let tokens = &mut tokens_owned;
   90         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   91         -
    loop {
   92         -
        match tokens.next().transpose()? {
   93         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   94         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   95         -
                "integrationSummaries" => {
   96         -
                    builder = builder.set_integration_summaries(crate::protocol_serde::shape_integration_summaries::de_integration_summaries(
   97         -
                        tokens, _value,
   98         -
                    )?);
   99         -
                }
  100         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  101         -
            },
  102         -
            other => {
  103         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  104         -
                    "expected object key or end object, found: {other:?}"
  105         -
                )))
  106         -
            }
  107         -
        }
  108         -
    }
  109         -
    if tokens.next().is_some() {
  110         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  111         -
            "found more JSON tokens after completing parsing",
  112         -
        ));
  113         -
    }
  114         -
    Ok(builder)
  115         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_integrations_input.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_integrations_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_integrations::ListIntegrationsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.integration_name_prefix {
    7         -
        object.key("integrationNamePrefix").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.integration_type {
   10         -
        object.key("integrationType").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.integration_status {
   13         -
        object.key("integrationStatus").string(var_3.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_anomaly_detectors.rs

@@ -1,0 +160,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_log_anomaly_detectors_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsOutput,
    9         -
    crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterException" => crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::InvalidParameterException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                output.build()
   36         -
            };
   37         -
            if tmp.message.is_none() {
   38         -
                tmp.message = _error_message;
   39         -
            }
   40         -
            tmp
   41         -
        }),
   42         -
        "OperationAbortedException" => crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::OperationAbortedException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        "ResourceNotFoundException" => crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::ResourceNotFoundException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        "ServiceUnavailableException" => crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::ServiceUnavailableException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   77         -
                output =
   78         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   79         -
                        .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
   80         -
                let output = output.meta(generic);
   81         -
                output.build()
   82         -
            };
   83         -
            if tmp.message.is_none() {
   84         -
                tmp.message = _error_message;
   85         -
            }
   86         -
            tmp
   87         -
        }),
   88         -
        _ => crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_list_log_anomaly_detectors_http_response(
   94         -
    _response_status: u16,
   95         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   96         -
    _response_body: &[u8],
   97         -
) -> std::result::Result<
   98         -
    crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsOutput,
   99         -
    crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError,
  100         -
> {
  101         -
    Ok({
  102         -
        #[allow(unused_mut)]
  103         -
        let mut output = crate::operation::list_log_anomaly_detectors::builders::ListLogAnomalyDetectorsOutputBuilder::default();
  104         -
        output = crate::protocol_serde::shape_list_log_anomaly_detectors::de_list_log_anomaly_detectors(_response_body, output)
  105         -
            .map_err(crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsError::unhandled)?;
  106         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  107         -
        output.build()
  108         -
    })
  109         -
}
  110         -
  111         -
pub fn ser_list_log_anomaly_detectors_input(
  112         -
    input: &crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsInput,
  113         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  114         -
    let mut out = String::new();
  115         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  116         -
    crate::protocol_serde::shape_list_log_anomaly_detectors_input::ser_list_log_anomaly_detectors_input_input(&mut object, input)?;
  117         -
    object.finish();
  118         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  119         -
}
  120         -
  121         -
pub(crate) fn de_list_log_anomaly_detectors(
  122         -
    _value: &[u8],
  123         -
    mut builder: crate::operation::list_log_anomaly_detectors::builders::ListLogAnomalyDetectorsOutputBuilder,
  124         -
) -> ::std::result::Result<
  125         -
    crate::operation::list_log_anomaly_detectors::builders::ListLogAnomalyDetectorsOutputBuilder,
  126         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  127         -
> {
  128         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  129         -
    let tokens = &mut tokens_owned;
  130         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  131         -
    loop {
  132         -
        match tokens.next().transpose()? {
  133         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  134         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  135         -
                "anomalyDetectors" => {
  136         -
                    builder = builder.set_anomaly_detectors(crate::protocol_serde::shape_anomaly_detectors::de_anomaly_detectors(tokens, _value)?);
  137         -
                }
  138         -
                "nextToken" => {
  139         -
                    builder = builder.set_next_token(
  140         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  141         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  142         -
                            .transpose()?,
  143         -
                    );
  144         -
                }
  145         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  146         -
            },
  147         -
            other => {
  148         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  149         -
                    "expected object key or end object, found: {other:?}"
  150         -
                )))
  151         -
            }
  152         -
        }
  153         -
    }
  154         -
    if tokens.next().is_some() {
  155         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  156         -
            "found more JSON tokens after completing parsing",
  157         -
        ));
  158         -
    }
  159         -
    Ok(builder)
  160         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_anomaly_detectors_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_log_anomaly_detectors_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_log_anomaly_detectors::ListLogAnomalyDetectorsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.filter_log_group_arn {
    7         -
        object.key("filterLogGroupArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.limit {
   10         -
        object.key("limit").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.next_token {
   16         -
        object.key("nextToken").string(var_3.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_groups.rs

@@ -1,0 +120,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_log_groups_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::list_log_groups::ListLogGroupsOutput, crate::operation::list_log_groups::ListLogGroupsError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::list_log_groups::ListLogGroupsError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::list_log_groups::ListLogGroupsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::list_log_groups::ListLogGroupsError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_log_groups::ListLogGroupsError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "ServiceUnavailableException" => crate::operation::list_log_groups::ListLogGroupsError::ServiceUnavailableException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   40         -
                output =
   41         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   42         -
                        .map_err(crate::operation::list_log_groups::ListLogGroupsError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        _ => crate::operation::list_log_groups::ListLogGroupsError::generic(generic),
   52         -
    })
   53         -
}
   54         -
   55         -
#[allow(clippy::unnecessary_wraps)]
   56         -
pub fn de_list_log_groups_http_response(
   57         -
    _response_status: u16,
   58         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   59         -
    _response_body: &[u8],
   60         -
) -> std::result::Result<crate::operation::list_log_groups::ListLogGroupsOutput, crate::operation::list_log_groups::ListLogGroupsError> {
   61         -
    Ok({
   62         -
        #[allow(unused_mut)]
   63         -
        let mut output = crate::operation::list_log_groups::builders::ListLogGroupsOutputBuilder::default();
   64         -
        output = crate::protocol_serde::shape_list_log_groups::de_list_log_groups(_response_body, output)
   65         -
            .map_err(crate::operation::list_log_groups::ListLogGroupsError::unhandled)?;
   66         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   67         -
        output.build()
   68         -
    })
   69         -
}
   70         -
   71         -
pub fn ser_list_log_groups_input(
   72         -
    input: &crate::operation::list_log_groups::ListLogGroupsInput,
   73         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   74         -
    let mut out = String::new();
   75         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   76         -
    crate::protocol_serde::shape_list_log_groups_input::ser_list_log_groups_input_input(&mut object, input)?;
   77         -
    object.finish();
   78         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   79         -
}
   80         -
   81         -
pub(crate) fn de_list_log_groups(
   82         -
    _value: &[u8],
   83         -
    mut builder: crate::operation::list_log_groups::builders::ListLogGroupsOutputBuilder,
   84         -
) -> ::std::result::Result<
   85         -
    crate::operation::list_log_groups::builders::ListLogGroupsOutputBuilder,
   86         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   87         -
> {
   88         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   89         -
    let tokens = &mut tokens_owned;
   90         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   91         -
    loop {
   92         -
        match tokens.next().transpose()? {
   93         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   94         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   95         -
                "logGroups" => {
   96         -
                    builder = builder.set_log_groups(crate::protocol_serde::shape_log_group_summaries::de_log_group_summaries(tokens, _value)?);
   97         -
                }
   98         -
                "nextToken" => {
   99         -
                    builder = builder.set_next_token(
  100         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  101         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  102         -
                            .transpose()?,
  103         -
                    );
  104         -
                }
  105         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  106         -
            },
  107         -
            other => {
  108         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  109         -
                    "expected object key or end object, found: {other:?}"
  110         -
                )))
  111         -
            }
  112         -
        }
  113         -
    }
  114         -
    if tokens.next().is_some() {
  115         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  116         -
            "found more JSON tokens after completing parsing",
  117         -
        ));
  118         -
    }
  119         -
    Ok(builder)
  120         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_groups_for_query.rs

@@ -1,0 +162,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_log_groups_for_query_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::list_log_groups_for_query::ListLogGroupsForQueryOutput,
    9         -
    crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "AccessDeniedException" => crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::AccessDeniedException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                output.build()
   36         -
            };
   37         -
            if tmp.message.is_none() {
   38         -
                tmp.message = _error_message;
   39         -
            }
   40         -
            tmp
   41         -
        }),
   42         -
        "InvalidParameterException" => crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::InvalidParameterException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        "ResourceNotFoundException" => crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::ResourceNotFoundException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        "ServiceUnavailableException" => crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::ServiceUnavailableException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   77         -
                output =
   78         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   79         -
                        .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
   80         -
                let output = output.meta(generic);
   81         -
                output.build()
   82         -
            };
   83         -
            if tmp.message.is_none() {
   84         -
                tmp.message = _error_message;
   85         -
            }
   86         -
            tmp
   87         -
        }),
   88         -
        _ => crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_list_log_groups_for_query_http_response(
   94         -
    _response_status: u16,
   95         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   96         -
    _response_body: &[u8],
   97         -
) -> std::result::Result<
   98         -
    crate::operation::list_log_groups_for_query::ListLogGroupsForQueryOutput,
   99         -
    crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError,
  100         -
> {
  101         -
    Ok({
  102         -
        #[allow(unused_mut)]
  103         -
        let mut output = crate::operation::list_log_groups_for_query::builders::ListLogGroupsForQueryOutputBuilder::default();
  104         -
        output = crate::protocol_serde::shape_list_log_groups_for_query::de_list_log_groups_for_query(_response_body, output)
  105         -
            .map_err(crate::operation::list_log_groups_for_query::ListLogGroupsForQueryError::unhandled)?;
  106         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  107         -
        output.build()
  108         -
    })
  109         -
}
  110         -
  111         -
pub fn ser_list_log_groups_for_query_input(
  112         -
    input: &crate::operation::list_log_groups_for_query::ListLogGroupsForQueryInput,
  113         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  114         -
    let mut out = String::new();
  115         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  116         -
    crate::protocol_serde::shape_list_log_groups_for_query_input::ser_list_log_groups_for_query_input_input(&mut object, input)?;
  117         -
    object.finish();
  118         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  119         -
}
  120         -
  121         -
pub(crate) fn de_list_log_groups_for_query(
  122         -
    _value: &[u8],
  123         -
    mut builder: crate::operation::list_log_groups_for_query::builders::ListLogGroupsForQueryOutputBuilder,
  124         -
) -> ::std::result::Result<
  125         -
    crate::operation::list_log_groups_for_query::builders::ListLogGroupsForQueryOutputBuilder,
  126         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  127         -
> {
  128         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  129         -
    let tokens = &mut tokens_owned;
  130         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  131         -
    loop {
  132         -
        match tokens.next().transpose()? {
  133         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  134         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  135         -
                "logGroupIdentifiers" => {
  136         -
                    builder = builder.set_log_group_identifiers(crate::protocol_serde::shape_log_group_identifiers::de_log_group_identifiers(
  137         -
                        tokens, _value,
  138         -
                    )?);
  139         -
                }
  140         -
                "nextToken" => {
  141         -
                    builder = builder.set_next_token(
  142         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  143         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  144         -
                            .transpose()?,
  145         -
                    );
  146         -
                }
  147         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  148         -
            },
  149         -
            other => {
  150         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  151         -
                    "expected object key or end object, found: {other:?}"
  152         -
                )))
  153         -
            }
  154         -
        }
  155         -
    }
  156         -
    if tokens.next().is_some() {
  157         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  158         -
            "found more JSON tokens after completing parsing",
  159         -
        ));
  160         -
    }
  161         -
    Ok(builder)
  162         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_groups_for_query_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_log_groups_for_query_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_log_groups_for_query::ListLogGroupsForQueryInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.query_id {
    7         -
        object.key("queryId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.next_token {
   10         -
        object.key("nextToken").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.max_results {
   13         -
        object.key("maxResults").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_log_groups_input.rs

@@ -1,0 +34,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_log_groups_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_log_groups::ListLogGroupsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.log_group_name_pattern {
    7         -
        object.key("logGroupNamePattern").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.log_group_class {
   10         -
        object.key("logGroupClass").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.include_linked_accounts {
   13         -
        object.key("includeLinkedAccounts").boolean(*var_3);
   14         -
    }
   15         -
    if let Some(var_4) = &input.account_identifiers {
   16         -
        let mut array_5 = object.key("accountIdentifiers").start_array();
   17         -
        for item_6 in var_4 {
   18         -
            {
   19         -
                array_5.value().string(item_6.as_str());
   20         -
            }
   21         -
        }
   22         -
        array_5.finish();
   23         -
    }
   24         -
    if let Some(var_7) = &input.next_token {
   25         -
        object.key("nextToken").string(var_7.as_str());
   26         -
    }
   27         -
    if let Some(var_8) = &input.limit {
   28         -
        object.key("limit").number(
   29         -
            #[allow(clippy::useless_conversion)]
   30         -
            ::aws_smithy_types::Number::NegInt((*var_8).into()),
   31         -
        );
   32         -
    }
   33         -
    Ok(())
   34         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_tags_for_resource.rs

@@ -1,0 +134,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_tags_for_resource_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
    9         -
    crate::operation::list_tags_for_resource::ListTagsForResourceError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidParameterException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ResourceNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "ServiceUnavailableException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   58         -
                output =
   59         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   60         -
                        .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
   61         -
                let output = output.meta(generic);
   62         -
                output.build()
   63         -
            };
   64         -
            if tmp.message.is_none() {
   65         -
                tmp.message = _error_message;
   66         -
            }
   67         -
            tmp
   68         -
        }),
   69         -
        _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic),
   70         -
    })
   71         -
}
   72         -
   73         -
#[allow(clippy::unnecessary_wraps)]
   74         -
pub fn de_list_tags_for_resource_http_response(
   75         -
    _response_status: u16,
   76         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   77         -
    _response_body: &[u8],
   78         -
) -> std::result::Result<
   79         -
    crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
   80         -
    crate::operation::list_tags_for_resource::ListTagsForResourceError,
   81         -
> {
   82         -
    Ok({
   83         -
        #[allow(unused_mut)]
   84         -
        let mut output = crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder::default();
   85         -
        output = crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource(_response_body, output)
   86         -
            .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
   87         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   88         -
        output.build()
   89         -
    })
   90         -
}
   91         -
   92         -
pub fn ser_list_tags_for_resource_input(
   93         -
    input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput,
   94         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   95         -
    let mut out = String::new();
   96         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   97         -
    crate::protocol_serde::shape_list_tags_for_resource_input::ser_list_tags_for_resource_input_input(&mut object, input)?;
   98         -
    object.finish();
   99         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  100         -
}
  101         -
  102         -
pub(crate) fn de_list_tags_for_resource(
  103         -
    _value: &[u8],
  104         -
    mut builder: crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder,
  105         -
) -> ::std::result::Result<
  106         -
    crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder,
  107         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  108         -
> {
  109         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  110         -
    let tokens = &mut tokens_owned;
  111         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  112         -
    loop {
  113         -
        match tokens.next().transpose()? {
  114         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  115         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  116         -
                "tags" => {
  117         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
  118         -
                }
  119         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  120         -
            },
  121         -
            other => {
  122         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  123         -
                    "expected object key or end object, found: {other:?}"
  124         -
                )))
  125         -
            }
  126         -
        }
  127         -
    }
  128         -
    if tokens.next().is_some() {
  129         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  130         -
            "found more JSON tokens after completing parsing",
  131         -
        ));
  132         -
    }
  133         -
    Ok(builder)
  134         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_tags_for_resource_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_tags_for_resource_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_arn {
    7         -
        object.key("resourceArn").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_list_tags_log_group.rs

@@ -1,0 +115,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_tags_log_group_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::list_tags_log_group::ListTagsLogGroupOutput, crate::operation::list_tags_log_group::ListTagsLogGroupError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    let error_code = match generic.code() {
   15         -
        Some(code) => code,
   16         -
        None => return Err(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "ResourceNotFoundException" => crate::operation::list_tags_log_group::ListTagsLogGroupError::ResourceNotFoundException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled)?;
   28         -
                let output = output.meta(generic);
   29         -
                output.build()
   30         -
            };
   31         -
            if tmp.message.is_none() {
   32         -
                tmp.message = _error_message;
   33         -
            }
   34         -
            tmp
   35         -
        }),
   36         -
        "ServiceUnavailableException" => crate::operation::list_tags_log_group::ListTagsLogGroupError::ServiceUnavailableException({
   37         -
            #[allow(unused_mut)]
   38         -
            let mut tmp = {
   39         -
                #[allow(unused_mut)]
   40         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   41         -
                output =
   42         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   43         -
                        .map_err(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                output.build()
   46         -
            };
   47         -
            if tmp.message.is_none() {
   48         -
                tmp.message = _error_message;
   49         -
            }
   50         -
            tmp
   51         -
        }),
   52         -
        _ => crate::operation::list_tags_log_group::ListTagsLogGroupError::generic(generic),
   53         -
    })
   54         -
}
   55         -
   56         -
#[allow(clippy::unnecessary_wraps)]
   57         -
pub fn de_list_tags_log_group_http_response(
   58         -
    _response_status: u16,
   59         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   60         -
    _response_body: &[u8],
   61         -
) -> std::result::Result<crate::operation::list_tags_log_group::ListTagsLogGroupOutput, crate::operation::list_tags_log_group::ListTagsLogGroupError>
   62         -
{
   63         -
    Ok({
   64         -
        #[allow(unused_mut)]
   65         -
        let mut output = crate::operation::list_tags_log_group::builders::ListTagsLogGroupOutputBuilder::default();
   66         -
        output = crate::protocol_serde::shape_list_tags_log_group::de_list_tags_log_group(_response_body, output)
   67         -
            .map_err(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled)?;
   68         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   69         -
        output.build()
   70         -
    })
   71         -
}
   72         -
   73         -
pub fn ser_list_tags_log_group_input(
   74         -
    input: &crate::operation::list_tags_log_group::ListTagsLogGroupInput,
   75         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   76         -
    let mut out = String::new();
   77         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   78         -
    crate::protocol_serde::shape_list_tags_log_group_input::ser_list_tags_log_group_input_input(&mut object, input)?;
   79         -
    object.finish();
   80         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   81         -
}
   82         -
   83         -
pub(crate) fn de_list_tags_log_group(
   84         -
    _value: &[u8],
   85         -
    mut builder: crate::operation::list_tags_log_group::builders::ListTagsLogGroupOutputBuilder,
   86         -
) -> ::std::result::Result<
   87         -
    crate::operation::list_tags_log_group::builders::ListTagsLogGroupOutputBuilder,
   88         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   89         -
> {
   90         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   91         -
    let tokens = &mut tokens_owned;
   92         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   93         -
    loop {
   94         -
        match tokens.next().transpose()? {
   95         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   96         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   97         -
                "tags" => {
   98         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   99         -
                }
  100         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  101         -
            },
  102         -
            other => {
  103         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  104         -
                    "expected object key or end object, found: {other:?}"
  105         -
                )))
  106         -
            }
  107         -
        }
  108         -
    }
  109         -
    if tokens.next().is_some() {
  110         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  111         -
            "found more JSON tokens after completing parsing",
  112         -
        ));
  113         -
    }
  114         -
    Ok(builder)
  115         -
}