AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_rejected_records_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::RejectedRecordsExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::RejectedRecordsExceptionBuilder, ::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         -
                "RejectedRecords" => {
   21         -
                    builder = builder.set_rejected_records(crate::protocol_serde::shape_rejected_records::de_rejected_records(tokens, _value)?);
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +51,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_report_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ReportConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.report_s3_configuration {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("ReportS3Configuration").start_object();
    9         -
        crate::protocol_serde::shape_report_s3_configuration::ser_report_s3_configuration(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_report_configuration<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::ReportConfiguration>, ::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::ReportConfigurationBuilder::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         -
                        "ReportS3Configuration" => {
   32         -
                            builder = builder.set_report_s3_configuration(
   33         -
                                crate::protocol_serde::shape_report_s3_configuration::de_report_s3_configuration(tokens, _value)?,
   34         -
                            );
   35         -
                        }
   36         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   37         -
                    },
   38         -
                    other => {
   39         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   40         -
                            "expected object key or end object, found: {other:?}"
   41         -
                        )))
   42         -
                    }
   43         -
                }
   44         -
            }
   45         -
            Ok(Some(builder.build()))
   46         -
        }
   47         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
            "expected start object or null",
   49         -
        )),
   50         -
    }
   51         -
}

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

@@ -1,0 +82,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_report_s3_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ReportS3Configuration,
    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         -
    if let Some(var_2) = &input.encryption_option {
   13         -
        object.key("EncryptionOption").string(var_2.as_str());
   14         -
    }
   15         -
    if let Some(var_3) = &input.kms_key_id {
   16         -
        object.key("KmsKeyId").string(var_3.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_report_s3_configuration<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::ReportS3Configuration>, ::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::ReportS3ConfigurationBuilder::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         -
                        "BucketName" => {
   38         -
                            builder = builder.set_bucket_name(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "ObjectKeyPrefix" => {
   45         -
                            builder = builder.set_object_key_prefix(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   47         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        "EncryptionOption" => {
   52         -
                            builder = builder.set_encryption_option(
   53         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   54         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::S3EncryptionOption::from(u.as_ref())))
   55         -
                                    .transpose()?,
   56         -
                            );
   57         -
                        }
   58         -
                        "KmsKeyId" => {
   59         -
                            builder = builder.set_kms_key_id(
   60         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   61         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   62         -
                                    .transpose()?,
   63         -
                            );
   64         -
                        }
   65         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   66         -
                    },
   67         -
                    other => {
   68         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   69         -
                            "expected object key or end object, found: {other:?}"
   70         -
                        )))
   71         -
                    }
   72         -
                }
   73         -
            }
   74         -
            Ok(Some(crate::serde_util::report_s3_configuration_correct_errors(builder).build().map_err(
   75         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   76         -
            )?))
   77         -
        }
   78         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   79         -
            "expected start object or null",
   80         -
        )),
   81         -
    }
   82         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_resource_not_found_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_resource_not_found_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ResourceNotFoundExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ResourceNotFoundExceptionBuilder, ::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_resume_batch_load_task.rs

@@ -1,0 +138,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_resume_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::resume_batch_load_task::ResumeBatchLoadTaskOutput,
    9         -
    crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError,
   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::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "InternalServerException" => crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "InvalidEndpointException" => crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::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::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?;
   88         -
                let output = output.meta(generic);
   89         -
                crate::serde_util::throttling_exception_correct_errors(output)
   90         -
                    .build()
   91         -
                    .map_err(crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?
   92         -
            };
   93         -
            tmp
   94         -
        }),
   95         -
        "ValidationException" => crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::ValidationException({
   96         -
            #[allow(unused_mut)]
   97         -
            let mut tmp = {
   98         -
                #[allow(unused_mut)]
   99         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  100         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  101         -
                    .map_err(crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?;
  102         -
                let output = output.meta(generic);
  103         -
                crate::serde_util::validation_exception_correct_errors(output)
  104         -
                    .build()
  105         -
                    .map_err(crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::unhandled)?
  106         -
            };
  107         -
            tmp
  108         -
        }),
  109         -
        _ => crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError::generic(generic),
  110         -
    })
  111         -
}
  112         -
  113         -
#[allow(clippy::unnecessary_wraps)]
  114         -
pub fn de_resume_batch_load_task_http_response(
  115         -
    _response_status: u16,
  116         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  117         -
    _response_body: &[u8],
  118         -
) -> std::result::Result<
  119         -
    crate::operation::resume_batch_load_task::ResumeBatchLoadTaskOutput,
  120         -
    crate::operation::resume_batch_load_task::ResumeBatchLoadTaskError,
  121         -
