AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_organization_config_rule_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.organization_config_rule_name {
    7         -
        object.key("OrganizationConfigRuleName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.organization_managed_rule_metadata {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("OrganizationManagedRuleMetadata").start_object();
   12         -
        crate::protocol_serde::shape_organization_managed_rule_metadata::ser_organization_managed_rule_metadata(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.organization_custom_rule_metadata {
   16         -
        #[allow(unused_mut)]
   17         -
        let mut object_5 = object.key("OrganizationCustomRuleMetadata").start_object();
   18         -
        crate::protocol_serde::shape_organization_custom_rule_metadata::ser_organization_custom_rule_metadata(&mut object_5, var_4)?;
   19         -
        object_5.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.excluded_accounts {
   22         -
        let mut array_7 = object.key("ExcludedAccounts").start_array();
   23         -
        for item_8 in var_6 {
   24         -
            {
   25         -
                array_7.value().string(item_8.as_str());
   26         -
            }
   27         -
        }
   28         -
        array_7.finish();
   29         -
    }
   30         -
    if let Some(var_9) = &input.organization_custom_policy_rule_metadata {
   31         -
        #[allow(unused_mut)]
   32         -
        let mut object_10 = object.key("OrganizationCustomPolicyRuleMetadata").start_object();
   33         -
        crate::protocol_serde::shape_organization_custom_policy_rule_metadata::ser_organization_custom_policy_rule_metadata(&mut object_10, var_9)?;
   34         -
        object_10.finish();
   35         -
    }
   36         -
    Ok(())
   37         -
}

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

@@ -1,0 +220,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_organization_conformance_pack_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_organization_conformance_pack::PutOrganizationConformancePackOutput,
    9         -
    crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError,
   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_organization_conformance_pack::PutOrganizationConformancePackError::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_organization_conformance_pack::PutOrganizationConformancePackError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InsufficientPermissionsException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::InsufficientPermissionsException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp =
   26         -
                 {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
   30         -
                    let output = output.meta(generic);
   31         -
                    output.build()
   32         -
                }
   33         -
            ;
   34         -
            if tmp.message.is_none() {
   35         -
                                                            tmp.message = _error_message;
   36         -
                                                        }
   37         -
            tmp
   38         -
        }),
   39         -
        "MaxNumberOfOrganizationConformancePacksExceededException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::MaxNumberOfOrganizationConformancePacksExceededException({
   40         -
            #[allow(unused_mut)]
   41         -
            let mut tmp =
   42         -
                 {
   43         -
                    #[allow(unused_mut)]
   44         -
                    let mut output = crate::types::error::builders::MaxNumberOfOrganizationConformancePacksExceededExceptionBuilder::default();
   45         -
                    output = crate::protocol_serde::shape_max_number_of_organization_conformance_packs_exceeded_exception::de_max_number_of_organization_conformance_packs_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
   46         -
                    let output = output.meta(generic);
   47         -
                    output.build()
   48         -
                }
   49         -
            ;
   50         -
            if tmp.message.is_none() {
   51         -
                                                            tmp.message = _error_message;
   52         -
                                                        }
   53         -
            tmp
   54         -
        }),
   55         -
        "NoAvailableOrganizationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::NoAvailableOrganizationException({
   56         -
            #[allow(unused_mut)]
   57         -
            let mut tmp =
   58         -
                 {
   59         -
                    #[allow(unused_mut)]
   60         -
                    let mut output = crate::types::error::builders::NoAvailableOrganizationExceptionBuilder::default();
   61         -
                    output = crate::protocol_serde::shape_no_available_organization_exception::de_no_available_organization_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
   62         -
                    let output = output.meta(generic);
   63         -
                    output.build()
   64         -
                }
   65         -
            ;
   66         -
            if tmp.message.is_none() {
   67         -
                                                            tmp.message = _error_message;
   68         -
                                                        }
   69         -
            tmp
   70         -
        }),
   71         -
        "OrganizationAccessDeniedException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationAccessDeniedException({
   72         -
            #[allow(unused_mut)]
   73         -
            let mut tmp =
   74         -
                 {
   75         -
                    #[allow(unused_mut)]
   76         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
   77         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
   78         -
                    let output = output.meta(generic);
   79         -
                    output.build()
   80         -
                }
   81         -
            ;
   82         -
            if tmp.message.is_none() {
   83         -
                                                            tmp.message = _error_message;
   84         -
                                                        }
   85         -
            tmp
   86         -
        }),
   87         -
        "OrganizationAllFeaturesNotEnabledException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationAllFeaturesNotEnabledException({
   88         -
            #[allow(unused_mut)]
   89         -
            let mut tmp =
   90         -
                 {
   91         -
                    #[allow(unused_mut)]
   92         -
                    let mut output = crate::types::error::builders::OrganizationAllFeaturesNotEnabledExceptionBuilder::default();
   93         -
                    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_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
   94         -
                    let output = output.meta(generic);
   95         -
                    output.build()
   96         -
                }
   97         -
            ;
   98         -
            if tmp.message.is_none() {
   99         -
                                                            tmp.message = _error_message;
  100         -
                                                        }
  101         -
            tmp
  102         -
        }),
  103         -
        "OrganizationConformancePackTemplateValidationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationConformancePackTemplateValidationException({
  104         -
            #[allow(unused_mut)]
  105         -
            let mut tmp =
  106         -
                 {
  107         -
                    #[allow(unused_mut)]
  108         -
                    let mut output = crate::types::error::builders::OrganizationConformancePackTemplateValidationExceptionBuilder::default();
  109         -
                    output = crate::protocol_serde::shape_organization_conformance_pack_template_validation_exception::de_organization_conformance_pack_template_validation_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
  110         -
                    let output = output.meta(generic);
  111         -
                    output.build()
  112         -
                }
  113         -
            ;
  114         -
            if tmp.message.is_none() {
  115         -
                                                            tmp.message = _error_message;
  116         -
                                                        }
  117         -
            tmp
  118         -
        }),
  119         -
        "ResourceInUseException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::ResourceInUseException({
  120         -
            #[allow(unused_mut)]
  121         -
            let mut tmp =
  122         -
                 {
  123         -
                    #[allow(unused_mut)]
  124         -
                    let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
  125         -
                    output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
  126         -
                    let output = output.meta(generic);
  127         -
                    output.build()
  128         -
                }
  129         -
            ;
  130         -
            if tmp.message.is_none() {
  131         -
                                                            tmp.message = _error_message;
  132         -
                                                        }
  133         -
            tmp
  134         -
        }),
  135         -
        "ValidationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::ValidationException({
  136         -
            #[allow(unused_mut)]
  137         -
            let mut tmp =
  138         -
                 {
  139         -
                    #[allow(unused_mut)]
  140         -
                    let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  141         -
                    output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
  142         -
                    let output = output.meta(generic);
  143         -
                    output.build()
  144         -
                }
  145         -
            ;
  146         -
            if tmp.message.is_none() {
  147         -
                                                            tmp.message = _error_message;
  148         -
                                                        }
  149         -
            tmp
  150         -
        }),
  151         -
        _ => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::generic(generic)
  152         -
    })
  153         -
}
  154         -
  155         -
