AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_aggregate_evaluation_result_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_aggregate_evaluation_result_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AggregateEvaluationResult>>, ::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_aggregate_evaluation_result::de_aggregate_evaluation_result(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/config/src/protocol_serde/shape_aggregate_resource_identifier.rs

@@ -1,0 +94,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_aggregate_resource_identifier(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AggregateResourceIdentifier,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("SourceAccountId").string(input.source_account_id.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("SourceRegion").string(input.source_region.as_str());
   11         -
    }
   12         -
    {
   13         -
        object.key("ResourceId").string(input.resource_id.as_str());
   14         -
    }
   15         -
    {
   16         -
        object.key("ResourceType").string(input.resource_type.as_str());
   17         -
    }
   18         -
    if let Some(var_1) = &input.resource_name {
   19         -
        object.key("ResourceName").string(var_1.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_aggregate_resource_identifier<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::AggregateResourceIdentifier>, ::aws_smithy_json::deserialize::error::DeserializeError>
   28         -
where
   29         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   30         -
{
   31         -
    match tokens.next().transpose()? {
   32         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   33         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   34         -
            #[allow(unused_mut)]
   35         -
            let mut builder = crate::types::builders::AggregateResourceIdentifierBuilder::default();
   36         -
            loop {
   37         -
                match tokens.next().transpose()? {
   38         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   39         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   40         -
                        "SourceAccountId" => {
   41         -
                            builder = builder.set_source_account_id(
   42         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   43         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   44         -
                                    .transpose()?,
   45         -
                            );
   46         -
                        }
   47         -
                        "SourceRegion" => {
   48         -
                            builder = builder.set_source_region(
   49         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   50         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   51         -
                                    .transpose()?,
   52         -
                            );
   53         -
                        }
   54         -
                        "ResourceId" => {
   55         -
                            builder = builder.set_resource_id(
   56         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   57         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   58         -
                                    .transpose()?,
   59         -
                            );
   60         -
                        }
   61         -
                        "ResourceType" => {
   62         -
                            builder = builder.set_resource_type(
   63         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   64         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ResourceType::from(u.as_ref())))
   65         -
                                    .transpose()?,
   66         -
                            );
   67         -
                        }
   68         -
                        "ResourceName" => {
   69         -
                            builder = builder.set_resource_name(
   70         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   71         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   72         -
                                    .transpose()?,
   73         -
                            );
   74         -
                        }
   75         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   76         -
                    },
   77         -
                    other => {
   78         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   79         -
                            "expected object key or end object, found: {other:?}"
   80         -
                        )))
   81         -
                    }
   82         -
                }
   83         -
            }
   84         -
            Ok(Some(
   85         -
                crate::serde_util::aggregate_resource_identifier_correct_errors(builder)
   86         -
                    .build()
   87         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   88         -
            ))
   89         -
        }
   90         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   91         -
            "expected start object or null",
   92         -
        )),
   93         -
    }
   94         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_aggregated_source_status.rs

