AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

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

@@ -1,0 +58,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_organization_custom_policy_rule_metadata(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::OrganizationCustomPolicyRuleMetadata,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.description {
    7         -
        object.key("Description").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.organization_config_rule_trigger_types {
   10         -
        let mut array_3 = object.key("OrganizationConfigRuleTriggerTypes").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         -
    if let Some(var_5) = &input.input_parameters {
   19         -
        object.key("InputParameters").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.maximum_execution_frequency {
   22         -
        object.key("MaximumExecutionFrequency").string(var_6.as_str());
   23         -
    }
   24         -
    if let Some(var_7) = &input.resource_types_scope {
   25         -
        let mut array_8 = object.key("ResourceTypesScope").start_array();
   26         -
        for item_9 in var_7 {
   27         -
            {
   28         -
                array_8.value().string(item_9.as_str());
   29         -
            }
   30         -
        }
   31         -
        array_8.finish();
   32         -
    }
   33         -
    if let Some(var_10) = &input.resource_id_scope {
   34         -
        object.key("ResourceIdScope").string(var_10.as_str());
   35         -
    }
   36         -
    if let Some(var_11) = &input.tag_key_scope {
   37         -
        object.key("TagKeyScope").string(var_11.as_str());
   38         -
    }
   39         -
    if let Some(var_12) = &input.tag_value_scope {
   40         -
        object.key("TagValueScope").string(var_12.as_str());
   41         -
    }
   42         -
    {
   43         -
        object.key("PolicyRuntime").string(input.policy_runtime.as_str());
   44         -
    }
   45         -
    {
   46         -
        object.key("PolicyText").string(input.policy_text.as_str());
   47         -
    }
   48         -
    if let Some(var_13) = &input.debug_log_delivery_accounts {
   49         -
        let mut array_14 = object.key("DebugLogDeliveryAccounts").start_array();
   50         -
        for item_15 in var_13 {
   51         -
            {
   52         -
                array_14.value().string(item_15.as_str());
   53         -
            }
   54         -
        }
   55         -
        array_14.finish();
   56         -
    }
   57         -
    Ok(())
   58         -
}

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

@@ -1,0 +97,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_organization_custom_policy_rule_metadata_no_policy<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::OrganizationCustomPolicyRuleMetadataNoPolicy>, ::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::OrganizationCustomPolicyRuleMetadataNoPolicyBuilder::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         -
                        "Description" => {
   19         -
                            builder = builder.set_description(
   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         -
                        "OrganizationConfigRuleTriggerTypes" => {
   26         -
                            builder = builder.set_organization_config_rule_trigger_types(
   27         -
                                    crate::protocol_serde::shape_organization_config_rule_trigger_type_no_sns::de_organization_config_rule_trigger_type_no_sns(tokens, _value)?
   28         -
                                );
   29         -
                        }
   30         -
                        "InputParameters" => {
   31         -
                            builder = builder.set_input_parameters(
   32         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   33         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   34         -
                                    .transpose()?,
   35         -
                            );
   36         -
                        }
   37         -
                        "MaximumExecutionFrequency" => {
   38         -
                            builder = builder.set_maximum_execution_frequency(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MaximumExecutionFrequency::from(u.as_ref())))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "ResourceTypesScope" => {
   45         -
                            builder = builder.set_resource_types_scope(crate::protocol_serde::shape_resource_types_scope::de_resource_types_scope(
   46         -
                                tokens, _value,
   47         -
                            )?);
   48         -
                        }
   49         -
                        "ResourceIdScope" => {
   50         -
                            builder = builder.set_resource_id_scope(
   51         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   52         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   53         -
                                    .transpose()?,
   54         -
                            );
   55         -
                        }
   56         -
                        "TagKeyScope" => {
   57         -
                            builder = builder.set_tag_key_scope(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   59         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        "TagValueScope" => {
   64         -
                            builder = builder.set_tag_value_scope(
   65         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   66         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   67         -
                                    .transpose()?,
   68         -
                            );
   69         -
                        }
   70         -
                        "PolicyRuntime" => {
   71         -
                            builder = builder.set_policy_runtime(
   72         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   73         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   74         -
                                    .transpose()?,
   75         -
                            );
   76         -
                        }
   77         -
                        "DebugLogDeliveryAccounts" => {
   78         -
                            builder = builder.set_debug_log_delivery_accounts(
   79         -
                                crate::protocol_serde::shape_debug_log_delivery_accounts::de_debug_log_delivery_accounts(tokens, _value)?,
   80         -
                            );
   81         -
                        }
   82         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   83         -
                    },
   84         -
                    other => {
   85         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   86         -
                            "expected object key or end object, found: {other:?}"
   87         -
                        )))
   88         -
                    }
   89         -
                }
   90         -
            }
   91         -
            Ok(Some(builder.build()))
   92         -
        }
   93         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   94         -
            "expected start object or null",
   95         -
        )),
   96         -
    }
   97         -
}

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

