AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_conformance_pack_compliance_summary_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_conformance_pack_compliance_summary::GetConformancePackComplianceSummaryInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.conformance_pack_names {
    7         -
        let mut array_2 = object.key("ConformancePackNames").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.limit {
   16         -
        object.key("Limit").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_5) = &input.next_token {
   22         -
        object.key("NextToken").string(var_5.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

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

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_custom_rule_policy_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_custom_rule_policy::GetCustomRulePolicyInput,
    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         -
    Ok(())
   10         -
}

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

@@ -1,0 +150,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_discovered_resource_counts_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::get_discovered_resource_counts::GetDiscoveredResourceCountsOutput,
    9         -
    crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError,
   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::get_discovered_resource_counts::GetDiscoveredResourceCountsError::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::get_discovered_resource_counts::GetDiscoveredResourceCountsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidLimitException" => crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::InvalidLimitException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::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         -
        "InvalidNextTokenException" => {
   39         -
            crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::InvalidNextTokenException({
   40         -
                #[allow(unused_mut)]
   41         -
                let mut tmp = {
   42         -
                    #[allow(unused_mut)]
   43         -
                    let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   44         -
                    output =
   45         -
                        crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   46         -
                            .map_err(crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::unhandled)?;
   47         -
                    let output = output.meta(generic);
   48         -
                    output.build()
   49         -
                };
   50         -
                if tmp.message.is_none() {
   51         -
                    tmp.message = _error_message;
   52         -
                }
   53         -
                tmp
   54         -
            })
   55         -
        }
   56         -
        "ValidationException" => crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::ValidationException({
   57         -
            #[allow(unused_mut)]
   58         -
            let mut tmp = {
   59         -
                #[allow(unused_mut)]
   60         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   61         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   62         -
                    .map_err(crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::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         -
        _ => crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::generic(generic),
   72         -
    })
   73         -
}
   74         -
   75         -
#[allow(clippy::unnecessary_wraps)]
   76         -
pub fn de_get_discovered_resource_counts_http_response(
   77         -
    _response_status: u16,
   78         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   79         -
    _response_body: &[u8],
   80         -
) -> std::result::Result<
   81         -
    crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsOutput,
   82         -
    crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError,
   83         -
> {
   84         -
    Ok({
   85         -
        #[allow(unused_mut)]
   86         -
        let mut output = crate::operation::get_discovered_resource_counts::builders::GetDiscoveredResourceCountsOutputBuilder::default();
   87         -
        output = crate::protocol_serde::shape_get_discovered_resource_counts::de_get_discovered_resource_counts(_response_body, output)
   88         -
            .map_err(crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsError::unhandled)?;
   89         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   90         -
        output.build()
   91         -
    })
   92         -
}
   93         -
   94         -
pub fn ser_get_discovered_resource_counts_input(
   95         -
    input: &crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsInput,
   96         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   97         -
    let mut out = String::new();
   98         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   99         -
    crate::protocol_serde::shape_get_discovered_resource_counts_input::ser_get_discovered_resource_counts_input_input(&mut object, input)?;
  100         -
    object.finish();
  101         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  102         -
}
  103         -
  104         -
pub(crate) fn de_get_discovered_resource_counts(
  105         -
    _value: &[u8],
  106         -
    mut builder: crate::operation::get_discovered_resource_counts::builders::GetDiscoveredResourceCountsOutputBuilder,
  107         -
) -> ::std::result::Result<
  108         -
    crate::operation::get_discovered_resource_counts::builders::GetDiscoveredResourceCountsOutputBuilder,
  109         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  110         -
> {
  111         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  112         -
    let tokens = &mut tokens_owned;
  113         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  114         -
    loop {
  115         -
        match tokens.next().transpose()? {
  116         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  117         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  118         -
                "totalDiscoveredResources" => {
  119         -
                    builder = builder.set_total_discovered_resources(
  120         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  121         -
                            .map(i64::try_from)
  122         -
                            .transpose()?,
  123         -
                    );
  124         -
                }
  125         -
                "resourceCounts" => {
  126         -
                    builder = builder.set_resource_counts(crate::protocol_serde::shape_resource_counts::de_resource_counts(tokens, _value)?);
  127         -
                }
  128         -
                "nextToken" => {
  129         -
                    builder = builder.set_next_token(
  130         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  131         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  132         -
                            .transpose()?,
  133         -
                    );
  134         -
                }
  135         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  136         -
            },
  137         -
            other => {
  138         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  139         -
                    "expected object key or end object, found: {other:?}"
  140         -
                )))
  141         -
            }
  142         -
        }
  143         -
    }
  144         -
    if tokens.next().is_some() {
  145         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  146         -
            "found more JSON tokens after completing parsing",
  147         -
        ));
  148         -
    }
  149         -
    Ok(builder)
  150         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_discovered_resource_counts_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_discovered_resource_counts::GetDiscoveredResourceCountsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_types {
    7         -
        let mut array_2 = object.key("resourceTypes").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.limit {
   16         -
        object.key("limit").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_5) = &input.next_token {
   22         -
        object.key("nextToken").string(var_5.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +174,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_organization_config_rule_detailed_status_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::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusOutput,
    9         -
    crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError,
   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::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::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(
   20         -
                crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled(generic),
   21         -
            )
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidLimitException" => crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::InvalidLimitException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp =
   30         -
                 {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled)?;
   34         -
                    let output = output.meta(generic);
   35         -
                    output.build()
   36         -
                }
   37         -
            ;
   38         -
            if tmp.message.is_none() {
   39         -
                                                            tmp.message = _error_message;
   40         -
                                                        }
   41         -
            tmp
   42         -
        }),
   43         -
        "InvalidNextTokenException" => crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::InvalidNextTokenException({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp =
   46         -
                 {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   49         -
                    output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled)?;
   50         -
                    let output = output.meta(generic);
   51         -
                    output.build()
   52         -
                }
   53         -
            ;
   54         -
            if tmp.message.is_none() {
   55         -
                                                            tmp.message = _error_message;
   56         -
                                                        }
   57         -
            tmp
   58         -
        }),
   59         -
        "NoSuchOrganizationConfigRuleException" => crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::NoSuchOrganizationConfigRuleException({
   60         -
            #[allow(unused_mut)]
   61         -
            let mut tmp =
   62         -
                 {
   63         -
                    #[allow(unused_mut)]
   64         -
                    let mut output = crate::types::error::builders::NoSuchOrganizationConfigRuleExceptionBuilder::default();
   65         -
                    output = crate::protocol_serde::shape_no_such_organization_config_rule_exception::de_no_such_organization_config_rule_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled)?;
   66         -
                    let output = output.meta(generic);
   67         -
                    output.build()
   68         -
                }
   69         -
            ;
   70         -
            if tmp.message.is_none() {
   71         -
                                                            tmp.message = _error_message;
   72         -
                                                        }
   73         -
            tmp
   74         -
        }),
   75         -
        "OrganizationAccessDeniedException" => crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::OrganizationAccessDeniedException({
   76         -
            #[allow(unused_mut)]
   77         -
            let mut tmp =
   78         -
                 {
   79         -
                    #[allow(unused_mut)]
   80         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
   81         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled)?;
   82         -
                    let output = output.meta(generic);
   83         -
                    output.build()
   84         -
                }
   85         -
            ;
   86         -
            if tmp.message.is_none() {
   87         -
                                                            tmp.message = _error_message;
   88         -
                                                        }
   89         -
            tmp
   90         -
        }),
   91         -
        _ => crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::generic(generic)
   92         -
    })
   93         -
}
   94         -
   95         -
