AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_configuration_aggregator_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_configuration_aggregator::PutConfigurationAggregatorInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.configuration_aggregator_name {
    7         -
        object.key("ConfigurationAggregatorName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.account_aggregation_sources {
   10         -
        let mut array_3 = object.key("AccountAggregationSources").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_account_aggregation_source::ser_account_aggregation_source(&mut object_5, item_4)?;
   16         -
                object_5.finish();
   17         -
            }
   18         -
        }
   19         -
        array_3.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.organization_aggregation_source {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_7 = object.key("OrganizationAggregationSource").start_object();
   24         -
        crate::protocol_serde::shape_organization_aggregation_source::ser_organization_aggregation_source(&mut object_7, var_6)?;
   25         -
        object_7.finish();
   26         -
    }
   27         -
    if let Some(var_8) = &input.tags {
   28         -
        let mut array_9 = object.key("Tags").start_array();
   29         -
        for item_10 in var_8 {
   30         -
            {
   31         -
                #[allow(unused_mut)]
   32         -
                let mut object_11 = array_9.value().start_object();
   33         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_11, item_10)?;
   34         -
                object_11.finish();
   35         -
            }
   36         -
        }
   37         -
        array_9.finish();
   38         -
    }
   39         -
    if let Some(var_12) = &input.aggregator_filters {
   40         -
        #[allow(unused_mut)]
   41         -
        let mut object_13 = object.key("AggregatorFilters").start_object();
   42         -
        crate::protocol_serde::shape_aggregator_filters::ser_aggregator_filters(&mut object_13, var_12)?;
   43         -
        object_13.finish();
   44         -
    }
   45         -
    Ok(())
   46         -
}

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

@@ -1,0 +154,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_put_configuration_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_configuration_recorder::PutConfigurationRecorderOutput,
    9         -
    crate::operation::put_configuration_recorder::PutConfigurationRecorderError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::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_configuration_recorder::PutConfigurationRecorderError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidConfigurationRecorderNameException" => {
   28         -
            crate::operation::put_configuration_recorder::PutConfigurationRecorderError::InvalidConfigurationRecorderNameException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidConfigurationRecorderNameExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_configuration_recorder_name_exception::de_invalid_configuration_recorder_name_exception_json_err(_response_body, output).map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::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         -
        "InvalidRecordingGroupException" => {
   44         -
            crate::operation::put_configuration_recorder::PutConfigurationRecorderError::InvalidRecordingGroupException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::InvalidRecordingGroupExceptionBuilder::default();
   49         -
                    output = crate::protocol_serde::shape_invalid_recording_group_exception::de_invalid_recording_group_exception_json_err(
   50         -
                        _response_body,
   51         -
                        output,
   52         -
                    )
   53         -
                    .map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::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         -
        "InvalidRoleException" => crate::operation::put_configuration_recorder::PutConfigurationRecorderError::InvalidRoleException({
   64         -
            #[allow(unused_mut)]
   65         -
            let mut tmp = {
   66         -
                #[allow(unused_mut)]
   67         -
                let mut output = crate::types::error::builders::InvalidRoleExceptionBuilder::default();
   68         -
                output = crate::protocol_serde::shape_invalid_role_exception::de_invalid_role_exception_json_err(_response_body, output)
   69         -
                    .map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::unhandled)?;
   70         -
                let output = output.meta(generic);
   71         -
                output.build()
   72         -
            };
   73         -
            if tmp.message.is_none() {
   74         -
                tmp.message = _error_message;
   75         -
            }
   76         -
            tmp
   77         -
        }),
   78         -
        "MaxNumberOfConfigurationRecordersExceededException" => {
   79         -
            crate::operation::put_configuration_recorder::PutConfigurationRecorderError::MaxNumberOfConfigurationRecordersExceededException({
   80         -
                #[allow(unused_mut)]
   81         -
                let mut tmp = {
   82         -
                    #[allow(unused_mut)]
   83         -
                    let mut output = crate::types::error::builders::MaxNumberOfConfigurationRecordersExceededExceptionBuilder::default();
   84         -
                    output = crate::protocol_serde::shape_max_number_of_configuration_recorders_exceeded_exception::de_max_number_of_configuration_recorders_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::unhandled)?;
   85         -
                    let output = output.meta(generic);
   86         -
                    output.build()
   87         -
                };
   88         -
                if tmp.message.is_none() {
   89         -
                    tmp.message = _error_message;
   90         -
                }
   91         -
                tmp
   92         -
            })
   93         -
        }
   94         -
        "UnmodifiableEntityException" => crate::operation::put_configuration_recorder::PutConfigurationRecorderError::UnmodifiableEntityException({
   95         -
            #[allow(unused_mut)]
   96         -
            let mut tmp = {
   97         -
                #[allow(unused_mut)]
   98         -
                let mut output = crate::types::error::builders::UnmodifiableEntityExceptionBuilder::default();
   99         -
                output =
  100         -
                    crate::protocol_serde::shape_unmodifiable_entity_exception::de_unmodifiable_entity_exception_json_err(_response_body, output)
  101         -
                        .map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::unhandled)?;
  102         -
                let output = output.meta(generic);
  103         -
                output.build()
  104         -
            };
  105         -
            if tmp.message.is_none() {
  106         -
                tmp.message = _error_message;
  107         -
            }
  108         -
            tmp
  109         -
        }),
  110         -
        "ValidationException" => crate::operation::put_configuration_recorder::PutConfigurationRecorderError::ValidationException({
  111         -
            #[allow(unused_mut)]
  112         -
            let mut tmp = {
  113         -
                #[allow(unused_mut)]
  114         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  115         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  116         -
                    .map_err(crate::operation::put_configuration_recorder::PutConfigurationRecorderError::unhandled)?;
  117         -
                let output = output.meta(generic);
  118         -
                output.build()
  119         -
            };
  120         -
            if tmp.message.is_none() {
  121         -
                tmp.message = _error_message;
  122         -
            }
  123         -
            tmp
  124         -
        }),
  125         -
        _ => crate::operation::put_configuration_recorder::PutConfigurationRecorderError::generic(generic),
  126         -
    })
  127         -
}
  128         -
  129         -