#[allow(clippy::unnecessary_wraps)]
  156         -
pub fn de_put_organization_conformance_pack_http_response(
  157         -
    _response_status: u16,
  158         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  159         -
    _response_body: &[u8],
  160         -
) -> std::result::Result<
  161         -
    crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackOutput,
  162         -
    crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError,
  163         -
> {
  164         -
    Ok({
  165         -
        #[allow(unused_mut)]
  166         -
        let mut output = crate::operation::put_organization_conformance_pack::builders::PutOrganizationConformancePackOutputBuilder::default();
  167         -
        output = crate::protocol_serde::shape_put_organization_conformance_pack::de_put_organization_conformance_pack(_response_body, output)
  168         -
            .map_err(crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::unhandled)?;
  169         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  170         -
        output.build()
  171         -
    })
  172         -
}
  173         -
  174         -
pub fn ser_put_organization_conformance_pack_input(
  175         -
    input: &crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput,
  176         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  177         -
    let mut out = String::new();
  178         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  179         -
    crate::protocol_serde::shape_put_organization_conformance_pack_input::ser_put_organization_conformance_pack_input_input(&mut object, input)?;
  180         -
    object.finish();
  181         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  182         -
}
  183         -
  184         -
pub(crate) fn de_put_organization_conformance_pack(
  185         -
    _value: &[u8],
  186         -
    mut builder: crate::operation::put_organization_conformance_pack::builders::PutOrganizationConformancePackOutputBuilder,
  187         -
) -> ::std::result::Result<
  188         -
    crate::operation::put_organization_conformance_pack::builders::PutOrganizationConformancePackOutputBuilder,
  189         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  190         -