#[allow(clippy::unnecessary_wraps)]
   96         -
pub fn de_get_organization_config_rule_detailed_status_http_response(
   97         -
    _response_status: u16,
   98         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   99         -
    _response_body: &[u8],
  100         -
) -> std::result::Result<
  101         -
    crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusOutput,
  102         -
    crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError,
  103         -
> {
  104         -
    Ok({
  105         -
        #[allow(unused_mut)]
  106         -
        let mut output =
  107         -
            crate::operation::get_organization_config_rule_detailed_status::builders::GetOrganizationConfigRuleDetailedStatusOutputBuilder::default();
  108         -
        output = crate::protocol_serde::shape_get_organization_config_rule_detailed_status::de_get_organization_config_rule_detailed_status(
  109         -
            _response_body,
  110         -
            output,
  111         -
        )
  112         -
        .map_err(crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusError::unhandled)?;
  113         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  114         -
        output.build()
  115         -
    })
  116         -
}
  117         -
  118         -
pub fn ser_get_organization_config_rule_detailed_status_input(
  119         -
    input: &crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusInput,
  120         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  121         -
    let mut out = String::new();
  122         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  123         -
    crate::protocol_serde::shape_get_organization_config_rule_detailed_status_input::ser_get_organization_config_rule_detailed_status_input_input(
  124         -
        &mut object,
  125         -
        input,
  126         -
    )?;
  127         -
    object.finish();
  128         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  129         -
}
  130         -
  131         -
