From a70121dcb2ede62575f20b8376fc3340f26ddbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wrzeszcz?= Date: Thu, 5 Oct 2023 00:42:42 +0200 Subject: [PATCH 1/2] Support for `aws-sdk-dynamodb` 0.32. --- Cargo.toml | 4 ++++ src/de/mod.rs | 4 ++-- src/lib.rs | 25 ++++++++++++++++++++++--- src/ser/mod.rs | 6 +++--- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3d83b60..78eba45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,7 @@ __aws_sdk_dynamodb_0_28 = { package = "aws-sdk-dynamodb", version = "0.28", defa __aws_sdk_dynamodb_0_29 = { package = "aws-sdk-dynamodb", version = "0.29", default-features = false, optional = true } __aws_sdk_dynamodb_0_30 = { package = "aws-sdk-dynamodb", version = "0.30", default-features = false, optional = true } __aws_sdk_dynamodb_0_31 = { package = "aws-sdk-dynamodb", version = "0.31", default-features = false, optional = true } +__aws_sdk_dynamodb_0_32 = { package = "aws-sdk-dynamodb", version = "0.32", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_8 = { package = "aws-sdk-dynamodbstreams", version = "0.8", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_9 = { package = "aws-sdk-dynamodbstreams", version = "0.9", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_10 = { package = "aws-sdk-dynamodbstreams", version = "0.10", default-features = false, optional = true } @@ -61,6 +62,7 @@ __aws_sdk_dynamodbstreams_0_28 = { package = "aws-sdk-dynamodbstreams", version __aws_sdk_dynamodbstreams_0_29 = { package = "aws-sdk-dynamodbstreams", version = "0.29", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_30 = { package = "aws-sdk-dynamodbstreams", version = "0.30", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_31 = { package = "aws-sdk-dynamodbstreams", version = "0.31", default-features = false, optional = true } +__aws_sdk_dynamodbstreams_0_32 = { package = "aws-sdk-dynamodbstreams", version = "0.32", default-features = false, optional = true } __rusoto_dynamodb_0_46 = { package = "rusoto_dynamodb", version = "0.46", default-features = false, optional = true } __rusoto_dynamodb_0_47 = { package = "rusoto_dynamodb", version = "0.47", default-features = false, optional = true } __rusoto_dynamodb_0_48 = { package = "rusoto_dynamodb", version = "0.48", default-features = false, optional = true } @@ -101,6 +103,7 @@ __rusoto_core_0_48_crate = { package = "rusoto_core", version = "0.48", default- "aws-sdk-dynamodb+0_29" = ["__aws_sdk_dynamodb_0_29"] "aws-sdk-dynamodb+0_30" = ["__aws_sdk_dynamodb_0_30"] "aws-sdk-dynamodb+0_31" = ["__aws_sdk_dynamodb_0_31"] +"aws-sdk-dynamodb+0_32" = ["__aws_sdk_dynamodb_0_32"] "aws-sdk-dynamodbstreams+0_8" = ["__aws_sdk_dynamodbstreams_0_8"] "aws-sdk-dynamodbstreams+0_9" = ["__aws_sdk_dynamodbstreams_0_9"] "aws-sdk-dynamodbstreams+0_10" = ["__aws_sdk_dynamodbstreams_0_10"] @@ -124,6 +127,7 @@ __rusoto_core_0_48_crate = { package = "rusoto_core", version = "0.48", default- "aws-sdk-dynamodbstreams+0_29" = ["__aws_sdk_dynamodbstreams_0_29"] "aws-sdk-dynamodbstreams+0_30" = ["__aws_sdk_dynamodbstreams_0_30"] "aws-sdk-dynamodbstreams+0_31" = ["__aws_sdk_dynamodbstreams_0_31"] +"aws-sdk-dynamodbstreams+0_32" = ["__aws_sdk_dynamodbstreams_0_32"] "rusoto_dynamodb+0_46" = ["__rusoto_dynamodb_0_46"] "rusoto_dynamodb+0_47" = ["__rusoto_dynamodb_0_47"] "rusoto_dynamodb+0_48" = ["__rusoto_dynamodb_0_48"] diff --git a/src/de/mod.rs b/src/de/mod.rs index 40ffdde..cc0e53b 100644 --- a/src/de/mod.rs +++ b/src/de/mod.rs @@ -32,7 +32,7 @@ where /// Interpret an [`Item`] as an instance of type `T`. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_31::client::Client; +/// # use __aws_sdk_dynamodb_0_32::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::from_item; /// # @@ -68,7 +68,7 @@ where /// Interpret a [`Items`] as a `Vec`. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_31::client::Client; +/// # use __aws_sdk_dynamodb_0_32::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::from_items; /// # diff --git a/src/lib.rs b/src/lib.rs index ef8ef5d..b877ce9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,11 +102,11 @@ //! //! ```toml //! [dependencies] -//! serde_dynamo = { version = "4", features = ["aws-sdk-dynamodb+0_31"] } +//! serde_dynamo = { version = "4", features = ["aws-sdk-dynamodb+0_32"] } //! ``` //! -//! See [`aws_sdk_dynamodb_0_31`] for examples and more information. See -//! [`aws_sdk_dynamodbstreams_0_31`] for DynamoDb streams support. +//! See [`aws_sdk_dynamodb_0_32`] for examples and more information. See +//! [`aws_sdk_dynamodbstreams_0_32`] for DynamoDb streams support. //! //! ## aws_lambda_events support //! @@ -514,6 +514,16 @@ aws_sdk_macro!( config_version = "0.56", ); +aws_sdk_macro!( + feature = "aws-sdk-dynamodb+0_32", + crate_name = __aws_sdk_dynamodb_0_32, + mod_name = aws_sdk_dynamodb_0_32, + attribute_value_path = ::__aws_sdk_dynamodb_0_32::types::AttributeValue, + blob_path = ::__aws_sdk_dynamodb_0_32::primitives::Blob, + aws_version = "0.32", + config_version = "0.56", +); + aws_sdk_streams_macro!( feature = "aws-sdk-dynamodbstreams+0_8", crate_name = __aws_sdk_dynamodbstreams_0_8, @@ -721,6 +731,15 @@ aws_sdk_streams_macro!( aws_version = "0.31", ); +aws_sdk_streams_macro!( + feature = "aws-sdk-dynamodbstreams+0_32", + crate_name = __aws_sdk_dynamodbstreams_0_32, + mod_name = aws_sdk_dynamodbstreams_0_32, + attribute_value_path = ::__aws_sdk_dynamodbstreams_0_32::types::AttributeValue, + blob_path = ::__aws_sdk_dynamodbstreams_0_32::primitives::Blob, + aws_version = "0.32", +); + rusoto_macro!( feature = "rusoto_dynamodb+0_46", crate_name = __rusoto_dynamodb_0_46, diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 432ee7a..9450955 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -27,7 +27,7 @@ use serializer_tuple_variant::SerializerTupleVariant; /// /// ```no_run /// use serde_dynamo::to_attribute_value; -/// # use __aws_sdk_dynamodb_0_31::client::Client; +/// # use __aws_sdk_dynamodb_0_32::client::Client; /// # use std::collections::HashMap; /// # /// # async fn get(client: &Client) -> Result<(), Box> { @@ -50,7 +50,7 @@ use serializer_tuple_variant::SerializerTupleVariant; /// /// ```no_run /// use serde_dynamo::to_attribute_value; -/// # use __aws_sdk_dynamodb_0_31::client::Client; +/// # use __aws_sdk_dynamodb_0_32::client::Client; /// # use std::collections::HashMap; /// # /// # async fn query(client: &Client) -> Result<(), Box> { @@ -94,7 +94,7 @@ where /// This is frequently used when serializing an entire data structure to be sent to DynamoDB. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_31::client::Client; +/// # use __aws_sdk_dynamodb_0_32::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::to_item; /// # From 22be1eb6547435d02801b8ed0cbe093c196c0a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wrzeszcz?= Date: Mon, 9 Oct 2023 10:22:12 +0200 Subject: [PATCH 2/2] Support for `aws-sdk-dynamodb` 0.33. --- Cargo.toml | 4 ++++ src/de/mod.rs | 4 ++-- src/lib.rs | 25 ++++++++++++++++++++++--- src/ser/mod.rs | 6 +++--- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 78eba45..34c7ec8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ __aws_sdk_dynamodb_0_29 = { package = "aws-sdk-dynamodb", version = "0.29", defa __aws_sdk_dynamodb_0_30 = { package = "aws-sdk-dynamodb", version = "0.30", default-features = false, optional = true } __aws_sdk_dynamodb_0_31 = { package = "aws-sdk-dynamodb", version = "0.31", default-features = false, optional = true } __aws_sdk_dynamodb_0_32 = { package = "aws-sdk-dynamodb", version = "0.32", default-features = false, optional = true } +__aws_sdk_dynamodb_0_33 = { package = "aws-sdk-dynamodb", version = "0.33", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_8 = { package = "aws-sdk-dynamodbstreams", version = "0.8", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_9 = { package = "aws-sdk-dynamodbstreams", version = "0.9", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_10 = { package = "aws-sdk-dynamodbstreams", version = "0.10", default-features = false, optional = true } @@ -63,6 +64,7 @@ __aws_sdk_dynamodbstreams_0_29 = { package = "aws-sdk-dynamodbstreams", version __aws_sdk_dynamodbstreams_0_30 = { package = "aws-sdk-dynamodbstreams", version = "0.30", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_31 = { package = "aws-sdk-dynamodbstreams", version = "0.31", default-features = false, optional = true } __aws_sdk_dynamodbstreams_0_32 = { package = "aws-sdk-dynamodbstreams", version = "0.32", default-features = false, optional = true } +__aws_sdk_dynamodbstreams_0_33 = { package = "aws-sdk-dynamodbstreams", version = "0.33", default-features = false, optional = true } __rusoto_dynamodb_0_46 = { package = "rusoto_dynamodb", version = "0.46", default-features = false, optional = true } __rusoto_dynamodb_0_47 = { package = "rusoto_dynamodb", version = "0.47", default-features = false, optional = true } __rusoto_dynamodb_0_48 = { package = "rusoto_dynamodb", version = "0.48", default-features = false, optional = true } @@ -104,6 +106,7 @@ __rusoto_core_0_48_crate = { package = "rusoto_core", version = "0.48", default- "aws-sdk-dynamodb+0_30" = ["__aws_sdk_dynamodb_0_30"] "aws-sdk-dynamodb+0_31" = ["__aws_sdk_dynamodb_0_31"] "aws-sdk-dynamodb+0_32" = ["__aws_sdk_dynamodb_0_32"] +"aws-sdk-dynamodb+0_33" = ["__aws_sdk_dynamodb_0_33"] "aws-sdk-dynamodbstreams+0_8" = ["__aws_sdk_dynamodbstreams_0_8"] "aws-sdk-dynamodbstreams+0_9" = ["__aws_sdk_dynamodbstreams_0_9"] "aws-sdk-dynamodbstreams+0_10" = ["__aws_sdk_dynamodbstreams_0_10"] @@ -128,6 +131,7 @@ __rusoto_core_0_48_crate = { package = "rusoto_core", version = "0.48", default- "aws-sdk-dynamodbstreams+0_30" = ["__aws_sdk_dynamodbstreams_0_30"] "aws-sdk-dynamodbstreams+0_31" = ["__aws_sdk_dynamodbstreams_0_31"] "aws-sdk-dynamodbstreams+0_32" = ["__aws_sdk_dynamodbstreams_0_32"] +"aws-sdk-dynamodbstreams+0_33" = ["__aws_sdk_dynamodbstreams_0_33"] "rusoto_dynamodb+0_46" = ["__rusoto_dynamodb_0_46"] "rusoto_dynamodb+0_47" = ["__rusoto_dynamodb_0_47"] "rusoto_dynamodb+0_48" = ["__rusoto_dynamodb_0_48"] diff --git a/src/de/mod.rs b/src/de/mod.rs index cc0e53b..8a45ddd 100644 --- a/src/de/mod.rs +++ b/src/de/mod.rs @@ -32,7 +32,7 @@ where /// Interpret an [`Item`] as an instance of type `T`. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_32::client::Client; +/// # use __aws_sdk_dynamodb_0_33::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::from_item; /// # @@ -68,7 +68,7 @@ where /// Interpret a [`Items`] as a `Vec`. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_32::client::Client; +/// # use __aws_sdk_dynamodb_0_33::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::from_items; /// # diff --git a/src/lib.rs b/src/lib.rs index b877ce9..f44fc2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,11 +102,11 @@ //! //! ```toml //! [dependencies] -//! serde_dynamo = { version = "4", features = ["aws-sdk-dynamodb+0_32"] } +//! serde_dynamo = { version = "4", features = ["aws-sdk-dynamodb+0_33"] } //! ``` //! -//! See [`aws_sdk_dynamodb_0_32`] for examples and more information. See -//! [`aws_sdk_dynamodbstreams_0_32`] for DynamoDb streams support. +//! See [`aws_sdk_dynamodb_0_33`] for examples and more information. See +//! [`aws_sdk_dynamodbstreams_0_33`] for DynamoDb streams support. //! //! ## aws_lambda_events support //! @@ -524,6 +524,16 @@ aws_sdk_macro!( config_version = "0.56", ); +aws_sdk_macro!( + feature = "aws-sdk-dynamodb+0_33", + crate_name = __aws_sdk_dynamodb_0_33, + mod_name = aws_sdk_dynamodb_0_33, + attribute_value_path = ::__aws_sdk_dynamodb_0_33::types::AttributeValue, + blob_path = ::__aws_sdk_dynamodb_0_33::primitives::Blob, + aws_version = "0.33", + config_version = "0.56", +); + aws_sdk_streams_macro!( feature = "aws-sdk-dynamodbstreams+0_8", crate_name = __aws_sdk_dynamodbstreams_0_8, @@ -740,6 +750,15 @@ aws_sdk_streams_macro!( aws_version = "0.32", ); +aws_sdk_streams_macro!( + feature = "aws-sdk-dynamodbstreams+0_33", + crate_name = __aws_sdk_dynamodbstreams_0_33, + mod_name = aws_sdk_dynamodbstreams_0_33, + attribute_value_path = ::__aws_sdk_dynamodbstreams_0_33::types::AttributeValue, + blob_path = ::__aws_sdk_dynamodbstreams_0_33::primitives::Blob, + aws_version = "0.33", +); + rusoto_macro!( feature = "rusoto_dynamodb+0_46", crate_name = __rusoto_dynamodb_0_46, diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 9450955..31e1744 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -27,7 +27,7 @@ use serializer_tuple_variant::SerializerTupleVariant; /// /// ```no_run /// use serde_dynamo::to_attribute_value; -/// # use __aws_sdk_dynamodb_0_32::client::Client; +/// # use __aws_sdk_dynamodb_0_33::client::Client; /// # use std::collections::HashMap; /// # /// # async fn get(client: &Client) -> Result<(), Box> { @@ -50,7 +50,7 @@ use serializer_tuple_variant::SerializerTupleVariant; /// /// ```no_run /// use serde_dynamo::to_attribute_value; -/// # use __aws_sdk_dynamodb_0_32::client::Client; +/// # use __aws_sdk_dynamodb_0_33::client::Client; /// # use std::collections::HashMap; /// # /// # async fn query(client: &Client) -> Result<(), Box> { @@ -94,7 +94,7 @@ where /// This is frequently used when serializing an entire data structure to be sent to DynamoDB. /// /// ```no_run -/// # use __aws_sdk_dynamodb_0_32::client::Client; +/// # use __aws_sdk_dynamodb_0_33::client::Client; /// # use serde_derive::{Serialize, Deserialize}; /// # use serde_dynamo::to_item; /// #