AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_delivery_destinations_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.next_token {
    7         -
        object.key("nextToken").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         -
    Ok(())
   16         -
}

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

@@ -1,0 +165,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_delivery_sources_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::describe_delivery_sources::DescribeDeliverySourcesOutput,
    9         -
    crate::operation::describe_delivery_sources::DescribeDeliverySourcesError,
   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::describe_delivery_sources::DescribeDeliverySourcesError::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::describe_delivery_sources::DescribeDeliverySourcesError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "ServiceQuotaExceededException" => {
   28         -
            crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ServiceQuotaExceededException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "ServiceUnavailableException" => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ServiceUnavailableException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   52         -
                output =
   53         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   54         -
                        .map_err(crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled)?;
   55         -
                let output = output.meta(generic);
   56         -
                output.build()
   57         -
            };
   58         -
            if tmp.message.is_none() {
   59         -
                tmp.message = _error_message;
   60         -
            }
   61         -
            tmp
   62         -
        }),
   63         -
        "ThrottlingException" => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ThrottlingException({
   64         -
            #[allow(unused_mut)]
   65         -
            let mut tmp = {
   66         -
                #[allow(unused_mut)]
   67         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   68         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   69         -
                    .map_err(crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled)?;
   70         -
                let output = output.meta(generic);
   71         -
                output.build()
   72         -
            };
   73         -
            if tmp.message.is_none() {
   74         -
                tmp.message = _error_message;
   75         -
            }
   76         -
            tmp
   77         -
        }),
   78         -
        "ValidationException" => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ValidationException({
   79         -
            #[allow(unused_mut)]
   80         -
            let mut tmp = {
   81         -
                #[allow(unused_mut)]
   82         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   83         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   84         -
                    .map_err(crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                output.build()
   87         -
            };
   88         -
            if tmp.message.is_none() {
   89         -
                tmp.message = _error_message;
   90         -
            }
   91         -
            tmp
   92         -
        }),
   93         -
        _ => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::generic(generic),
   94         -
    })
   95         -
}
   96         -
   97         -
#[allow(clippy::unnecessary_wraps)]
   98         -
pub fn de_describe_delivery_sources_http_response(
   99         -
    _response_status: u16,
  100         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  101         -
    _response_body: &[u8],
  102         -
) -> std::result::Result<
  103         -
    crate::operation::describe_delivery_sources::DescribeDeliverySourcesOutput,
  104         -
    crate::operation::describe_delivery_sources::DescribeDeliverySourcesError,
  105         -
> {
  106         -
    Ok({
  107         -
        #[allow(unused_mut)]
  108         -
        let mut output = crate::operation::describe_delivery_sources::builders::DescribeDeliverySourcesOutputBuilder::default();
  109         -
        output = crate::protocol_serde::shape_describe_delivery_sources::de_describe_delivery_sources(_response_body, output)
  110         -
            .map_err(crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled)?;
  111         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  112         -
        output.build()
  113         -
    })
  114         -
}
  115         -
  116         -
pub fn ser_describe_delivery_sources_input(
  117         -
    input: &crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput,
  118         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  119         -
    let mut out = String::new();
  120         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  121         -
    crate::protocol_serde::shape_describe_delivery_sources_input::ser_describe_delivery_sources_input_input(&mut object, input)?;
  122         -
    object.finish();
  123         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  124         -
}
  125         -
  126         -
pub(crate) fn de_describe_delivery_sources(
  127         -
    _value: &[u8],
  128         -
    mut builder: crate::operation::describe_delivery_sources::builders::DescribeDeliverySourcesOutputBuilder,
  129         -
) -> ::std::result::Result<
  130         -
    crate::operation::describe_delivery_sources::builders::DescribeDeliverySourcesOutputBuilder,
  131         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  132         -
> {
  133         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  134         -
    let tokens = &mut tokens_owned;
  135         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  136         -
    loop {
  137         -
        match tokens.next().transpose()? {
  138         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  139         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  140         -
                "deliverySources" => {
  141         -
                    builder = builder.set_delivery_sources(crate::protocol_serde::shape_delivery_sources::de_delivery_sources(tokens, _value)?);
  142         -
                }
  143         -
                "nextToken" => {
  144         -
                    builder = builder.set_next_token(
  145         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  146         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  147         -
                            .transpose()?,
  148         -
                    );
  149         -
                }
  150         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  151         -
            },
  152         -
            other => {
  153         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  154         -
                    "expected object key or end object, found: {other:?}"
  155         -
                )))
  156         -
            }
  157         -
        }
  158         -
    }
  159         -
    if tokens.next().is_some() {
  160         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  161         -
            "found more JSON tokens after completing parsing",
  162         -
        ));
  163         -
    }
  164         -
    Ok(builder)
  165         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_delivery_sources_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.next_token {
    7         -
        object.key("nextToken").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         -
    Ok(())
   16         -
}

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

