Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_backups_input.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_backups_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_backups::ListBackupsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.table_name {
    7         -
        object.key("TableName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.limit {
   10         -
        object.key("Limit").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.time_range_lower_bound {
   16         -
        object
   17         -
            .key("TimeRangeLowerBound")
   18         -
            .date_time(var_3, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
   19         -
    }
   20         -
    if let Some(var_4) = &input.time_range_upper_bound {
   21         -
        object
   22         -
            .key("TimeRangeUpperBound")
   23         -
            .date_time(var_4, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
   24         -
    }
   25         -
    if let Some(var_5) = &input.exclusive_start_backup_arn {
   26         -
        object.key("ExclusiveStartBackupArn").string(var_5.as_str());
   27         -
    }
   28         -
    if let Some(var_6) = &input.backup_type {
   29         -
        object.key("BackupType").string(var_6.as_str());
   30         -
    }
   31         -
    Ok(())
   32         -
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_contributor_insights.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_contributor_insights_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_exports.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_exports_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_global_tables.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_global_tables_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_tables.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_tables_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_tags_of_resource.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_list_tags_of_resource_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::list_tags_of_resource::ListTagsOfResourceOutput,
    9         -
    crate::operation::list_tags_of_resource::ListTagsOfResourceError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    let error_code = match generic.code() {
   16         -
        Some(code) => code,
   17         -
        None => return Err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled(generic)),
   18         -
    };
   19         -
   20         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   21         -
    Err(match error_code {
   22         -
        "InternalServerError" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::InternalServerError({
   23         -
            #[allow(unused_mut)]
   24         -
            let mut tmp = {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   27         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   28         -
                    .map_err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                output.build()
   31         -
            };
   32         -
            if tmp.message.is_none() {
   33         -
                tmp.message = _error_message;
   34         -
            }
   35         -
            tmp
   36         -
        }),
   37         -
        "InvalidEndpointException" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::InvalidEndpointError({
   38         -
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::InvalidEndpointErrorBuilder::default();
   42         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   43         -
                    .map_err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                output.build()
   46         -
            };
   47         -
            if tmp.message.is_none() {
   48         -
                tmp.message = _error_message;
   49         -
            }
   50         -
            tmp
   51         -
        }),
   52         -
        "ResourceNotFoundException" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::ResourceNotFoundError({
   53         -
            #[allow(unused_mut)]
   54         -
            let mut tmp = {
   55         -
                #[allow(unused_mut)]
   56         -
                let mut output = crate::types::error::builders::ResourceNotFoundErrorBuilder::default();
   57         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   58         -
                    .map_err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled)?;
   59         -
                let output = output.meta(generic);
   60         -
                output.build()
   61         -
            };
   62         -
            if tmp.message.is_none() {
   63         -
                tmp.message = _error_message;
   64         -
            }
   65         -
            tmp
   66         -
        }),
   67         -
        _ => crate::operation::list_tags_of_resource::ListTagsOfResourceError::generic(generic),
   68         -
    })
   69         -
}
   70         -
   71         -
#[allow(clippy::unnecessary_wraps)]
   72         -
pub fn de_list_tags_of_resource_http_response(
   73         -
    _response_status: u16,
   74         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   75         -
    _response_body: &[u8],
   76         -
) -> std::result::Result<
   77         -
    crate::operation::list_tags_of_resource::ListTagsOfResourceOutput,
   78         -
    crate::operation::list_tags_of_resource::ListTagsOfResourceError,
   79         -
> {
   80         -
    Ok({
   81         -
        #[allow(unused_mut)]
   82         -
        let mut output = crate::operation::list_tags_of_resource::builders::ListTagsOfResourceOutputBuilder::default();
   83         -
        output = crate::protocol_serde::shape_list_tags_of_resource::de_list_tags_of_resource(_response_body, output)
   84         -
            .map_err(crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled)?;
   85         -
        output.build()
   86         -
    })
   87         -
}
   88         -
   89         -
pub fn ser_list_tags_of_resource_input(
   90         -
    input: &crate::operation::list_tags_of_resource::ListTagsOfResourceInput,
   91         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   92         -
    let mut out = String::new();
   93         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   94         -
    crate::protocol_serde::shape_list_tags_of_resource_input::ser_list_tags_of_resource_input_input(&mut object, input)?;
   95         -
    object.finish();
   96         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   97         -
}
   98         -
   99         -
pub(crate) fn de_list_tags_of_resource(
  100         -
    _value: &[u8],
  101         -
    mut builder: crate::operation::list_tags_of_resource::builders::ListTagsOfResourceOutputBuilder,
  102         -
) -> ::std::result::Result<
  103         -
    crate::operation::list_tags_of_resource::builders::ListTagsOfResourceOutputBuilder,
  104         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  105         -
