AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

@@ -1,0 +116,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_data_model(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DataModel,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.time_column {
    7         -
        object.key("TimeColumn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.time_unit {
   10         -
        object.key("TimeUnit").string(var_2.as_str());
   11         -
    }
   12         -
    {
   13         -
        let mut array_3 = object.key("DimensionMappings").start_array();
   14         -
        for item_4 in &input.dimension_mappings {
   15         -
            {
   16         -
                #[allow(unused_mut)]
   17         -
                let mut object_5 = array_3.value().start_object();
   18         -
                crate::protocol_serde::shape_dimension_mapping::ser_dimension_mapping(&mut object_5, item_4)?;
   19         -
                object_5.finish();
   20         -
            }
   21         -
        }
   22         -
        array_3.finish();
   23         -
    }
   24         -
    if let Some(var_6) = &input.multi_measure_mappings {
   25         -
        #[allow(unused_mut)]
   26         -
        let mut object_7 = object.key("MultiMeasureMappings").start_object();
   27         -
        crate::protocol_serde::shape_multi_measure_mappings::ser_multi_measure_mappings(&mut object_7, var_6)?;
   28         -
        object_7.finish();
   29         -
    }
   30         -
    if let Some(var_8) = &input.mixed_measure_mappings {
   31         -
        let mut array_9 = object.key("MixedMeasureMappings").start_array();
   32         -
        for item_10 in var_8 {
   33         -
            {
   34         -
                #[allow(unused_mut)]
   35         -
                let mut object_11 = array_9.value().start_object();
   36         -
                crate::protocol_serde::shape_mixed_measure_mapping::ser_mixed_measure_mapping(&mut object_11, item_10)?;
   37         -
                object_11.finish();
   38         -
            }
   39         -
        }
   40         -
        array_9.finish();
   41         -
    }
   42         -
    if let Some(var_12) = &input.measure_name_column {
   43         -
        object.key("MeasureNameColumn").string(var_12.as_str());
   44         -
    }
   45         -
    Ok(())
   46         -
}
   47         -
   48         -
pub(crate) fn de_data_model<'a, I>(
   49         -
    tokens: &mut ::std::iter::Peekable<I>,
   50         -
    _value: &'a [u8],
   51         -
) -> ::std::result::Result<Option<crate::types::DataModel>, ::aws_smithy_json::deserialize::error::DeserializeError>
   52         -