pub(crate) fn de_get_organization_config_rule_detailed_status(
  132         -
    _value: &[u8],
  133         -
    mut builder: crate::operation::get_organization_config_rule_detailed_status::builders::GetOrganizationConfigRuleDetailedStatusOutputBuilder,
  134         -
) -> ::std::result::Result<
  135         -
    crate::operation::get_organization_config_rule_detailed_status::builders::GetOrganizationConfigRuleDetailedStatusOutputBuilder,
  136         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  137         -
> {
  138         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  139         -
    let tokens = &mut tokens_owned;
  140         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  141         -
    loop {
  142         -
        match tokens.next().transpose()? {
  143         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  144         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  145         -
                "OrganizationConfigRuleDetailedStatus" => {
  146         -
                    builder = builder.set_organization_config_rule_detailed_status(
  147         -
                        crate::protocol_serde::shape_organization_config_rule_detailed_status::de_organization_config_rule_detailed_status(
  148         -
                            tokens, _value,
  149         -
                        )?,
  150         -
                    );
  151         -
                }
  152         -
                "NextToken" => {
  153         -
                    builder = builder.set_next_token(
  154         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  155         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  156         -
                            .transpose()?,
  157         -
                    );
  158         -
                }
  159         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  160         -
            },
  161         -
            other => {
  162         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  163         -
                    "expected object key or end object, found: {other:?}"
  164         -
                )))
  165         -
            }
  166         -
        }
  167         -
    }
  168         -
    if tokens.next().is_some() {
  169         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  170         -
            "found more JSON tokens after completing parsing",
  171         -
        ));
  172         -
    }
  173         -
    Ok(builder)
  174         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_organization_config_rule_detailed_status_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_organization_config_rule_detailed_status::GetOrganizationConfigRuleDetailedStatusInput,
    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.filters {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("Filters").start_object();
   12         -
        crate::protocol_serde::shape_status_detail_filters::ser_status_detail_filters(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.limit {
   16         -
        object.key("Limit").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_5) = &input.next_token {
   22         -
        object.key("NextToken").string(var_5.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +173,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_organization_conformance_pack_detailed_status_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::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusOutput,
    9         -
    crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError,
   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::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::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(
   20         -
                crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled(
   21         -
                    generic,
   22         -
                ),
   23         -
            )
   24         -
        }
   25         -
    };
   26         -
   27         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   28         -
    Err(match error_code {
   29         -
        "InvalidLimitException" => crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::InvalidLimitException({
   30         -
            #[allow(unused_mut)]
   31         -
            let mut tmp =
   32         -
                 {
   33         -
                    #[allow(unused_mut)]
   34         -
                    let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   35         -
                    output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled)?;
   36         -
                    let output = output.meta(generic);
   37         -
                    output.build()
   38         -
                }
   39         -
            ;
   40         -
            if tmp.message.is_none() {
   41         -
                                                            tmp.message = _error_message;
   42         -
                                                        }
   43         -
            tmp
   44         -
        }),
   45         -
        "InvalidNextTokenException" => crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::InvalidNextTokenException({
   46         -
            #[allow(unused_mut)]
   47         -
            let mut tmp =
   48         -
                 {
   49         -
                    #[allow(unused_mut)]
   50         -
                    let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   51         -
                    output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled)?;
   52         -
                    let output = output.meta(generic);
   53         -
                    output.build()
   54         -
                }
   55         -
            ;
   56         -
            if tmp.message.is_none() {
   57         -
                                                            tmp.message = _error_message;
   58         -
                                                        }
   59         -
            tmp
   60         -
        }),
   61         -
        "NoSuchOrganizationConformancePackException" => crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::NoSuchOrganizationConformancePackException({
   62         -
            #[allow(unused_mut)]
   63         -
            let mut tmp =
   64         -
                 {
   65         -
                    #[allow(unused_mut)]
   66         -
                    let mut output = crate::types::error::builders::NoSuchOrganizationConformancePackExceptionBuilder::default();
   67         -
                    output = crate::protocol_serde::shape_no_such_organization_conformance_pack_exception::de_no_such_organization_conformance_pack_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled)?;
   68         -
                    let output = output.meta(generic);
   69         -
                    output.build()
   70         -
                }
   71         -
            ;
   72         -
            if tmp.message.is_none() {
   73         -
                                                            tmp.message = _error_message;
   74         -
                                                        }
   75         -
            tmp
   76         -
        }),
   77         -
        "OrganizationAccessDeniedException" => crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::OrganizationAccessDeniedException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp =
   80         -
                 {
   81         -
                    #[allow(unused_mut)]
   82         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
   83         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled)?;
   84         -
                    let output = output.meta(generic);
   85         -
                    output.build()
   86         -
                }
   87         -
            ;
   88         -
            if tmp.message.is_none() {
   89         -
                                                            tmp.message = _error_message;
   90         -
                                                        }
   91         -
            tmp
   92         -
        }),
   93         -
        _ => crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::generic(generic)
   94         -
    })
   95         -
}
   96         -
   97         -
