AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

@@ -1,0 +53,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_archival_summary<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ArchivalSummary>, ::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::ArchivalSummaryBuilder::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         -
                        "ArchivalDateTime" => {
   19         -
                            builder = builder.set_archival_date_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   20         -
                                tokens.next(),
   21         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   22         -
                            )?);
   23         -
                        }
   24         -
                        "ArchivalReason" => {
   25         -
                            builder = builder.set_archival_reason(
   26         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   27         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   28         -
                                    .transpose()?,
   29         -
                            );
   30         -
                        }
   31         -
                        "ArchivalBackupArn" => {
   32         -
                            builder = builder.set_archival_backup_arn(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   39         -
                    },
   40         -
                    other => {
   41         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   42         -
                            "expected object key or end object, found: {other:?}"
   43         -
                        )))
   44         -
                    }
   45         -
                }
   46         -
            }
   47         -
            Ok(Some(builder.build()))
   48         -
        }
   49         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   50         -
            "expected start object or null",
   51         -
        )),
   52         -
    }
   53         -
}

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

@@ -1,0 +62,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_attribute_definition(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AttributeDefinition,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("AttributeName").string(input.attribute_name.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("AttributeType").string(input.attribute_type.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_attribute_definition<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::AttributeDefinition>, ::aws_smithy_json::deserialize::error::DeserializeError>
   19         -
where
   20         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   21         -
{
   22         -
    match tokens.next().transpose()? {
   23         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   24         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   25         -
            #[allow(unused_mut)]
   26         -
            let mut builder = crate::types::builders::AttributeDefinitionBuilder::default();
   27         -
            loop {
   28         -
                match tokens.next().transpose()? {
   29         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   30         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   31         -
                        "AttributeName" => {
   32         -
                            builder = builder.set_attribute_name(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "AttributeType" => {
   39         -
                            builder = builder.set_attribute_type(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ScalarAttributeType::from(u.as_ref())))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(crate::serde_util::attribute_definition_correct_errors(builder).build().map_err(
   55         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   56         -
            )?))
   57         -
        }
   58         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   59         -
            "expected start object or null",
   60         -
        )),
   61         -
    }
   62         -
}

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

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

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_attribute_map<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<
    6         -
    Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
    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::StartObject { .. }) => {
   15         -
            let mut map = ::std::collections::HashMap::new();
   16         -
            loop {
   17         -
                match tokens.next().transpose()? {
   18         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21         -
                        let value = crate::protocol_serde::shape_attribute_value::de_attribute_value(tokens, _value)?;
   22         -
                        match value {
   23         -
                            Some(value) => {
   24         -
                                map.insert(key, value);
   25         -
                            }
   26         -
                            None => {
   27         -
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   28         -
                                    "dense map cannot contain null values",
   29         -
                                ))
   30         -
                            }
   31         -
                        }
   32         -
                    }
   33         -
                    other => {
   34         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   35         -
                            "expected object key or end object, found: {other:?}"
   36         -
                        )))
   37         -
                    }
   38         -
                }
   39         -
            }
   40         -
            Ok(Some(map))
   41         -
        }
   42         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43         -
            "expected start object or null",
   44         -
        )),
   45         -
    }
   46         -
}

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

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

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

