AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_continuous_backups_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_continuous_backups_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput,
    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         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_contributor_insights.rs

@@ -1,0 +160,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_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::describe_contributor_insights::DescribeContributorInsightsOutput,
    9         -
    crate::operation::describe_contributor_insights::DescribeContributorInsightsError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::describe_contributor_insights::DescribeContributorInsightsError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_contributor_insights::DescribeContributorInsightsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InternalServerError" => crate::operation::describe_contributor_insights::DescribeContributorInsightsError::InternalServerError({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   28         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::describe_contributor_insights::DescribeContributorInsightsError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ResourceNotFoundException" => {
   39         -
            crate::operation::describe_contributor_insights::DescribeContributorInsightsError::ResourceNotFoundException({
   40         -
                #[allow(unused_mut)]
   41         -
                let mut tmp = {
   42         -
                    #[allow(unused_mut)]
   43         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   44         -
                    output =
   45         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   46         -
                            .map_err(crate::operation::describe_contributor_insights::DescribeContributorInsightsError::unhandled)?;
   47         -
                    let output = output.meta(generic);
   48         -
                    output.build()
   49         -
                };
   50         -
                if tmp.message.is_none() {
   51         -
                    tmp.message = _error_message;
   52         -
                }
   53         -
                tmp
   54         -
            })
   55         -
        }
   56         -
        _ => crate::operation::describe_contributor_insights::DescribeContributorInsightsError::generic(generic),
   57         -
    })
   58         -
}
   59         -
   60         -
#[allow(clippy::unnecessary_wraps)]
   61         -
pub fn de_describe_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::describe_contributor_insights::DescribeContributorInsightsOutput,
   67         -
    crate::operation::describe_contributor_insights::DescribeContributorInsightsError,
   68         -
> {
   69         -
    Ok({
   70         -
        #[allow(unused_mut)]
   71         -
        let mut output = crate::operation::describe_contributor_insights::builders::DescribeContributorInsightsOutputBuilder::default();
   72         -
        output = crate::protocol_serde::shape_describe_contributor_insights::de_describe_contributor_insights(_response_body, output)
   73         -
            .map_err(crate::operation::describe_contributor_insights::DescribeContributorInsightsError::unhandled)?;
   74         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   75         -
        output.build()
   76         -
    })
   77         -
}
   78         -
   79         -
pub fn ser_describe_contributor_insights_input(
   80         -
    input: &crate::operation::describe_contributor_insights::DescribeContributorInsightsInput,
   81         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   82         -
    let mut out = String::new();
   83         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   84         -
    crate::protocol_serde::shape_describe_contributor_insights_input::ser_describe_contributor_insights_input_input(&mut object, input)?;
   85         -
    object.finish();
   86         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   87         -
}
   88         -
   89         -
pub(crate) fn de_describe_contributor_insights(
   90         -
    _value: &[u8],
   91         -
    mut builder: crate::operation::describe_contributor_insights::builders::DescribeContributorInsightsOutputBuilder,
   92         -
) -> ::std::result::Result<
   93         -
    crate::operation::describe_contributor_insights::builders::DescribeContributorInsightsOutputBuilder,
   94         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   95         -