> {
  191         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  192         -
    let tokens = &mut tokens_owned;
  193         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  194         -
    loop {
  195         -
        match tokens.next().transpose()? {
  196         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  197         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  198         -
                "OrganizationConformancePackArn" => {
  199         -
                    builder = builder.set_organization_conformance_pack_arn(
  200         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  201         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  202         -
                            .transpose()?,
  203         -
                    );
  204         -
                }
  205         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  206         -
            },
  207         -
            other => {
  208         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  209         -
                    "expected object key or end object, found: {other:?}"
  210         -
                )))
  211         -
            }
  212         -
        }
  213         -
    }
  214         -
    if tokens.next().is_some() {
  215         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  216         -
            "found more JSON tokens after completing parsing",
  217         -
        ));
  218         -
    }
  219         -
    Ok(builder)
  220         -
}

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

@@ -1,0 +43,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_organization_conformance_pack_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.organization_conformance_pack_name {
    7         -
        object.key("OrganizationConformancePackName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.template_s3_uri {
   10         -
        object.key("TemplateS3Uri").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.template_body {
   13         -
        object.key("TemplateBody").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.delivery_s3_bucket {
   16         -
        object.key("DeliveryS3Bucket").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.delivery_s3_key_prefix {
   19         -
        object.key("DeliveryS3KeyPrefix").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.conformance_pack_input_parameters {
   22         -
        let mut array_7 = object.key("ConformancePackInputParameters").start_array();
   23         -
        for item_8 in var_6 {
   24         -
            {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut object_9 = array_7.value().start_object();
   27         -
                crate::protocol_serde::shape_conformance_pack_input_parameter::ser_conformance_pack_input_parameter(&mut object_9, item_8)?;
   28         -
                object_9.finish();
   29         -
            }
   30         -
        }
   31         -
        array_7.finish();
   32         -
    }
   33         -
    if let Some(var_10) = &input.excluded_accounts {
   34         -
        let mut array_11 = object.key("ExcludedAccounts").start_array();
   35         -
        for item_12 in var_10 {
   36         -
            {
   37         -
                array_11.value().string(item_12.as_str());
   38         -
            }
   39         -
        }
   40         -
        array_11.finish();
   41         -
    }
   42         -
    Ok(())
   43         -
}

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

@@ -1,0 +130,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_remediation_configurations_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_remediation_configurations::PutRemediationConfigurationsOutput,
    9         -
    crate::operation::put_remediation_configurations::PutRemediationConfigurationsError,
   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_remediation_configurations::PutRemediationConfigurationsError::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_remediation_configurations::PutRemediationConfigurationsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InsufficientPermissionsException" => {
   24         -
            crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::InsufficientPermissionsException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::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         -
        "InvalidParameterValueException" => {
   44         -
            crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::InvalidParameterValueException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   49         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   50         -
                        _response_body,
   51         -
                        output,
   52         -
                    )
   53         -
                    .map_err(crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::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         -
        _ => crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::generic(generic),
   64         -
    })
   65         -
}
   66         -
   67         -
#[allow(clippy::unnecessary_wraps)]
   68         -
pub fn de_put_remediation_configurations_http_response(
   69         -
    _response_status: u16,
   70         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   71         -
    _response_body: &[u8],
   72         -
) -> std::result::Result<
   73         -
    crate::operation::put_remediation_configurations::PutRemediationConfigurationsOutput,
   74         -
    crate::operation::put_remediation_configurations::PutRemediationConfigurationsError,
   75         -
> {
   76         -
    Ok({
   77         -
        #[allow(unused_mut)]
   78         -
        let mut output = crate::operation::put_remediation_configurations::builders::PutRemediationConfigurationsOutputBuilder::default();
   79         -
        output = crate::protocol_serde::shape_put_remediation_configurations::de_put_remediation_configurations(_response_body, output)
   80         -
            .map_err(crate::operation::put_remediation_configurations::PutRemediationConfigurationsError::unhandled)?;
   81         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   82         -
        output.build()
   83         -
    })
   84         -
}
   85         -
   86         -
pub fn ser_put_remediation_configurations_input(
   87         -
    input: &crate::operation::put_remediation_configurations::PutRemediationConfigurationsInput,
   88         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   89         -
    let mut out = String::new();
   90         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   91         -
    crate::protocol_serde::shape_put_remediation_configurations_input::ser_put_remediation_configurations_input_input(&mut object, input)?;
   92         -
    object.finish();
   93         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   94         -
}
   95         -
   96         -
pub(crate) fn de_put_remediation_configurations(
   97         -
    _value: &[u8],
   98         -
    mut builder: crate::operation::put_remediation_configurations::builders::PutRemediationConfigurationsOutputBuilder,
   99         -
) -> ::std::result::Result<
  100         -
    crate::operation::put_remediation_configurations::builders::PutRemediationConfigurationsOutputBuilder,
  101         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  102         -
> {
  103         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  104         -
    let tokens = &mut tokens_owned;
  105         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  106         -
    loop {
  107         -
        match tokens.next().transpose()? {
  108         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  109         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  110         -
                "FailedBatches" => {
  111         -
                    builder = builder.set_failed_batches(crate::protocol_serde::shape_failed_remediation_batches::de_failed_remediation_batches(
  112         -
                        tokens, _value,
  113         -
                    )?);
  114         -
                }
  115         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  116         -
            },
  117         -
            other => {
  118         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  119         -
                    "expected object key or end object, found: {other:?}"
  120         -
                )))
  121         -
            }
  122         -
        }
  123         -
    }
  124         -
    if tokens.next().is_some() {
  125         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  126         -
            "found more JSON tokens after completing parsing",
  127         -
        ));
  128         -
    }
  129         -
    Ok(builder)
  130         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_remediation_configurations_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_remediation_configurations::PutRemediationConfigurationsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.remediation_configurations {
    7         -
        let mut array_2 = object.key("RemediationConfigurations").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                #[allow(unused_mut)]
   11         -
                let mut object_4 = array_2.value().start_object();
   12         -
                crate::protocol_serde::shape_remediation_configuration::ser_remediation_configuration(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +134,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_remediation_exceptions_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_remediation_exceptions::PutRemediationExceptionsOutput,
    9         -
    crate::operation::put_remediation_exceptions::PutRemediationExceptionsError,
   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_remediation_exceptions::PutRemediationExceptionsError::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::put_remediation_exceptions::PutRemediationExceptionsError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InsufficientPermissionsException" => {
   28         -
            crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::InsufficientPermissionsException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "InvalidParameterValueException" => {
   48         -
            crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::InvalidParameterValueException({
   49         -
                #[allow(unused_mut)]
   50         -
                let mut tmp = {
   51         -
                    #[allow(unused_mut)]
   52         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   53         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   54         -
                        _response_body,
   55         -
                        output,
   56         -
                    )
   57         -
                    .map_err(crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::unhandled)?;
   58         -
                    let output = output.meta(generic);
   59         -
                    output.build()
   60         -
                };
   61         -
                if tmp.message.is_none() {
   62         -
                    tmp.message = _error_message;
   63         -
                }
   64         -
                tmp
   65         -
            })
   66         -
        }
   67         -
        _ => crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::generic(generic),
   68         -
    })
   69         -
}
   70         -
   71         -