#[allow(clippy::unnecessary_wraps)]
   98         -
pub fn de_get_organization_conformance_pack_detailed_status_http_response(
   99         -
    _response_status: u16,
  100         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  101         -
    _response_body: &[u8],
  102         -
) -> std::result::Result<
  103         -
    crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusOutput,
  104         -
    crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError,
  105         -
> {
  106         -
    Ok({
  107         -
        #[allow(unused_mut)]
  108         -
        let mut output = crate::operation::get_organization_conformance_pack_detailed_status::builders::GetOrganizationConformancePackDetailedStatusOutputBuilder::default();
  109         -
        output =
  110         -
            crate::protocol_serde::shape_get_organization_conformance_pack_detailed_status::de_get_organization_conformance_pack_detailed_status(
  111         -
                _response_body,
  112         -
                output,
  113         -
            )
  114         -
            .map_err(
  115         -
                crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusError::unhandled,
  116         -
            )?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub fn ser_get_organization_conformance_pack_detailed_status_input(
  123         -
    input: &crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusInput,
  124         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  125         -
    let mut out = String::new();
  126         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  127         -
    crate::protocol_serde::shape_get_organization_conformance_pack_detailed_status_input::ser_get_organization_conformance_pack_detailed_status_input_input(&mut object, input)?;
  128         -
    object.finish();
  129         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  130         -
}
  131         -
  132         -
pub(crate) fn de_get_organization_conformance_pack_detailed_status(
  133         -
    _value: &[u8],
  134         -
    mut builder: crate::operation::get_organization_conformance_pack_detailed_status::builders::GetOrganizationConformancePackDetailedStatusOutputBuilder,
  135         -
) -> ::std::result::Result<
  136         -
    crate::operation::get_organization_conformance_pack_detailed_status::builders::GetOrganizationConformancePackDetailedStatusOutputBuilder,
  137         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  138         -
> {
  139         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  140         -
    let tokens = &mut tokens_owned;
  141         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  142         -
    loop {
  143         -
        match tokens.next().transpose()? {
  144         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  145         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  146         -
                "OrganizationConformancePackDetailedStatuses" => {
  147         -
                    builder = builder.set_organization_conformance_pack_detailed_statuses(
  148         -
                            crate::protocol_serde::shape_organization_conformance_pack_detailed_statuses::de_organization_conformance_pack_detailed_statuses(tokens, _value)?
  149         -
                        );
  150         -
                }
  151         -
                "NextToken" => {
  152         -
                    builder = builder.set_next_token(
  153         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  154         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  155         -
                            .transpose()?,
  156         -
                    );
  157         -
                }
  158         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  159         -
            },
  160         -
            other => {
  161         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  162         -
                    "expected object key or end object, found: {other:?}"
  163         -
                )))
  164         -
            }
  165         -
        }
  166         -
    }
  167         -
    if tokens.next().is_some() {
  168         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  169         -
            "found more JSON tokens after completing parsing",
  170         -
        ));
  171         -
    }
  172         -
    Ok(builder)
  173         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_organization_conformance_pack_detailed_status_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_organization_conformance_pack_detailed_status::GetOrganizationConformancePackDetailedStatusInput,
    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.filters {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("Filters").start_object();
   12         -
        crate::protocol_serde::shape_organization_resource_detailed_status_filters::ser_organization_resource_detailed_status_filters(
   13         -
            &mut object_3,
   14         -
            var_2,
   15         -
        )?;
   16         -
        object_3.finish();
   17         -
    }
   18         -
    if let Some(var_4) = &input.limit {
   19         -
        object.key("Limit").number(
   20         -
            #[allow(clippy::useless_conversion)]
   21         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   22         -
        );
   23         -
    }
   24         -
    if let Some(var_5) = &input.next_token {
   25         -
        object.key("NextToken").string(var_5.as_str());
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +128,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_organization_custom_rule_policy_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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyOutput,
    9         -
    crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError,
   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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "NoSuchOrganizationConfigRuleException" => {
   24         -
            crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::NoSuchOrganizationConfigRuleException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::NoSuchOrganizationConfigRuleExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_no_such_organization_config_rule_exception::de_no_such_organization_config_rule_exception_json_err(_response_body, output).map_err(crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::unhandled)?;
   30         -
                    let output = output.meta(generic);
   31         -
                    output.build()
   32         -
                };
   33         -
                if tmp.message.is_none() {
   34         -
                    tmp.message = _error_message;
   35         -
                }
   36         -
                tmp
   37         -
            })
   38         -
        }
   39         -
        "OrganizationAccessDeniedException" => {
   40         -
            crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::OrganizationAccessDeniedException({
   41         -
                #[allow(unused_mut)]
   42         -
                let mut tmp = {
   43         -
                    #[allow(unused_mut)]
   44         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
   45         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(
   46         -
                        _response_body,
   47         -
                        output,
   48         -
                    )
   49         -
                    .map_err(crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::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         -
        }
   59         -
        _ => crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::generic(generic),
   60         -
    })
   61         -
}
   62         -
   63         -
#[allow(clippy::unnecessary_wraps)]
   64         -
pub fn de_get_organization_custom_rule_policy_http_response(
   65         -
    _response_status: u16,
   66         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   67         -
    _response_body: &[u8],
   68         -
) -> std::result::Result<
   69         -
    crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyOutput,
   70         -
    crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError,
   71         -
> {
   72         -
    Ok({
   73         -
        #[allow(unused_mut)]
   74         -
        let mut output = crate::operation::get_organization_custom_rule_policy::builders::GetOrganizationCustomRulePolicyOutputBuilder::default();
   75         -
        output = crate::protocol_serde::shape_get_organization_custom_rule_policy::de_get_organization_custom_rule_policy(_response_body, output)
   76         -
            .map_err(crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::unhandled)?;
   77         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   78         -
        output.build()
   79         -
    })
   80         -
}
   81         -
   82         -
pub fn ser_get_organization_custom_rule_policy_input(
   83         -
    input: &crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput,
   84         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   85         -
    let mut out = String::new();
   86         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   87         -
    crate::protocol_serde::shape_get_organization_custom_rule_policy_input::ser_get_organization_custom_rule_policy_input_input(&mut object, input)?;
   88         -
    object.finish();
   89         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   90         -
}
   91         -
   92         -
pub(crate) fn de_get_organization_custom_rule_policy(
   93         -
    _value: &[u8],
   94         -
    mut builder: crate::operation::get_organization_custom_rule_policy::builders::GetOrganizationCustomRulePolicyOutputBuilder,
   95         -
) -> ::std::result::Result<
   96         -
    crate::operation::get_organization_custom_rule_policy::builders::GetOrganizationCustomRulePolicyOutputBuilder,
   97         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   98         -
> {
   99         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  100         -
    let tokens = &mut tokens_owned;
  101         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  102         -
    loop {
  103         -
        match tokens.next().transpose()? {
  104         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  105         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  106         -
                "PolicyText" => {
  107         -
                    builder = builder.set_policy_text(
  108         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  109         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  110         -
                            .transpose()?,
  111         -
                    );
  112         -
                }
  113         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  114         -
            },
  115         -
            other => {
  116         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  117         -
                    "expected object key or end object, found: {other:?}"
  118         -
                )))
  119         -
            }
  120         -
        }
  121         -
    }
  122         -
    if tokens.next().is_some() {
  123         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  124         -
            "found more JSON tokens after completing parsing",
  125         -
        ));
  126         -
    }
  127         -
    Ok(builder)
  128         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_get_organization_custom_rule_policy_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput,
    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         -
    Ok(())
   10         -
}

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