> {
   96         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   97         -
    let tokens = &mut tokens_owned;
   98         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   99         -
    loop {
  100         -
        match tokens.next().transpose()? {
  101         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  102         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  103         -
                "TableName" => {
  104         -
                    builder = builder.set_table_name(
  105         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  106         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  107         -
                            .transpose()?,
  108         -
                    );
  109         -
                }
  110         -
                "IndexName" => {
  111         -
                    builder = builder.set_index_name(
  112         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  113         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  114         -
                            .transpose()?,
  115         -
                    );
  116         -
                }
  117         -
                "ContributorInsightsRuleList" => {
  118         -
                    builder = builder.set_contributor_insights_rule_list(
  119         -
                        crate::protocol_serde::shape_contributor_insights_rule_list::de_contributor_insights_rule_list(tokens, _value)?,
  120         -
                    );
  121         -
                }
  122         -
                "ContributorInsightsStatus" => {
  123         -
                    builder = builder.set_contributor_insights_status(
  124         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  125         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::ContributorInsightsStatus::from(u.as_ref())))
  126         -
                            .transpose()?,
  127         -
                    );
  128         -
                }
  129         -
                "LastUpdateDateTime" => {
  130         -
                    builder = builder.set_last_update_date_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  131         -
                        tokens.next(),
  132         -
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
  133         -
                    )?);
  134         -
                }
  135         -
                "FailureException" => {
  136         -
                    builder = builder.set_failure_exception(crate::protocol_serde::shape_failure_exception::de_failure_exception(tokens, _value)?);
  137         -
                }
  138         -
                "ContributorInsightsMode" => {
  139         -
                    builder = builder.set_contributor_insights_mode(
  140         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  141         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::ContributorInsightsMode::from(u.as_ref())))
  142         -
                            .transpose()?,
  143         -
                    );
  144         -
                }
  145         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  146         -
            },
  147         -
            other => {
  148         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  149         -
                    "expected object key or end object, found: {other:?}"
  150         -
                )))
  151         -
            }
  152         -
        }
  153         -
    }
  154         -
    if tokens.next().is_some() {
  155         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  156         -
            "found more JSON tokens after completing parsing",
  157         -
        ));
  158         -
    }
  159         -
    Ok(builder)
  160         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_contributor_insights_input.rs

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_contributor_insights_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_contributor_insights::DescribeContributorInsightsInput,
    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.index_name {
   10         -
        object.key("IndexName").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

@@ -1,0 +74,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_endpoints_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsOutput, crate::operation::describe_endpoints::DescribeEndpointsError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    Err(crate::operation::describe_endpoints::DescribeEndpointsError::generic(generic))
   15         -
}
   16         -
   17         -
#[allow(clippy::unnecessary_wraps)]
   18         -
pub fn de_describe_endpoints_http_response(
   19         -
    _response_status: u16,
   20         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   21         -
    _response_body: &[u8],
   22         -
) -> std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsOutput, crate::operation::describe_endpoints::DescribeEndpointsError>
   23         -
{
   24         -
    Ok({
   25         -
        #[allow(unused_mut)]
   26         -
        let mut output = crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder::default();
   27         -
        output = crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints(_response_body, output)
   28         -
            .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?;
   29         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   30         -
        crate::serde_util::describe_endpoints_output_output_correct_errors(output)
   31         -
            .build()
   32         -
            .map_err(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled)?
   33         -
    })
   34         -
}
   35         -
   36         -
pub fn ser_describe_endpoints_input(
   37         -
    _input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
   38         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   39         -
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
   40         -
}
   41         -
   42         -
pub(crate) fn de_describe_endpoints(
   43         -
    _value: &[u8],
   44         -
    mut builder: crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder,
   45         -
) -> ::std::result::Result<
   46         -
    crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder,
   47         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   48         -
> {
   49         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   50         -
    let tokens = &mut tokens_owned;
   51         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   52         -
    loop {
   53         -
        match tokens.next().transpose()? {
   54         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   55         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   56         -
                "Endpoints" => {
   57         -
                    builder = builder.set_endpoints(crate::protocol_serde::shape_endpoints::de_endpoints(tokens, _value)?);
   58         -
                }
   59         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   60         -
            },
   61         -
            other => {
   62         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                    "expected object key or end object, found: {other:?}"
   64         -
                )))
   65         -
            }
   66         -
        }
   67         -
    }
   68         -
    if tokens.next().is_some() {
   69         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   70         -
            "found more JSON tokens after completing parsing",
   71         -
        ));
   72         -
    }
   73         -
    Ok(builder)
   74         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_export.rs

@@ -1,0 +127,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_export_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::describe_export::DescribeExportOutput, crate::operation::describe_export::DescribeExportError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::describe_export::DescribeExportError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::describe_export::DescribeExportError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "ExportNotFoundException" => crate::operation::describe_export::DescribeExportError::ExportNotFoundException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::ExportNotFoundExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_export_not_found_exception::de_export_not_found_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::describe_export::DescribeExportError::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         -
        "InternalServerError" => crate::operation::describe_export::DescribeExportError::InternalServerError({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   40         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::describe_export::DescribeExportError::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         -
        "LimitExceededException" => crate::operation::describe_export::DescribeExportError::LimitExceededException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::describe_export::DescribeExportError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        _ => crate::operation::describe_export::DescribeExportError::generic(generic),
   66         -
    })
   67         -
}
   68         -
   69         -