@@ -1,0 +126,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_destinations_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::describe_destinations::DescribeDestinationsOutput,
    9         -
    crate::operation::describe_destinations::DescribeDestinationsError,
   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::describe_destinations::DescribeDestinationsError::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::describe_destinations::DescribeDestinationsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterException" => crate::operation::describe_destinations::DescribeDestinationsError::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::describe_destinations::DescribeDestinationsError::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         -
        "ServiceUnavailableException" => crate::operation::describe_destinations::DescribeDestinationsError::ServiceUnavailableException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   43         -
                output =
   44         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   45         -
                        .map_err(crate::operation::describe_destinations::DescribeDestinationsError::unhandled)?;
   46         -
                let output = output.meta(generic);
   47         -
                output.build()
   48         -
            };
   49         -
            if tmp.message.is_none() {
   50         -
                tmp.message = _error_message;
   51         -
            }
   52         -
            tmp
   53         -
        }),
   54         -
        _ => crate::operation::describe_destinations::DescribeDestinationsError::generic(generic),
   55         -
    })
   56         -
}
   57         -
   58         -
#[allow(clippy::unnecessary_wraps)]
   59         -
pub fn de_describe_destinations_http_response(
   60         -
    _response_status: u16,
   61         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   62         -
    _response_body: &[u8],
   63         -
) -> std::result::Result<
   64         -
    crate::operation::describe_destinations::DescribeDestinationsOutput,
   65         -
    crate::operation::describe_destinations::DescribeDestinationsError,
   66         -
> {
   67         -
    Ok({
   68         -
        #[allow(unused_mut)]
   69         -
        let mut output = crate::operation::describe_destinations::builders::DescribeDestinationsOutputBuilder::default();
   70         -
        output = crate::protocol_serde::shape_describe_destinations::de_describe_destinations(_response_body, output)
   71         -
            .map_err(crate::operation::describe_destinations::DescribeDestinationsError::unhandled)?;
   72         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   73         -
        output.build()
   74         -
    })
   75         -
}
   76         -
   77         -
pub fn ser_describe_destinations_input(
   78         -
    input: &crate::operation::describe_destinations::DescribeDestinationsInput,
   79         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   80         -
    let mut out = String::new();
   81         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   82         -
    crate::protocol_serde::shape_describe_destinations_input::ser_describe_destinations_input_input(&mut object, input)?;
   83         -
    object.finish();
   84         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   85         -
}
   86         -
   87         -
pub(crate) fn de_describe_destinations(
   88         -
    _value: &[u8],
   89         -
    mut builder: crate::operation::describe_destinations::builders::DescribeDestinationsOutputBuilder,
   90         -
) -> ::std::result::Result<
   91         -
    crate::operation::describe_destinations::builders::DescribeDestinationsOutputBuilder,
   92         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   93         -