@@ -1,0 +183,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_attribute_value(
    3         -
    object_6: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AttributeValue,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    match input {
    7         -
        crate::types::AttributeValue::S(inner) => {
    8         -
            object_6.key("S").string(inner.as_str());
    9         -
        }
   10         -
        crate::types::AttributeValue::N(inner) => {
   11         -
            object_6.key("N").string(inner.as_str());
   12         -
        }
   13         -
        crate::types::AttributeValue::B(inner) => {
   14         -
            object_6.key("B").string_unchecked(&::aws_smithy_types::base64::encode(inner));
   15         -
        }
   16         -
        crate::types::AttributeValue::Ss(inner) => {
   17         -
            let mut array_1 = object_6.key("SS").start_array();
   18         -
            for item_2 in inner {
   19         -
                {
   20         -
                    array_1.value().string(item_2.as_str());
   21         -
                }
   22         -
            }
   23         -
            array_1.finish();
   24         -
        }
   25         -
        crate::types::AttributeValue::Ns(inner) => {
   26         -
            let mut array_3 = object_6.key("NS").start_array();
   27         -
            for item_4 in inner {
   28         -
                {
   29         -
                    array_3.value().string(item_4.as_str());
   30         -
                }
   31         -
            }
   32         -
            array_3.finish();
   33         -
        }
   34         -
        crate::types::AttributeValue::Bs(inner) => {
   35         -
            let mut array_5 = object_6.key("BS").start_array();
   36         -
            for item_6 in inner {
   37         -
                {
   38         -
                    array_5.value().string_unchecked(&::aws_smithy_types::base64::encode(item_6));
   39         -
                }
   40         -
            }
   41         -
            array_5.finish();
   42         -
        }
   43         -
        crate::types::AttributeValue::M(inner) => {
   44         -
            #[allow(unused_mut)]
   45         -
            let mut object_7 = object_6.key("M").start_object();
   46         -
            for (key_8, value_9) in inner {
   47         -
                {
   48         -
                    #[allow(unused_mut)]
   49         -
                    let mut object_10 = object_7.key(key_8.as_str()).start_object();
   50         -
                    crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_10, value_9)?;
   51         -
                    object_10.finish();
   52         -
                }
   53         -
            }
   54         -
            object_7.finish();
   55         -
        }
   56         -
        crate::types::AttributeValue::L(inner) => {
   57         -
            let mut array_11 = object_6.key("L").start_array();
   58         -
            for item_12 in inner {
   59         -
                {
   60         -
                    #[allow(unused_mut)]
   61         -
                    let mut object_13 = array_11.value().start_object();
   62         -
                    crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_13, item_12)?;
   63         -
                    object_13.finish();
   64         -
                }
   65         -
            }
   66         -
            array_11.finish();
   67         -
        }
   68         -
        crate::types::AttributeValue::Null(inner) => {
   69         -
            object_6.key("NULL").boolean(*inner);
   70         -
        }
   71         -
        crate::types::AttributeValue::Bool(inner) => {
   72         -
            object_6.key("BOOL").boolean(*inner);
   73         -
        }
   74         -
        crate::types::AttributeValue::Unknown => {
   75         -
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   76         -
                "AttributeValue",
   77         -
            ))
   78         -
        }
   79         -
    }
   80         -
    Ok(())
   81         -
}
   82         -
   83         -
pub(crate) fn de_attribute_value<'a, I>(
   84         -
    tokens: &mut ::std::iter::Peekable<I>,
   85         -
    _value: &'a [u8],
   86         -
) -> ::std::result::Result<Option<crate::types::AttributeValue>, ::aws_smithy_json::deserialize::error::DeserializeError>
   87         -
