AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_global_secondary_indexes<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexInfo>>, ::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_global_secondary_index_info::de_global_secondary_index_info(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

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

@@ -1,0 +43,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_global_table<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::GlobalTable>, ::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::GlobalTableBuilder::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         -
                        "GlobalTableName" => {
   19         -
                            builder = builder.set_global_table_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "ReplicationGroup" => {
   26         -
                            builder = builder.set_replication_group(crate::protocol_serde::shape_replica_list::de_replica_list(tokens, _value)?);
   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         -
}

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

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

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

@@ -1,0 +65,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_global_table_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::GlobalTableDescription>, ::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::GlobalTableDescriptionBuilder::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         -
                        "ReplicationGroup" => {
   19         -
                            builder = builder.set_replication_group(
   20         -
                                crate::protocol_serde::shape_replica_description_list::de_replica_description_list(tokens, _value)?,
   21         -
                            );
   22         -
                        }
   23         -
                        "GlobalTableArn" => {
   24         -
                            builder = builder.set_global_table_arn(
   25         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   26         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   27         -
                                    .transpose()?,
   28         -
                            );
   29         -
                        }
   30         -
                        "CreationDateTime" => {
   31         -
                            builder = builder.set_creation_date_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   32         -
                                tokens.next(),
   33         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   34         -
                            )?);
   35         -
                        }
   36         -
                        "GlobalTableStatus" => {
   37         -
                            builder = builder.set_global_table_status(
   38         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   39         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::GlobalTableStatus::from(u.as_ref())))
   40         -
                                    .transpose()?,
   41         -
                            );
   42         -
                        }
   43         -
                        "GlobalTableName" => {
   44         -
                            builder = builder.set_global_table_name(
   45         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   46         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   47         -
                                    .transpose()?,
   48         -
                            );
   49         -
                        }
   50         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   51         -
                    },
   52         -
                    other => {
   53         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   54         -
                            "expected object key or end object, found: {other:?}"
   55         -
                        )))
   56         -
                    }
   57         -
                }
   58         -
            }
   59         -
            Ok(Some(builder.build()))
   60         -
        }
   61         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   62         -
            "expected start object or null",
   63         -
        )),
   64         -
    }
   65         -
}

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

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_global_table_global_secondary_index_settings_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("IndexName").string(input.index_name.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.provisioned_write_capacity_units {
   10         -
        object.key("ProvisionedWriteCapacityUnits").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_2) = &input.provisioned_write_capacity_auto_scaling_settings_update {
   16         -
        #[allow(unused_mut)]
   17         -
        let mut object_3 = object.key("ProvisionedWriteCapacityAutoScalingSettingsUpdate").start_object();
   18         -
        crate::protocol_serde::shape_auto_scaling_settings_update::ser_auto_scaling_settings_update(&mut object_3, var_2)?;
   19         -
        object_3.finish();
   20         -
    }
   21         -
    Ok(())
   22         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_global_table_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::GlobalTable>>, ::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_global_table::de_global_table(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

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

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

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

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_global_table_witness_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::GlobalTableWitnessDescription>, ::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::GlobalTableWitnessDescriptionBuilder::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         -
                        "RegionName" => {
   19         -
                            builder = builder.set_region_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "WitnessStatus" => {
   26         -
                            builder = builder.set_witness_status(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::WitnessStatus::from(u.as_ref())))
   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(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

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

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

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_global_table_witness_group_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::GlobalTableWitnessGroupUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.create {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("Create").start_object();
    9         -
        crate::protocol_serde::shape_create_global_table_witness_group_member_action::ser_create_global_table_witness_group_member_action(
   10         -
            &mut object_2,
   11         -
            var_1,
   12         -
        )?;
   13         -
        object_2.finish();
   14         -
    }
   15         -
    if let Some(var_3) = &input.delete {
   16         -
        #[allow(unused_mut)]
   17         -
        let mut object_4 = object.key("Delete").start_object();
   18         -
        crate::protocol_serde::shape_delete_global_table_witness_group_member_action::ser_delete_global_table_witness_group_member_action(
   19         -
            &mut object_4,
   20         -
            var_3,
   21         -
        )?;
   22         -
        object_4.finish();
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_import_conflict_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_import_conflict_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ImportConflictExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ImportConflictExceptionBuilder, ::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_import_not_found_exception.rs

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_import_not_found_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ImportNotFoundExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ImportNotFoundExceptionBuilder, ::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_import_summary.rs

@@ -1,0 +84,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_import_summary<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ImportSummary>, ::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::ImportSummaryBuilder::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         -
                        "ImportArn" => {
   19         -
                            builder = builder.set_import_arn(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "ImportStatus" => {
   26         -
                            builder = builder.set_import_status(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ImportStatus::from(u.as_ref())))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "TableArn" => {
   33         -
                            builder = builder.set_table_arn(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "S3BucketSource" => {
   40         -
                            builder =
   41         -
                                builder.set_s3_bucket_source(crate::protocol_serde::shape_s3_bucket_source::de_s3_bucket_source(tokens, _value)?);
   42         -
                        }
   43         -
                        "CloudWatchLogGroupArn" => {
   44         -
                            builder = builder.set_cloud_watch_log_group_arn(
   45         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   46         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   47         -
                                    .transpose()?,
   48         -
                            );
   49         -
                        }
   50         -
                        "InputFormat" => {
   51         -
                            builder = builder.set_input_format(
   52         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::InputFormat::from(u.as_ref())))
   54         -
                                    .transpose()?,
   55         -
                            );
   56         -
                        }
   57         -
                        "StartTime" => {
   58         -
                            builder = builder.set_start_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   59         -
                                tokens.next(),
   60         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   61         -
                            )?);
   62         -
                        }
   63         -
                        "EndTime" => {
   64         -
                            builder = builder.set_end_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   65         -
                                tokens.next(),
   66         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   67         -
                            )?);
   68         -
                        }
   69         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   70         -
                    },
   71         -
                    other => {
   72         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   73         -
                            "expected object key or end object, found: {other:?}"
   74         -
                        )))
   75         -
                    }
   76         -
                }
   77         -
            }
   78         -
            Ok(Some(builder.build()))
   79         -
        }
   80         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   81         -
            "expected start object or null",
   82         -
        )),
   83         -
    }
   84         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_import_summary_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::ImportSummary>>, ::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_import_summary::de_import_summary(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_import_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_import_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::import_table::ImportTableOutput, crate::operation::import_table::ImportTableError> {
    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::import_table::ImportTableError::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::import_table::ImportTableError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "ImportConflictException" => crate::operation::import_table::ImportTableError::ImportConflictException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::ImportConflictExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_import_conflict_exception::de_import_conflict_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::import_table::ImportTableError::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         -
        "LimitExceededException" => crate::operation::import_table::ImportTableError::LimitExceededException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::import_table::ImportTableError::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         -
        "ResourceInUseException" => crate::operation::import_table::ImportTableError::ResourceInUseException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::import_table::ImportTableError::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::import_table::ImportTableError::generic(generic),
   66         -
    })
   67         -
}
   68         -
   69         -