#[allow(clippy::unnecessary_wraps)]
  130         -
pub fn de_put_configuration_recorder_http_response(
  131         -
    _response_status: u16,
  132         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  133         -
    _response_body: &[u8],
  134         -
) -> std::result::Result<
  135         -
    crate::operation::put_configuration_recorder::PutConfigurationRecorderOutput,
  136         -
    crate::operation::put_configuration_recorder::PutConfigurationRecorderError,
  137         -
> {
  138         -
    Ok({
  139         -
        #[allow(unused_mut)]
  140         -
        let mut output = crate::operation::put_configuration_recorder::builders::PutConfigurationRecorderOutputBuilder::default();
  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_put_configuration_recorder_input(
  147         -
    input: &crate::operation::put_configuration_recorder::PutConfigurationRecorderInput,
  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_put_configuration_recorder_input::ser_put_configuration_recorder_input_input(&mut object, input)?;
  152         -
    object.finish();
  153         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  154         -
}

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

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

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

@@ -1,0 +175,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_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_conformance_pack::PutConformancePackOutput,
    9         -
    crate::operation::put_conformance_pack::PutConformancePackError,
   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_conformance_pack::PutConformancePackError::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_conformance_pack::PutConformancePackError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ConformancePackTemplateValidationException" => {
   24         -
            crate::operation::put_conformance_pack::PutConformancePackError::ConformancePackTemplateValidationException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::ConformancePackTemplateValidationExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_conformance_pack_template_validation_exception::de_conformance_pack_template_validation_exception_json_err(_response_body, output).map_err(crate::operation::put_conformance_pack::PutConformancePackError::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         -
        "InsufficientPermissionsException" => crate::operation::put_conformance_pack::PutConformancePackError::InsufficientPermissionsException({
   40         -
            #[allow(unused_mut)]
   41         -
            let mut tmp = {
   42         -
                #[allow(unused_mut)]
   43         -
                let mut output = crate::types::error::builders::InsufficientPermissionsExceptionBuilder::default();
   44         -
                output = crate::protocol_serde::shape_insufficient_permissions_exception::de_insufficient_permissions_exception_json_err(
   45         -
                    _response_body,
   46         -
                    output,
   47         -
                )
   48         -
                .map_err(crate::operation::put_conformance_pack::PutConformancePackError::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         -
        "InvalidParameterValueException" => crate::operation::put_conformance_pack::PutConformancePackError::InvalidParameterValueException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   63         -
                    _response_body,
   64         -
                    output,
   65         -
                )
   66         -
                .map_err(crate::operation::put_conformance_pack::PutConformancePackError::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         -
        "MaxNumberOfConformancePacksExceededException" => {
   76         -
            crate::operation::put_conformance_pack::PutConformancePackError::MaxNumberOfConformancePacksExceededException({
   77         -
                #[allow(unused_mut)]
   78         -
                let mut tmp = {
   79         -
                    #[allow(unused_mut)]
   80         -
                    let mut output = crate::types::error::builders::MaxNumberOfConformancePacksExceededExceptionBuilder::default();
   81         -
                    output = crate::protocol_serde::shape_max_number_of_conformance_packs_exceeded_exception::de_max_number_of_conformance_packs_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_conformance_pack::PutConformancePackError::unhandled)?;
   82         -
                    let output = output.meta(generic);
   83         -
                    output.build()
   84         -
                };
   85         -
                if tmp.message.is_none() {
   86         -
                    tmp.message = _error_message;
   87         -
                }
   88         -
                tmp
   89         -
            })
   90         -
        }
   91         -
        "ResourceInUseException" => crate::operation::put_conformance_pack::PutConformancePackError::ResourceInUseException({
   92         -
            #[allow(unused_mut)]
   93         -
            let mut tmp = {
   94         -
                #[allow(unused_mut)]
   95         -
                let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   96         -
                output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   97         -
                    .map_err(crate::operation::put_conformance_pack::PutConformancePackError::unhandled)?;
   98         -
                let output = output.meta(generic);
   99         -
                output.build()
  100         -
            };
  101         -
            if tmp.message.is_none() {
  102         -
                tmp.message = _error_message;
  103         -
            }
  104         -
            tmp
  105         -
        }),
  106         -
        _ => crate::operation::put_conformance_pack::PutConformancePackError::generic(generic),
  107         -
    })
  108         -
}
  109         -
  110         -
#[allow(clippy::unnecessary_wraps)]
  111         -
pub fn de_put_conformance_pack_http_response(
  112         -
    _response_status: u16,
  113         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  114         -
    _response_body: &[u8],
  115         -
) -> std::result::Result<
  116         -
    crate::operation::put_conformance_pack::PutConformancePackOutput,
  117         -
    crate::operation::put_conformance_pack::PutConformancePackError,
  118         -
> {
  119         -
    Ok({
  120         -
        #[allow(unused_mut)]
  121         -
        let mut output = crate::operation::put_conformance_pack::builders::PutConformancePackOutputBuilder::default();
  122         -
        output = crate::protocol_serde::shape_put_conformance_pack::de_put_conformance_pack(_response_body, output)
  123         -
            .map_err(crate::operation::put_conformance_pack::PutConformancePackError::unhandled)?;
  124         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  125         -
        output.build()
  126         -
    })
  127         -
}
  128         -
  129         -
pub fn ser_put_conformance_pack_input(
  130         -
    input: &crate::operation::put_conformance_pack::PutConformancePackInput,
  131         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  132         -
    let mut out = String::new();
  133         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  134         -
    crate::protocol_serde::shape_put_conformance_pack_input::ser_put_conformance_pack_input_input(&mut object, input)?;
  135         -
    object.finish();
  136         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  137         -
}
  138         -
  139         -
pub(crate) fn de_put_conformance_pack(
  140         -
    _value: &[u8],
  141         -
    mut builder: crate::operation::put_conformance_pack::builders::PutConformancePackOutputBuilder,
  142         -
) -> ::std::result::Result<
  143         -
    crate::operation::put_conformance_pack::builders::PutConformancePackOutputBuilder,
  144         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  145         -
> {
  146         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  147         -
    let tokens = &mut tokens_owned;
  148         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  149         -
    loop {
  150         -
        match tokens.next().transpose()? {
  151         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  152         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  153         -
                "ConformancePackArn" => {
  154         -
                    builder = builder.set_conformance_pack_arn(
  155         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  156         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  157         -
                            .transpose()?,
  158         -
                    );
  159         -
                }
  160         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  161         -
            },
  162         -
            other => {
  163         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  164         -
                    "expected object key or end object, found: {other:?}"
  165         -
                )))
  166         -
            }
  167         -
        }
  168         -
    }
  169         -
    if tokens.next().is_some() {
  170         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  171         -
            "found more JSON tokens after completing parsing",
  172         -
        ));
  173         -
    }
  174         -
    Ok(builder)
  175         -
}

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

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_conformance_pack_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_conformance_pack::PutConformancePackInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.conformance_pack_name {
    7         -
        object.key("ConformancePackName").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.template_ssm_document_details {
   34         -
        #[allow(unused_mut)]
   35         -
        let mut object_11 = object.key("TemplateSSMDocumentDetails").start_object();
   36         -
        crate::protocol_serde::shape_template_ssm_document_details::ser_template_ssm_document_details(&mut object_11, var_10)?;
   37         -
        object_11.finish();
   38         -
    }
   39         -
    Ok(())
   40         -
}

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

