AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_database_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_endpoints.rs

@@ -1,0 +124,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_endpoints_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_endpoints::DescribeEndpointsOutput, crate::operation::describe_endpoints::DescribeEndpointsError>
    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_endpoints::DescribeEndpointsError::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_endpoints::DescribeEndpointsError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "InternalServerException" => crate::operation::describe_endpoints::DescribeEndpointsError::InternalServerException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   28         -
                let output = output.meta(generic);
   29         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   30         -
                    .build()
   31         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?
   32         -
            };
   33         -
            tmp
   34         -
        }),
   35         -
        "ThrottlingException" => crate::operation::describe_endpoints::DescribeEndpointsError::ThrottlingException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                crate::serde_util::throttling_exception_correct_errors(output)
   44         -
                    .build()
   45         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?
   46         -
            };
   47         -
            tmp
   48         -
        }),
   49         -
        "ValidationException" => crate::operation::describe_endpoints::DescribeEndpointsError::ValidationException({
   50         -
            #[allow(unused_mut)]
   51         -
            let mut tmp = {
   52         -
                #[allow(unused_mut)]
   53         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   54         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   55         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   56         -
                let output = output.meta(generic);
   57         -
                crate::serde_util::validation_exception_correct_errors(output)
   58         -
                    .build()
   59         -
                    .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?
   60         -
            };
   61         -
            tmp
   62         -
        }),
   63         -
        _ => crate::operation::describe_endpoints::DescribeEndpointsError::generic(generic),
   64         -
    })
   65         -
}
   66         -
   67         -
#[allow(clippy::unnecessary_wraps)]
   68         -
pub fn de_describe_endpoints_http_response(
   69         -
    _response_status: u16,
   70         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   71         -
    _response_body: &[u8],
   72         -
) -> std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsOutput, crate::operation::describe_endpoints::DescribeEndpointsError>
   73         -
{
   74         -
    Ok({
   75         -
        #[allow(unused_mut)]
   76         -
        let mut output = crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder::default();
   77         -
        output = crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints(_response_body, output)
   78         -
            .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   79         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   80         -
        crate::serde_util::describe_endpoints_output_output_correct_errors(output)
   81         -
            .build()
   82         -
            .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?
   83         -
    })
   84         -
}
   85         -
   86         -
pub fn ser_describe_endpoints_input(
   87         -
    _input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
   88         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   89         -
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
   90         -
}
   91         -
   92         -
pub(crate) fn de_describe_endpoints(
   93         -
    _value: &[u8],
   94         -
    mut builder: crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder,
   95         -
) -> ::std::result::Result<
   96         -
    crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder,
   97         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   98         -
> {
   99         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  100         -
    let tokens = &mut tokens_owned;
  101         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  102         -
    loop {
  103         -
        match tokens.next().transpose()? {
  104         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  105         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  106         -
                "Endpoints" => {
  107         -
                    builder = builder.set_endpoints(crate::protocol_serde::shape_endpoints::de_endpoints(tokens, _value)?);
  108         -
                }
  109         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  110         -
            },
  111         -
            other => {
  112         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  113         -
                    "expected object key or end object, found: {other:?}"
  114         -
                )))
  115         -
            }
  116         -
        }
  117         -
    }
  118         -
    if tokens.next().is_some() {
  119         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  120         -
            "found more JSON tokens after completing parsing",
  121         -
        ));
  122         -
    }
  123         -
    Ok(builder)
  124         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_table.rs