where
   88         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   89         -
{
   90         -
    let mut variant = None;
   91         -
    match tokens.next().transpose()? {
   92         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   93         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   94         -
            match tokens.next().transpose()? {
   95         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   96         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   97         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   98         -
                        tokens.peek()
   99         -
                    {
  100         -
                        let _ = tokens.next().expect("peek returned a token")?;
  101         -
                        continue;
  102         -
                    }
  103         -
                    let key = key.to_unescaped()?;
  104         -
                    if key == "__type" {
  105         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
  106         -
                        continue;
  107         -
                    }
  108         -
                    if variant.is_some() {
  109         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  110         -
                            "encountered mixed variants in union",
  111         -
                        ));
  112         -
                    }
  113         -
                    variant = match key.as_ref() {
  114         -
                        "S" => Some(crate::types::AttributeValue::S(
  115         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  116         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  117         -
                                .transpose()?
  118         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'S' cannot be null"))?,
  119         -
                        )),
  120         -
                        "N" => Some(crate::types::AttributeValue::N(
  121         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  122         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  123         -
                                .transpose()?
  124         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'N' cannot be null"))?,
  125         -
                        )),
  126         -
                        "B" => Some(crate::types::AttributeValue::B(
  127         -
                            ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
  128         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'B' cannot be null"))?,
  129         -
                        )),
  130         -
                        "SS" => Some(crate::types::AttributeValue::Ss(
  131         -
                            crate::protocol_serde::shape_string_set_attribute_value::de_string_set_attribute_value(tokens, _value)?
  132         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'SS' cannot be null"))?,
  133         -
                        )),
  134         -
                        "NS" => Some(crate::types::AttributeValue::Ns(
  135         -
                            crate::protocol_serde::shape_number_set_attribute_value::de_number_set_attribute_value(tokens, _value)?
  136         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NS' cannot be null"))?,
  137         -
                        )),
  138         -
                        "BS" => Some(crate::types::AttributeValue::Bs(
  139         -
                            crate::protocol_serde::shape_binary_set_attribute_value::de_binary_set_attribute_value(tokens, _value)?
  140         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BS' cannot be null"))?,
  141         -
                        )),
  142         -
                        "M" => Some(crate::types::AttributeValue::M(
  143         -
                            crate::protocol_serde::shape_map_attribute_value::de_map_attribute_value(tokens, _value)?
  144         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'M' cannot be null"))?,
  145         -
                        )),
  146         -
                        "L" => Some(crate::types::AttributeValue::L(
  147         -
                            crate::protocol_serde::shape_list_attribute_value::de_list_attribute_value(tokens, _value)?
  148         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'L' cannot be null"))?,
  149         -
                        )),
  150         -
                        "NULL" => Some(crate::types::AttributeValue::Null(
  151         -
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
  152         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NULL' cannot be null"))?,
  153         -
                        )),
  154         -
                        "BOOL" => Some(crate::types::AttributeValue::Bool(
  155         -
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
  156         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BOOL' cannot be null"))?,
  157         -
                        )),
  158         -
                        _ => {
  159         -
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
  160         -
                            Some(crate::types::AttributeValue::Unknown)
  161         -
                        }
  162         -
                    };
  163         -
                }
  164         -
                other => {
  165         -
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  166         -
                        "expected object key or end object, found: {other:?}"
  167         -
                    )))
  168         -
                }
  169         -
            }
  170         -
        },
  171         -
        _ => {
  172         -
            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  173         -
                "expected start object or null",
  174         -
            ))
  175         -
        }
  176         -
    }
  177         -
    if variant.is_none() {
  178         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  179         -
            "Union did not contain a valid variant.",
  180         -
        ));
  181         -
    }
  182         -
    Ok(variant)
  183         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_attribute_value_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AttributeValueUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.value {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("Value").start_object();
    9         -
        crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.action {
   13         -
        object.key("Action").string(var_3.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/protocol_serde/shape_auto_scaling_policy_description_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_auto_scaling_policy_description_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AutoScalingPolicyDescription>>, ::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_auto_scaling_policy_description::de_auto_scaling_policy_description(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_auto_scaling_policy_update.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_auto_scaling_policy_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AutoScalingPolicyUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.policy_name {
    7         -
        object.key("PolicyName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.target_tracking_scaling_policy_configuration {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("TargetTrackingScalingPolicyConfiguration").start_object();
   12         -
        crate::protocol_serde::shape_auto_scaling_target_tracking_scaling_policy_configuration_update::ser_auto_scaling_target_tracking_scaling_policy_configuration_update(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_auto_scaling_settings_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AutoScalingSettingsDescription>, ::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::AutoScalingSettingsDescriptionBuilder::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         -
                        "MinimumUnits" => {
   19         -
                            builder = builder.set_minimum_units(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "MaximumUnits" => {
   26         -
                            builder = builder.set_maximum_units(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "AutoScalingDisabled" => {
   33         -
                            builder = builder.set_auto_scaling_disabled(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   34         -
                        }
   35         -
                        "AutoScalingRoleArn" => {
   36         -
                            builder = builder.set_auto_scaling_role_arn(
   37         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   38         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   39         -
                                    .transpose()?,
   40         -
                            );
   41         -
                        }
   42         -
                        "ScalingPolicies" => {
   43         -
                            builder = builder.set_scaling_policies(
   44         -
                                crate::protocol_serde::shape_auto_scaling_policy_description_list::de_auto_scaling_policy_description_list(
   45         -
                                    tokens, _value,
   46         -
                                )?,
   47         -
                            );
   48         -
                        }
   49         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   50         -
                    },
   51         -
                    other => {
   52         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   53         -
                            "expected object key or end object, found: {other:?}"
   54         -
                        )))
   55         -
                    }
   56         -
                }
   57         -
            }
   58         -
            Ok(Some(builder.build()))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

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

@@ -1,0 +31,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_auto_scaling_settings_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AutoScalingSettingsUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.minimum_units {
    7         -
        object.key("MinimumUnits").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    if let Some(var_2) = &input.maximum_units {
   13         -
        object.key("MaximumUnits").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   16         -
        );
   17         -
    }
   18         -
    if let Some(var_3) = &input.auto_scaling_disabled {
   19         -
        object.key("AutoScalingDisabled").boolean(*var_3);
   20         -
    }
   21         -
    if let Some(var_4) = &input.auto_scaling_role_arn {
   22         -
        object.key("AutoScalingRoleArn").string(var_4.as_str());
   23         -
    }
   24         -
    if let Some(var_5) = &input.scaling_policy_update {
   25         -
        #[allow(unused_mut)]
   26         -
        let mut object_6 = object.key("ScalingPolicyUpdate").start_object();
   27         -
        crate::protocol_serde::shape_auto_scaling_policy_update::ser_auto_scaling_policy_update(&mut object_6, var_5)?;
   28         -
        object_6.finish();
   29         -
    }
   30         -
    Ok(())
   31         -
}

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

@@ -1,0 +62,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_auto_scaling_target_tracking_scaling_policy_configuration_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<
    6         -
    Option<crate::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription>,
    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::StartObject { .. }) => {
   15         -
            #[allow(unused_mut)]
   16         -
            let mut builder = crate::types::builders::AutoScalingTargetTrackingScalingPolicyConfigurationDescriptionBuilder::default();
   17         -
            loop {
   18         -
                match tokens.next().transpose()? {
   19         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   20         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   21         -
                        "DisableScaleIn" => {
   22         -
                            builder = builder.set_disable_scale_in(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   23         -
                        }
   24         -
                        "ScaleInCooldown" => {
   25         -
                            builder = builder.set_scale_in_cooldown(
   26         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   27         -
                                    .map(i32::try_from)
   28         -
                                    .transpose()?,
   29         -
                            );
   30         -
                        }
   31         -
                        "ScaleOutCooldown" => {
   32         -
                            builder = builder.set_scale_out_cooldown(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34         -
                                    .map(i32::try_from)
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "TargetValue" => {
   39         -
                            builder = builder.set_target_value(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
   41         -
                            );
   42         -
                        }
   43         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   44         -
                    },
   45         -
                    other => {
   46         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   47         -
                            "expected object key or end object, found: {other:?}"
   48         -
                        )))
   49         -
                    }
   50         -
                }
   51         -
            }
   52         -
            Ok(Some(
   53         -
                crate::serde_util::auto_scaling_target_tracking_scaling_policy_configuration_description_correct_errors(builder)
   54         -
                    .build()
   55         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   56         -
            ))
   57         -
        }
   58         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   59         -
            "expected start object or null",
   60         -
        )),
   61         -
    }
   62         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_auto_scaling_target_tracking_scaling_policy_configuration_update(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.disable_scale_in {
    7         -
        object.key("DisableScaleIn").boolean(*var_1);
    8         -
    }
    9         -
    if let Some(var_2) = &input.scale_in_cooldown {
   10         -
        object.key("ScaleInCooldown").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.scale_out_cooldown {
   16         -
        object.key("ScaleOutCooldown").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   19         -
        );
   20         -
    }
   21         -
    {
   22         -
        object.key("TargetValue").number(
   23         -
            #[allow(clippy::useless_conversion)]
   24         -
            ::aws_smithy_types::Number::Float((input.target_value).into()),
   25         -
        );
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_backup_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::BackupDescription>, ::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::BackupDescriptionBuilder::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         -
                        "BackupDetails" => {
   19         -
                            builder = builder.set_backup_details(crate::protocol_serde::shape_backup_details::de_backup_details(tokens, _value)?);
   20         -
                        }
   21         -
                        "SourceTableDetails" => {
   22         -
                            builder = builder.set_source_table_details(crate::protocol_serde::shape_source_table_details::de_source_table_details(
   23         -
                                tokens, _value,
   24         -
                            )?);
   25         -
                        }
   26         -
                        "SourceTableFeatureDetails" => {
   27         -
                            builder = builder.set_source_table_feature_details(
   28         -
                                crate::protocol_serde::shape_source_table_feature_details::de_source_table_feature_details(tokens, _value)?,
   29         -
                            );
   30         -
                        }
   31         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   32         -
                    },
   33         -
                    other => {
   34         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   35         -
                            "expected object key or end object, found: {other:?}"
   36         -
                        )))
   37         -
                    }
   38         -
                }
   39         -
            }
   40         -
            Ok(Some(builder.build()))
   41         -
        }
   42         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43         -
            "expected start object or null",
   44         -
        )),
   45         -
    }
   46         -
}

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