#[allow(clippy::unnecessary_wraps)]
   70         -
pub fn de_describe_export_http_response(
   71         -
    _response_status: u16,
   72         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   73         -
    _response_body: &[u8],
   74         -
) -> std::result::Result<crate::operation::describe_export::DescribeExportOutput, crate::operation::describe_export::DescribeExportError> {
   75         -
    Ok({
   76         -
        #[allow(unused_mut)]
   77         -
        let mut output = crate::operation::describe_export::builders::DescribeExportOutputBuilder::default();
   78         -
        output = crate::protocol_serde::shape_describe_export::de_describe_export(_response_body, output)
   79         -
            .map_err(crate::operation::describe_export::DescribeExportError::unhandled)?;
   80         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   81         -
        output.build()
   82         -
    })
   83         -
}
   84         -
   85         -
pub fn ser_describe_export_input(
   86         -
    input: &crate::operation::describe_export::DescribeExportInput,
   87         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   88         -
    let mut out = String::new();
   89         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   90         -
    crate::protocol_serde::shape_describe_export_input::ser_describe_export_input_input(&mut object, input)?;
   91         -
    object.finish();
   92         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   93         -
}
   94         -
   95         -
pub(crate) fn de_describe_export(
   96         -
    _value: &[u8],
   97         -
    mut builder: crate::operation::describe_export::builders::DescribeExportOutputBuilder,
   98         -
) -> ::std::result::Result<
   99         -
    crate::operation::describe_export::builders::DescribeExportOutputBuilder,
  100         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  101         -