@@ -1,0 +168,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_table_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_table::DescribeTableOutput, crate::operation::describe_table::DescribeTableError> {
    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::describe_table::DescribeTableError::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::describe_table::DescribeTableError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::describe_table::DescribeTableError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::describe_table::DescribeTableError::InternalServerException({
   35         -
            #[allow(unused_mut)]
   36         -
            let mut tmp = {
   37         -
                #[allow(unused_mut)]
   38         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   39         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   40         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::describe_table::DescribeTableError::InvalidEndpointException({
   49         -
            #[allow(unused_mut)]
   50         -
            let mut tmp = {
   51         -
                #[allow(unused_mut)]
   52         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   53         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   54         -
                    .map_err(crate::operation::describe_table::DescribeTableError::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         -
        "ResourceNotFoundException" => crate::operation::describe_table::DescribeTableError::ResourceNotFoundException({
   64         -
            #[allow(unused_mut)]
   65         -
            let mut tmp = {
   66         -
                #[allow(unused_mut)]
   67         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   68         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   69         -
                    .map_err(crate::operation::describe_table::DescribeTableError::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         -
        "ThrottlingException" => crate::operation::describe_table::DescribeTableError::ThrottlingException({
   79         -
            #[allow(unused_mut)]
   80         -
            let mut tmp = {
   81         -
                #[allow(unused_mut)]
   82         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   83         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   84         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                crate::serde_util::throttling_exception_correct_errors(output)
   87         -
                    .build()
   88         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?
   89         -
            };
   90         -
            tmp
   91         -
        }),
   92         -
        "ValidationException" => crate::operation::describe_table::DescribeTableError::ValidationException({
   93         -
            #[allow(unused_mut)]
   94         -
            let mut tmp = {
   95         -
                #[allow(unused_mut)]
   96         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   97         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   98         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
   99         -
                let output = output.meta(generic);
  100         -
                crate::serde_util::validation_exception_correct_errors(output)
  101         -
                    .build()
  102         -
                    .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?
  103         -
            };
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::describe_table::DescribeTableError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_describe_table_http_response(
  112         -
    _response_status: u16,
  113         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  114         -
    _response_body: &[u8],
  115         -
) -> std::result::Result<crate::operation::describe_table::DescribeTableOutput, crate::operation::describe_table::DescribeTableError> {
  116         -
    Ok({
  117         -
        #[allow(unused_mut)]
  118         -
        let mut output = crate::operation::describe_table::builders::DescribeTableOutputBuilder::default();
  119         -
        output = crate::protocol_serde::shape_describe_table::de_describe_table(_response_body, output)
  120         -
            .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
  121         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  122         -
        output.build()
  123         -
    })
  124         -
}
  125         -
  126         -
pub fn ser_describe_table_input(
  127         -
    input: &crate::operation::describe_table::DescribeTableInput,
  128         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  129         -
    let mut out = String::new();
  130         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  131         -
    crate::protocol_serde::shape_describe_table_input::ser_describe_table_input_input(&mut object, input)?;
  132         -
    object.finish();
  133         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  134         -
}
  135         -
  136         -
pub(crate) fn de_describe_table(
  137         -
    _value: &[u8],
  138         -
    mut builder: crate::operation::describe_table::builders::DescribeTableOutputBuilder,
  139         -
) -> ::std::result::Result<
  140         -
    crate::operation::describe_table::builders::DescribeTableOutputBuilder,
  141         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  142         -
> {
  143         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  144         -
    let tokens = &mut tokens_owned;
  145         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  146         -
    loop {
  147         -
        match tokens.next().transpose()? {
  148         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  149         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  150         -
                "Table" => {
  151         -
                    builder = builder.set_table(crate::protocol_serde::shape_table::de_table(tokens, _value)?);
  152         -
                }
  153         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  154         -
            },
  155         -
            other => {
  156         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  157         -
                    "expected object key or end object, found: {other:?}"
  158         -
                )))
  159         -
            }
  160         -
        }
  161         -
    }
  162         -
    if tokens.next().is_some() {
  163         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  164         -
            "found more JSON tokens after completing parsing",
  165         -
        ));
  166         -
    }
  167         -
    Ok(builder)
  168         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_table_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_dimension.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_dimension(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Dimension,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("Name").string(input.name.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("Value").string(input.value.as_str());
   11         -
    }
   12         -
    if let Some(var_1) = &input.dimension_value_type {
   13         -
        object.key("DimensionValueType").string(var_1.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_dimension_mapping.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_dimension_mapping(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DimensionMapping,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.source_column {
    7         -
        object.key("SourceColumn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.destination_column {
   10         -
        object.key("DestinationColumn").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_dimension_mapping<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::DimensionMapping>, ::aws_smithy_json::deserialize::error::DeserializeError>
   19         -
where
   20         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   21         -
{
   22         -
    match tokens.next().transpose()? {
   23         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   24         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   25         -
            #[allow(unused_mut)]
   26         -
            let mut builder = crate::types::builders::DimensionMappingBuilder::default();
   27         -
            loop {
   28         -
                match tokens.next().transpose()? {
   29         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   30         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   31         -
                        "SourceColumn" => {
   32         -
                            builder = builder.set_source_column(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "DestinationColumn" => {
   39         -
                            builder = builder.set_destination_column(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_dimension_mappings.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_dimension_mappings<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DimensionMapping>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_dimension_mapping::de_dimension_mapping(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_endpoint.rs

@@ -1,0 +49,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_endpoint<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Endpoint>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::EndpointBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "Address" => {
   19         -
                            builder = builder.set_address(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "CachePeriodInMinutes" => {
   26         -
                            builder = builder.set_cache_period_in_minutes(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(crate::serde_util::endpoint_correct_errors(builder).build().map_err(|err| {
   42         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   43         -
            })?))
   44         -
        }
   45         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46         -
            "expected start object or null",
   47         -
        )),
   48         -
    }
   49         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_endpoints.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_endpoints<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Endpoint>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_endpoint::de_endpoint(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_internal_server_exception.rs

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_internal_server_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InternalServerExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InternalServerExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "Message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_invalid_endpoint_exception.rs

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_endpoint_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidEndpointExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidEndpointExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "Message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_list_batch_load_tasks.rs

@@ -1,0 +168,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_batch_load_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::list_batch_load_tasks::ListBatchLoadTasksOutput,
    9         -
    crate::operation::list_batch_load_tasks::ListBatchLoadTasksError,
   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_batch_load_tasks::ListBatchLoadTasksError::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_batch_load_tasks::ListBatchLoadTasksError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "InternalServerException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::InternalServerException({
   38         -
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   42         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   43         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "InvalidEndpointException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::InvalidEndpointException({
   52         -
            #[allow(unused_mut)]
   53         -
            let mut tmp = {
   54         -
                #[allow(unused_mut)]
   55         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   56         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   57         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                output.build()
   60         -
            };
   61         -
            if tmp.message.is_none() {
   62         -
                tmp.message = _error_message;
   63         -
            }
   64         -
            tmp
   65         -
        }),
   66         -
        "ThrottlingException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::ThrottlingException({
   67         -
            #[allow(unused_mut)]
   68         -
            let mut tmp = {
   69         -
                #[allow(unused_mut)]
   70         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   71         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   72         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                crate::serde_util::throttling_exception_correct_errors(output)
   75         -
                    .build()
   76         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?
   77         -
            };
   78         -
            tmp
   79         -
        }),
   80         -
        "ValidationException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::ValidationException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                crate::serde_util::validation_exception_correct_errors(output)
   89         -
                    .build()
   90         -
                    .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?
   91         -
            };
   92         -
            tmp
   93         -
        }),
   94         -
        _ => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::generic(generic),
   95         -
    })
   96         -
}
   97         -
   98         -
#[allow(clippy::unnecessary_wraps)]
   99         -
pub fn de_list_batch_load_tasks_http_response(
  100         -
    _response_status: u16,
  101         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  102         -
    _response_body: &[u8],
  103         -
) -> std::result::Result<
  104         -
    crate::operation::list_batch_load_tasks::ListBatchLoadTasksOutput,
  105         -
    crate::operation::list_batch_load_tasks::ListBatchLoadTasksError,
  106         -
> {
  107         -
    Ok({
  108         -
        #[allow(unused_mut)]
  109         -
        let mut output = crate::operation::list_batch_load_tasks::builders::ListBatchLoadTasksOutputBuilder::default();
  110         -
        output = crate::protocol_serde::shape_list_batch_load_tasks::de_list_batch_load_tasks(_response_body, output)
  111         -
            .map_err(crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled)?;
  112         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  113         -
        output.build()
  114         -
    })
  115         -
}
  116         -
  117         -
pub fn ser_list_batch_load_tasks_input(
  118         -
    input: &crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput,
  119         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  120         -
    let mut out = String::new();
  121         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  122         -
    crate::protocol_serde::shape_list_batch_load_tasks_input::ser_list_batch_load_tasks_input_input(&mut object, input)?;
  123         -
    object.finish();
  124         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  125         -
}
  126         -
  127         -
pub(crate) fn de_list_batch_load_tasks(
  128         -
    _value: &[u8],
  129         -
    mut builder: crate::operation::list_batch_load_tasks::builders::ListBatchLoadTasksOutputBuilder,
  130         -
) -> ::std::result::Result<
  131         -
    crate::operation::list_batch_load_tasks::builders::ListBatchLoadTasksOutputBuilder,
  132         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  133         -
> {
  134         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  135         -
    let tokens = &mut tokens_owned;
  136         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  137         -
    loop {
  138         -
        match tokens.next().transpose()? {
  139         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  140         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  141         -
                "NextToken" => {
  142         -
                    builder = builder.set_next_token(
  143         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  144         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  145         -
                            .transpose()?,
  146         -
                    );
  147         -
                }
  148         -
                "BatchLoadTasks" => {
  149         -
                    builder = builder.set_batch_load_tasks(crate::protocol_serde::shape_batch_load_task_list::de_batch_load_task_list(
  150         -
                        tokens, _value,
  151         -
                    )?);
  152         -
                }
  153         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  154         -
            },
  155         -
            other => {
  156         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  157         -
                    "expected object key or end object, found: {other:?}"
  158         -
                )))
  159         -
            }
  160         -
        }
  161         -
    }
  162         -
    if tokens.next().is_some() {
  163         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  164         -
            "found more JSON tokens after completing parsing",
  165         -
        ));
  166         -
    }
  167         -
    Ok(builder)
  168         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_list_batch_load_tasks_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_batch_load_tasks_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput,
    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.max_results {
   10         -
        object.key("MaxResults").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.task_status {
   16         -
        object.key("TaskStatus").string(var_3.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_list_databases.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_databases_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_databases::ListDatabasesOutput, crate::operation::list_databases::ListDatabasesError> {
    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_databases::ListDatabasesError::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_databases::ListDatabasesError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::list_databases::ListDatabasesError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::list_databases::ListDatabasesError::InternalServerException({
   35         -
            #[allow(unused_mut)]
   36         -
            let mut tmp = {
   37         -
                #[allow(unused_mut)]
   38         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   39         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   40         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::list_databases::ListDatabasesError::InvalidEndpointException({
   49         -
            #[allow(unused_mut)]
   50         -
            let mut tmp = {
   51         -
                #[allow(unused_mut)]
   52         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   53         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   54         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::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::list_databases::ListDatabasesError::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::list_databases::ListDatabasesError::unhandled)?;
   70         -
                let output = output.meta(generic);
   71         -
                crate::serde_util::throttling_exception_correct_errors(output)
   72         -
                    .build()
   73         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?
   74         -
            };
   75         -
            tmp
   76         -
        }),
   77         -
        "ValidationException" => crate::operation::list_databases::ListDatabasesError::ValidationException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp = {
   80         -
                #[allow(unused_mut)]
   81         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   82         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   83         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?;
   84         -
                let output = output.meta(generic);
   85         -
                crate::serde_util::validation_exception_correct_errors(output)
   86         -
                    .build()
   87         -
                    .map_err(crate::operation::list_databases::ListDatabasesError::unhandled)?
   88         -
            };
   89         -
            tmp
   90         -
        }),
   91         -
        _ => crate::operation::list_databases::ListDatabasesError::generic(generic),
   92         -
    })
   93         -
}
   94         -
   95         -
#[allow(clippy::unnecessary_wraps)]
   96         -
pub fn de_list_databases_http_response(
   97         -
    _response_status: u16,
   98         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   99         -
    _response_body: &[u8],
  100         -
) -> std::result::Result<crate::operation::list_databases::ListDatabasesOutput, crate::operation::list_databases::ListDatabasesError> {
  101         -
    Ok({
  102         -
        #[allow(unused_mut)]
  103         -
        let mut output = crate::operation::list_databases::builders::ListDatabasesOutputBuilder::default();
  104         -
        output = crate::protocol_serde::shape_list_databases::de_list_databases(_response_body, output)
  105         -
            .map_err(crate::operation::list_databases::ListDatabasesError::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_databases_input(
  112         -
    input: &crate::operation::list_databases::ListDatabasesInput,
  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_databases_input::ser_list_databases_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_databases(
  122         -
    _value: &[u8],
  123         -
    mut builder: crate::operation::list_databases::builders::ListDatabasesOutputBuilder,
  124         -
) -> ::std::result::Result<
  125         -
    crate::operation::list_databases::builders::ListDatabasesOutputBuilder,
  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         -
                "Databases" => {
  136         -
                    builder = builder.set_databases(crate::protocol_serde::shape_database_list::de_database_list(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/timestreamwrite/src/protocol_serde/shape_list_databases_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_databases_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_databases::ListDatabasesInput,
    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.max_results {
   10         -
        object.key("MaxResults").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/timestreamwrite/src/protocol_serde/shape_list_tables.rs

@@ -1,0 +173,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_tables_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_tables::ListTablesOutput, crate::operation::list_tables::ListTablesError> {
    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_tables::ListTablesError::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_tables::ListTablesError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::list_tables::ListTablesError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::list_tables::ListTablesError::InternalServerException({
   35         -
            #[allow(unused_mut)]
   36         -
            let mut tmp = {
   37         -
                #[allow(unused_mut)]
   38         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   39         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   40         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::list_tables::ListTablesError::InvalidEndpointException({
   49         -
            #[allow(unused_mut)]
   50         -
            let mut tmp = {
   51         -
                #[allow(unused_mut)]
   52         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   53         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   54         -
                    .map_err(crate::operation::list_tables::ListTablesError::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         -
        "ResourceNotFoundException" => crate::operation::list_tables::ListTablesError::ResourceNotFoundException({
   64         -
            #[allow(unused_mut)]
   65         -
            let mut tmp = {
   66         -
                #[allow(unused_mut)]
   67         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   68         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   69         -
                    .map_err(crate::operation::list_tables::ListTablesError::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         -
        "ThrottlingException" => crate::operation::list_tables::ListTablesError::ThrottlingException({
   79         -
            #[allow(unused_mut)]
   80         -
            let mut tmp = {
   81         -
                #[allow(unused_mut)]
   82         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   83         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   84         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                crate::serde_util::throttling_exception_correct_errors(output)
   87         -
                    .build()
   88         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?
   89         -
            };
   90         -
            tmp
   91         -
        }),
   92         -
        "ValidationException" => crate::operation::list_tables::ListTablesError::ValidationException({
   93         -
            #[allow(unused_mut)]
   94         -
            let mut tmp = {
   95         -
                #[allow(unused_mut)]
   96         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   97         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   98         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?;
   99         -
                let output = output.meta(generic);
  100         -
                crate::serde_util::validation_exception_correct_errors(output)
  101         -
                    .build()
  102         -
                    .map_err(crate::operation::list_tables::ListTablesError::unhandled)?
  103         -
            };
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::list_tables::ListTablesError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_list_tables_http_response(
  112         -
    _response_status: u16,
  113         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  114         -
    _response_body: &[u8],
  115         -
) -> std::result::Result<crate::operation::list_tables::ListTablesOutput, crate::operation::list_tables::ListTablesError> {
  116         -
    Ok({
  117         -
        #[allow(unused_mut)]
  118         -
        let mut output = crate::operation::list_tables::builders::ListTablesOutputBuilder::default();
  119         -
        output = crate::protocol_serde::shape_list_tables::de_list_tables(_response_body, output)
  120         -
            .map_err(crate::operation::list_tables::ListTablesError::unhandled)?;
  121         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  122         -
        output.build()
  123         -
    })
  124         -
}
  125         -
  126         -
pub fn ser_list_tables_input(
  127         -
    input: &crate::operation::list_tables::ListTablesInput,
  128         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  129         -
    let mut out = String::new();
  130         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  131         -
    crate::protocol_serde::shape_list_tables_input::ser_list_tables_input_input(&mut object, input)?;
  132         -
    object.finish();
  133         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  134         -
}
  135         -
  136         -
pub(crate) fn de_list_tables(
  137         -
    _value: &[u8],
  138         -
    mut builder: crate::operation::list_tables::builders::ListTablesOutputBuilder,
  139         -
) -> ::std::result::Result<crate::operation::list_tables::builders::ListTablesOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
  140         -
{
  141         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  142         -
    let tokens = &mut tokens_owned;
  143         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  144         -
    loop {
  145         -
        match tokens.next().transpose()? {
  146         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  147         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  148         -
                "Tables" => {
  149         -
                    builder = builder.set_tables(crate::protocol_serde::shape_table_list::de_table_list(tokens, _value)?);
  150         -
                }
  151         -
                "NextToken" => {
  152         -
                    builder = builder.set_next_token(
  153         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  154         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  155         -
                            .transpose()?,
  156         -
                    );
  157         -
                }
  158         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  159         -
            },
  160         -
            other => {
  161         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  162         -
                    "expected object key or end object, found: {other:?}"
  163         -
                )))
  164         -
            }
  165         -
        }
  166         -
    }
  167         -
    if tokens.next().is_some() {
  168         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  169         -
            "found more JSON tokens after completing parsing",
  170         -
        ));
  171         -
    }
  172         -
    Ok(builder)
  173         -
}