@@ -1,0 +190,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_delivery_channel_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_delivery_channel::PutDeliveryChannelOutput,
    9         -
    crate::operation::put_delivery_channel::PutDeliveryChannelError,
   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_delivery_channel::PutDeliveryChannelError::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_delivery_channel::PutDeliveryChannelError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InsufficientDeliveryPolicyException" => {
   24         -
            crate::operation::put_delivery_channel::PutDeliveryChannelError::InsufficientDeliveryPolicyException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InsufficientDeliveryPolicyExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_insufficient_delivery_policy_exception::de_insufficient_delivery_policy_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::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         -
        "InvalidDeliveryChannelNameException" => {
   44         -
            crate::operation::put_delivery_channel::PutDeliveryChannelError::InvalidDeliveryChannelNameException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::InvalidDeliveryChannelNameExceptionBuilder::default();
   49         -
                    output =
   50         -
                        crate::protocol_serde::shape_invalid_delivery_channel_name_exception::de_invalid_delivery_channel_name_exception_json_err(
   51         -
                            _response_body,
   52         -
                            output,
   53         -
                        )
   54         -
                        .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
   55         -
                    let output = output.meta(generic);
   56         -
                    output.build()
   57         -
                };
   58         -
                if tmp.message.is_none() {
   59         -
                    tmp.message = _error_message;
   60         -
                }
   61         -
                tmp
   62         -
            })
   63         -
        }
   64         -
        "InvalidS3KeyPrefixException" => crate::operation::put_delivery_channel::PutDeliveryChannelError::InvalidS3KeyPrefixException({
   65         -
            #[allow(unused_mut)]
   66         -
            let mut tmp = {
   67         -
                #[allow(unused_mut)]
   68         -
                let mut output = crate::types::error::builders::InvalidS3KeyPrefixExceptionBuilder::default();
   69         -
                output =
   70         -
                    crate::protocol_serde::shape_invalid_s3_key_prefix_exception::de_invalid_s3_key_prefix_exception_json_err(_response_body, output)
   71         -
                        .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "InvalidS3KmsKeyArnException" => crate::operation::put_delivery_channel::PutDeliveryChannelError::InvalidS3KmsKeyArnException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::InvalidS3KmsKeyArnExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_invalid_s3_kms_key_arn_exception::de_invalid_s3_kms_key_arn_exception_json_err(
   86         -
                    _response_body,
   87         -
                    output,
   88         -
                )
   89         -
                .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
   90         -
                let output = output.meta(generic);
   91         -
                output.build()
   92         -
            };
   93         -
            if tmp.message.is_none() {
   94         -
                tmp.message = _error_message;
   95         -
            }
   96         -
            tmp
   97         -
        }),
   98         -
        "InvalidSNSTopicARNException" => crate::operation::put_delivery_channel::PutDeliveryChannelError::InvalidSnsTopicArnException({
   99         -
            #[allow(unused_mut)]
  100         -
            let mut tmp = {
  101         -
                #[allow(unused_mut)]
  102         -
                let mut output = crate::types::error::builders::InvalidSnsTopicArnExceptionBuilder::default();
  103         -
                output =
  104         -
                    crate::protocol_serde::shape_invalid_sns_topic_arn_exception::de_invalid_sns_topic_arn_exception_json_err(_response_body, output)
  105         -
                        .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
  106         -
                let output = output.meta(generic);
  107         -
                output.build()
  108         -
            };
  109         -
            if tmp.message.is_none() {
  110         -
                tmp.message = _error_message;
  111         -
            }
  112         -
            tmp
  113         -
        }),
  114         -
        "MaxNumberOfDeliveryChannelsExceededException" => {
  115         -
            crate::operation::put_delivery_channel::PutDeliveryChannelError::MaxNumberOfDeliveryChannelsExceededException({
  116         -
                #[allow(unused_mut)]
  117         -
                let mut tmp = {
  118         -
                    #[allow(unused_mut)]
  119         -
                    let mut output = crate::types::error::builders::MaxNumberOfDeliveryChannelsExceededExceptionBuilder::default();
  120         -
                    output = crate::protocol_serde::shape_max_number_of_delivery_channels_exceeded_exception::de_max_number_of_delivery_channels_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
  121         -
                    let output = output.meta(generic);
  122         -
                    output.build()
  123         -
                };
  124         -
                if tmp.message.is_none() {
  125         -
                    tmp.message = _error_message;
  126         -
                }
  127         -
                tmp
  128         -
            })
  129         -
        }
  130         -
        "NoAvailableConfigurationRecorderException" => {
  131         -
            crate::operation::put_delivery_channel::PutDeliveryChannelError::NoAvailableConfigurationRecorderException({
  132         -
                #[allow(unused_mut)]
  133         -
                let mut tmp = {
  134         -
                    #[allow(unused_mut)]
  135         -
                    let mut output = crate::types::error::builders::NoAvailableConfigurationRecorderExceptionBuilder::default();
  136         -
                    output = crate::protocol_serde::shape_no_available_configuration_recorder_exception::de_no_available_configuration_recorder_exception_json_err(_response_body, output).map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
  137         -
                    let output = output.meta(generic);
  138         -
                    output.build()
  139         -
                };
  140         -
                if tmp.message.is_none() {
  141         -
                    tmp.message = _error_message;
  142         -
                }
  143         -
                tmp
  144         -
            })
  145         -
        }
  146         -
        "NoSuchBucketException" => crate::operation::put_delivery_channel::PutDeliveryChannelError::NoSuchBucketException({
  147         -
            #[allow(unused_mut)]
  148         -
            let mut tmp = {
  149         -
                #[allow(unused_mut)]
  150         -
                let mut output = crate::types::error::builders::NoSuchBucketExceptionBuilder::default();
  151         -
                output = crate::protocol_serde::shape_no_such_bucket_exception::de_no_such_bucket_exception_json_err(_response_body, output)
  152         -
                    .map_err(crate::operation::put_delivery_channel::PutDeliveryChannelError::unhandled)?;
  153         -
                let output = output.meta(generic);
  154         -
                output.build()
  155         -
            };
  156         -
            if tmp.message.is_none() {
  157         -
                tmp.message = _error_message;
  158         -
            }
  159         -
            tmp
  160         -
        }),
  161         -
        _ => crate::operation::put_delivery_channel::PutDeliveryChannelError::generic(generic),
  162         -
    })
  163         -
}
  164         -
  165         -