where
   53         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   54         -
{
   55         -
    match tokens.next().transpose()? {
   56         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   57         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   58         -
            #[allow(unused_mut)]
   59         -
            let mut builder = crate::types::builders::DataModelBuilder::default();
   60         -
            loop {
   61         -
                match tokens.next().transpose()? {
   62         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   63         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   64         -
                        "TimeColumn" => {
   65         -
                            builder = builder.set_time_column(
   66         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   67         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   68         -
                                    .transpose()?,
   69         -
                            );
   70         -
                        }
   71         -
                        "TimeUnit" => {
   72         -
                            builder = builder.set_time_unit(
   73         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   74         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::TimeUnit::from(u.as_ref())))
   75         -
                                    .transpose()?,
   76         -
                            );
   77         -
                        }
   78         -
                        "DimensionMappings" => {
   79         -
                            builder = builder
   80         -
                                .set_dimension_mappings(crate::protocol_serde::shape_dimension_mappings::de_dimension_mappings(tokens, _value)?);
   81         -
                        }
   82         -
                        "MultiMeasureMappings" => {
   83         -
                            builder = builder.set_multi_measure_mappings(
   84         -
                                crate::protocol_serde::shape_multi_measure_mappings::de_multi_measure_mappings(tokens, _value)?,
   85         -
                            );
   86         -
                        }
   87         -
                        "MixedMeasureMappings" => {
   88         -
                            builder = builder.set_mixed_measure_mappings(
   89         -
                                crate::protocol_serde::shape_mixed_measure_mapping_list::de_mixed_measure_mapping_list(tokens, _value)?,
   90         -
                            );
   91         -
                        }
   92         -
                        "MeasureNameColumn" => {
   93         -
                            builder = builder.set_measure_name_column(
   94         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   95         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   96         -
                                    .transpose()?,
   97         -
                            );
   98         -
                        }
   99         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  100         -
                    },
  101         -
                    other => {
  102         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  103         -
                            "expected object key or end object, found: {other:?}"
  104         -
                        )))
  105         -
                    }
  106         -
                }
  107         -
            }
  108         -
            Ok(Some(crate::serde_util::data_model_correct_errors(builder).build().map_err(|err| {
  109         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
  110         -
            })?))
  111         -
        }
  112         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  113         -
            "expected start object or null",
  114         -
        )),
  115         -
    }
  116         -
}

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

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_data_model_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DataModelConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.data_model {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("DataModel").start_object();
    9         -
        crate::protocol_serde::shape_data_model::ser_data_model(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.data_model_s3_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("DataModelS3Configuration").start_object();
   15         -
        crate::protocol_serde::shape_data_model_s3_configuration::ser_data_model_s3_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_data_model_configuration<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::DataModelConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::DataModelConfigurationBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "DataModel" => {
   38         -
                            builder = builder.set_data_model(crate::protocol_serde::shape_data_model::de_data_model(tokens, _value)?);
   39         -
                        }
   40         -
                        "DataModelS3Configuration" => {
   41         -
                            builder = builder.set_data_model_s3_configuration(
   42         -
                                crate::protocol_serde::shape_data_model_s3_configuration::de_data_model_s3_configuration(tokens, _value)?,
   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_data_model_s3_configuration.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_data_model_s3_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DataModelS3Configuration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.bucket_name {
    7         -
        object.key("BucketName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.object_key {
   10         -
        object.key("ObjectKey").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_data_model_s3_configuration<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::DataModelS3Configuration>, ::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::DataModelS3ConfigurationBuilder::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         -
                        "BucketName" => {
   32         -
                            builder = builder.set_bucket_name(
   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         -
                        "ObjectKey" => {
   39         -
                            builder = builder.set_object_key(
   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_data_source_configuration.rs

@@ -1,0 +75,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_data_source_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DataSourceConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.data_source_s3_configuration {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("DataSourceS3Configuration").start_object();
    9         -
        crate::protocol_serde::shape_data_source_s3_configuration::ser_data_source_s3_configuration(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.csv_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("CsvConfiguration").start_object();
   15         -
        crate::protocol_serde::shape_csv_configuration::ser_csv_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    {
   19         -
        object.key("DataFormat").string(input.data_format.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_data_source_configuration<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::DataSourceConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   28         -
where
   29         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   30         -
{
   31         -
    match tokens.next().transpose()? {
   32         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   33         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   34         -
            #[allow(unused_mut)]
   35         -
            let mut builder = crate::types::builders::DataSourceConfigurationBuilder::default();
   36         -
            loop {
   37         -
                match tokens.next().transpose()? {
   38         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   39         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   40         -
                        "DataSourceS3Configuration" => {
   41         -
                            builder = builder.set_data_source_s3_configuration(
   42         -
                                crate::protocol_serde::shape_data_source_s3_configuration::de_data_source_s3_configuration(tokens, _value)?,
   43         -
                            );
   44         -
                        }
   45         -
                        "CsvConfiguration" => {
   46         -
                            builder =
   47         -
                                builder.set_csv_configuration(crate::protocol_serde::shape_csv_configuration::de_csv_configuration(tokens, _value)?);
   48         -
                        }
   49         -
                        "DataFormat" => {
   50         -
                            builder = builder.set_data_format(
   51         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   52         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::BatchLoadDataFormat::from(u.as_ref())))
   53         -
                                    .transpose()?,
   54         -
                            );
   55         -
                        }
   56         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   57         -
                    },
   58         -
                    other => {
   59         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   60         -
                            "expected object key or end object, found: {other:?}"
   61         -
                        )))
   62         -
                    }
   63         -
                }
   64         -
            }
   65         -
            Ok(Some(
   66         -
                crate::serde_util::data_source_configuration_correct_errors(builder)
   67         -
                    .build()
   68         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   69         -
            ))
   70         -
        }
   71         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   72         -
            "expected start object or null",
   73         -
        )),
   74         -
    }
   75         -
}

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

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_data_source_s3_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DataSourceS3Configuration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("BucketName").string(input.bucket_name.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.object_key_prefix {
   10         -
        object.key("ObjectKeyPrefix").string(var_1.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_data_source_s3_configuration<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::DataSourceS3Configuration>, ::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::DataSourceS3ConfigurationBuilder::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         -
                        "BucketName" => {
   32         -
                            builder = builder.set_bucket_name(
   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         -
                        "ObjectKeyPrefix" => {
   39         -
                            builder = builder.set_object_key_prefix(
   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(
   55         -
                crate::serde_util::data_source_s3_configuration_correct_errors(builder)
   56         -
                    .build()
   57         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   58         -
            ))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

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

@@ -1,0 +73,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_database<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Database>, ::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::DatabaseBuilder::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         -
                        "Arn" => {
   19         -
                            builder = builder.set_arn(
   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         -
                        "DatabaseName" => {
   26         -
                            builder = builder.set_database_name(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "TableCount" => {
   33         -
                            builder = builder.set_table_count(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "KmsKeyId" => {
   40         -
                            builder = builder.set_kms_key_id(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "CreationTime" => {
   47         -
                            builder = builder.set_creation_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   48         -
                                tokens.next(),
   49         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   50         -
                            )?);
   51         -
                        }
   52         -
                        "LastUpdatedTime" => {
   53         -
                            builder = builder.set_last_updated_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   54         -
                                tokens.next(),
   55         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   56         -
                            )?);
   57         -
                        }
   58         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   59         -
                    },
   60         -
                    other => {
   61         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   62         -
                            "expected object key or end object, found: {other:?}"
   63         -
                        )))
   64         -
                    }
   65         -
                }
   66         -
            }
   67         -
            Ok(Some(builder.build()))
   68         -
        }
   69         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   70         -
            "expected start object or null",
   71         -
        )),
   72         -
    }
   73         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_database_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Database>>, ::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_database::de_database(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_delete_database.rs

@@ -1,0 +132,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_database_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::delete_database::DeleteDatabaseOutput, crate::operation::delete_database::DeleteDatabaseError> {
    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::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::delete_database::DeleteDatabaseError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::delete_database::DeleteDatabaseError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                crate::serde_util::throttling_exception_correct_errors(output)
   87         -
                    .build()
   88         -
                    .map_err(crate::operation::delete_database::DeleteDatabaseError::unhandled)?
   89         -
            };
   90         -
            tmp
   91         -
        }),
   92         -
        "ValidationException" => crate::operation::delete_database::DeleteDatabaseError::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::delete_database::DeleteDatabaseError::unhandled)?;
   99         -
                let output = output.meta(generic);
  100         -
                crate::serde_util::validation_exception_correct_errors(output)
  101         -
                    .build()
  102         -
                    .map_err(crate::operation::delete_database::DeleteDatabaseError::unhandled)?
  103         -
            };
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::delete_database::DeleteDatabaseError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_delete_database_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::delete_database::DeleteDatabaseOutput, crate::operation::delete_database::DeleteDatabaseError> {
  116         -
    Ok({
  117         -
        #[allow(unused_mut)]
  118         -
        let mut output = crate::operation::delete_database::builders::DeleteDatabaseOutputBuilder::default();
  119         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  120         -
        output.build()
  121         -
    })
  122         -
}
  123         -
  124         -
pub fn ser_delete_database_input(
  125         -
    input: &crate::operation::delete_database::DeleteDatabaseInput,
  126         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  127         -
    let mut out = String::new();
  128         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  129         -
    crate::protocol_serde::shape_delete_database_input::ser_delete_database_input_input(&mut object, input)?;
  130         -
    object.finish();
  131         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  132         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_delete_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_delete_database_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_database::DeleteDatabaseInput,
    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_delete_table.rs

@@ -1,0 +132,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_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::delete_table::DeleteTableOutput, crate::operation::delete_table::DeleteTableError> {
    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::delete_table::DeleteTableError::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::delete_table::DeleteTableError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::delete_table::DeleteTableError::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::delete_table::DeleteTableError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::delete_table::DeleteTableError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::delete_table::DeleteTableError::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::delete_table::DeleteTableError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::delete_table::DeleteTableError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::delete_table::DeleteTableError::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::delete_table::DeleteTableError::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::delete_table::DeleteTableError::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::delete_table::DeleteTableError::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::delete_table::DeleteTableError::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::delete_table::DeleteTableError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                crate::serde_util::throttling_exception_correct_errors(output)
   87         -
                    .build()
   88         -
                    .map_err(crate::operation::delete_table::DeleteTableError::unhandled)?
   89         -
            };
   90         -
            tmp
   91         -
        }),
   92         -
        "ValidationException" => crate::operation::delete_table::DeleteTableError::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::delete_table::DeleteTableError::unhandled)?;
   99         -
                let output = output.meta(generic);
  100         -
                crate::serde_util::validation_exception_correct_errors(output)
  101         -
                    .build()
  102         -
                    .map_err(crate::operation::delete_table::DeleteTableError::unhandled)?
  103         -
            };
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::delete_table::DeleteTableError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_delete_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::delete_table::DeleteTableOutput, crate::operation::delete_table::DeleteTableError> {
  116         -
    Ok({
  117         -
        #[allow(unused_mut)]
  118         -
        let mut output = crate::operation::delete_table::builders::DeleteTableOutputBuilder::default();
  119         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  120         -
        output.build()
  121         -
    })
  122         -
}
  123         -
  124         -