@@ -1,0 +144,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_organization_custom_rule_metadata(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::OrganizationCustomRuleMetadata,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.description {
    7         -
        object.key("Description").string(var_1.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("LambdaFunctionArn").string(input.lambda_function_arn.as_str());
   11         -
    }
   12         -
    {
   13         -
        let mut array_2 = object.key("OrganizationConfigRuleTriggerTypes").start_array();
   14         -
        for item_3 in &input.organization_config_rule_trigger_types {
   15         -
            {
   16         -
                array_2.value().string(item_3.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_2.finish();
   20         -
    }
   21         -
    if let Some(var_4) = &input.input_parameters {
   22         -
        object.key("InputParameters").string(var_4.as_str());
   23         -
    }
   24         -
    if let Some(var_5) = &input.maximum_execution_frequency {
   25         -
        object.key("MaximumExecutionFrequency").string(var_5.as_str());
   26         -
    }
   27         -
    if let Some(var_6) = &input.resource_types_scope {
   28         -
        let mut array_7 = object.key("ResourceTypesScope").start_array();
   29         -
        for item_8 in var_6 {
   30         -
            {
   31         -
                array_7.value().string(item_8.as_str());
   32         -
            }
   33         -
        }
   34         -
        array_7.finish();
   35         -
    }
   36         -
    if let Some(var_9) = &input.resource_id_scope {
   37         -
        object.key("ResourceIdScope").string(var_9.as_str());
   38         -
    }
   39         -
    if let Some(var_10) = &input.tag_key_scope {
   40         -
        object.key("TagKeyScope").string(var_10.as_str());
   41         -
    }
   42         -
    if let Some(var_11) = &input.tag_value_scope {
   43         -
        object.key("TagValueScope").string(var_11.as_str());
   44         -
    }
   45         -
    Ok(())
   46         -
}
   47         -
   48         -
pub(crate) fn de_organization_custom_rule_metadata<'a, I>(
   49         -
    tokens: &mut ::std::iter::Peekable<I>,
   50         -
    _value: &'a [u8],
   51         -
) -> ::std::result::Result<Option<crate::types::OrganizationCustomRuleMetadata>, ::aws_smithy_json::deserialize::error::DeserializeError>
   52         -
where
   53         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   54         -
{
   55         -
    match tokens.next().transpose()? {
   56         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   57         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   58         -
            #[allow(unused_mut)]
   59         -
            let mut builder = crate::types::builders::OrganizationCustomRuleMetadataBuilder::default();
   60         -
            loop {
   61         -
                match tokens.next().transpose()? {
   62         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   63         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   64         -
                        "Description" => {
   65         -
                            builder = builder.set_description(
   66         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   67         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   68         -
                                    .transpose()?,
   69         -
                            );
   70         -
                        }
   71         -
                        "LambdaFunctionArn" => {
   72         -
                            builder = builder.set_lambda_function_arn(
   73         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   74         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   75         -
                                    .transpose()?,
   76         -
                            );
   77         -
                        }
   78         -
                        "OrganizationConfigRuleTriggerTypes" => {
   79         -
                            builder = builder.set_organization_config_rule_trigger_types(
   80         -
                                crate::protocol_serde::shape_organization_config_rule_trigger_types::de_organization_config_rule_trigger_types(
   81         -
                                    tokens, _value,
   82         -
                                )?,
   83         -
                            );
   84         -
                        }
   85         -
                        "InputParameters" => {
   86         -
                            builder = builder.set_input_parameters(
   87         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   88         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   89         -
                                    .transpose()?,
   90         -
                            );
   91         -
                        }
   92         -
                        "MaximumExecutionFrequency" => {
   93         -
                            builder = builder.set_maximum_execution_frequency(
   94         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   95         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MaximumExecutionFrequency::from(u.as_ref())))
   96         -
                                    .transpose()?,
   97         -
                            );
   98         -
                        }
   99         -
                        "ResourceTypesScope" => {
  100         -
                            builder = builder.set_resource_types_scope(crate::protocol_serde::shape_resource_types_scope::de_resource_types_scope(
  101         -
                                tokens, _value,
  102         -
                            )?);
  103         -
                        }
  104         -
                        "ResourceIdScope" => {
  105         -
                            builder = builder.set_resource_id_scope(
  106         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  107         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  108         -
                                    .transpose()?,
  109         -
                            );
  110         -
                        }
  111         -
                        "TagKeyScope" => {
  112         -
                            builder = builder.set_tag_key_scope(
  113         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  114         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  115         -
                                    .transpose()?,
  116         -
                            );
  117         -
                        }
  118         -
                        "TagValueScope" => {
  119         -
                            builder = builder.set_tag_value_scope(
  120         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  121         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  122         -
                                    .transpose()?,
  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(
  135         -
                crate::serde_util::organization_custom_rule_metadata_correct_errors(builder)
  136         -
                    .build()
  137         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
  138         -
            ))
  139         -
        }
  140         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  141         -
            "expected start object or null",
  142         -
        )),
  143         -
    }
  144         -
}

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

@@ -1,0 +128,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_organization_managed_rule_metadata(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::OrganizationManagedRuleMetadata,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.description {
    7         -
        object.key("Description").string(var_1.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("RuleIdentifier").string(input.rule_identifier.as_str());
   11         -
    }
   12         -
    if let Some(var_2) = &input.input_parameters {
   13         -
        object.key("InputParameters").string(var_2.as_str());
   14         -
    }
   15         -
    if let Some(var_3) = &input.maximum_execution_frequency {
   16         -
        object.key("MaximumExecutionFrequency").string(var_3.as_str());
   17         -
    }
   18         -
    if let Some(var_4) = &input.resource_types_scope {
   19         -
        let mut array_5 = object.key("ResourceTypesScope").start_array();
   20         -
        for item_6 in var_4 {
   21         -
            {
   22         -
                array_5.value().string(item_6.as_str());
   23         -
            }
   24         -
        }
   25         -
        array_5.finish();
   26         -
    }
   27         -
    if let Some(var_7) = &input.resource_id_scope {
   28         -
        object.key("ResourceIdScope").string(var_7.as_str());
   29         -
    }
   30         -
    if let Some(var_8) = &input.tag_key_scope {
   31         -
        object.key("TagKeyScope").string(var_8.as_str());
   32         -
    }
   33         -
    if let Some(var_9) = &input.tag_value_scope {
   34         -
        object.key("TagValueScope").string(var_9.as_str());
   35         -
    }
   36         -
    Ok(())
   37         -
}
   38         -
   39         -
pub(crate) fn de_organization_managed_rule_metadata<'a, I>(
   40         -
    tokens: &mut ::std::iter::Peekable<I>,
   41         -
    _value: &'a [u8],
   42         -
) -> ::std::result::Result<Option<crate::types::OrganizationManagedRuleMetadata>, ::aws_smithy_json::deserialize::error::DeserializeError>
   43         -
where
   44         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   45         -
{
   46         -
    match tokens.next().transpose()? {
   47         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   48         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   49         -
            #[allow(unused_mut)]
   50         -
            let mut builder = crate::types::builders::OrganizationManagedRuleMetadataBuilder::default();
   51         -
            loop {
   52         -
                match tokens.next().transpose()? {
   53         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   54         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   55         -
                        "Description" => {
   56         -
                            builder = builder.set_description(
   57         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   58         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   59         -
                                    .transpose()?,
   60         -
                            );
   61         -
                        }
   62         -
                        "RuleIdentifier" => {
   63         -
                            builder = builder.set_rule_identifier(
   64         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   65         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   66         -
                                    .transpose()?,
   67         -
                            );
   68         -
                        }
   69         -
                        "InputParameters" => {
   70         -
                            builder = builder.set_input_parameters(
   71         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   72         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   73         -
                                    .transpose()?,
   74         -
                            );
   75         -
                        }
   76         -
                        "MaximumExecutionFrequency" => {
   77         -
                            builder = builder.set_maximum_execution_frequency(
   78         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   79         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MaximumExecutionFrequency::from(u.as_ref())))
   80         -
                                    .transpose()?,
   81         -
                            );
   82         -
                        }
   83         -
                        "ResourceTypesScope" => {
   84         -
                            builder = builder.set_resource_types_scope(crate::protocol_serde::shape_resource_types_scope::de_resource_types_scope(
   85         -
                                tokens, _value,
   86         -
                            )?);
   87         -
                        }
   88         -
                        "ResourceIdScope" => {
   89         -
                            builder = builder.set_resource_id_scope(
   90         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   91         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   92         -
                                    .transpose()?,
   93         -
                            );
   94         -
                        }
   95         -
                        "TagKeyScope" => {
   96         -
                            builder = builder.set_tag_key_scope(
   97         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   98         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   99         -
                                    .transpose()?,
  100         -
                            );
  101         -
                        }
  102         -
                        "TagValueScope" => {
  103         -
                            builder = builder.set_tag_value_scope(
  104         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  105         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  106         -
                                    .transpose()?,
  107         -
                            );
  108         -
                        }
  109         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  110         -
                    },
  111         -
                    other => {
  112         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  113         -
                            "expected object key or end object, found: {other:?}"
  114         -
                        )))
  115         -
                    }
  116         -
                }
  117         -
            }
  118         -
            Ok(Some(
  119         -
                crate::serde_util::organization_managed_rule_metadata_correct_errors(builder)
  120         -
                    .build()
  121         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
  122         -
            ))
  123         -
        }
  124         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  125         -
            "expected start object or null",
  126         -
        )),
  127         -
    }
  128         -
}

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_organization_resource_detailed_status_filters(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::OrganizationResourceDetailedStatusFilters,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.account_id {
    7         -
        object.key("AccountId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.status {
   10         -
        object.key("Status").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

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

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

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_pending_aggregation_request<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::PendingAggregationRequest>, ::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::PendingAggregationRequestBuilder::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         -
                        "RequesterAccountId" => {
   19         -
                            builder = builder.set_requester_account_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         -
                        "RequesterAwsRegion" => {
   26         -
                            builder = builder.set_requester_aws_region(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_pending_aggregation_request_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_pending_aggregation_request_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::PendingAggregationRequest>>, ::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_pending_aggregation_request::de_pending_aggregation_request(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_put_aggregation_authorization.rs

@@ -1,0 +110,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_put_aggregation_authorization_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::put_aggregation_authorization::PutAggregationAuthorizationOutput,
    9         -
    crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError,
   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::put_aggregation_authorization::PutAggregationAuthorizationError::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::put_aggregation_authorization::PutAggregationAuthorizationError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => {
   24         -
            crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError::InvalidParameterValueException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError::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         -
        }
   43         -
        _ => crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError::generic(generic),
   44         -
    })
   45         -
}
   46         -
   47         -
#[allow(clippy::unnecessary_wraps)]
   48         -
pub fn de_put_aggregation_authorization_http_response(
   49         -
    _response_status: u16,
   50         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   51         -
    _response_body: &[u8],
   52         -
) -> std::result::Result<
   53         -
    crate::operation::put_aggregation_authorization::PutAggregationAuthorizationOutput,
   54         -
    crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError,
   55         -
> {
   56         -
    Ok({
   57         -
        #[allow(unused_mut)]
   58         -
        let mut output = crate::operation::put_aggregation_authorization::builders::PutAggregationAuthorizationOutputBuilder::default();
   59         -
        output = crate::protocol_serde::shape_put_aggregation_authorization::de_put_aggregation_authorization(_response_body, output)
   60         -
            .map_err(crate::operation::put_aggregation_authorization::PutAggregationAuthorizationError::unhandled)?;
   61         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   62         -
        output.build()
   63         -
    })
   64         -
}
   65         -
   66         -
pub fn ser_put_aggregation_authorization_input(
   67         -
    input: &crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput,
   68         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   69         -
    let mut out = String::new();
   70         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   71         -
    crate::protocol_serde::shape_put_aggregation_authorization_input::ser_put_aggregation_authorization_input_input(&mut object, input)?;
   72         -
    object.finish();
   73         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   74         -
}
   75         -
   76         -
pub(crate) fn de_put_aggregation_authorization(
   77         -
    _value: &[u8],
   78         -
    mut builder: crate::operation::put_aggregation_authorization::builders::PutAggregationAuthorizationOutputBuilder,
   79         -
) -> ::std::result::Result<
   80         -
    crate::operation::put_aggregation_authorization::builders::PutAggregationAuthorizationOutputBuilder,
   81         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   82         -
> {
   83         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   84         -
    let tokens = &mut tokens_owned;
   85         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   86         -
    loop {
   87         -
        match tokens.next().transpose()? {
   88         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   89         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   90         -
                "AggregationAuthorization" => {
   91         -
                    builder = builder.set_aggregation_authorization(
   92         -
                        crate::protocol_serde::shape_aggregation_authorization::de_aggregation_authorization(tokens, _value)?,
   93         -
                    );
   94         -
                }
   95         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   96         -
            },
   97         -
            other => {
   98         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   99         -
                    "expected object key or end object, found: {other:?}"
  100         -
                )))
  101         -
            }
  102         -
        }
  103         -
    }
  104         -
    if tokens.next().is_some() {
  105         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  106         -
            "found more JSON tokens after completing parsing",
  107         -
        ));
  108         -
    }
  109         -
    Ok(builder)
  110         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_aggregation_authorization_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.authorized_account_id {
    7         -
        object.key("AuthorizedAccountId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.authorized_aws_region {
   10         -
        object.key("AuthorizedAwsRegion").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.tags {
   13         -
        let mut array_4 = object.key("Tags").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                #[allow(unused_mut)]
   17         -
                let mut object_6 = array_4.value().start_object();
   18         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_6, item_5)?;
   19         -
                object_6.finish();
   20         -
            }
   21         -
        }
   22         -
        array_4.finish();
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +129,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_put_config_rule_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::put_config_rule::PutConfigRuleOutput, crate::operation::put_config_rule::PutConfigRuleError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::put_config_rule::PutConfigRuleError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::put_config_rule::PutConfigRuleError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InsufficientPermissionsException" => crate::operation::put_config_rule::PutConfigRuleError::InsufficientPermissionsException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   26         -
                    _response_body,
   27         -
                    output,
   28         -
                )
   29         -
                .map_err(crate::operation::put_config_rule::PutConfigRuleError::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         -
        "InvalidParameterValueException" => crate::operation::put_config_rule::PutConfigRuleError::InvalidParameterValueException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   44         -
                    _response_body,
   45         -
                    output,
   46         -
                )
   47         -
                .map_err(crate::operation::put_config_rule::PutConfigRuleError::unhandled)?;
   48         -
                let output = output.meta(generic);
   49         -
                output.build()
   50         -
            };
   51         -
            if tmp.message.is_none() {
   52         -
                tmp.message = _error_message;
   53         -
            }
   54         -
            tmp
   55         -
        }),
   56         -
        "MaxNumberOfConfigRulesExceededException" => {
   57         -
            crate::operation::put_config_rule::PutConfigRuleError::MaxNumberOfConfigRulesExceededException({
   58         -
                #[allow(unused_mut)]
   59         -
                let mut tmp = {
   60         -
                    #[allow(unused_mut)]
   61         -
                    let mut output = crate::types::error::builders::MaxNumberOfConfigRulesExceededExceptionBuilder::default();
   62         -
                    output = crate::protocol_serde::shape_max_number_of_config_rules_exceeded_exception::de_max_number_of_config_rules_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_config_rule::PutConfigRuleError::unhandled)?;
   63         -
                    let output = output.meta(generic);
   64         -
                    output.build()
   65         -
                };
   66         -
                if tmp.message.is_none() {
   67         -
                    tmp.message = _error_message;
   68         -
                }
   69         -
                tmp
   70         -
            })
   71         -
        }
   72         -
        "NoAvailableConfigurationRecorderException" => {
   73         -
            crate::operation::put_config_rule::PutConfigRuleError::NoAvailableConfigurationRecorderException({
   74         -
                #[allow(unused_mut)]
   75         -
                let mut tmp = {
   76         -
                    #[allow(unused_mut)]
   77         -
                    let mut output = crate::types::error::builders::NoAvailableConfigurationRecorderExceptionBuilder::default();
   78         -
                    output = crate::protocol_serde::shape_no_available_configuration_recorder_exception::de_no_available_configuration_recorder_exception_json_err(_response_body, output).map_err(crate::operation::put_config_rule::PutConfigRuleError::unhandled)?;
   79         -
                    let output = output.meta(generic);
   80         -
                    output.build()
   81         -
                };
   82         -
                if tmp.message.is_none() {
   83         -
                    tmp.message = _error_message;
   84         -
                }
   85         -
                tmp
   86         -
            })
   87         -
        }
   88         -
        "ResourceInUseException" => crate::operation::put_config_rule::PutConfigRuleError::ResourceInUseException({
   89         -
            #[allow(unused_mut)]
   90         -
            let mut tmp = {
   91         -
                #[allow(unused_mut)]
   92         -
                let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   93         -
                output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   94         -
                    .map_err(crate::operation::put_config_rule::PutConfigRuleError::unhandled)?;
   95         -
                let output = output.meta(generic);
   96         -
                output.build()
   97         -
            };
   98         -
            if tmp.message.is_none() {
   99         -
                tmp.message = _error_message;
  100         -
            }
  101         -
            tmp
  102         -
        }),
  103         -
        _ => crate::operation::put_config_rule::PutConfigRuleError::generic(generic),
  104         -
    })
  105         -
}
  106         -
  107         -
