AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_table.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_table_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::describe_table::DescribeTableOutput, crate::operation::describe_table::DescribeTableError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::describe_table::DescribeTableError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::describe_table::DescribeTableError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InternalServerError" => crate::operation::describe_table::DescribeTableError::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_table::DescribeTableError::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_table::DescribeTableError::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_table::DescribeTableError::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         -
        "ResourceNotFoundException" => crate::operation::describe_table::DescribeTableError::ResourceNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::describe_table::DescribeTableError::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_table::DescribeTableError::generic(generic),
   66         -
    })
   67         -
}
   68         -
   69         -
#[allow(clippy::unnecessary_wraps)]
   70         -
pub fn de_describe_table_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_table::DescribeTableOutput, crate::operation::describe_table::DescribeTableError> {
   75         -
    Ok({
   76         -
        #[allow(unused_mut)]
   77         -
        let mut output = crate::operation::describe_table::builders::DescribeTableOutputBuilder::default();
   78         -
        output = crate::protocol_serde::shape_describe_table::de_describe_table(_response_body, output)
   79         -
            .map_err(crate::operation::describe_table::DescribeTableError::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_table_input(
   86         -
    input: &crate::operation::describe_table::DescribeTableInput,
   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_table_input::ser_describe_table_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_table(
   96         -
    _value: &[u8],
   97         -
    mut builder: crate::operation::describe_table::builders::DescribeTableOutputBuilder,
   98         -
) -> ::std::result::Result<
   99         -
    crate::operation::describe_table::builders::DescribeTableOutputBuilder,
  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         -
                "Table" => {
  110         -
                    builder = builder.set_table(crate::protocol_serde::shape_table_description::de_table_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_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_table_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_table::DescribeTableInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.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_table_replica_auto_scaling.rs

@@ -1,0 +123,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_table_replica_auto_scaling_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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput,
    9         -
    crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError,
   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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::generic(generic),
   57         -
    })
   58         -
}
   59         -
   60         -
#[allow(clippy::unnecessary_wraps)]
   61         -
pub fn de_describe_table_replica_auto_scaling_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_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput,
   67         -
    crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError,
   68         -
> {
   69         -
    Ok({
   70         -
        #[allow(unused_mut)]
   71         -
        let mut output = crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingOutputBuilder::default();
   72         -
        output = crate::protocol_serde::shape_describe_table_replica_auto_scaling::de_describe_table_replica_auto_scaling(_response_body, output)
   73         -
            .map_err(crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::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_table_replica_auto_scaling_input(
   80         -
    input: &crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput,
   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_table_replica_auto_scaling_input::ser_describe_table_replica_auto_scaling_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_table_replica_auto_scaling(
   90         -
    _value: &[u8],
   91         -
    mut builder: crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingOutputBuilder,
   92         -
) -> ::std::result::Result<
   93         -
    crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingOutputBuilder,
   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         -
                "TableAutoScalingDescription" => {
  104         -
                    builder = builder.set_table_auto_scaling_description(
  105         -
                        crate::protocol_serde::shape_table_auto_scaling_description::de_table_auto_scaling_description(tokens, _value)?,
  106         -
                    );
  107         -
                }
  108         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  109         -
            },
  110         -
            other => {
  111         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  112         -
                    "expected object key or end object, found: {other:?}"
  113         -
                )))
  114         -
            }
  115         -
        }
  116         -
    }
  117         -
    if tokens.next().is_some() {
  118         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  119         -
            "found more JSON tokens after completing parsing",
  120         -
        ));
  121         -
    }
  122         -
    Ok(builder)
  123         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_table_replica_auto_scaling_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_table_replica_auto_scaling_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput,
    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_time_to_live.rs

@@ -1,0 +135,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_time_to_live_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_time_to_live::DescribeTimeToLiveOutput,
    9         -
    crate::operation::describe_time_to_live::DescribeTimeToLiveError,
   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_time_to_live::DescribeTimeToLiveError::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_time_to_live::DescribeTimeToLiveError::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_time_to_live::DescribeTimeToLiveError::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_time_to_live::DescribeTimeToLiveError::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         -
        "InvalidEndpointException" => crate::operation::describe_time_to_live::DescribeTimeToLiveError::InvalidEndpointException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::describe_time_to_live::DescribeTimeToLiveError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "ResourceNotFoundException" => crate::operation::describe_time_to_live::DescribeTimeToLiveError::ResourceNotFoundException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::describe_time_to_live::DescribeTimeToLiveError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        _ => crate::operation::describe_time_to_live::DescribeTimeToLiveError::generic(generic),
   69         -
    })
   70         -
}
   71         -
   72         -