@@ -1,0 +197,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_resource_config_history_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::get_resource_config_history::GetResourceConfigHistoryOutput,
    9         -
    crate::operation::get_resource_config_history::GetResourceConfigHistoryError,
   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::get_resource_config_history::GetResourceConfigHistoryError::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::get_resource_config_history::GetResourceConfigHistoryError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidLimitException" => crate::operation::get_resource_config_history::GetResourceConfigHistoryError::InvalidLimitException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::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         -
        "InvalidNextTokenException" => crate::operation::get_resource_config_history::GetResourceConfigHistoryError::InvalidNextTokenException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        "InvalidTimeRangeException" => crate::operation::get_resource_config_history::GetResourceConfigHistoryError::InvalidTimeRangeException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::InvalidTimeRangeExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_invalid_time_range_exception::de_invalid_time_range_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        "NoAvailableConfigurationRecorderException" => {
   73         -
            crate::operation::get_resource_config_history::GetResourceConfigHistoryError::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::get_resource_config_history::GetResourceConfigHistoryError::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         -
        "ResourceNotDiscoveredException" => {
   89         -
            crate::operation::get_resource_config_history::GetResourceConfigHistoryError::ResourceNotDiscoveredException({
   90         -
                #[allow(unused_mut)]
   91         -
                let mut tmp = {
   92         -
                    #[allow(unused_mut)]
   93         -
                    let mut output = crate::types::error::builders::ResourceNotDiscoveredExceptionBuilder::default();
   94         -
                    output = crate::protocol_serde::shape_resource_not_discovered_exception::de_resource_not_discovered_exception_json_err(
   95         -
                        _response_body,
   96         -
                        output,
   97         -
                    )
   98         -
                    .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::unhandled)?;
   99         -
                    let output = output.meta(generic);
  100         -
                    output.build()
  101         -
                };
  102         -
                if tmp.message.is_none() {
  103         -
                    tmp.message = _error_message;
  104         -
                }
  105         -
                tmp
  106         -
            })
  107         -
        }
  108         -
        "ValidationException" => crate::operation::get_resource_config_history::GetResourceConfigHistoryError::ValidationException({
  109         -
            #[allow(unused_mut)]
  110         -
            let mut tmp = {
  111         -
                #[allow(unused_mut)]
  112         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  113         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  114         -
                    .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::unhandled)?;
  115         -
                let output = output.meta(generic);
  116         -
                output.build()
  117         -
            };
  118         -
            if tmp.message.is_none() {
  119         -
                tmp.message = _error_message;
  120         -
            }
  121         -
            tmp
  122         -
        }),
  123         -
        _ => crate::operation::get_resource_config_history::GetResourceConfigHistoryError::generic(generic),
  124         -
    })
  125         -
}
  126         -
  127         -