#[allow(clippy::unnecessary_wraps)]
  166         -
pub fn de_put_delivery_channel_http_response(
  167         -
    _response_status: u16,
  168         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  169         -
    _response_body: &[u8],
  170         -
) -> std::result::Result<
  171         -
    crate::operation::put_delivery_channel::PutDeliveryChannelOutput,
  172         -
    crate::operation::put_delivery_channel::PutDeliveryChannelError,
  173         -
> {
  174         -
    Ok({
  175         -
        #[allow(unused_mut)]
  176         -
        let mut output = crate::operation::put_delivery_channel::builders::PutDeliveryChannelOutputBuilder::default();
  177         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  178         -
        output.build()
  179         -
    })
  180         -
}
  181         -
  182         -
pub fn ser_put_delivery_channel_input(
  183         -
    input: &crate::operation::put_delivery_channel::PutDeliveryChannelInput,
  184         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  185         -
    let mut out = String::new();
  186         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  187         -
    crate::protocol_serde::shape_put_delivery_channel_input::ser_put_delivery_channel_input_input(&mut object, input)?;
  188         -
    object.finish();
  189         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  190         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_put_delivery_channel_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_delivery_channel_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_delivery_channel::PutDeliveryChannelInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.delivery_channel {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("DeliveryChannel").start_object();
    9         -
        crate::protocol_serde::shape_delivery_channel::ser_delivery_channel(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

@@ -1,0 +132,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_evaluations_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_evaluations::PutEvaluationsOutput, crate::operation::put_evaluations::PutEvaluationsError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::put_evaluations::PutEvaluationsError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::put_evaluations::PutEvaluationsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterValueException" => crate::operation::put_evaluations::PutEvaluationsError::InvalidParameterValueException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   26         -
                    _response_body,
   27         -
                    output,
   28         -
                )
   29         -
                .map_err(crate::operation::put_evaluations::PutEvaluationsError::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         -
        "InvalidResultTokenException" => crate::operation::put_evaluations::PutEvaluationsError::InvalidResultTokenException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::InvalidResultTokenExceptionBuilder::default();
   43         -
                output =
   44         -
                    crate::protocol_serde::shape_invalid_result_token_exception::de_invalid_result_token_exception_json_err(_response_body, output)
   45         -
                        .map_err(crate::operation::put_evaluations::PutEvaluationsError::unhandled)?;
   46         -
                let output = output.meta(generic);
   47         -
                output.build()
   48         -
            };
   49         -
            if tmp.message.is_none() {
   50         -
                tmp.message = _error_message;
   51         -
            }
   52         -
            tmp
   53         -
        }),
   54         -
        "NoSuchConfigRuleException" => crate::operation::put_evaluations::PutEvaluationsError::NoSuchConfigRuleException({
   55         -
            #[allow(unused_mut)]
   56         -
            let mut tmp = {
   57         -
                #[allow(unused_mut)]
   58         -
                let mut output = crate::types::error::builders::NoSuchConfigRuleExceptionBuilder::default();
   59         -
                output =
   60         -
                    crate::protocol_serde::shape_no_such_config_rule_exception::de_no_such_config_rule_exception_json_err(_response_body, output)
   61         -
                        .map_err(crate::operation::put_evaluations::PutEvaluationsError::unhandled)?;
   62         -
                let output = output.meta(generic);
   63         -
                output.build()
   64         -
            };
   65         -
            if tmp.message.is_none() {
   66         -
                tmp.message = _error_message;
   67         -
            }
   68         -
            tmp
   69         -
        }),
   70         -
        _ => crate::operation::put_evaluations::PutEvaluationsError::generic(generic),
   71         -
    })
   72         -
}
   73         -
   74         -