> {
   94         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   95         -
    let tokens = &mut tokens_owned;
   96         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   97         -
    loop {
   98         -
        match tokens.next().transpose()? {
   99         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  100         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  101         -
                "destinations" => {
  102         -
                    builder = builder.set_destinations(crate::protocol_serde::shape_destinations::de_destinations(tokens, _value)?);
  103         -
                }
  104         -
                "nextToken" => {
  105         -
                    builder = builder.set_next_token(
  106         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  107         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  108         -
                            .transpose()?,
  109         -
                    );
  110         -
                }
  111         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
            },
  113         -
            other => {
  114         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                    "expected object key or end object, found: {other:?}"
  116         -
                )))
  117         -
            }
  118         -
        }
  119         -
    }
  120         -
    if tokens.next().is_some() {
  121         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  122         -
            "found more JSON tokens after completing parsing",
  123         -
        ));
  124         -
    }
  125         -
    Ok(builder)
  126         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_destinations_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_destinations::DescribeDestinationsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.destination_name_prefix {
    7         -
        object.key("DestinationNamePrefix").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.limit {
   13         -
        object.key("limit").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_describe_export_tasks.rs

@@ -1,0 +126,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_export_tasks_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::describe_export_tasks::DescribeExportTasksOutput,
    9         -
    crate::operation::describe_export_tasks::DescribeExportTasksError,
   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::describe_export_tasks::DescribeExportTasksError::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::describe_export_tasks::DescribeExportTasksError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterException" => crate::operation::describe_export_tasks::DescribeExportTasksError::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::describe_export_tasks::DescribeExportTasksError::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         -
        "ServiceUnavailableException" => crate::operation::describe_export_tasks::DescribeExportTasksError::ServiceUnavailableException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   43         -
                output =
   44         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   45         -
                        .map_err(crate::operation::describe_export_tasks::DescribeExportTasksError::unhandled)?;
   46         -
                let output = output.meta(generic);
   47         -
                output.build()
   48         -
            };
   49         -
            if tmp.message.is_none() {
   50         -
                tmp.message = _error_message;
   51         -
            }
   52         -
            tmp
   53         -
        }),
   54         -
        _ => crate::operation::describe_export_tasks::DescribeExportTasksError::generic(generic),
   55         -
    })
   56         -
}
   57         -
   58         -
#[allow(clippy::unnecessary_wraps)]
   59         -
pub fn de_describe_export_tasks_http_response(
   60         -
    _response_status: u16,
   61         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   62         -
    _response_body: &[u8],
   63         -
) -> std::result::Result<
   64         -
    crate::operation::describe_export_tasks::DescribeExportTasksOutput,
   65         -
    crate::operation::describe_export_tasks::DescribeExportTasksError,
   66         -
> {
   67         -
    Ok({
   68         -
        #[allow(unused_mut)]
   69         -
        let mut output = crate::operation::describe_export_tasks::builders::DescribeExportTasksOutputBuilder::default();
   70         -
        output = crate::protocol_serde::shape_describe_export_tasks::de_describe_export_tasks(_response_body, output)
   71         -
            .map_err(crate::operation::describe_export_tasks::DescribeExportTasksError::unhandled)?;
   72         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   73         -
        output.build()
   74         -
    })
   75         -
}
   76         -
   77         -
pub fn ser_describe_export_tasks_input(
   78         -
    input: &crate::operation::describe_export_tasks::DescribeExportTasksInput,
   79         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   80         -
    let mut out = String::new();
   81         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   82         -
    crate::protocol_serde::shape_describe_export_tasks_input::ser_describe_export_tasks_input_input(&mut object, input)?;
   83         -
    object.finish();
   84         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   85         -
}
   86         -
   87         -
pub(crate) fn de_describe_export_tasks(
   88         -
    _value: &[u8],
   89         -
    mut builder: crate::operation::describe_export_tasks::builders::DescribeExportTasksOutputBuilder,
   90         -
) -> ::std::result::Result<
   91         -
    crate::operation::describe_export_tasks::builders::DescribeExportTasksOutputBuilder,
   92         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   93         -
> {
   94         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   95         -
    let tokens = &mut tokens_owned;
   96         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   97         -
    loop {
   98         -
        match tokens.next().transpose()? {
   99         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  100         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  101         -
                "exportTasks" => {
  102         -
                    builder = builder.set_export_tasks(crate::protocol_serde::shape_export_tasks::de_export_tasks(tokens, _value)?);
  103         -
                }
  104         -
                "nextToken" => {
  105         -
                    builder = builder.set_next_token(
  106         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  107         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  108         -
                            .transpose()?,
  109         -
                    );
  110         -
                }
  111         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
            },
  113         -
            other => {
  114         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                    "expected object key or end object, found: {other:?}"
  116         -
                )))
  117         -
            }
  118         -
        }
  119         -
    }
  120         -
    if tokens.next().is_some() {
  121         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  122         -
            "found more JSON tokens after completing parsing",
  123         -
        ));
  124         -
    }
  125         -
    Ok(builder)
  126         -
}

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

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

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