pub fn ser_delete_table_input(
  125         -
    input: &crate::operation::delete_table::DeleteTableInput,
  126         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  127         -
    let mut out = String::new();
  128         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  129         -
    crate::protocol_serde::shape_delete_table_input::ser_delete_table_input_input(&mut object, input)?;
  130         -
    object.finish();
  131         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  132         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_delete_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_delete_table_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_table::DeleteTableInput,
    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_describe_batch_load_task.rs

@@ -1,0 +162,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_batch_load_task_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_batch_load_task::DescribeBatchLoadTaskOutput,
    9         -
    crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError,
   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_batch_load_task::DescribeBatchLoadTaskError::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_batch_load_task::DescribeBatchLoadTaskError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::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::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "InternalServerException" => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::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::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "InvalidEndpointException" => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::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::describe_batch_load_task::DescribeBatchLoadTaskError::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         -
        "ResourceNotFoundException" => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::ResourceNotFoundException({
   67         -
            #[allow(unused_mut)]
   68         -
            let mut tmp = {
   69         -
                #[allow(unused_mut)]
   70         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   71         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   72         -
                    .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                output.build()
   75         -
            };
   76         -
            if tmp.message.is_none() {
   77         -
                tmp.message = _error_message;
   78         -
            }
   79         -
            tmp
   80         -
        }),
   81         -
        "ThrottlingException" => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::ThrottlingException({
   82         -
            #[allow(unused_mut)]
   83         -
            let mut tmp = {
   84         -
                #[allow(unused_mut)]
   85         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   86         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   87         -
                    .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?;
   88         -
                let output = output.meta(generic);
   89         -
                crate::serde_util::throttling_exception_correct_errors(output)
   90         -
                    .build()
   91         -
                    .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?
   92         -
            };
   93         -
            tmp
   94         -
        }),
   95         -
        _ => crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::generic(generic),
   96         -
    })
   97         -
}
   98         -
   99         -