#[allow(clippy::unnecessary_wraps)]
   75         -
pub fn de_put_evaluations_http_response(
   76         -
    _response_status: u16,
   77         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   78         -
    _response_body: &[u8],
   79         -
) -> std::result::Result<crate::operation::put_evaluations::PutEvaluationsOutput, crate::operation::put_evaluations::PutEvaluationsError> {
   80         -
    Ok({
   81         -
        #[allow(unused_mut)]
   82         -
        let mut output = crate::operation::put_evaluations::builders::PutEvaluationsOutputBuilder::default();
   83         -
        output = crate::protocol_serde::shape_put_evaluations::de_put_evaluations(_response_body, output)
   84         -
            .map_err(crate::operation::put_evaluations::PutEvaluationsError::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_evaluations_input(
   91         -
    input: &crate::operation::put_evaluations::PutEvaluationsInput,
   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_evaluations_input::ser_put_evaluations_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_evaluations(
  101         -
    _value: &[u8],
  102         -
    mut builder: crate::operation::put_evaluations::builders::PutEvaluationsOutputBuilder,
  103         -
) -> ::std::result::Result<
  104         -
    crate::operation::put_evaluations::builders::PutEvaluationsOutputBuilder,
  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         -
                "FailedEvaluations" => {
  115         -
                    builder = builder.set_failed_evaluations(crate::protocol_serde::shape_evaluations::de_evaluations(tokens, _value)?);
  116         -
                }
  117         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  118         -
            },
  119         -
            other => {
  120         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  121         -
                    "expected object key or end object, found: {other:?}"
  122         -
                )))
  123         -
            }
  124         -
        }
  125         -
    }
  126         -
    if tokens.next().is_some() {
  127         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  128         -
            "found more JSON tokens after completing parsing",
  129         -
        ));
  130         -
    }
  131         -
    Ok(builder)
  132         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_evaluations_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_evaluations::PutEvaluationsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.evaluations {
    7         -
        let mut array_2 = object.key("Evaluations").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_evaluation::ser_evaluation(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.result_token {
   19         -
        object.key("ResultToken").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.test_mode {
   22         -
        object.key("TestMode").boolean(*var_6);
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +86,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_external_evaluation_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_external_evaluation::PutExternalEvaluationOutput,
    9         -
    crate::operation::put_external_evaluation::PutExternalEvaluationError,
   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_external_evaluation::PutExternalEvaluationError::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_external_evaluation::PutExternalEvaluationError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => crate::operation::put_external_evaluation::PutExternalEvaluationError::InvalidParameterValueException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   29         -
                    _response_body,
   30         -
                    output,
   31         -
                )
   32         -
                .map_err(crate::operation::put_external_evaluation::PutExternalEvaluationError::unhandled)?;
   33         -
                let output = output.meta(generic);
   34         -
                output.build()
   35         -
            };
   36         -
            if tmp.message.is_none() {
   37         -
                tmp.message = _error_message;
   38         -
            }
   39         -
            tmp
   40         -
        }),
   41         -
        "NoSuchConfigRuleException" => crate::operation::put_external_evaluation::PutExternalEvaluationError::NoSuchConfigRuleException({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::NoSuchConfigRuleExceptionBuilder::default();
   46         -
                output =
   47         -
                    crate::protocol_serde::shape_no_such_config_rule_exception::de_no_such_config_rule_exception_json_err(_response_body, output)
   48         -
                        .map_err(crate::operation::put_external_evaluation::PutExternalEvaluationError::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         -
        _ => crate::operation::put_external_evaluation::PutExternalEvaluationError::generic(generic),
   58         -
    })
   59         -
}
   60         -
   61         -