@@ -1,0 +171,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_field_indexes_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::describe_field_indexes::DescribeFieldIndexesOutput,
    9         -
    crate::operation::describe_field_indexes::DescribeFieldIndexesError,
   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::describe_field_indexes::DescribeFieldIndexesError::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::describe_field_indexes::DescribeFieldIndexesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterException" => crate::operation::describe_field_indexes::DescribeFieldIndexesError::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::describe_field_indexes::DescribeFieldIndexesError::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         -
        "LimitExceededException" => crate::operation::describe_field_indexes::DescribeFieldIndexesError::LimitExceededException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::describe_field_indexes::DescribeFieldIndexesError::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         -
        "OperationAbortedException" => crate::operation::describe_field_indexes::DescribeFieldIndexesError::OperationAbortedException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::describe_field_indexes::DescribeFieldIndexesError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "ResourceNotFoundException" => crate::operation::describe_field_indexes::DescribeFieldIndexesError::ResourceNotFoundException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::describe_field_indexes::DescribeFieldIndexesError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                output.build()
   77         -
            };
   78         -
            if tmp.message.is_none() {
   79         -
                tmp.message = _error_message;
   80         -
            }
   81         -
            tmp
   82         -
        }),
   83         -
        "ServiceUnavailableException" => crate::operation::describe_field_indexes::DescribeFieldIndexesError::ServiceUnavailableException({
   84         -
            #[allow(unused_mut)]
   85         -
            let mut tmp = {
   86         -
                #[allow(unused_mut)]
   87         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   88         -
                output =
   89         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   90         -
                        .map_err(crate::operation::describe_field_indexes::DescribeFieldIndexesError::unhandled)?;
   91         -
                let output = output.meta(generic);
   92         -
                output.build()
   93         -
            };
   94         -
            if tmp.message.is_none() {
   95         -
                tmp.message = _error_message;
   96         -
            }
   97         -
            tmp
   98         -
        }),
   99         -
        _ => crate::operation::describe_field_indexes::DescribeFieldIndexesError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_describe_field_indexes_http_response(
  105         -
    _response_status: u16,
  106         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  107         -
    _response_body: &[u8],
  108         -
) -> std::result::Result<
  109         -
    crate::operation::describe_field_indexes::DescribeFieldIndexesOutput,
  110         -
    crate::operation::describe_field_indexes::DescribeFieldIndexesError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::describe_field_indexes::builders::DescribeFieldIndexesOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_describe_field_indexes::de_describe_field_indexes(_response_body, output)
  116         -
            .map_err(crate::operation::describe_field_indexes::DescribeFieldIndexesError::unhandled)?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub fn ser_describe_field_indexes_input(
  123         -
    input: &crate::operation::describe_field_indexes::DescribeFieldIndexesInput,
  124         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  125         -
    let mut out = String::new();
  126         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  127         -
    crate::protocol_serde::shape_describe_field_indexes_input::ser_describe_field_indexes_input_input(&mut object, input)?;
  128         -
    object.finish();
  129         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  130         -
}
  131         -
  132         -
pub(crate) fn de_describe_field_indexes(
  133         -
    _value: &[u8],
  134         -
    mut builder: crate::operation::describe_field_indexes::builders::DescribeFieldIndexesOutputBuilder,
  135         -
) -> ::std::result::Result<
  136         -
    crate::operation::describe_field_indexes::builders::DescribeFieldIndexesOutputBuilder,
  137         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  138         -