#[allow(clippy::unnecessary_wraps)]
   72         -
pub fn de_put_remediation_exceptions_http_response(
   73         -
    _response_status: u16,
   74         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   75         -
    _response_body: &[u8],
   76         -
) -> std::result::Result<
   77         -
    crate::operation::put_remediation_exceptions::PutRemediationExceptionsOutput,
   78         -
    crate::operation::put_remediation_exceptions::PutRemediationExceptionsError,
   79         -
> {
   80         -
    Ok({
   81         -
        #[allow(unused_mut)]
   82         -
        let mut output = crate::operation::put_remediation_exceptions::builders::PutRemediationExceptionsOutputBuilder::default();
   83         -
        output = crate::protocol_serde::shape_put_remediation_exceptions::de_put_remediation_exceptions(_response_body, output)
   84         -
            .map_err(crate::operation::put_remediation_exceptions::PutRemediationExceptionsError::unhandled)?;
   85         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   86         -
        output.build()
   87         -
    })
   88         -
}
   89         -
   90         -
pub fn ser_put_remediation_exceptions_input(
   91         -
    input: &crate::operation::put_remediation_exceptions::PutRemediationExceptionsInput,
   92         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   93         -
    let mut out = String::new();
   94         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   95         -
    crate::protocol_serde::shape_put_remediation_exceptions_input::ser_put_remediation_exceptions_input_input(&mut object, input)?;
   96         -
    object.finish();
   97         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   98         -
}
   99         -
  100         -