@@ -1,0 +81,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_aggregated_source_status<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AggregatedSourceStatus>, ::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::AggregatedSourceStatusBuilder::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         -
                        "SourceId" => {
   19         -
                            builder = builder.set_source_id(
   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         -
                        "SourceType" => {
   26         -
                            builder = builder.set_source_type(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::AggregatedSourceType::from(u.as_ref())))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "AwsRegion" => {
   33         -
                            builder = builder.set_aws_region(
   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         -
                        "LastUpdateStatus" => {
   40         -
                            builder = builder.set_last_update_status(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::AggregatedSourceStatusType::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "LastUpdateTime" => {
   47         -
                            builder = builder.set_last_update_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   48         -
                                tokens.next(),
   49         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   50         -
                            )?);
   51         -
                        }
   52         -
                        "LastErrorCode" => {
   53         -
                            builder = builder.set_last_error_code(
   54         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   55         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   56         -
                                    .transpose()?,
   57         -
                            );
   58         -
                        }
   59         -
                        "LastErrorMessage" => {
   60         -
                            builder = builder.set_last_error_message(
   61         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   62         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   63         -
                                    .transpose()?,
   64         -
                            );
   65         -
                        }
   66         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   67         -
                    },
   68         -
                    other => {
   69         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   70         -
                            "expected object key or end object, found: {other:?}"
   71         -
                        )))
   72         -
                    }
   73         -
                }
   74         -
            }
   75         -
            Ok(Some(builder.build()))
   76         -
        }
   77         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   78         -
            "expected start object or null",
   79         -
        )),
   80         -
    }
   81         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_aggregated_source_status_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_aggregated_source_status_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AggregatedSourceStatus>>, ::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_aggregated_source_status::de_aggregated_source_status(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/config/src/protocol_serde/shape_aggregation_authorization.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_aggregation_authorization<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AggregationAuthorization>, ::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::AggregationAuthorizationBuilder::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         -
                        "AggregationAuthorizationArn" => {
   19         -
                            builder = builder.set_aggregation_authorization_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         -
                        "AuthorizedAccountId" => {
   26         -
                            builder = builder.set_authorized_account_id(
   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         -
                        "AuthorizedAwsRegion" => {
   33         -
                            builder = builder.set_authorized_aws_region(
   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         -
                        "CreationTime" => {
   40         -
                            builder = builder.set_creation_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   41         -
                                tokens.next(),
   42         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   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(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_aggregation_authorization_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_aggregation_authorization_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AggregationAuthorization>>, ::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_aggregation_authorization::de_aggregation_authorization(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/config/src/protocol_serde/shape_aggregator_filter_resource_type.rs

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_aggregator_filter_resource_type(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AggregatorFilterResourceType,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.r#type {
    7         -
        object.key("Type").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.value {
   10         -
        let mut array_3 = object.key("Value").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_aggregator_filter_resource_type<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::AggregatorFilterResourceType>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::AggregatorFilterResourceTypeBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "Type" => {
   38         -
                            builder = builder.set_type(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::AggregatorFilterType::from(u.as_ref())))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "Value" => {
   45         -
                            builder = builder.set_value(crate::protocol_serde::shape_resource_type_value_list::de_resource_type_value_list(
   46         -
                                tokens, _value,
   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/config/src/protocol_serde/shape_aggregator_filter_service_principal.rs

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_aggregator_filter_service_principal(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AggregatorFilterServicePrincipal,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.r#type {
    7         -
        object.key("Type").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.value {
   10         -
        let mut array_3 = object.key("Value").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_aggregator_filter_service_principal<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::AggregatorFilterServicePrincipal>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::AggregatorFilterServicePrincipalBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "Type" => {
   38         -
                            builder = builder.set_type(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::AggregatorFilterType::from(u.as_ref())))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "Value" => {
   45         -
                            builder = builder.set_value(
   46         -
                                crate::protocol_serde::shape_service_principal_value_list::de_service_principal_value_list(tokens, _value)?,
   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/config/src/protocol_serde/shape_aggregator_filters.rs

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_aggregator_filters(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AggregatorFilters,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_type {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("ResourceType").start_object();
    9         -
        crate::protocol_serde::shape_aggregator_filter_resource_type::ser_aggregator_filter_resource_type(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.service_principal {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("ServicePrincipal").start_object();
   15         -
        crate::protocol_serde::shape_aggregator_filter_service_principal::ser_aggregator_filter_service_principal(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_aggregator_filters<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::AggregatorFilters>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::AggregatorFiltersBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "ResourceType" => {
   38         -
                            builder = builder.set_resource_type(
   39         -
                                crate::protocol_serde::shape_aggregator_filter_resource_type::de_aggregator_filter_resource_type(tokens, _value)?,
   40         -
                            );
   41         -
                        }
   42         -
                        "ServicePrincipal" => {
   43         -
                            builder = builder.set_service_principal(
   44         -
                                crate::protocol_serde::shape_aggregator_filter_service_principal::de_aggregator_filter_service_principal(
   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/config/src/protocol_serde/shape_aggregator_region_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_aggregator_region_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/config/src/protocol_serde/shape_associate_resource_types.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_associate_resource_types_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_associate_resource_types_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::associate_resource_types::AssociateResourceTypesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.configuration_recorder_arn {
    7         -
        object.key("ConfigurationRecorderArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.resource_types {
   10         -
        let mut array_3 = object.key("ResourceTypes").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_base_configuration_item.rs

@@ -1,0 +140,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_base_configuration_item<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::BaseConfigurationItem>, ::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::BaseConfigurationItemBuilder::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         -
                        "version" => {
   19         -
                            builder = builder.set_version(
   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         -
                        "accountId" => {
   26         -
                            builder = builder.set_account_id(
   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         -
                        "configurationItemCaptureTime" => {
   33         -
                            builder = builder.set_configuration_item_capture_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   34         -
                                tokens.next(),
   35         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   36         -
                            )?);
   37         -
                        }
   38         -
                        "configurationItemStatus" => {
   39         -
                            builder = builder.set_configuration_item_status(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ConfigurationItemStatus::from(u.as_ref())))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        "configurationStateId" => {
   46         -
                            builder = builder.set_configuration_state_id(
   47         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   48         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   49         -
                                    .transpose()?,
   50         -
                            );
   51         -
                        }
   52         -
                        "arn" => {
   53         -
                            builder = builder.set_arn(
   54         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   55         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   56         -
                                    .transpose()?,
   57         -
                            );
   58         -
                        }
   59         -
                        "resourceType" => {
   60         -
                            builder = builder.set_resource_type(
   61         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   62         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ResourceType::from(u.as_ref())))
   63         -
                                    .transpose()?,
   64         -
                            );
   65         -
                        }
   66         -
                        "resourceId" => {
   67         -
                            builder = builder.set_resource_id(
   68         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   69         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   70         -
                                    .transpose()?,
   71         -
                            );
   72         -
                        }
   73         -
                        "resourceName" => {
   74         -
                            builder = builder.set_resource_name(
   75         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   76         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   77         -
                                    .transpose()?,
   78         -
                            );
   79         -
                        }
   80         -
                        "awsRegion" => {
   81         -
                            builder = builder.set_aws_region(
   82         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   83         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   84         -
                                    .transpose()?,
   85         -
                            );
   86         -
                        }
   87         -
                        "availabilityZone" => {
   88         -
                            builder = builder.set_availability_zone(
   89         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   90         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   91         -
                                    .transpose()?,
   92         -
                            );
   93         -
                        }
   94         -
                        "resourceCreationTime" => {
   95         -
                            builder = builder.set_resource_creation_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   96         -
                                tokens.next(),
   97         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   98         -
                            )?);
   99         -
                        }
  100         -
                        "configuration" => {
  101         -
                            builder = builder.set_configuration(
  102         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  103         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  104         -
                                    .transpose()?,
  105         -
                            );
  106         -
                        }
  107         -
                        "supplementaryConfiguration" => {
  108         -
                            builder = builder.set_supplementary_configuration(
  109         -
                                crate::protocol_serde::shape_supplementary_configuration::de_supplementary_configuration(tokens, _value)?,
  110         -
                            );
  111         -
                        }
  112         -
                        "recordingFrequency" => {
  113         -
                            builder = builder.set_recording_frequency(
  114         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  115         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::RecordingFrequency::from(u.as_ref())))
  116         -
                                    .transpose()?,
  117         -
                            );
  118         -
                        }
  119         -
                        "configurationItemDeliveryTime" => {
  120         -
                            builder = builder.set_configuration_item_delivery_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  121         -
                                tokens.next(),
  122         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
  123         -
                            )?);
  124         -
                        }
  125         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  126         -
                    },
  127         -
                    other => {
  128         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  129         -
                            "expected object key or end object, found: {other:?}"
  130         -
                        )))
  131         -
                    }
  132         -
                }
  133         -
            }
  134         -
            Ok(Some(builder.build()))
  135         -
        }
  136         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  137         -
            "expected start object or null",
  138         -
        )),
  139         -
    }
  140         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_base_configuration_items.rs

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

@@ -1,0 +126,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_batch_get_aggregate_resource_config_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigOutput,
    9         -
    crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "NoSuchConfigurationAggregatorException" => {
   24         -
            crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::NoSuchConfigurationAggregatorException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::NoSuchConfigurationAggregatorExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_no_such_configuration_aggregator_exception::de_no_such_configuration_aggregator_exception_json_err(_response_body, output).map_err(crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::unhandled)?;
   30         -
                    let output = output.meta(generic);
   31         -
                    output.build()
   32         -
                };
   33         -
                if tmp.message.is_none() {
   34         -
                    tmp.message = _error_message;
   35         -
                }
   36         -
                tmp
   37         -
            })
   38         -
        }
   39         -
        "ValidationException" => crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::ValidationException({
   40         -
            #[allow(unused_mut)]
   41         -
            let mut tmp = {
   42         -
                #[allow(unused_mut)]
   43         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   44         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   45         -
                    .map_err(crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::unhandled)?;
   46         -
                let output = output.meta(generic);
   47         -
                output.build()
   48         -
            };
   49         -
            if tmp.message.is_none() {
   50         -
                tmp.message = _error_message;
   51         -
            }
   52         -
            tmp
   53         -
        }),
   54         -
        _ => crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::generic(generic),
   55         -
    })
   56         -
}
   57         -
   58         -
#[allow(clippy::unnecessary_wraps)]
   59         -
pub fn de_batch_get_aggregate_resource_config_http_response(
   60         -
    _response_status: u16,
   61         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   62         -
    _response_body: &[u8],
   63         -
) -> std::result::Result<
   64         -
    crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigOutput,
   65         -
    crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError,
   66         -
> {
   67         -
    Ok({
   68         -
        #[allow(unused_mut)]
   69         -
        let mut output = crate::operation::batch_get_aggregate_resource_config::builders::BatchGetAggregateResourceConfigOutputBuilder::default();
   70         -
        output = crate::protocol_serde::shape_batch_get_aggregate_resource_config::de_batch_get_aggregate_resource_config(_response_body, output)
   71         -
            .map_err(crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigError::unhandled)?;
   72         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   73         -
        output.build()
   74         -
    })
   75         -
}
   76         -
   77         -
pub fn ser_batch_get_aggregate_resource_config_input(
   78         -
    input: &crate::operation::batch_get_aggregate_resource_config::BatchGetAggregateResourceConfigInput,
   79         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   80         -
    let mut out = String::new();
   81         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   82         -
    crate::protocol_serde::shape_batch_get_aggregate_resource_config_input::ser_batch_get_aggregate_resource_config_input_input(&mut object, input)?;
   83         -
    object.finish();
   84         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   85         -
}
   86         -
   87         -
pub(crate) fn de_batch_get_aggregate_resource_config(
   88         -
    _value: &[u8],
   89         -
    mut builder: crate::operation::batch_get_aggregate_resource_config::builders::BatchGetAggregateResourceConfigOutputBuilder,
   90         -
) -> ::std::result::Result<
   91         -
    crate::operation::batch_get_aggregate_resource_config::builders::BatchGetAggregateResourceConfigOutputBuilder,
   92         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   93         -
> {
   94         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   95         -
    let tokens = &mut tokens_owned;
   96         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   97         -
    loop {
   98         -
        match tokens.next().transpose()? {
   99         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  100         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  101         -
                "BaseConfigurationItems" => {
  102         -
                    builder = builder.set_base_configuration_items(
  103         -
                        crate::protocol_serde::shape_base_configuration_items::de_base_configuration_items(tokens, _value)?,
  104         -
                    );
  105         -
                }
  106         -
                "UnprocessedResourceIdentifiers" => {
  107         -
                    builder = builder.set_unprocessed_resource_identifiers(
  108         -
                        crate::protocol_serde::shape_unprocessed_resource_identifier_list::de_unprocessed_resource_identifier_list(tokens, _value)?,
  109         -
                    );
  110         -
                }
  111         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
            },
  113         -
            other => {
  114         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                    "expected object key or end object, found: {other:?}"
  116         -
                )))
  117         -
            }
  118         -
        }
  119         -
    }
  120         -
    if tokens.next().is_some() {
  121         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  122         -
            "found more JSON tokens after completing parsing",
  123         -
        ));
  124         -
    }
  125         -
    Ok(builder)
  126         -
}