#[allow(clippy::unnecessary_wraps)]
  100         -
pub fn de_describe_batch_load_task_http_response(
  101         -
    _response_status: u16,
  102         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  103         -
    _response_body: &[u8],
  104         -
) -> std::result::Result<
  105         -
    crate::operation::describe_batch_load_task::DescribeBatchLoadTaskOutput,
  106         -
    crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError,
  107         -
> {
  108         -
    Ok({
  109         -
        #[allow(unused_mut)]
  110         -
        let mut output = crate::operation::describe_batch_load_task::builders::DescribeBatchLoadTaskOutputBuilder::default();
  111         -
        output = crate::protocol_serde::shape_describe_batch_load_task::de_describe_batch_load_task(_response_body, output)
  112         -
            .map_err(crate::operation::describe_batch_load_task::DescribeBatchLoadTaskError::unhandled)?;
  113         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  114         -
        crate::serde_util::describe_batch_load_task_output_output_correct_errors(output).build()
  115         -
    })
  116         -
}
  117         -
  118         -
pub fn ser_describe_batch_load_task_input(
  119         -
    input: &crate::operation::describe_batch_load_task::DescribeBatchLoadTaskInput,
  120         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  121         -
    let mut out = String::new();
  122         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  123         -
    crate::protocol_serde::shape_describe_batch_load_task_input::ser_describe_batch_load_task_input_input(&mut object, input)?;
  124         -
    object.finish();
  125         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  126         -
}
  127         -
  128         -