> {
  106         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  107         -
    let tokens = &mut tokens_owned;
  108         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  109         -
    loop {
  110         -
        match tokens.next().transpose()? {
  111         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  112         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  113         -
                "Tags" => {
  114         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tag_list::de_tag_list(tokens, _value)?);
  115         -
                }
  116         -
                "NextToken" => {
  117         -
                    builder = builder.set_next_token(
  118         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  119         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  120         -
                            .transpose()?,
  121         -
                    );
  122         -
                }
  123         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  124         -
            },
  125         -
            other => {
  126         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  127         -
                    "expected object key or end object, found: {other:?}"
  128         -
                )))
  129         -
            }
  130         -
        }
  131         -
    }
  132         -
    if tokens.next().is_some() {
  133         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  134         -
            "found more JSON tokens after completing parsing",
  135         -
        ));
  136         -
    }
  137         -
    Ok(builder)
  138         -
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_list_tags_of_resource_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_local_secondary_index.rs

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_local_secondary_index(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::LocalSecondaryIndex,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("IndexName").string(input.index_name.as_str());
    8         -
    }
    9         -
    {
   10         -
        let mut array_1 = object.key("KeySchema").start_array();
   11         -
        for item_2 in &input.key_schema {
   12         -
            {
   13         -
                #[allow(unused_mut)]
   14         -
                let mut object_3 = array_1.value().start_object();
   15         -
                crate::protocol_serde::shape_key_schema_element::ser_key_schema_element(&mut object_3, item_2)?;
   16         -
                object_3.finish();
   17         -
            }
   18         -
        }
   19         -
        array_1.finish();
   20         -
    }
   21         -
    {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_4 = object.key("Projection").start_object();
   24         -
        crate::protocol_serde::shape_projection::ser_projection(&mut object_4, &input.projection)?;
   25         -
        object_4.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_local_secondary_index_description.rs

@@ -1,0 +67,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_local_secondary_index_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LocalSecondaryIndexDescription>, ::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::LocalSecondaryIndexDescriptionBuilder::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         -
                        "IndexName" => {
   19         -
                            builder = builder.set_index_name(
   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         -
                        "KeySchema" => {
   26         -
                            builder = builder.set_key_schema(crate::protocol_serde::shape_key_schema::de_key_schema(tokens, _value)?);
   27         -
                        }
   28         -
                        "Projection" => {
   29         -
                            builder = builder.set_projection(crate::protocol_serde::shape_projection::de_projection(tokens, _value)?);
   30         -
                        }
   31         -
                        "IndexSizeBytes" => {
   32         -
                            builder = builder.set_index_size_bytes(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34         -
                                    .map(i64::try_from)
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "ItemCount" => {
   39         -
                            builder = builder.set_item_count(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   41         -
                                    .map(i64::try_from)
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        "IndexArn" => {
   46         -
                            builder = builder.set_index_arn(
   47         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   48         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   49         -
                                    .transpose()?,
   50         -
                            );
   51         -
                        }
   52         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   53         -
                    },
   54         -
                    other => {
   55         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   56         -
                            "expected object key or end object, found: {other:?}"
   57         -
                        )))
   58         -
                    }
   59         -
                }
   60         -
            }
   61         -
            Ok(Some(builder.build()))
   62         -
        }
   63         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   64         -
            "expected start object or null",
   65         -
        )),
   66         -
    }
   67         -
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_local_secondary_index_description_list.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_local_secondary_index_info.rs

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_local_secondary_index_info<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LocalSecondaryIndexInfo>, ::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::LocalSecondaryIndexInfoBuilder::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         -
                        "IndexName" => {
   19         -
                            builder = builder.set_index_name(
   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         -
                        "KeySchema" => {
   26         -
                            builder = builder.set_key_schema(crate::protocol_serde::shape_key_schema::de_key_schema(tokens, _value)?);
   27         -
                        }
   28         -
                        "Projection" => {
   29         -
                            builder = builder.set_projection(crate::protocol_serde::shape_projection::de_projection(tokens, _value)?);
   30         -
                        }
   31         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   32         -
                    },
   33         -
                    other => {
   34         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   35         -
                            "expected object key or end object, found: {other:?}"
   36         -
                        )))
   37         -
                    }
   38         -
                }
   39         -
            }
   40         -
            Ok(Some(builder.build()))
   41         -
        }
   42         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43         -
            "expected start object or null",
   44         -
        )),
   45         -
    }
   46         -
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_local_secondary_indexes.rs

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