#[allow(clippy::unnecessary_wraps)]
  108         -
pub fn de_put_config_rule_http_response(
  109         -
    _response_status: u16,
  110         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  111         -
    _response_body: &[u8],
  112         -
) -> std::result::Result<crate::operation::put_config_rule::PutConfigRuleOutput, crate::operation::put_config_rule::PutConfigRuleError> {
  113         -
    Ok({
  114         -
        #[allow(unused_mut)]
  115         -
        let mut output = crate::operation::put_config_rule::builders::PutConfigRuleOutputBuilder::default();
  116         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  117         -
        output.build()
  118         -
    })
  119         -
}
  120         -
  121         -
pub fn ser_put_config_rule_input(
  122         -
    input: &crate::operation::put_config_rule::PutConfigRuleInput,
  123         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  124         -
    let mut out = String::new();
  125         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  126         -
    crate::protocol_serde::shape_put_config_rule_input::ser_put_config_rule_input_input(&mut object, input)?;
  127         -
    object.finish();
  128         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  129         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_config_rule_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_config_rule::PutConfigRuleInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.config_rule {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("ConfigRule").start_object();
    9         -
        crate::protocol_serde::shape_config_rule::ser_config_rule(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.tags {
   13         -
        let mut array_4 = object.key("Tags").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                #[allow(unused_mut)]
   17         -
                let mut object_6 = array_4.value().start_object();
   18         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_6, item_5)?;
   19         -
                object_6.finish();
   20         -
            }
   21         -
        }
   22         -
        array_4.finish();
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +196,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_put_configuration_aggregator_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::put_configuration_aggregator::PutConfigurationAggregatorOutput,
    9         -
    crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError,
   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::put_configuration_aggregator::PutConfigurationAggregatorError::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::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => {
   24         -
            crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::InvalidParameterValueException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::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         -
        }
   43         -
        "InvalidRoleException" => crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::InvalidRoleException({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp = {
   46         -
                #[allow(unused_mut)]
   47         -
                let mut output = crate::types::error::builders::InvalidRoleExceptionBuilder::default();
   48         -
                output = crate::protocol_serde::shape_invalid_role_exception::de_invalid_role_exception_json_err(_response_body, output)
   49         -
                    .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
   50         -
                let output = output.meta(generic);
   51         -
                output.build()
   52         -
            };
   53         -
            if tmp.message.is_none() {
   54         -
                tmp.message = _error_message;
   55         -
            }
   56         -
            tmp
   57         -
        }),
   58         -
        "LimitExceededException" => crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::LimitExceededException({
   59         -
            #[allow(unused_mut)]
   60         -
            let mut tmp = {
   61         -
                #[allow(unused_mut)]
   62         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   63         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   64         -
                    .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
   65         -
                let output = output.meta(generic);
   66         -
                output.build()
   67         -
            };
   68         -
            if tmp.message.is_none() {
   69         -
                tmp.message = _error_message;
   70         -
            }
   71         -
            tmp
   72         -
        }),
   73         -
        "NoAvailableOrganizationException" => {
   74         -
            crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::NoAvailableOrganizationException({
   75         -
                #[allow(unused_mut)]
   76         -
                let mut tmp = {
   77         -
                    #[allow(unused_mut)]
   78         -
                    let mut output = crate::types::error::builders::NoAvailableOrganizationExceptionBuilder::default();
   79         -
                    output = crate::protocol_serde::shape_no_available_organization_exception::de_no_available_organization_exception_json_err(
   80         -
                        _response_body,
   81         -
                        output,
   82         -
                    )
   83         -
                    .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
   84         -
                    let output = output.meta(generic);
   85         -
                    output.build()
   86         -
                };
   87         -
                if tmp.message.is_none() {
   88         -
                    tmp.message = _error_message;
   89         -
                }
   90         -
                tmp
   91         -
            })
   92         -
        }
   93         -
        "OrganizationAccessDeniedException" => {
   94         -
            crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::OrganizationAccessDeniedException({
   95         -
                #[allow(unused_mut)]
   96         -
                let mut tmp = {
   97         -
                    #[allow(unused_mut)]
   98         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
   99         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(
  100         -
                        _response_body,
  101         -
                        output,
  102         -
                    )
  103         -
                    .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
  104         -
                    let output = output.meta(generic);
  105         -
                    output.build()
  106         -
                };
  107         -
                if tmp.message.is_none() {
  108         -
                    tmp.message = _error_message;
  109         -
                }
  110         -
                tmp
  111         -
            })
  112         -
        }
  113         -
        "OrganizationAllFeaturesNotEnabledException" => {
  114         -
            crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::OrganizationAllFeaturesNotEnabledException({
  115         -
                #[allow(unused_mut)]
  116         -
                let mut tmp = {
  117         -
                    #[allow(unused_mut)]
  118         -
                    let mut output = crate::types::error::builders::OrganizationAllFeaturesNotEnabledExceptionBuilder::default();
  119         -
                    output = crate::protocol_serde::shape_organization_all_features_not_enabled_exception::de_organization_all_features_not_enabled_exception_json_err(_response_body, output).map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
  120         -
                    let output = output.meta(generic);
  121         -
                    output.build()
  122         -
                };
  123         -
                if tmp.message.is_none() {
  124         -
                    tmp.message = _error_message;
  125         -
                }
  126         -
                tmp
  127         -
            })
  128         -
        }
  129         -
        _ => crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::generic(generic),
  130         -
    })
  131         -
}
  132         -
  133         -