> {
  102         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  103         -
    let tokens = &mut tokens_owned;
  104         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  105         -
    loop {
  106         -
        match tokens.next().transpose()? {
  107         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  108         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  109         -
                "ExportDescription" => {
  110         -
                    builder = builder.set_export_description(crate::protocol_serde::shape_export_description::de_export_description(tokens, _value)?);
  111         -
                }
  112         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  113         -
            },
  114         -
            other => {
  115         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  116         -
                    "expected object key or end object, found: {other:?}"
  117         -
                )))
  118         -
            }
  119         -
        }
  120         -
    }
  121         -
    if tokens.next().is_some() {
  122         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  123         -
            "found more JSON tokens after completing parsing",
  124         -
        ));
  125         -
    }
  126         -
    Ok(builder)
  127         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_export_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_global_table.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_describe_global_table_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::describe_global_table::DescribeGlobalTableOutput,
    9         -
    crate::operation::describe_global_table::DescribeGlobalTableError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::describe_global_table::DescribeGlobalTableError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_global_table::DescribeGlobalTableError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "GlobalTableNotFoundException" => crate::operation::describe_global_table::DescribeGlobalTableError::GlobalTableNotFoundException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::GlobalTableNotFoundExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_global_table_not_found_exception::de_global_table_not_found_exception_json_err(
   29         -
                    _response_body,
   30         -
                    output,
   31         -
                )
   32         -
                .map_err(crate::operation::describe_global_table::DescribeGlobalTableError::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         -
        "InternalServerError" => crate::operation::describe_global_table::DescribeGlobalTableError::InternalServerError({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   46         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   47         -
                    .map_err(crate::operation::describe_global_table::DescribeGlobalTableError::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         -
        "InvalidEndpointException" => crate::operation::describe_global_table::DescribeGlobalTableError::InvalidEndpointException({
   57         -
            #[allow(unused_mut)]
   58         -
            let mut tmp = {
   59         -
                #[allow(unused_mut)]
   60         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   61         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   62         -
                    .map_err(crate::operation::describe_global_table::DescribeGlobalTableError::unhandled)?;
   63         -
                let output = output.meta(generic);
   64         -
                output.build()
   65         -
            };
   66         -
            if tmp.message.is_none() {
   67         -
                tmp.message = _error_message;
   68         -
            }
   69         -
            tmp
   70         -
        }),
   71         -
        _ => crate::operation::describe_global_table::DescribeGlobalTableError::generic(generic),
   72         -
    })
   73         -
}
   74         -
   75         -
#[allow(clippy::unnecessary_wraps)]
   76         -
pub fn de_describe_global_table_http_response(
   77         -
    _response_status: u16,
   78         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   79         -
    _response_body: &[u8],
   80         -
) -> std::result::Result<
   81         -
    crate::operation::describe_global_table::DescribeGlobalTableOutput,
   82         -
    crate::operation::describe_global_table::DescribeGlobalTableError,
   83         -
> {
   84         -
    Ok({
   85         -
        #[allow(unused_mut)]
   86         -
        let mut output = crate::operation::describe_global_table::builders::DescribeGlobalTableOutputBuilder::default();
   87         -
        output = crate::protocol_serde::shape_describe_global_table::de_describe_global_table(_response_body, output)
   88         -
            .map_err(crate::operation::describe_global_table::DescribeGlobalTableError::unhandled)?;
   89         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   90         -
        output.build()
   91         -
    })
   92         -
}
   93         -
   94         -
pub fn ser_describe_global_table_input(
   95         -
    input: &crate::operation::describe_global_table::DescribeGlobalTableInput,
   96         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   97         -
    let mut out = String::new();
   98         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   99         -
    crate::protocol_serde::shape_describe_global_table_input::ser_describe_global_table_input_input(&mut object, input)?;
  100         -
    object.finish();
  101         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  102         -
}
  103         -
  104         -
pub(crate) fn de_describe_global_table(
  105         -
    _value: &[u8],
  106         -
    mut builder: crate::operation::describe_global_table::builders::DescribeGlobalTableOutputBuilder,
  107         -
) -> ::std::result::Result<
  108         -
    crate::operation::describe_global_table::builders::DescribeGlobalTableOutputBuilder,
  109         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  110         -
> {
  111         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  112         -
    let tokens = &mut tokens_owned;
  113         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  114         -
    loop {
  115         -
        match tokens.next().transpose()? {
  116         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  117         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  118         -
                "GlobalTableDescription" => {
  119         -
                    builder = builder.set_global_table_description(
  120         -
                        crate::protocol_serde::shape_global_table_description::de_global_table_description(tokens, _value)?,
  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/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_global_table_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_global_table_settings.rs

@@ -1,0 +147,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_global_table_settings_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput,
    9         -
    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "GlobalTableNotFoundException" => {
   24         -
            crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::GlobalTableNotFoundException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::GlobalTableNotFoundExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_global_table_not_found_exception::de_global_table_not_found_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled)?;
   34         -
                    let output = output.meta(generic);
   35         -
                    output.build()
   36         -
                };
   37         -
                if tmp.message.is_none() {
   38         -
                    tmp.message = _error_message;
   39         -
                }
   40         -
                tmp
   41         -
            })
   42         -
        }
   43         -
        "InternalServerError" => crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InternalServerError({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp = {
   46         -
                #[allow(unused_mut)]
   47         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   48         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   49         -
                    .map_err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled)?;
   50         -
                let output = output.meta(generic);
   51         -
                output.build()
   52         -
            };
   53         -
            if tmp.message.is_none() {
   54         -
                tmp.message = _error_message;
   55         -
            }
   56         -
            tmp
   57         -
        }),
   58         -
        "InvalidEndpointException" => crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InvalidEndpointException({
   59         -
            #[allow(unused_mut)]
   60         -
            let mut tmp = {
   61         -
                #[allow(unused_mut)]
   62         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   63         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   64         -
                    .map_err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled)?;
   65         -
                let output = output.meta(generic);
   66         -
                output.build()
   67         -
            };
   68         -
            if tmp.message.is_none() {
   69         -
                tmp.message = _error_message;
   70         -
            }
   71         -
            tmp
   72         -
        }),
   73         -
        _ => crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::generic(generic),
   74         -
    })
   75         -
}
   76         -
   77         -
#[allow(clippy::unnecessary_wraps)]
   78         -
pub fn de_describe_global_table_settings_http_response(
   79         -
    _response_status: u16,
   80         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   81         -
    _response_body: &[u8],
   82         -
) -> std::result::Result<
   83         -
    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput,
   84         -
    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError,
   85         -
> {
   86         -
    Ok({
   87         -
        #[allow(unused_mut)]
   88         -
        let mut output = crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder::default();
   89         -
        output = crate::protocol_serde::shape_describe_global_table_settings::de_describe_global_table_settings(_response_body, output)
   90         -
            .map_err(crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled)?;
   91         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   92         -
        output.build()
   93         -
    })
   94         -
}
   95         -
   96         -