#[allow(clippy::unnecessary_wraps)]
   73         -
pub fn de_describe_time_to_live_http_response(
   74         -
    _response_status: u16,
   75         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   76         -
    _response_body: &[u8],
   77         -
) -> std::result::Result<
   78         -
    crate::operation::describe_time_to_live::DescribeTimeToLiveOutput,
   79         -
    crate::operation::describe_time_to_live::DescribeTimeToLiveError,
   80         -
> {
   81         -
    Ok({
   82         -
        #[allow(unused_mut)]
   83         -
        let mut output = crate::operation::describe_time_to_live::builders::DescribeTimeToLiveOutputBuilder::default();
   84         -
        output = crate::protocol_serde::shape_describe_time_to_live::de_describe_time_to_live(_response_body, output)
   85         -
            .map_err(crate::operation::describe_time_to_live::DescribeTimeToLiveError::unhandled)?;
   86         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   87         -
        output.build()
   88         -
    })
   89         -
}
   90         -
   91         -
pub fn ser_describe_time_to_live_input(
   92         -
    input: &crate::operation::describe_time_to_live::DescribeTimeToLiveInput,
   93         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   94         -
    let mut out = String::new();
   95         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   96         -
    crate::protocol_serde::shape_describe_time_to_live_input::ser_describe_time_to_live_input_input(&mut object, input)?;
   97         -
    object.finish();
   98         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   99         -
}
  100         -
  101         -
pub(crate) fn de_describe_time_to_live(
  102         -
    _value: &[u8],
  103         -
    mut builder: crate::operation::describe_time_to_live::builders::DescribeTimeToLiveOutputBuilder,
  104         -
) -> ::std::result::Result<
  105         -
    crate::operation::describe_time_to_live::builders::DescribeTimeToLiveOutputBuilder,
  106         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  107         -
> {
  108         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  109         -
    let tokens = &mut tokens_owned;
  110         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  111         -
    loop {
  112         -
        match tokens.next().transpose()? {
  113         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  114         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  115         -
                "TimeToLiveDescription" => {
  116         -
                    builder = builder.set_time_to_live_description(
  117         -
                        crate::protocol_serde::shape_time_to_live_description::de_time_to_live_description(tokens, _value)?,
  118         -
                    );
  119         -
                }
  120         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  121         -
            },
  122         -
            other => {
  123         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  124         -
                    "expected object key or end object, found: {other:?}"
  125         -
                )))
  126         -
            }
  127         -
        }
  128         -
    }
  129         -
    if tokens.next().is_some() {
  130         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  131         -
            "found more JSON tokens after completing parsing",
  132         -
        ));
  133         -
    }
  134         -
    Ok(builder)
  135         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_describe_time_to_live_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_time_to_live_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_time_to_live::DescribeTimeToLiveInput,
    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_disable_kinesis_streaming_destination.rs