#[allow(clippy::unnecessary_wraps)]
  134         -
pub fn de_put_configuration_aggregator_http_response(
  135         -
    _response_status: u16,
  136         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  137         -
    _response_body: &[u8],
  138         -
) -> std::result::Result<
  139         -
    crate::operation::put_configuration_aggregator::PutConfigurationAggregatorOutput,
  140         -
    crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError,
  141         -
> {
  142         -
    Ok({
  143         -
        #[allow(unused_mut)]
  144         -
        let mut output = crate::operation::put_configuration_aggregator::builders::PutConfigurationAggregatorOutputBuilder::default();
  145         -
        output = crate::protocol_serde::shape_put_configuration_aggregator::de_put_configuration_aggregator(_response_body, output)
  146         -
            .map_err(crate::operation::put_configuration_aggregator::PutConfigurationAggregatorError::unhandled)?;
  147         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  148         -
        output.build()
  149         -
    })
  150         -
}
  151         -
  152         -
pub fn ser_put_configuration_aggregator_input(
  153         -
    input: &crate::operation::put_configuration_aggregator::PutConfigurationAggregatorInput,
  154         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  155         -
    let mut out = String::new();
  156         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  157         -
    crate::protocol_serde::shape_put_configuration_aggregator_input::ser_put_configuration_aggregator_input_input(&mut object, input)?;
  158         -
    object.finish();
  159         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  160         -
}
  161         -
  162         -