pub(crate) fn de_put_remediation_exceptions(
  101         -
    _value: &[u8],
  102         -
    mut builder: crate::operation::put_remediation_exceptions::builders::PutRemediationExceptionsOutputBuilder,
  103         -
) -> ::std::result::Result<
  104         -
    crate::operation::put_remediation_exceptions::builders::PutRemediationExceptionsOutputBuilder,
  105         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  106         -
> {
  107         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  108         -
    let tokens = &mut tokens_owned;
  109         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  110         -
    loop {
  111         -
        match tokens.next().transpose()? {
  112         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  113         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  114         -
                "FailedBatches" => {
  115         -
                    builder = builder.set_failed_batches(
  116         -
                        crate::protocol_serde::shape_failed_remediation_exception_batches::de_failed_remediation_exception_batches(tokens, _value)?,
  117         -
                    );
  118         -
                }
  119         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  120         -
            },
  121         -
            other => {
  122         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  123         -
                    "expected object key or end object, found: {other:?}"
  124         -
                )))
  125         -
            }
  126         -
        }
  127         -
    }
  128         -
    if tokens.next().is_some() {
  129         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  130         -
            "found more JSON tokens after completing parsing",
  131         -
        ));
  132         -
    }
  133         -
    Ok(builder)
  134         -
}

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

@@ -1,0 +30,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_remediation_exceptions_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_remediation_exceptions::PutRemediationExceptionsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.config_rule_name {
    7         -
        object.key("ConfigRuleName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.resource_keys {
   10         -
        let mut array_3 = object.key("ResourceKeys").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                #[allow(unused_mut)]
   14         -
                let mut object_5 = array_3.value().start_object();
   15         -
                crate::protocol_serde::shape_remediation_exception_resource_key::ser_remediation_exception_resource_key(&mut object_5, item_4)?;
   16         -
                object_5.finish();
   17         -
            }
   18         -
        }
   19         -
        array_3.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.message {
   22         -
        object.key("Message").string(var_6.as_str());
   23         -
    }
   24         -
    if let Some(var_7) = &input.expiration_time {
   25         -
        object
   26         -
            .key("ExpirationTime")
   27         -
            .date_time(var_7, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
   28         -
    }
   29         -
    Ok(())
   30         -
}

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

@@ -1,0 +118,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_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<crate::operation::put_resource_config::PutResourceConfigOutput, crate::operation::put_resource_config::PutResourceConfigError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::put_resource_config::PutResourceConfigError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    let error_code = match generic.code() {
   15         -
        Some(code) => code,
   16         -
        None => return Err(crate::operation::put_resource_config::PutResourceConfigError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "InsufficientPermissionsException" => crate::operation::put_resource_config::PutResourceConfigError::InsufficientPermissionsException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   27         -
                    _response_body,
   28         -
                    output,
   29         -
                )
   30         -
                .map_err(crate::operation::put_resource_config::PutResourceConfigError::unhandled)?;
   31         -
                let output = output.meta(generic);
   32         -
                output.build()
   33         -
            };
   34         -
            if tmp.message.is_none() {
   35         -
                tmp.message = _error_message;
   36         -
            }
   37         -
            tmp
   38         -
        }),
   39         -
        "MaxActiveResourcesExceededException" => {
   40         -
            crate::operation::put_resource_config::PutResourceConfigError::MaxActiveResourcesExceededException({
   41         -
                #[allow(unused_mut)]
   42         -
                let mut tmp = {
   43         -
                    #[allow(unused_mut)]
   44         -
                    let mut output = crate::types::error::builders::MaxActiveResourcesExceededExceptionBuilder::default();
   45         -
                    output =
   46         -
                        crate::protocol_serde::shape_max_active_resources_exceeded_exception::de_max_active_resources_exceeded_exception_json_err(
   47         -
                            _response_body,
   48         -
                            output,
   49         -
                        )
   50         -
                        .map_err(crate::operation::put_resource_config::PutResourceConfigError::unhandled)?;
   51         -
                    let output = output.meta(generic);
   52         -
                    output.build()
   53         -
                };
   54         -
                if tmp.message.is_none() {
   55         -
                    tmp.message = _error_message;
   56         -
                }
   57         -
                tmp
   58         -
            })
   59         -
        }
   60         -
        "NoRunningConfigurationRecorderException" => {
   61         -
            crate::operation::put_resource_config::PutResourceConfigError::NoRunningConfigurationRecorderException({
   62         -
                #[allow(unused_mut)]
   63         -
                let mut tmp = {
   64         -
                    #[allow(unused_mut)]
   65         -
                    let mut output = crate::types::error::builders::NoRunningConfigurationRecorderExceptionBuilder::default();
   66         -
                    output = crate::protocol_serde::shape_no_running_configuration_recorder_exception::de_no_running_configuration_recorder_exception_json_err(_response_body, output).map_err(crate::operation::put_resource_config::PutResourceConfigError::unhandled)?;
   67         -
                    let output = output.meta(generic);
   68         -
                    output.build()
   69         -
                };
   70         -
                if tmp.message.is_none() {
   71         -
                    tmp.message = _error_message;
   72         -
                }
   73         -
                tmp
   74         -
            })
   75         -
        }
   76         -
        "ValidationException" => crate::operation::put_resource_config::PutResourceConfigError::ValidationException({
   77         -
            #[allow(unused_mut)]
   78         -
            let mut tmp = {
   79         -
                #[allow(unused_mut)]
   80         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   81         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   82         -
                    .map_err(crate::operation::put_resource_config::PutResourceConfigError::unhandled)?;
   83         -
                let output = output.meta(generic);
   84         -
                output.build()
   85         -
            };
   86         -
            if tmp.message.is_none() {
   87         -
                tmp.message = _error_message;
   88         -
            }
   89         -
            tmp
   90         -
        }),
   91         -
        _ => crate::operation::put_resource_config::PutResourceConfigError::generic(generic),
   92         -
    })
   93         -
}
   94         -
   95         -