#[allow(clippy::unnecessary_wraps)]
   62         -
pub fn de_put_external_evaluation_http_response(
   63         -
    _response_status: u16,
   64         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   65         -
    _response_body: &[u8],
   66         -
) -> std::result::Result<
   67         -
    crate::operation::put_external_evaluation::PutExternalEvaluationOutput,
   68         -
    crate::operation::put_external_evaluation::PutExternalEvaluationError,
   69         -
> {
   70         -
    Ok({
   71         -
        #[allow(unused_mut)]
   72         -
        let mut output = crate::operation::put_external_evaluation::builders::PutExternalEvaluationOutputBuilder::default();
   73         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   74         -
        output.build()
   75         -
    })
   76         -
}
   77         -
   78         -
pub fn ser_put_external_evaluation_input(
   79         -
    input: &crate::operation::put_external_evaluation::PutExternalEvaluationInput,
   80         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   81         -
    let mut out = String::new();
   82         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   83         -
    crate::protocol_serde::shape_put_external_evaluation_input::ser_put_external_evaluation_input_input(&mut object, input)?;
   84         -
    object.finish();
   85         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   86         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_put_external_evaluation_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::put_external_evaluation::PutExternalEvaluationInput,
    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.external_evaluation {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("ExternalEvaluation").start_object();
   12         -
        crate::protocol_serde::shape_external_evaluation::ser_external_evaluation(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

@@ -1,0 +238,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_config_rule_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::put_organization_config_rule::PutOrganizationConfigRuleOutput,
    9         -
    crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError,
   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_config_rule::PutOrganizationConfigRuleError::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_organization_config_rule::PutOrganizationConfigRuleError::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_organization_config_rule::PutOrganizationConfigRuleError::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_organization_config_rule::PutOrganizationConfigRuleError::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_organization_config_rule::PutOrganizationConfigRuleError::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_organization_config_rule::PutOrganizationConfigRuleError::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         -
        "MaxNumberOfOrganizationConfigRulesExceededException" => {
   68         -
            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::MaxNumberOfOrganizationConfigRulesExceededException({
   69         -
                #[allow(unused_mut)]
   70         -
                let mut tmp = {
   71         -
                    #[allow(unused_mut)]
   72         -
                    let mut output = crate::types::error::builders::MaxNumberOfOrganizationConfigRulesExceededExceptionBuilder::default();
   73         -
                    output = crate::protocol_serde::shape_max_number_of_organization_config_rules_exceeded_exception::de_max_number_of_organization_config_rules_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
   74         -
                    let output = output.meta(generic);
   75         -
                    output.build()
   76         -
                };
   77         -
                if tmp.message.is_none() {
   78         -
                    tmp.message = _error_message;
   79         -
                }
   80         -
                tmp
   81         -
            })
   82         -
        }
   83         -
        "NoAvailableOrganizationException" => {
   84         -
            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::NoAvailableOrganizationException({
   85         -
                #[allow(unused_mut)]
   86         -
                let mut tmp = {
   87         -
                    #[allow(unused_mut)]
   88         -
                    let mut output = crate::types::error::builders::NoAvailableOrganizationExceptionBuilder::default();
   89         -
                    output = crate::protocol_serde::shape_no_available_organization_exception::de_no_available_organization_exception_json_err(
   90         -
                        _response_body,
   91         -
                        output,
   92         -
                    )
   93         -
                    .map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
   94         -
                    let output = output.meta(generic);
   95         -
                    output.build()
   96         -
                };
   97         -
                if tmp.message.is_none() {
   98         -
                    tmp.message = _error_message;
   99         -
                }
  100         -
                tmp
  101         -
            })
  102         -
        }
  103         -
        "OrganizationAccessDeniedException" => {
  104         -
            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::OrganizationAccessDeniedException({
  105         -
                #[allow(unused_mut)]
  106         -
                let mut tmp = {
  107         -
                    #[allow(unused_mut)]
  108         -
                    let mut output = crate::types::error::builders::OrganizationAccessDeniedExceptionBuilder::default();
  109         -
                    output = crate::protocol_serde::shape_organization_access_denied_exception::de_organization_access_denied_exception_json_err(
  110         -
                        _response_body,
  111         -
                        output,
  112         -
                    )
  113         -
                    .map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
  114         -
                    let output = output.meta(generic);
  115         -
                    output.build()
  116         -
                };
  117         -
                if tmp.message.is_none() {
  118         -
                    tmp.message = _error_message;
  119         -
                }
  120         -
                tmp
  121         -
            })
  122         -
        }
  123         -
        "OrganizationAllFeaturesNotEnabledException" => {
  124         -
            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::OrganizationAllFeaturesNotEnabledException({
  125         -
                #[allow(unused_mut)]
  126         -
                let mut tmp = {
  127         -
                    #[allow(unused_mut)]
  128         -
                    let mut output = crate::types::error::builders::OrganizationAllFeaturesNotEnabledExceptionBuilder::default();
  129         -
                    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_config_rule::PutOrganizationConfigRuleError::unhandled)?;
  130         -
                    let output = output.meta(generic);
  131         -
                    output.build()
  132         -
                };
  133         -
                if tmp.message.is_none() {
  134         -
                    tmp.message = _error_message;
  135         -
                }
  136         -
                tmp
  137         -
            })
  138         -
        }
  139         -
        "ResourceInUseException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::ResourceInUseException({
  140         -
            #[allow(unused_mut)]
  141         -
            let mut tmp = {
  142         -
                #[allow(unused_mut)]
  143         -
                let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
  144         -
                output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
  145         -
                    .map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
  146         -
                let output = output.meta(generic);
  147         -
                output.build()
  148         -
            };
  149         -
            if tmp.message.is_none() {
  150         -
                tmp.message = _error_message;
  151         -
            }
  152         -
            tmp
  153         -
        }),
  154         -
        "ValidationException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::ValidationException({
  155         -
            #[allow(unused_mut)]
  156         -
            let mut tmp = {
  157         -
                #[allow(unused_mut)]
  158         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  159         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  160         -
                    .map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
  161         -
                let output = output.meta(generic);
  162         -
                output.build()
  163         -
            };
  164         -
            if tmp.message.is_none() {
  165         -
                tmp.message = _error_message;
  166         -
            }
  167         -
            tmp
  168         -
        }),
  169         -
        _ => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::generic(generic),
  170         -
    })
  171         -
}
  172         -
  173         -