pub fn ser_describe_global_table_settings_input(
   97         -
    input: &crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput,
   98         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   99         -
    let mut out = String::new();
  100         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  101         -
    crate::protocol_serde::shape_describe_global_table_settings_input::ser_describe_global_table_settings_input_input(&mut object, input)?;
  102         -
    object.finish();
  103         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  104         -
}
  105         -
  106         -
pub(crate) fn de_describe_global_table_settings(
  107         -
    _value: &[u8],
  108         -
    mut builder: crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder,
  109         -
) -> ::std::result::Result<
  110         -
    crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder,
  111         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  112         -
> {
  113         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  114         -
    let tokens = &mut tokens_owned;
  115         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  116         -
    loop {
  117         -
        match tokens.next().transpose()? {
  118         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  119         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  120         -
                "GlobalTableName" => {
  121         -
                    builder = builder.set_global_table_name(
  122         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  123         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  124         -
                            .transpose()?,
  125         -
                    );
  126         -
                }
  127         -
                "ReplicaSettings" => {
  128         -
                    builder = builder.set_replica_settings(
  129         -
                        crate::protocol_serde::shape_replica_settings_description_list::de_replica_settings_description_list(tokens, _value)?,
  130         -
                    );
  131         -
                }
  132         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  133         -
            },
  134         -
            other => {
  135         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  136         -
                    "expected object key or end object, found: {other:?}"
  137         -
                )))
  138         -
            }
  139         -
        }
  140         -
    }
  141         -
    if tokens.next().is_some() {
  142         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  143         -
            "found more JSON tokens after completing parsing",
  144         -
        ));
  145         -
    }
  146         -
    Ok(builder)
  147         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_global_table_settings_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_import.rs

@@ -1,0 +99,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_import_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::describe_import::DescribeImportOutput, crate::operation::describe_import::DescribeImportError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::describe_import::DescribeImportError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::describe_import::DescribeImportError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "ImportNotFoundException" => crate::operation::describe_import::DescribeImportError::ImportNotFoundException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::ImportNotFoundExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_import_not_found_exception::de_import_not_found_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::describe_import::DescribeImportError::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         -
        _ => crate::operation::describe_import::DescribeImportError::generic(generic),
   36         -
    })
   37         -
}
   38         -
   39         -
#[allow(clippy::unnecessary_wraps)]
   40         -
pub fn de_describe_import_http_response(
   41         -
    _response_status: u16,
   42         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   43         -
    _response_body: &[u8],
   44         -
) -> std::result::Result<crate::operation::describe_import::DescribeImportOutput, crate::operation::describe_import::DescribeImportError> {
   45         -
    Ok({
   46         -
        #[allow(unused_mut)]
   47         -
        let mut output = crate::operation::describe_import::builders::DescribeImportOutputBuilder::default();
   48         -
        output = crate::protocol_serde::shape_describe_import::de_describe_import(_response_body, output)
   49         -
            .map_err(crate::operation::describe_import::DescribeImportError::unhandled)?;
   50         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   51         -
        crate::serde_util::describe_import_output_output_correct_errors(output).build()
   52         -
    })
   53         -
}
   54         -
   55         -
pub fn ser_describe_import_input(
   56         -
    input: &crate::operation::describe_import::DescribeImportInput,
   57         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   58         -
    let mut out = String::new();
   59         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   60         -
    crate::protocol_serde::shape_describe_import_input::ser_describe_import_input_input(&mut object, input)?;
   61         -
    object.finish();
   62         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   63         -
}
   64         -
   65         -
pub(crate) fn de_describe_import(
   66         -
    _value: &[u8],
   67         -
    mut builder: crate::operation::describe_import::builders::DescribeImportOutputBuilder,
   68         -
) -> ::std::result::Result<
   69         -
    crate::operation::describe_import::builders::DescribeImportOutputBuilder,
   70         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   71         -