@@ -1,0 +203,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_disable_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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput,
    9         -
    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError,
   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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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         -
        "LimitExceededException" => {
   58         -
            crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::LimitExceededException({
   59         -
                #[allow(unused_mut)]
   60         -
                let mut tmp = {
   61         -
                    #[allow(unused_mut)]
   62         -
                    let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   63         -
                    output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   64         -
                        .map_err(crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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         -
        }
   74         -
        "ResourceInUseException" => {
   75         -
            crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceInUseException({
   76         -
                #[allow(unused_mut)]
   77         -
                let mut tmp = {
   78         -
                    #[allow(unused_mut)]
   79         -
                    let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   80         -
                    output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   81         -
                        .map_err(crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::unhandled)?;
   82         -
                    let output = output.meta(generic);
   83         -
                    output.build()
   84         -
                };
   85         -
                if tmp.message.is_none() {
   86         -
                    tmp.message = _error_message;
   87         -
                }
   88         -
                tmp
   89         -
            })
   90         -
        }
   91         -
        "ResourceNotFoundException" => {
   92         -
            crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceNotFoundException({
   93         -
                #[allow(unused_mut)]
   94         -
                let mut tmp = {
   95         -
                    #[allow(unused_mut)]
   96         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   97         -
                    output =
   98         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   99         -
                            .map_err(crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::unhandled)?;
  100         -
                    let output = output.meta(generic);
  101         -
                    output.build()
  102         -
                };
  103         -
                if tmp.message.is_none() {
  104         -
                    tmp.message = _error_message;
  105         -
                }
  106         -
                tmp
  107         -
            })
  108         -
        }
  109         -
        _ => crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::generic(generic),
  110         -
    })
  111         -
}
  112         -
  113         -
#[allow(clippy::unnecessary_wraps)]
  114         -
pub fn de_disable_kinesis_streaming_destination_http_response(
  115         -
    _response_status: u16,
  116         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  117         -
    _response_body: &[u8],
  118         -
) -> std::result::Result<
  119         -
    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput,
  120         -
    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError,
  121         -
> {
  122         -
    Ok({
  123         -
        #[allow(unused_mut)]
  124         -
        let mut output =
  125         -
            crate::operation::disable_kinesis_streaming_destination::builders::DisableKinesisStreamingDestinationOutputBuilder::default();
  126         -
        output = crate::protocol_serde::shape_disable_kinesis_streaming_destination::de_disable_kinesis_streaming_destination(_response_body, output)
  127         -
            .map_err(crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::unhandled)?;
  128         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  129         -
        output.build()
  130         -
    })
  131         -
}
  132         -
  133         -
pub fn ser_disable_kinesis_streaming_destination_input(
  134         -
    input: &crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput,
  135         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  136         -
    let mut out = String::new();
  137         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  138         -
    crate::protocol_serde::shape_disable_kinesis_streaming_destination_input::ser_disable_kinesis_streaming_destination_input_input(
  139         -
        &mut object,
  140         -
        input,
  141         -
    )?;
  142         -
    object.finish();
  143         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  144         -
}
  145         -
  146         -
pub(crate) fn de_disable_kinesis_streaming_destination(
  147         -
    _value: &[u8],
  148         -
    mut builder: crate::operation::disable_kinesis_streaming_destination::builders::DisableKinesisStreamingDestinationOutputBuilder,
  149         -
) -> ::std::result::Result<
  150         -
    crate::operation::disable_kinesis_streaming_destination::builders::DisableKinesisStreamingDestinationOutputBuilder,
  151         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  152         -
> {
  153         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  154         -
    let tokens = &mut tokens_owned;
  155         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  156         -
    loop {
  157         -
        match tokens.next().transpose()? {
  158         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  159         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  160         -
                "TableName" => {
  161         -
                    builder = builder.set_table_name(
  162         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  163         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  164         -
                            .transpose()?,
  165         -
                    );
  166         -
                }
  167         -
                "StreamArn" => {
  168         -
                    builder = builder.set_stream_arn(
  169         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  170         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  171         -
                            .transpose()?,
  172         -
                    );
  173         -
                }
  174         -
                "DestinationStatus" => {
  175         -
                    builder = builder.set_destination_status(
  176         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  177         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::DestinationStatus::from(u.as_ref())))
  178         -
                            .transpose()?,
  179         -
                    );
  180         -
                }
  181         -
                "EnableKinesisStreamingConfiguration" => {
  182         -
                    builder = builder.set_enable_kinesis_streaming_configuration(
  183         -
                        crate::protocol_serde::shape_enable_kinesis_streaming_configuration::de_enable_kinesis_streaming_configuration(
  184         -
                            tokens, _value,
  185         -
                        )?,
  186         -
                    );
  187         -
                }
  188         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  189         -
            },
  190         -
            other => {
  191         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  192         -
                    "expected object key or end object, found: {other:?}"
  193         -
                )))
  194         -
            }
  195         -
        }
  196         -
    }
  197         -
    if tokens.next().is_some() {
  198         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  199         -
            "found more JSON tokens after completing parsing",
  200         -
        ));
  201         -
    }
  202         -
    Ok(builder)
  203         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_disable_kinesis_streaming_destination_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput,
    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.stream_arn {
   10         -
        object.key("StreamArn").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.enable_kinesis_streaming_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("EnableKinesisStreamingConfiguration").start_object();
   15         -
        crate::protocol_serde::shape_enable_kinesis_streaming_configuration::ser_enable_kinesis_streaming_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

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

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

@@ -1,0 +53,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_enable_kinesis_streaming_configuration<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::EnableKinesisStreamingConfiguration>, ::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::EnableKinesisStreamingConfigurationBuilder::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         -
                        "ApproximateCreationDateTimePrecision" => {
   19         -
                            builder = builder.set_approximate_creation_date_time_precision(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| {
   22         -
                                        s.to_unescaped()
   23         -
                                            .map(|u| crate::types::ApproximateCreationDateTimePrecision::from(u.as_ref()))
   24         -
                                    })
   25         -
                                    .transpose()?,
   26         -
                            );
   27         -
                        }
   28         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   29         -
                    },
   30         -
                    other => {
   31         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   32         -
                            "expected object key or end object, found: {other:?}"
   33         -
                        )))
   34         -
                    }
   35         -
                }
   36         -
            }
   37         -
            Ok(Some(builder.build()))
   38         -
        }
   39         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   40         -
            "expected start object or null",
   41         -
        )),
   42         -
    }
   43         -
}
   44         -
   45         -