#[allow(clippy::unnecessary_wraps)]
  174         -
pub fn de_put_organization_config_rule_http_response(
  175         -
    _response_status: u16,
  176         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  177         -
    _response_body: &[u8],
  178         -
) -> std::result::Result<
  179         -
    crate::operation::put_organization_config_rule::PutOrganizationConfigRuleOutput,
  180         -
    crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError,
  181         -
> {
  182         -
    Ok({
  183         -
        #[allow(unused_mut)]
  184         -
        let mut output = crate::operation::put_organization_config_rule::builders::PutOrganizationConfigRuleOutputBuilder::default();
  185         -
        output = crate::protocol_serde::shape_put_organization_config_rule::de_put_organization_config_rule(_response_body, output)
  186         -
            .map_err(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::unhandled)?;
  187         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  188         -
        output.build()
  189         -
    })
  190         -
}
  191         -
  192         -
pub fn ser_put_organization_config_rule_input(
  193         -
    input: &crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
  194         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  195         -
    let mut out = String::new();
  196         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  197         -
    crate::protocol_serde::shape_put_organization_config_rule_input::ser_put_organization_config_rule_input_input(&mut object, input)?;
  198         -
    object.finish();
  199         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  200         -
}
  201         -
  202         -
pub(crate) fn de_put_organization_config_rule(
  203         -
    _value: &[u8],
  204         -
    mut builder: crate::operation::put_organization_config_rule::builders::PutOrganizationConfigRuleOutputBuilder,
  205         -
) -> ::std::result::Result<
  206         -
    crate::operation::put_organization_config_rule::builders::PutOrganizationConfigRuleOutputBuilder,
  207         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  208         -
> {
  209         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  210         -
    let tokens = &mut tokens_owned;
  211         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  212         -
    loop {
  213         -
        match tokens.next().transpose()? {
  214         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  215         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  216         -
                "OrganizationConfigRuleArn" => {
  217         -
                    builder = builder.set_organization_config_rule_arn(
  218         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  219         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  220         -
                            .transpose()?,
  221         -
                    );
  222         -
                }
  223         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  224         -
            },
  225         -
            other => {
  226         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  227         -
                    "expected object key or end object, found: {other:?}"
  228         -
                )))
  229         -
            }
  230         -
        }
  231         -
    }
  232         -
    if tokens.next().is_some() {
  233         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  234         -
            "found more JSON tokens after completing parsing",
  235         -
        ));
  236         -
    }
  237         -
    Ok(builder)
  238         -
}