#[allow(clippy::unnecessary_wraps)]
   96         -
pub fn de_put_resource_config_http_response(
   97         -
    _response_status: u16,
   98         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   99         -
    _response_body: &[u8],
  100         -
) -> std::result::Result<crate::operation::put_resource_config::PutResourceConfigOutput, crate::operation::put_resource_config::PutResourceConfigError>
  101         -
{
  102         -
    Ok({
  103         -
        #[allow(unused_mut)]
  104         -
        let mut output = crate::operation::put_resource_config::builders::PutResourceConfigOutputBuilder::default();
  105         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  106         -
        output.build()
  107         -
    })
  108         -
}
  109         -
  110         -
pub fn ser_put_resource_config_input(
  111         -
    input: &crate::operation::put_resource_config::PutResourceConfigInput,
  112         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  113         -
    let mut out = String::new();
  114         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  115         -
    crate::protocol_serde::shape_put_resource_config_input::ser_put_resource_config_input_input(&mut object, input)?;
  116         -
    object.finish();
  117         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  118         -
}

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

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_resource_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_resource_config::PutResourceConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_type {
    7         -
        object.key("ResourceType").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.schema_version_id {
   10         -
        object.key("SchemaVersionId").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.resource_id {
   13         -
        object.key("ResourceId").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.resource_name {
   16         -
        object.key("ResourceName").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.configuration {
   19         -
        object.key("Configuration").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.tags {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_7 = object.key("Tags").start_object();
   24         -
        for (key_8, value_9) in var_6 {
   25         -
            {
   26         -
                object_7.key(key_8.as_str()).string(value_9.as_str());
   27         -
            }
   28         -
        }
   29         -
        object_7.finish();
   30         -
    }
   31         -
    Ok(())
   32         -
}

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

@@ -1,0 +130,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_retention_configuration_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_retention_configuration::PutRetentionConfigurationOutput,
    9         -
    crate::operation::put_retention_configuration::PutRetentionConfigurationError,
   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_retention_configuration::PutRetentionConfigurationError::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::put_retention_configuration::PutRetentionConfigurationError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::put_retention_configuration::PutRetentionConfigurationError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::put_retention_configuration::PutRetentionConfigurationError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "MaxNumberOfRetentionConfigurationsExceededException" => {
   48         -
            crate::operation::put_retention_configuration::PutRetentionConfigurationError::MaxNumberOfRetentionConfigurationsExceededException({
   49         -
                #[allow(unused_mut)]
   50         -
                let mut tmp = {
   51         -
                    #[allow(unused_mut)]
   52         -
                    let mut output = crate::types::error::builders::MaxNumberOfRetentionConfigurationsExceededExceptionBuilder::default();
   53         -
                    output = crate::protocol_serde::shape_max_number_of_retention_configurations_exceeded_exception::de_max_number_of_retention_configurations_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_retention_configuration::PutRetentionConfigurationError::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         -
        _ => crate::operation::put_retention_configuration::PutRetentionConfigurationError::generic(generic),
   64         -
    })
   65         -
}
   66         -
   67         -
#[allow(clippy::unnecessary_wraps)]
   68         -
pub fn de_put_retention_configuration_http_response(
   69         -
    _response_status: u16,
   70         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   71         -
    _response_body: &[u8],
   72         -
) -> std::result::Result<
   73         -
    crate::operation::put_retention_configuration::PutRetentionConfigurationOutput,
   74         -
    crate::operation::put_retention_configuration::PutRetentionConfigurationError,
   75         -
> {
   76         -
    Ok({
   77         -
        #[allow(unused_mut)]
   78         -
        let mut output = crate::operation::put_retention_configuration::builders::PutRetentionConfigurationOutputBuilder::default();
   79         -
        output = crate::protocol_serde::shape_put_retention_configuration::de_put_retention_configuration(_response_body, output)
   80         -
            .map_err(crate::operation::put_retention_configuration::PutRetentionConfigurationError::unhandled)?;
   81         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   82         -
        output.build()
   83         -
    })
   84         -
}
   85         -
   86         -
pub fn ser_put_retention_configuration_input(
   87         -
    input: &crate::operation::put_retention_configuration::PutRetentionConfigurationInput,
   88         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   89         -
    let mut out = String::new();
   90         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   91         -
    crate::protocol_serde::shape_put_retention_configuration_input::ser_put_retention_configuration_input_input(&mut object, input)?;
   92         -
    object.finish();
   93         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   94         -
}
   95         -
   96         -
pub(crate) fn de_put_retention_configuration(
   97         -
    _value: &[u8],
   98         -
    mut builder: crate::operation::put_retention_configuration::builders::PutRetentionConfigurationOutputBuilder,
   99         -
) -> ::std::result::Result<
  100         -
    crate::operation::put_retention_configuration::builders::PutRetentionConfigurationOutputBuilder,
  101         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  102         -
> {
  103         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  104         -
    let tokens = &mut tokens_owned;
  105         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  106         -
    loop {
  107         -
        match tokens.next().transpose()? {
  108         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  109         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  110         -
                "RetentionConfiguration" => {
  111         -
                    builder = builder.set_retention_configuration(crate::protocol_serde::shape_retention_configuration::de_retention_configuration(
  112         -
                        tokens, _value,
  113         -
                    )?);
  114         -
                }
  115         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  116         -
            },
  117         -
            other => {
  118         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  119         -
                    "expected object key or end object, found: {other:?}"
  120         -
                )))
  121         -
            }
  122         -
        }
  123         -
    }
  124         -
    if tokens.next().is_some() {
  125         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  126         -
            "found more JSON tokens after completing parsing",
  127         -
        ));
  128         -
    }
  129         -
    Ok(builder)
  130         -
}

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_retention_configuration_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_retention_configuration::PutRetentionConfigurationInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.retention_period_in_days {
    7         -
        object.key("RetentionPeriodInDays").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

@@ -1,0 +187,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_service_linked_configuration_recorder_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_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderOutput,
    9         -
    crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError,
   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_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::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::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled(generic))
   20         -
        }
   21         -
    };
   22         -
   23         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   24         -
    Err(match error_code {
   25         -
        "ConflictException" => {
   26         -
            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::ConflictException({
   27         -
                #[allow(unused_mut)]
   28         -
                let mut tmp = {
   29         -
                    #[allow(unused_mut)]
   30         -
                    let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   31         -
                    output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output).map_err(
   32         -
                        crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled,
   33         -
                    )?;
   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         -
        "InsufficientPermissionsException" => {
   44         -
            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::InsufficientPermissionsException(
   45         -
                {
   46         -
                    #[allow(unused_mut)]
   47         -
                    let mut tmp = {
   48         -
                        #[allow(unused_mut)]
   49         -
                        let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   50         -
                        output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   51         -
                            _response_body,
   52         -
                            output,
   53         -
                        )
   54         -
                        .map_err(
   55         -
                            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled,
   56         -
                        )?;
   57         -
                        let output = output.meta(generic);
   58         -
                        output.build()
   59         -
                    };
   60         -
                    if tmp.message.is_none() {
   61         -
                        tmp.message = _error_message;
   62         -
                    }
   63         -
                    tmp
   64         -
                },
   65         -
            )
   66         -
        }
   67         -
        "LimitExceededException" => {
   68         -
            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::LimitExceededException({
   69         -
                #[allow(unused_mut)]
   70         -
                let mut tmp = {
   71         -
                    #[allow(unused_mut)]
   72         -
                    let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   73         -
                    output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   74         -
                        .map_err(
   75         -
                            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled,
   76         -
                        )?;
   77         -
                    let output = output.meta(generic);
   78         -
                    output.build()
   79         -
                };
   80         -
                if tmp.message.is_none() {
   81         -
                    tmp.message = _error_message;
   82         -
                }
   83         -
                tmp
   84         -
            })
   85         -
        }
   86         -
        "ValidationException" => {
   87         -
            crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::ValidationException({
   88         -
                #[allow(unused_mut)]
   89         -
                let mut tmp = {
   90         -
                    #[allow(unused_mut)]
   91         -
                    let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   92         -
                    output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output).map_err(
   93         -
                        crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled,
   94         -
                    )?;
   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         -
        }
  104         -
        _ => crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::generic(generic),
  105         -
    })
  106         -
}
  107         -
  108         -
#[allow(clippy::unnecessary_wraps)]
  109         -
pub fn de_put_service_linked_configuration_recorder_http_response(
  110         -
    _response_status: u16,
  111         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  112         -
    _response_body: &[u8],
  113         -
) -> std::result::Result<
  114         -
    crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderOutput,
  115         -
    crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError,
  116         -
> {
  117         -
    Ok({
  118         -
        #[allow(unused_mut)]
  119         -
        let mut output =
  120         -
            crate::operation::put_service_linked_configuration_recorder::builders::PutServiceLinkedConfigurationRecorderOutputBuilder::default();
  121         -
        output = crate::protocol_serde::shape_put_service_linked_configuration_recorder::de_put_service_linked_configuration_recorder(
  122         -
            _response_body,
  123         -
            output,
  124         -
        )
  125         -
        .map_err(crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderError::unhandled)?;
  126         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  127         -
        output.build()
  128         -
    })
  129         -
}
  130         -
  131         -
pub fn ser_put_service_linked_configuration_recorder_input(
  132         -
    input: &crate::operation::put_service_linked_configuration_recorder::PutServiceLinkedConfigurationRecorderInput,
  133         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  134         -
    let mut out = String::new();
  135         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  136         -
    crate::protocol_serde::shape_put_service_linked_configuration_recorder_input::ser_put_service_linked_configuration_recorder_input_input(
  137         -
        &mut object,
  138         -
        input,
  139         -
    )?;
  140         -
    object.finish();
  141         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  142         -
}
  143         -
  144         -
pub(crate) fn de_put_service_linked_configuration_recorder(
  145         -
    _value: &[u8],
  146         -
    mut builder: crate::operation::put_service_linked_configuration_recorder::builders::PutServiceLinkedConfigurationRecorderOutputBuilder,
  147         -
) -> ::std::result::Result<
  148         -
    crate::operation::put_service_linked_configuration_recorder::builders::PutServiceLinkedConfigurationRecorderOutputBuilder,
  149         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  150         -
> {
  151         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  152         -
    let tokens = &mut tokens_owned;
  153         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  154         -
    loop {
  155         -
        match tokens.next().transpose()? {
  156         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  157         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  158         -
                "Arn" => {
  159         -
                    builder = builder.set_arn(
  160         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  161         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  162         -
                            .transpose()?,
  163         -
                    );
  164         -
                }
  165         -
                "Name" => {
  166         -
                    builder = builder.set_name(
  167         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  168         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  169         -
                            .transpose()?,
  170         -
                    );
  171         -
                }
  172         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  173         -
            },
  174         -
            other => {
  175         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  176         -
                    "expected object key or end object, found: {other:?}"
  177         -
                )))
  178         -
            }
  179         -
        }
  180         -
    }
  181         -
    if tokens.next().is_some() {
  182         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  183         -
            "found more JSON tokens after completing parsing",
  184         -
        ));
  185         -
    }
  186         -
    Ok(builder)
  187         -
}