pub fn ser_enable_kinesis_streaming_configuration(
   46         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   47         -
    input: &crate::types::EnableKinesisStreamingConfiguration,
   48         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   49         -
    if let Some(var_1) = &input.approximate_creation_date_time_precision {
   50         -
        object.key("ApproximateCreationDateTimePrecision").string(var_1.as_str());
   51         -
    }
   52         -
    Ok(())
   53         -
}

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

@@ -1,0 +202,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_enable_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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput,
    9         -
    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError,
   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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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         -
        "LimitExceededException" => {
   58         -
            crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::LimitExceededException({
   59         -
                #[allow(unused_mut)]
   60         -
                let mut tmp = {
   61         -
                    #[allow(unused_mut)]
   62         -
                    let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   63         -
                    output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   64         -
                        .map_err(crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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         -
        }
   74         -
        "ResourceInUseException" => {
   75         -
            crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceInUseException({
   76         -
                #[allow(unused_mut)]
   77         -
                let mut tmp = {
   78         -
                    #[allow(unused_mut)]
   79         -
                    let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   80         -
                    output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   81         -
                        .map_err(crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::unhandled)?;
   82         -
                    let output = output.meta(generic);
   83         -
                    output.build()
   84         -
                };
   85         -
                if tmp.message.is_none() {
   86         -
                    tmp.message = _error_message;
   87         -
                }
   88         -
                tmp
   89         -
            })
   90         -
        }
   91         -
        "ResourceNotFoundException" => {
   92         -
            crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceNotFoundException({
   93         -
                #[allow(unused_mut)]
   94         -
                let mut tmp = {
   95         -
                    #[allow(unused_mut)]
   96         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   97         -
                    output =
   98         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   99         -
                            .map_err(crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::unhandled)?;
  100         -
                    let output = output.meta(generic);
  101         -
                    output.build()
  102         -
                };
  103         -
                if tmp.message.is_none() {
  104         -
                    tmp.message = _error_message;
  105         -
                }
  106         -
                tmp
  107         -
            })
  108         -
        }
  109         -
        _ => crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::generic(generic),
  110         -
    })
  111         -
}
  112         -
  113         -
#[allow(clippy::unnecessary_wraps)]
  114         -
pub fn de_enable_kinesis_streaming_destination_http_response(
  115         -
    _response_status: u16,
  116         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  117         -
    _response_body: &[u8],
  118         -
) -> std::result::Result<
  119         -
    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput,
  120         -
    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError,
  121         -
> {
  122         -
    Ok({
  123         -
        #[allow(unused_mut)]
  124         -
        let mut output = crate::operation::enable_kinesis_streaming_destination::builders::EnableKinesisStreamingDestinationOutputBuilder::default();
  125         -
        output = crate::protocol_serde::shape_enable_kinesis_streaming_destination::de_enable_kinesis_streaming_destination(_response_body, output)
  126         -
            .map_err(crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::unhandled)?;
  127         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  128         -
        output.build()
  129         -
    })
  130         -
}
  131         -
  132         -
pub fn ser_enable_kinesis_streaming_destination_input(
  133         -
    input: &crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput,
  134         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  135         -
    let mut out = String::new();
  136         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  137         -
    crate::protocol_serde::shape_enable_kinesis_streaming_destination_input::ser_enable_kinesis_streaming_destination_input_input(
  138         -
        &mut object,
  139         -
        input,
  140         -
    )?;
  141         -
    object.finish();
  142         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  143         -
}
  144         -
  145         -
pub(crate) fn de_enable_kinesis_streaming_destination(
  146         -
    _value: &[u8],
  147         -
    mut builder: crate::operation::enable_kinesis_streaming_destination::builders::EnableKinesisStreamingDestinationOutputBuilder,
  148         -
) -> ::std::result::Result<
  149         -
    crate::operation::enable_kinesis_streaming_destination::builders::EnableKinesisStreamingDestinationOutputBuilder,
  150         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  151         -
> {
  152         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  153         -
    let tokens = &mut tokens_owned;
  154         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  155         -
    loop {
  156         -
        match tokens.next().transpose()? {
  157         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  158         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  159         -
                "TableName" => {
  160         -
                    builder = builder.set_table_name(
  161         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  162         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  163         -
                            .transpose()?,
  164         -
                    );
  165         -
                }
  166         -
                "StreamArn" => {
  167         -
                    builder = builder.set_stream_arn(
  168         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  169         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  170         -
                            .transpose()?,
  171         -
                    );
  172         -
                }
  173         -
                "DestinationStatus" => {
  174         -
                    builder = builder.set_destination_status(
  175         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  176         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::DestinationStatus::from(u.as_ref())))
  177         -
                            .transpose()?,
  178         -
                    );
  179         -
                }
  180         -
                "EnableKinesisStreamingConfiguration" => {
  181         -
                    builder = builder.set_enable_kinesis_streaming_configuration(
  182         -
                        crate::protocol_serde::shape_enable_kinesis_streaming_configuration::de_enable_kinesis_streaming_configuration(
  183         -
                            tokens, _value,
  184         -
                        )?,
  185         -
                    );
  186         -
                }
  187         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  188         -
            },
  189         -
            other => {
  190         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  191         -
                    "expected object key or end object, found: {other:?}"
  192         -
                )))
  193         -
            }
  194         -
        }
  195         -
    }
  196         -
    if tokens.next().is_some() {
  197         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  198         -
            "found more JSON tokens after completing parsing",
  199         -
        ));
  200         -
    }
  201         -
    Ok(builder)
  202         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_enable_kinesis_streaming_destination_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput,
    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.stream_arn {
   10         -
        object.key("StreamArn").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.enable_kinesis_streaming_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("EnableKinesisStreamingConfiguration").start_object();
   15         -
        crate::protocol_serde::shape_enable_kinesis_streaming_configuration::ser_enable_kinesis_streaming_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

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

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

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