@@ -1,0 +82,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_backup_details<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::BackupDetails>, ::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::BackupDetailsBuilder::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         -
                        "BackupArn" => {
   19         -
                            builder = builder.set_backup_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         -
                        "BackupName" => {
   26         -
                            builder = builder.set_backup_name(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "BackupSizeBytes" => {
   33         -
                            builder = builder.set_backup_size_bytes(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "BackupStatus" => {
   40         -
                            builder = builder.set_backup_status(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::BackupStatus::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "BackupType" => {
   47         -
                            builder = builder.set_backup_type(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::BackupType::from(u.as_ref())))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "BackupCreationDateTime" => {
   54         -
                            builder = builder.set_backup_creation_date_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   55         -
                                tokens.next(),
   56         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   57         -
                            )?);
   58         -
                        }
   59         -
                        "BackupExpiryDateTime" => {
   60         -
                            builder = builder.set_backup_expiry_date_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   61         -
                                tokens.next(),
   62         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   63         -
                            )?);
   64         -
                        }
   65         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   66         -
                    },
   67         -
                    other => {
   68         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   69         -
                            "expected object key or end object, found: {other:?}"
   70         -
                        )))
   71         -
                    }
   72         -
                }
   73         -
            }
   74         -
            Ok(Some(crate::serde_util::backup_details_correct_errors(builder).build().map_err(
   75         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   76         -
            )?))
   77         -
        }
   78         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   79         -
            "expected start object or null",
   80         -
        )),
   81         -
    }
   82         -
}