> {
  139         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  140         -
    let tokens = &mut tokens_owned;
  141         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  142         -
    loop {
  143         -
        match tokens.next().transpose()? {
  144         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  145         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  146         -
                "fieldIndexes" => {
  147         -
                    builder = builder.set_field_indexes(crate::protocol_serde::shape_field_indexes::de_field_indexes(tokens, _value)?);
  148         -
                }
  149         -
                "nextToken" => {
  150         -
                    builder = builder.set_next_token(
  151         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  152         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  153         -
                            .transpose()?,
  154         -
                    );
  155         -
                }
  156         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  157         -
            },
  158         -
            other => {
  159         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  160         -
                    "expected object key or end object, found: {other:?}"
  161         -
                )))
  162         -
            }
  163         -
        }
  164         -
    }
  165         -
    if tokens.next().is_some() {
  166         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  167         -
            "found more JSON tokens after completing parsing",
  168         -
        ));
  169         -
    }
  170         -
    Ok(builder)
  171         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_field_indexes_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_field_indexes::DescribeFieldIndexesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.log_group_identifiers {
    7         -
        let mut array_2 = object.key("logGroupIdentifiers").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.next_token {
   16         -
        object.key("nextToken").string(var_4.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +171,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_index_policies_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::describe_index_policies::DescribeIndexPoliciesOutput,
    9         -
    crate::operation::describe_index_policies::DescribeIndexPoliciesError,
   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::describe_index_policies::DescribeIndexPoliciesError::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::describe_index_policies::DescribeIndexPoliciesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterException" => crate::operation::describe_index_policies::DescribeIndexPoliciesError::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::describe_index_policies::DescribeIndexPoliciesError::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         -
        "LimitExceededException" => crate::operation::describe_index_policies::DescribeIndexPoliciesError::LimitExceededException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::describe_index_policies::DescribeIndexPoliciesError::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         -
        "OperationAbortedException" => crate::operation::describe_index_policies::DescribeIndexPoliciesError::OperationAbortedException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::describe_index_policies::DescribeIndexPoliciesError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "ResourceNotFoundException" => crate::operation::describe_index_policies::DescribeIndexPoliciesError::ResourceNotFoundException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::describe_index_policies::DescribeIndexPoliciesError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                output.build()
   77         -
            };
   78         -
            if tmp.message.is_none() {
   79         -
                tmp.message = _error_message;
   80         -
            }
   81         -
            tmp
   82         -
        }),
   83         -
        "ServiceUnavailableException" => crate::operation::describe_index_policies::DescribeIndexPoliciesError::ServiceUnavailableException({
   84         -
            #[allow(unused_mut)]
   85         -
            let mut tmp = {
   86         -
                #[allow(unused_mut)]
   87         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   88         -
                output =
   89         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   90         -
                        .map_err(crate::operation::describe_index_policies::DescribeIndexPoliciesError::unhandled)?;
   91         -
                let output = output.meta(generic);
   92         -
                output.build()
   93         -
            };
   94         -
            if tmp.message.is_none() {
   95         -
                tmp.message = _error_message;
   96         -
            }
   97         -
            tmp
   98         -
        }),
   99         -
        _ => crate::operation::describe_index_policies::DescribeIndexPoliciesError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_describe_index_policies_http_response(
  105         -
    _response_status: u16,
  106         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  107         -
    _response_body: &[u8],
  108         -
) -> std::result::Result<
  109         -
    crate::operation::describe_index_policies::DescribeIndexPoliciesOutput,
  110         -
    crate::operation::describe_index_policies::DescribeIndexPoliciesError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::describe_index_policies::builders::DescribeIndexPoliciesOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_describe_index_policies::de_describe_index_policies(_response_body, output)
  116         -
            .map_err(crate::operation::describe_index_policies::DescribeIndexPoliciesError::unhandled)?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub fn ser_describe_index_policies_input(
  123         -
    input: &crate::operation::describe_index_policies::DescribeIndexPoliciesInput,
  124         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  125         -
    let mut out = String::new();
  126         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  127         -
    crate::protocol_serde::shape_describe_index_policies_input::ser_describe_index_policies_input_input(&mut object, input)?;
  128         -
    object.finish();
  129         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  130         -
}
  131         -
  132         -
pub(crate) fn de_describe_index_policies(
  133         -
    _value: &[u8],
  134         -
    mut builder: crate::operation::describe_index_policies::builders::DescribeIndexPoliciesOutputBuilder,
  135         -
) -> ::std::result::Result<
  136         -
    crate::operation::describe_index_policies::builders::DescribeIndexPoliciesOutputBuilder,
  137         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  138         -
> {
  139         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  140         -
    let tokens = &mut tokens_owned;
  141         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  142         -
    loop {
  143         -
        match tokens.next().transpose()? {
  144         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  145         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  146         -
                "indexPolicies" => {
  147         -
                    builder = builder.set_index_policies(crate::protocol_serde::shape_index_policies::de_index_policies(tokens, _value)?);
  148         -
                }
  149         -
                "nextToken" => {
  150         -
                    builder = builder.set_next_token(
  151         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  152         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  153         -
                            .transpose()?,
  154         -
                    );
  155         -
                }
  156         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  157         -
            },
  158         -
            other => {
  159         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  160         -
                    "expected object key or end object, found: {other:?}"
  161         -
                )))
  162         -
            }
  163         -
        }
  164         -
    }
  165         -
    if tokens.next().is_some() {
  166         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  167         -
            "found more JSON tokens after completing parsing",
  168         -
        ));
  169         -
    }
  170         -
    Ok(builder)
  171         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_index_policies_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_index_policies::DescribeIndexPoliciesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.log_group_identifiers {
    7         -
        let mut array_2 = object.key("logGroupIdentifiers").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.next_token {
   16         -
        object.key("nextToken").string(var_4.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +122,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_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::describe_log_groups::DescribeLogGroupsOutput, crate::operation::describe_log_groups::DescribeLogGroupsError>
    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::describe_log_groups::DescribeLogGroupsError::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::describe_log_groups::DescribeLogGroupsError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "InvalidParameterException" => crate::operation::describe_log_groups::DescribeLogGroupsError::InvalidParameterException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::describe_log_groups::DescribeLogGroupsError::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::describe_log_groups::DescribeLogGroupsError::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::describe_log_groups::DescribeLogGroupsError::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::describe_log_groups::DescribeLogGroupsError::generic(generic),
   53         -
    })
   54         -
}
   55         -
   56         -