pub(crate) fn de_put_configuration_aggregator(
  163         -
    _value: &[u8],
  164         -
    mut builder: crate::operation::put_configuration_aggregator::builders::PutConfigurationAggregatorOutputBuilder,
  165         -
) -> ::std::result::Result<
  166         -
    crate::operation::put_configuration_aggregator::builders::PutConfigurationAggregatorOutputBuilder,
  167         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  168         -
> {
  169         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  170         -
    let tokens = &mut tokens_owned;
  171         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  172         -
    loop {
  173         -
        match tokens.next().transpose()? {
  174         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  175         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  176         -
                "ConfigurationAggregator" => {
  177         -
                    builder = builder.set_configuration_aggregator(
  178         -
                        crate::protocol_serde::shape_configuration_aggregator::de_configuration_aggregator(tokens, _value)?,
  179         -
                    );
  180         -
                }
  181         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  182         -
            },
  183         -
            other => {
  184         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  185         -
                    "expected object key or end object, found: {other:?}"
  186         -
                )))
  187         -
            }
  188         -
        }
  189         -
    }
  190         -
    if tokens.next().is_some() {
  191         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  192         -
            "found more JSON tokens after completing parsing",
  193         -
        ));
  194         -
    }
  195         -
    Ok(builder)
  196         -
}