> {
  122         -
    Ok({
  123         -
        #[allow(unused_mut)]
  124         -
        let mut output = crate::operation::resume_batch_load_task::builders::ResumeBatchLoadTaskOutputBuilder::default();
  125         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  126         -
        output.build()
  127         -
    })
  128         -
}
  129         -
  130         -
pub fn ser_resume_batch_load_task_input(
  131         -
    input: &crate::operation::resume_batch_load_task::ResumeBatchLoadTaskInput,
  132         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  133         -
    let mut out = String::new();
  134         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  135         -
    crate::protocol_serde::shape_resume_batch_load_task_input::ser_resume_batch_load_task_input_input(&mut object, input)?;
  136         -
    object.finish();
  137         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  138         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_resume_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_resume_batch_load_task_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::resume_batch_load_task::ResumeBatchLoadTaskInput,
    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_retention_properties.rs

@@ -1,0 +68,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_retention_properties(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::RetentionProperties,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("MemoryStoreRetentionPeriodInHours").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((input.memory_store_retention_period_in_hours).into()),
   10         -
        );
   11         -
    }
   12         -
    {
   13         -
        object.key("MagneticStoreRetentionPeriodInDays").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((input.magnetic_store_retention_period_in_days).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_retention_properties<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::RetentionProperties>, ::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::RetentionPropertiesBuilder::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         -
                        "MemoryStoreRetentionPeriodInHours" => {
   38         -
                            builder = builder.set_memory_store_retention_period_in_hours(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   40         -
                                    .map(i64::try_from)
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "MagneticStoreRetentionPeriodInDays" => {
   45         -
                            builder = builder.set_magnetic_store_retention_period_in_days(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   47         -
                                    .map(i64::try_from)
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(crate::serde_util::retention_properties_correct_errors(builder).build().map_err(
   61         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   62         -
            )?))
   63         -
        }
   64         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   65         -
            "expected start object or null",
   66         -
        )),
   67         -
    }
   68         -
}

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

@@ -1,0 +80,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_s3_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::S3Configuration,
    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_prefix {
   10         -
        object.key("ObjectKeyPrefix").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.encryption_option {
   13         -
        object.key("EncryptionOption").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.kms_key_id {
   16         -
        object.key("KmsKeyId").string(var_4.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_s3_configuration<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::S3Configuration>, ::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::S3ConfigurationBuilder::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         -
                        "BucketName" => {
   38         -
                            builder = builder.set_bucket_name(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "ObjectKeyPrefix" => {
   45         -
                            builder = builder.set_object_key_prefix(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   47         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        "EncryptionOption" => {
   52         -
                            builder = builder.set_encryption_option(
   53         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   54         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::S3EncryptionOption::from(u.as_ref())))
   55         -
                                    .transpose()?,
   56         -
                            );
   57         -
                        }
   58         -
                        "KmsKeyId" => {
   59         -
                            builder = builder.set_kms_key_id(
   60         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   61         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   62         -
                                    .transpose()?,
   63         -
                            );
   64         -
                        }
   65         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   66         -
                    },
   67         -
                    other => {
   68         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   69         -
                            "expected object key or end object, found: {other:?}"
   70         -
                        )))
   71         -
                    }
   72         -
                }
   73         -
            }
   74         -
            Ok(Some(builder.build()))
   75         -
        }
   76         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77         -
            "expected start object or null",
   78         -
        )),
   79         -
    }
   80         -
}

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

@@ -1,0 +56,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_schema(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Schema,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.composite_partition_key {
    7         -
        let mut array_2 = object.key("CompositePartitionKey").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                #[allow(unused_mut)]
   11         -
                let mut object_4 = array_2.value().start_object();
   12         -
                crate::protocol_serde::shape_partition_key::ser_partition_key(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_schema<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::Schema>, ::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::SchemaBuilder::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         -
                        "CompositePartitionKey" => {
   38         -
                            builder = builder
   39         -
                                .set_composite_partition_key(crate::protocol_serde::shape_partition_key_list::de_partition_key_list(tokens, _value)?);
   40         -
                        }
   41         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   42         -
                    },
   43         -
                    other => {
   44         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   45         -
                            "expected object key or end object, found: {other:?}"
   46         -
                        )))
   47         -
                    }
   48         -
                }
   49         -
            }
   50         -
            Ok(Some(builder.build()))
   51         -
        }
   52         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   53         -
            "expected start object or null",
   54         -
        )),
   55         -
    }
   56         -
}

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

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

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