> {
   72         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   73         -
    let tokens = &mut tokens_owned;
   74         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   75         -
    loop {
   76         -
        match tokens.next().transpose()? {
   77         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   78         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   79         -
                "ImportTableDescription" => {
   80         -
                    builder = builder.set_import_table_description(
   81         -
                        crate::protocol_serde::shape_import_table_description::de_import_table_description(tokens, _value)?,
   82         -
                    );
   83         -
                }
   84         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   85         -
            },
   86         -
            other => {
   87         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   88         -
                    "expected object key or end object, found: {other:?}"
   89         -
                )))
   90         -
            }
   91         -
        }
   92         -
    }
   93         -
    if tokens.next().is_some() {
   94         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   95         -
            "found more JSON tokens after completing parsing",
   96         -
        ));
   97         -
    }
   98         -
    Ok(builder)
   99         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_import_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_kinesis_streaming_destination.rs

@@ -1,0 +154,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_kinesis_streaming_destination_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput,
    9         -
    crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InternalServerError" => {
   24         -
            crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::InternalServerError({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   30         -
                        .map_err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::unhandled)?;
   31         -
                    let output = output.meta(generic);
   32         -
                    output.build()
   33         -
                };
   34         -
                if tmp.message.is_none() {
   35         -
                    tmp.message = _error_message;
   36         -
                }
   37         -
                tmp
   38         -
            })
   39         -
        }
   40         -
        "InvalidEndpointException" => {
   41         -
            crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::InvalidEndpointException({
   42         -
                #[allow(unused_mut)]
   43         -
                let mut tmp = {
   44         -
                    #[allow(unused_mut)]
   45         -
                    let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   46         -
                    output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   47         -
                        .map_err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::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         -
        }
   57         -
        "ResourceNotFoundException" => {
   58         -
            crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::ResourceNotFoundException({
   59         -
                #[allow(unused_mut)]
   60         -
                let mut tmp = {
   61         -
                    #[allow(unused_mut)]
   62         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   63         -
                    output =
   64         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   65         -
                            .map_err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::unhandled)?;
   66         -
                    let output = output.meta(generic);
   67         -
                    output.build()
   68         -
                };
   69         -
                if tmp.message.is_none() {
   70         -
                    tmp.message = _error_message;
   71         -
                }
   72         -
                tmp
   73         -
            })
   74         -
        }
   75         -
        _ => crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::generic(generic),
   76         -
    })
   77         -
}
   78         -
   79         -
#[allow(clippy::unnecessary_wraps)]
   80         -
pub fn de_describe_kinesis_streaming_destination_http_response(
   81         -
    _response_status: u16,
   82         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   83         -
    _response_body: &[u8],
   84         -
) -> std::result::Result<
   85         -
    crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput,
   86         -
    crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError,
   87         -
> {
   88         -
    Ok({
   89         -
        #[allow(unused_mut)]
   90         -
        let mut output =
   91         -
            crate::operation::describe_kinesis_streaming_destination::builders::DescribeKinesisStreamingDestinationOutputBuilder::default();
   92         -
        output =
   93         -
            crate::protocol_serde::shape_describe_kinesis_streaming_destination::de_describe_kinesis_streaming_destination(_response_body, output)
   94         -
                .map_err(crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::unhandled)?;
   95         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   96         -
        output.build()
   97         -
    })
   98         -
}
   99         -
  100         -
pub fn ser_describe_kinesis_streaming_destination_input(
  101         -
    input: &crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput,
  102         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  103         -
    let mut out = String::new();
  104         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  105         -
    crate::protocol_serde::shape_describe_kinesis_streaming_destination_input::ser_describe_kinesis_streaming_destination_input_input(
  106         -
        &mut object,
  107         -
        input,
  108         -
    )?;
  109         -
    object.finish();
  110         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  111         -
}
  112         -
  113         -
pub(crate) fn de_describe_kinesis_streaming_destination(
  114         -
    _value: &[u8],
  115         -
    mut builder: crate::operation::describe_kinesis_streaming_destination::builders::DescribeKinesisStreamingDestinationOutputBuilder,
  116         -
) -> ::std::result::Result<
  117         -
    crate::operation::describe_kinesis_streaming_destination::builders::DescribeKinesisStreamingDestinationOutputBuilder,
  118         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  119         -