#[allow(clippy::unnecessary_wraps)]
  128         -
pub fn de_get_resource_config_history_http_response(
  129         -
    _response_status: u16,
  130         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  131         -
    _response_body: &[u8],
  132         -
) -> std::result::Result<
  133         -
    crate::operation::get_resource_config_history::GetResourceConfigHistoryOutput,
  134         -
    crate::operation::get_resource_config_history::GetResourceConfigHistoryError,
  135         -
> {
  136         -
    Ok({
  137         -
        #[allow(unused_mut)]
  138         -
        let mut output = crate::operation::get_resource_config_history::builders::GetResourceConfigHistoryOutputBuilder::default();
  139         -
        output = crate::protocol_serde::shape_get_resource_config_history::de_get_resource_config_history(_response_body, output)
  140         -
            .map_err(crate::operation::get_resource_config_history::GetResourceConfigHistoryError::unhandled)?;
  141         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  142         -
        output.build()
  143         -
    })
  144         -
}
  145         -
  146         -
pub fn ser_get_resource_config_history_input(
  147         -
    input: &crate::operation::get_resource_config_history::GetResourceConfigHistoryInput,
  148         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  149         -
    let mut out = String::new();
  150         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  151         -
    crate::protocol_serde::shape_get_resource_config_history_input::ser_get_resource_config_history_input_input(&mut object, input)?;
  152         -
    object.finish();
  153         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  154         -
}
  155         -
  156         -