pub(crate) fn de_describe_batch_load_task(
  129         -
    _value: &[u8],
  130         -
    mut builder: crate::operation::describe_batch_load_task::builders::DescribeBatchLoadTaskOutputBuilder,
  131         -
) -> ::std::result::Result<
  132         -
    crate::operation::describe_batch_load_task::builders::DescribeBatchLoadTaskOutputBuilder,
  133         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  134         -
> {
  135         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  136         -
    let tokens = &mut tokens_owned;
  137         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  138         -
    loop {
  139         -
        match tokens.next().transpose()? {
  140         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  141         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  142         -
                "BatchLoadTaskDescription" => {
  143         -
                    builder = builder.set_batch_load_task_description(
  144         -
                        crate::protocol_serde::shape_batch_load_task_description::de_batch_load_task_description(tokens, _value)?,
  145         -
                    );
  146         -
                }
  147         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  148         -
            },
  149         -
            other => {
  150         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  151         -
                    "expected object key or end object, found: {other:?}"
  152         -
                )))
  153         -
            }
  154         -
        }
  155         -
    }
  156         -
    if tokens.next().is_some() {
  157         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  158         -
            "found more JSON tokens after completing parsing",
  159         -
        ));
  160         -
    }
  161         -
    Ok(builder)
  162         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_batch_load_task_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_batch_load_task_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_batch_load_task::DescribeBatchLoadTaskInput,
    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         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_describe_database.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_database_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_database::DescribeDatabaseOutput, crate::operation::describe_database::DescribeDatabaseError> {
    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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "InternalServerException" => crate::operation::describe_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "InvalidEndpointException" => crate::operation::describe_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::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_database::DescribeDatabaseError::unhandled)?;
   85         -
                let output = output.meta(generic);
   86         -
                crate::serde_util::throttling_exception_correct_errors(output)
   87         -
                    .build()
   88         -
                    .map_err(crate::operation::describe_database::DescribeDatabaseError::unhandled)?
   89         -
            };
   90         -
            tmp
   91         -
        }),
   92         -
        "ValidationException" => crate::operation::describe_database::DescribeDatabaseError::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_database::DescribeDatabaseError::unhandled)?;
   99         -
                let output = output.meta(generic);
  100         -
                crate::serde_util::validation_exception_correct_errors(output)
  101         -
                    .build()
  102         -
                    .map_err(crate::operation::describe_database::DescribeDatabaseError::unhandled)?
  103         -
            };
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::describe_database::DescribeDatabaseError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_describe_database_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_database::DescribeDatabaseOutput, crate::operation::describe_database::DescribeDatabaseError> {
  116         -
    Ok({
  117         -
        #[allow(unused_mut)]
  118         -
        let mut output = crate::operation::describe_database::builders::DescribeDatabaseOutputBuilder::default();
  119         -
        output = crate::protocol_serde::shape_describe_database::de_describe_database(_response_body, output)
  120         -
            .map_err(crate::operation::describe_database::DescribeDatabaseError::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_database_input(
  127         -
    input: &crate::operation::describe_database::DescribeDatabaseInput,
  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_database_input::ser_describe_database_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_database(
  137         -
    _value: &[u8],
  138         -
    mut builder: crate::operation::describe_database::builders::DescribeDatabaseOutputBuilder,
  139         -
) -> ::std::result::Result<
  140         -
    crate::operation::describe_database::builders::DescribeDatabaseOutputBuilder,
  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         -
                "Database" => {
  151         -
                    builder = builder.set_database(crate::protocol_serde::shape_database::de_database(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         -
}