#[allow(clippy::unnecessary_wraps)]
   57         -
pub fn de_describe_log_groups_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::describe_log_groups::DescribeLogGroupsOutput, crate::operation::describe_log_groups::DescribeLogGroupsError>
   62         -
{
   63         -
    Ok({
   64         -
        #[allow(unused_mut)]
   65         -
        let mut output = crate::operation::describe_log_groups::builders::DescribeLogGroupsOutputBuilder::default();
   66         -
        output = crate::protocol_serde::shape_describe_log_groups::de_describe_log_groups(_response_body, output)
   67         -
            .map_err(crate::operation::describe_log_groups::DescribeLogGroupsError::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_describe_log_groups_input(
   74         -
    input: &crate::operation::describe_log_groups::DescribeLogGroupsInput,
   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_describe_log_groups_input::ser_describe_log_groups_input_input(&mut object, input)?;
   79         -
    object.finish();
   80         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   81         -
}
   82         -
   83         -
pub(crate) fn de_describe_log_groups(
   84         -
    _value: &[u8],
   85         -
    mut builder: crate::operation::describe_log_groups::builders::DescribeLogGroupsOutputBuilder,
   86         -
) -> ::std::result::Result<
   87         -
    crate::operation::describe_log_groups::builders::DescribeLogGroupsOutputBuilder,
   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         -
                "logGroups" => {
   98         -
                    builder = builder.set_log_groups(crate::protocol_serde::shape_log_groups::de_log_groups(tokens, _value)?);
   99         -
                }
  100         -
                "nextToken" => {
  101         -
                    builder = builder.set_next_token(
  102         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  103         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  104         -
                            .transpose()?,
  105         -
                    );
  106         -
                }
  107         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  108         -
            },
  109         -
            other => {
  110         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  111         -
                    "expected object key or end object, found: {other:?}"
  112         -
                )))
  113         -
            }
  114         -
        }
  115         -
    }
  116         -
    if tokens.next().is_some() {
  117         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  118         -
            "found more JSON tokens after completing parsing",
  119         -
        ));
  120         -
    }
  121         -
    Ok(builder)
  122         -
}

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

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_log_groups_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_log_groups::DescribeLogGroupsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.account_identifiers {
    7         -
        let mut array_2 = object.key("accountIdentifiers").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.log_group_name_prefix {
   16         -
        object.key("logGroupNamePrefix").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.log_group_name_pattern {
   19         -
        object.key("logGroupNamePattern").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.next_token {
   22         -
        object.key("nextToken").string(var_6.as_str());
   23         -
    }
   24         -
    if let Some(var_7) = &input.limit {
   25         -
        object.key("limit").number(
   26         -
            #[allow(clippy::useless_conversion)]
   27         -
            ::aws_smithy_types::Number::NegInt((*var_7).into()),
   28         -
        );
   29         -
    }
   30         -
    if let Some(var_8) = &input.include_linked_accounts {
   31         -
        object.key("includeLinkedAccounts").boolean(*var_8);
   32         -
    }
   33         -
    if let Some(var_9) = &input.log_group_class {
   34         -
        object.key("logGroupClass").string(var_9.as_str());
   35         -
    }
   36         -
    if let Some(var_10) = &input.log_group_identifiers {
   37         -
        let mut array_11 = object.key("logGroupIdentifiers").start_array();
   38         -
        for item_12 in var_10 {
   39         -
            {
   40         -
                array_11.value().string(item_12.as_str());
   41         -
            }
   42         -
        }
   43         -
        array_11.finish();
   44         -
    }
   45         -
    Ok(())
   46         -
}