pub(crate) fn de_get_resource_config_history(
  157         -
    _value: &[u8],
  158         -
    mut builder: crate::operation::get_resource_config_history::builders::GetResourceConfigHistoryOutputBuilder,
  159         -
) -> ::std::result::Result<
  160         -
    crate::operation::get_resource_config_history::builders::GetResourceConfigHistoryOutputBuilder,
  161         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  162         -
> {
  163         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  164         -
    let tokens = &mut tokens_owned;
  165         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  166         -
    loop {
  167         -
        match tokens.next().transpose()? {
  168         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  169         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  170         -
                "configurationItems" => {
  171         -
                    builder = builder.set_configuration_items(crate::protocol_serde::shape_configuration_item_list::de_configuration_item_list(
  172         -
                        tokens, _value,
  173         -
                    )?);
  174         -
                }
  175         -
                "nextToken" => {
  176         -
                    builder = builder.set_next_token(
  177         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  178         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  179         -
                            .transpose()?,
  180         -
                    );
  181         -
                }
  182         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  183         -
            },
  184         -
            other => {
  185         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  186         -
                    "expected object key or end object, found: {other:?}"
  187         -
                )))
  188         -
            }
  189         -
        }
  190         -
    }
  191         -
    if tokens.next().is_some() {
  192         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  193         -
            "found more JSON tokens after completing parsing",
  194         -
        ));
  195         -
    }
  196         -
    Ok(builder)
  197         -
}