@@ -1,0 +86,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_table<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Table>, ::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::TableBuilder::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         -
                        "TableName" => {
   26         -
                            builder = builder.set_table_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         -
                        "DatabaseName" => {
   33         -
                            builder = builder.set_database_name(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "TableStatus" => {
   40         -
                            builder = builder.set_table_status(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::TableStatus::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "RetentionProperties" => {
   47         -
                            builder = builder.set_retention_properties(crate::protocol_serde::shape_retention_properties::de_retention_properties(
   48         -
                                tokens, _value,
   49         -
                            )?);
   50         -
                        }
   51         -
                        "CreationTime" => {
   52         -
                            builder = builder.set_creation_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   53         -
                                tokens.next(),
   54         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   55         -
                            )?);
   56         -
                        }
   57         -
                        "LastUpdatedTime" => {
   58         -
                            builder = builder.set_last_updated_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   59         -
                                tokens.next(),
   60         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   61         -
                            )?);
   62         -
                        }
   63         -
                        "MagneticStoreWriteProperties" => {
   64         -
                            builder = builder.set_magnetic_store_write_properties(
   65         -
                                crate::protocol_serde::shape_magnetic_store_write_properties::de_magnetic_store_write_properties(tokens, _value)?,
   66         -
                            );
   67         -
                        }
   68         -
                        "Schema" => {
   69         -
                            builder = builder.set_schema(crate::protocol_serde::shape_schema::de_schema(tokens, _value)?);
   70         -
                        }
   71         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   72         -
                    },
   73         -
                    other => {
   74         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   75         -
                            "expected object key or end object, found: {other:?}"
   76         -
                        )))
   77         -
                    }
   78         -
                }
   79         -
            }
   80         -
            Ok(Some(builder.build()))
   81         -
        }
   82         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   83         -
            "expected start object or null",
   84         -
        )),
   85         -
    }
   86         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_table_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_table_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Table>>, ::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_table::de_table(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_tag.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_tag_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_tag_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Tag>>, ::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_tag::de_tag(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_tag_resource.rs

@@ -1,0 +122,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_tag_resource_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::tag_resource::TagResourceOutput, crate::operation::tag_resource::TagResourceError> {
    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::tag_resource::TagResourceError::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::tag_resource::TagResourceError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidEndpointException" => crate::operation::tag_resource::TagResourceError::InvalidEndpointException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "ResourceNotFoundException" => crate::operation::tag_resource::TagResourceError::ResourceNotFoundException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        "ServiceQuotaExceededException" => crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   56         -
                    _response_body,
   57         -
                    output,
   58         -
                )
   59         -
                .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "ThrottlingException" => crate::operation::tag_resource::TagResourceError::ThrottlingException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                crate::serde_util::throttling_exception_correct_errors(output)
   77         -
                    .build()
   78         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?
   79         -
            };
   80         -
            tmp
   81         -
        }),
   82         -
        "ValidationException" => crate::operation::tag_resource::TagResourceError::ValidationException({
   83         -
            #[allow(unused_mut)]
   84         -
            let mut tmp = {
   85         -
                #[allow(unused_mut)]
   86         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   87         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   88         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   89         -
                let output = output.meta(generic);
   90         -
                crate::serde_util::validation_exception_correct_errors(output)
   91         -
                    .build()
   92         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?
   93         -
            };
   94         -
            tmp
   95         -
        }),
   96         -
        _ => crate::operation::tag_resource::TagResourceError::generic(generic),
   97         -
    })
   98         -
}
   99         -
  100         -
#[allow(clippy::unnecessary_wraps)]
  101         -
pub fn de_tag_resource_http_response(
  102         -
    _response_status: u16,
  103         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  104         -
    _response_body: &[u8],
  105         -
) -> std::result::Result<crate::operation::tag_resource::TagResourceOutput, crate::operation::tag_resource::TagResourceError> {
  106         -
    Ok({
  107         -
        #[allow(unused_mut)]
  108         -
        let mut output = crate::operation::tag_resource::builders::TagResourceOutputBuilder::default();
  109         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  110         -
        output.build()
  111         -
    })
  112         -
}
  113         -
  114         -
pub fn ser_tag_resource_input(
  115         -
    input: &crate::operation::tag_resource::TagResourceInput,
  116         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  117         -
    let mut out = String::new();
  118         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  119         -
    crate::protocol_serde::shape_tag_resource_input::ser_tag_resource_input_input(&mut object, input)?;
  120         -
    object.finish();
  121         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  122         -
}