> {
  120         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  121         -
    let tokens = &mut tokens_owned;
  122         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  123         -
    loop {
  124         -
        match tokens.next().transpose()? {
  125         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  126         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  127         -
                "TableName" => {
  128         -
                    builder = builder.set_table_name(
  129         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  130         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  131         -
                            .transpose()?,
  132         -
                    );
  133         -
                }
  134         -
                "KinesisDataStreamDestinations" => {
  135         -
                    builder = builder.set_kinesis_data_stream_destinations(
  136         -
                        crate::protocol_serde::shape_kinesis_data_stream_destinations::de_kinesis_data_stream_destinations(tokens, _value)?,
  137         -
                    );
  138         -
                }
  139         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  140         -
            },
  141         -
            other => {
  142         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  143         -
                    "expected object key or end object, found: {other:?}"
  144         -
                )))
  145         -
            }
  146         -
        }
  147         -
    }
  148         -
    if tokens.next().is_some() {
  149         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  150         -
            "found more JSON tokens after completing parsing",
  151         -
        ));
  152         -
    }
  153         -
    Ok(builder)
  154         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_kinesis_streaming_destination_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_kinesis_streaming_destination_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput,
    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         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_limits.rs

@@ -1,0 +133,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_limits_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::describe_limits::DescribeLimitsOutput, crate::operation::describe_limits::DescribeLimitsError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::describe_limits::DescribeLimitsError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::describe_limits::DescribeLimitsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InternalServerError" => crate::operation::describe_limits::DescribeLimitsError::InternalServerError({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
   25         -
                output = crate::protocol_serde::shape_internal_server_error::de_internal_server_error_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::describe_limits::DescribeLimitsError::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         -
        "InvalidEndpointException" => crate::operation::describe_limits::DescribeLimitsError::InvalidEndpointException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::describe_limits::DescribeLimitsError::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         -
        _ => crate::operation::describe_limits::DescribeLimitsError::generic(generic),
   51         -
    })
   52         -
}
   53         -
   54         -
#[allow(clippy::unnecessary_wraps)]
   55         -
pub fn de_describe_limits_http_response(
   56         -
    _response_status: u16,
   57         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   58         -
    _response_body: &[u8],
   59         -
) -> std::result::Result<crate::operation::describe_limits::DescribeLimitsOutput, crate::operation::describe_limits::DescribeLimitsError> {
   60         -
    Ok({
   61         -
        #[allow(unused_mut)]
   62         -
        let mut output = crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder::default();
   63         -
        output = crate::protocol_serde::shape_describe_limits::de_describe_limits(_response_body, output)
   64         -
            .map_err(crate::operation::describe_limits::DescribeLimitsError::unhandled)?;
   65         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   66         -
        output.build()
   67         -
    })
   68         -
}
   69         -
   70         -
pub fn ser_describe_limits_input(
   71         -
    _input: &crate::operation::describe_limits::DescribeLimitsInput,
   72         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   73         -
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
   74         -
}
   75         -
   76         -
pub(crate) fn de_describe_limits(
   77         -
    _value: &[u8],
   78         -
    mut builder: crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder,
   79         -
) -> ::std::result::Result<
   80         -
    crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder,
   81         -
    ::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         -
                "AccountMaxReadCapacityUnits" => {
   91         -
                    builder = builder.set_account_max_read_capacity_units(
   92         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   93         -
                            .map(i64::try_from)
   94         -
                            .transpose()?,
   95         -
                    );
   96         -
                }
   97         -
                "AccountMaxWriteCapacityUnits" => {
   98         -
                    builder = builder.set_account_max_write_capacity_units(
   99         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  100         -
                            .map(i64::try_from)
  101         -
                            .transpose()?,
  102         -
                    );
  103         -
                }
  104         -
                "TableMaxReadCapacityUnits" => {
  105         -
                    builder = builder.set_table_max_read_capacity_units(
  106         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  107         -
                            .map(i64::try_from)
  108         -
                            .transpose()?,
  109         -
                    );
  110         -
                }
  111         -
                "TableMaxWriteCapacityUnits" => {
  112         -
                    builder = builder.set_table_max_write_capacity_units(
  113         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  114         -
                            .map(i64::try_from)
  115         -
                            .transpose()?,
  116         -
                    );
  117         -
                }
  118         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  119         -
            },
  120         -
            other => {
  121         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  122         -
                    "expected object key or end object, found: {other:?}"
  123         -
                )))
  124         -
            }
  125         -
        }
  126         -
    }
  127         -
    if tokens.next().is_some() {
  128         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  129         -
            "found more JSON tokens after completing parsing",
  130         -
        ));
  131         -
    }
  132         -
    Ok(builder)
  133         -
}