#[allow(clippy::unnecessary_wraps)]
   70         -
pub fn de_import_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::import_table::ImportTableOutput, crate::operation::import_table::ImportTableError> {
   75         -
    Ok({
   76         -
        #[allow(unused_mut)]
   77         -
        let mut output = crate::operation::import_table::builders::ImportTableOutputBuilder::default();
   78         -
        output = crate::protocol_serde::shape_import_table::de_import_table(_response_body, output)
   79         -
            .map_err(crate::operation::import_table::ImportTableError::unhandled)?;
   80         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   81         -
        crate::serde_util::import_table_output_output_correct_errors(output).build()
   82         -
    })
   83         -
}
   84         -
   85         -
pub fn ser_import_table_input(
   86         -
    input: &crate::operation::import_table::ImportTableInput,
   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_import_table_input::ser_import_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_import_table(
   96         -
    _value: &[u8],
   97         -
    mut builder: crate::operation::import_table::builders::ImportTableOutputBuilder,
   98         -
) -> ::std::result::Result<crate::operation::import_table::builders::ImportTableOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
   99         -
{
  100         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  101         -
    let tokens = &mut tokens_owned;
  102         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  103         -
    loop {
  104         -
        match tokens.next().transpose()? {
  105         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  106         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  107         -
                "ImportTableDescription" => {
  108         -
                    builder = builder.set_import_table_description(
  109         -
                        crate::protocol_serde::shape_import_table_description::de_import_table_description(tokens, _value)?,
  110         -
                    );
  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         -
}