AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_retention_configuration_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::RetentionConfiguration>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_retention_configuration::de_retention_configuration(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

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

@@ -1,0 +84,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_scope(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Scope,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.compliance_resource_types {
    7         -
        let mut array_2 = object.key("ComplianceResourceTypes").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.tag_key {
   16         -
        object.key("TagKey").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.tag_value {
   19         -
        object.key("TagValue").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.compliance_resource_id {
   22         -
        object.key("ComplianceResourceId").string(var_6.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}
   26         -
   27         -
pub(crate) fn de_scope<'a, I>(
   28         -
    tokens: &mut ::std::iter::Peekable<I>,
   29         -
    _value: &'a [u8],
   30         -
) -> ::std::result::Result<Option<crate::types::Scope>, ::aws_smithy_json::deserialize::error::DeserializeError>
   31         -
where
   32         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   33         -
{
   34         -
    match tokens.next().transpose()? {
   35         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   36         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   37         -
            #[allow(unused_mut)]
   38         -
            let mut builder = crate::types::builders::ScopeBuilder::default();
   39         -
            loop {
   40         -
                match tokens.next().transpose()? {
   41         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   42         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   43         -
                        "ComplianceResourceTypes" => {
   44         -
                            builder = builder.set_compliance_resource_types(
   45         -
                                crate::protocol_serde::shape_compliance_resource_types::de_compliance_resource_types(tokens, _value)?,
   46         -
                            );
   47         -
                        }
   48         -
                        "TagKey" => {
   49         -
                            builder = builder.set_tag_key(
   50         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   51         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   52         -
                                    .transpose()?,
   53         -
                            );
   54         -
                        }
   55         -
                        "TagValue" => {
   56         -
                            builder = builder.set_tag_value(
   57         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   58         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   59         -
                                    .transpose()?,
   60         -
                            );
   61         -
                        }
   62         -
                        "ComplianceResourceId" => {
   63         -
                            builder = builder.set_compliance_resource_id(
   64         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   65         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   66         -
                                    .transpose()?,
   67         -
                            );
   68         -
                        }
   69         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   70         -
                    },
   71         -
                    other => {
   72         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   73         -
                            "expected object key or end object, found: {other:?}"
   74         -
                        )))
   75         -
                    }
   76         -
                }
   77         -
            }
   78         -
            Ok(Some(builder.build()))
   79         -
        }
   80         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   81         -
            "expected start object or null",
   82         -
        )),
   83         -
    }
   84         -
}

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

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

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_select_aggregate_resource_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::select_aggregate_resource_config::SelectAggregateResourceConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.expression {
    7         -
        object.key("Expression").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.configuration_aggregator_name {
   10         -
        object.key("ConfigurationAggregatorName").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.limit {
   13         -
        object.key("Limit").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   16         -
        );
   17         -
    }
   18         -
    if let Some(var_4) = &input.max_results {
   19         -
        object.key("MaxResults").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_select_resource_config.rs

@@ -1,0 +143,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_select_resource_config_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::select_resource_config::SelectResourceConfigOutput,
    9         -
    crate::operation::select_resource_config::SelectResourceConfigError,
   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::select_resource_config::SelectResourceConfigError::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::select_resource_config::SelectResourceConfigError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidExpressionException" => crate::operation::select_resource_config::SelectResourceConfigError::InvalidExpressionException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidExpressionExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_expression_exception::de_invalid_expression_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::select_resource_config::SelectResourceConfigError::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         -
        "InvalidLimitException" => crate::operation::select_resource_config::SelectResourceConfigError::InvalidLimitException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::select_resource_config::SelectResourceConfigError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "InvalidNextTokenException" => crate::operation::select_resource_config::SelectResourceConfigError::InvalidNextTokenException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::select_resource_config::SelectResourceConfigError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        _ => crate::operation::select_resource_config::SelectResourceConfigError::generic(generic),
   69         -
    })
   70         -
}
   71         -
   72         -
#[allow(clippy::unnecessary_wraps)]
   73         -
pub fn de_select_resource_config_http_response(
   74         -
    _response_status: u16,
   75         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   76         -
    _response_body: &[u8],
   77         -
) -> std::result::Result<
   78         -
    crate::operation::select_resource_config::SelectResourceConfigOutput,
   79         -
    crate::operation::select_resource_config::SelectResourceConfigError,
   80         -
> {
   81         -
    Ok({
   82         -
        #[allow(unused_mut)]
   83         -
        let mut output = crate::operation::select_resource_config::builders::SelectResourceConfigOutputBuilder::default();
   84         -
        output = crate::protocol_serde::shape_select_resource_config::de_select_resource_config(_response_body, output)
   85         -
            .map_err(crate::operation::select_resource_config::SelectResourceConfigError::unhandled)?;
   86         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   87         -
        output.build()
   88         -
    })
   89         -
}
   90         -
   91         -
pub fn ser_select_resource_config_input(
   92         -
    input: &crate::operation::select_resource_config::SelectResourceConfigInput,
   93         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   94         -
    let mut out = String::new();
   95         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   96         -
    crate::protocol_serde::shape_select_resource_config_input::ser_select_resource_config_input_input(&mut object, input)?;
   97         -
    object.finish();
   98         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   99         -
}
  100         -
  101         -
pub(crate) fn de_select_resource_config(
  102         -
    _value: &[u8],
  103         -
    mut builder: crate::operation::select_resource_config::builders::SelectResourceConfigOutputBuilder,
  104         -
) -> ::std::result::Result<
  105         -
    crate::operation::select_resource_config::builders::SelectResourceConfigOutputBuilder,
  106         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  107         -
> {
  108         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  109         -
    let tokens = &mut tokens_owned;
  110         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  111         -
    loop {
  112         -
        match tokens.next().transpose()? {
  113         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  114         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  115         -
                "Results" => {
  116         -
                    builder = builder.set_results(crate::protocol_serde::shape_results::de_results(tokens, _value)?);
  117         -
                }
  118         -
                "QueryInfo" => {
  119         -
                    builder = builder.set_query_info(crate::protocol_serde::shape_query_info::de_query_info(tokens, _value)?);
  120         -
                }
  121         -
                "NextToken" => {
  122         -
                    builder = builder.set_next_token(
  123         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  124         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  125         -
                            .transpose()?,
  126         -
                    );
  127         -
                }
  128         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  129         -
            },
  130         -
            other => {
  131         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  132         -
                    "expected object key or end object, found: {other:?}"
  133         -
                )))
  134         -
            }
  135         -
        }
  136         -
    }
  137         -
    if tokens.next().is_some() {
  138         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  139         -
            "found more JSON tokens after completing parsing",
  140         -
        ));
  141         -
    }
  142         -
    Ok(builder)
  143         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_select_resource_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::select_resource_config::SelectResourceConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.expression {
    7         -
        object.key("Expression").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.limit {
   10         -
        object.key("Limit").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.next_token {
   16         -
        object.key("NextToken").string(var_3.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_service_principal_value_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                            .transpose()?;
   23         -
                        if let Some(value) = value {
   24         -
                            items.push(value);
   25         -
                        } else {
   26         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   27         -
                                "dense list cannot contain null values",
   28         -
                            ));
   29         -
                        }
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(items))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start array or null",
   37         -
        )),
   38         -
    }
   39         -
}

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

@@ -1,0 +88,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_source(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Source,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("Owner").string(input.owner.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.source_identifier {
   10         -
        object.key("SourceIdentifier").string(var_1.as_str());
   11         -
    }
   12         -
    if let Some(var_2) = &input.source_details {
   13         -
        let mut array_3 = object.key("SourceDetails").start_array();
   14         -
        for item_4 in var_2 {
   15         -
            {
   16         -
                #[allow(unused_mut)]
   17         -
                let mut object_5 = array_3.value().start_object();
   18         -
                crate::protocol_serde::shape_source_detail::ser_source_detail(&mut object_5, item_4)?;
   19         -
                object_5.finish();
   20         -
            }
   21         -
        }
   22         -
        array_3.finish();
   23         -
    }
   24         -
    if let Some(var_6) = &input.custom_policy_details {
   25         -
        #[allow(unused_mut)]
   26         -
        let mut object_7 = object.key("CustomPolicyDetails").start_object();
   27         -
        crate::protocol_serde::shape_custom_policy_details::ser_custom_policy_details(&mut object_7, var_6)?;
   28         -
        object_7.finish();
   29         -
    }
   30         -
    Ok(())
   31         -
}
   32         -
   33         -
pub(crate) fn de_source<'a, I>(
   34         -
    tokens: &mut ::std::iter::Peekable<I>,
   35         -
    _value: &'a [u8],
   36         -
) -> ::std::result::Result<Option<crate::types::Source>, ::aws_smithy_json::deserialize::error::DeserializeError>
   37         -
where
   38         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   39         -
{
   40         -
    match tokens.next().transpose()? {
   41         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   42         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   43         -
            #[allow(unused_mut)]
   44         -
            let mut builder = crate::types::builders::SourceBuilder::default();
   45         -
            loop {
   46         -
                match tokens.next().transpose()? {
   47         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   48         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   49         -
                        "Owner" => {
   50         -
                            builder = builder.set_owner(
   51         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   52         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Owner::from(u.as_ref())))
   53         -
                                    .transpose()?,
   54         -
                            );
   55         -
                        }
   56         -
                        "SourceIdentifier" => {
   57         -
                            builder = builder.set_source_identifier(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   59         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        "SourceDetails" => {
   64         -
                            builder = builder.set_source_details(crate::protocol_serde::shape_source_details::de_source_details(tokens, _value)?);
   65         -
                        }
   66         -
                        "CustomPolicyDetails" => {
   67         -
                            builder = builder.set_custom_policy_details(
   68         -
                                crate::protocol_serde::shape_custom_policy_details::de_custom_policy_details(tokens, _value)?,
   69         -
                            );
   70         -
                        }
   71         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   72         -
                    },
   73         -
                    other => {
   74         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   75         -
                            "expected object key or end object, found: {other:?}"
   76         -
                        )))
   77         -
                    }
   78         -
                }
   79         -
            }
   80         -
            Ok(Some(crate::serde_util::source_correct_errors(builder).build().map_err(|err| {
   81         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   82         -
            })?))
   83         -
        }
   84         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   85         -
            "expected start object or null",
   86         -
        )),
   87         -
    }
   88         -
}

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

@@ -1,0 +70,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_source_detail(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::SourceDetail,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.event_source {
    7         -
        object.key("EventSource").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.message_type {
   10         -
        object.key("MessageType").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.maximum_execution_frequency {
   13         -
        object.key("MaximumExecutionFrequency").string(var_3.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}
   17         -
   18         -
pub(crate) fn de_source_detail<'a, I>(
   19         -
    tokens: &mut ::std::iter::Peekable<I>,
   20         -
    _value: &'a [u8],
   21         -
) -> ::std::result::Result<Option<crate::types::SourceDetail>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    match tokens.next().transpose()? {
   26         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   27         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   28         -
            #[allow(unused_mut)]
   29         -
            let mut builder = crate::types::builders::SourceDetailBuilder::default();
   30         -
            loop {
   31         -
                match tokens.next().transpose()? {
   32         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   33         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   34         -
                        "EventSource" => {
   35         -
                            builder = builder.set_event_source(
   36         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   37         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EventSource::from(u.as_ref())))
   38         -
                                    .transpose()?,
   39         -
                            );
   40         -
                        }
   41         -
                        "MessageType" => {
   42         -
                            builder = builder.set_message_type(
   43         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   44         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MessageType::from(u.as_ref())))
   45         -
                                    .transpose()?,
   46         -
                            );
   47         -
                        }
   48         -
                        "MaximumExecutionFrequency" => {
   49         -
                            builder = builder.set_maximum_execution_frequency(
   50         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   51         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MaximumExecutionFrequency::from(u.as_ref())))
   52         -
                                    .transpose()?,
   53         -
                            );
   54         -
                        }
   55         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   56         -
                    },
   57         -
                    other => {
   58         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   59         -
                            "expected object key or end object, found: {other:?}"
   60         -
                        )))
   61         -
                    }
   62         -
                }
   63         -
            }
   64         -
            Ok(Some(builder.build()))
   65         -
        }
   66         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   67         -
            "expected start object or null",
   68         -
        )),
   69         -
    }
   70         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_source_details<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::SourceDetail>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_source_detail::de_source_detail(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

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

@@ -1,0 +66,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_ssm_controls(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::SsmControls,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.concurrent_execution_rate_percentage {
    7         -
        object.key("ConcurrentExecutionRatePercentage").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    if let Some(var_2) = &input.error_percentage {
   13         -
        object.key("ErrorPercentage").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_ssm_controls<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::SsmControls>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::SsmControlsBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "ConcurrentExecutionRatePercentage" => {
   38         -
                            builder = builder.set_concurrent_execution_rate_percentage(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   40         -
                                    .map(i32::try_from)
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "ErrorPercentage" => {
   45         -
                            builder = builder.set_error_percentage(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   47         -
                                    .map(i32::try_from)
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(builder.build()))
   61         -
        }
   62         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63         -
            "expected start object or null",
   64         -
        )),
   65         -
    }
   66         -
}

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

@@ -1,0 +118,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_start_config_rules_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::start_config_rules_evaluation::StartConfigRulesEvaluationOutput,
    9         -
    crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError,
   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::start_config_rules_evaluation::StartConfigRulesEvaluationError::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::start_config_rules_evaluation::StartConfigRulesEvaluationError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => {
   24         -
            crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::InvalidParameterValueException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::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         -
        "LimitExceededException" => crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::LimitExceededException({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp = {
   46         -
                #[allow(unused_mut)]
   47         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   48         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   49         -
                    .map_err(crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::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         -
        "NoSuchConfigRuleException" => crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::NoSuchConfigRuleException({
   59         -
            #[allow(unused_mut)]
   60         -
            let mut tmp = {
   61         -
                #[allow(unused_mut)]
   62         -
                let mut output = crate::types::error::builders::NoSuchConfigRuleExceptionBuilder::default();
   63         -
                output =
   64         -
                    crate::protocol_serde::shape_no_such_config_rule_exception::de_no_such_config_rule_exception_json_err(_response_body, output)
   65         -
                        .map_err(crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::unhandled)?;
   66         -
                let output = output.meta(generic);
   67         -
                output.build()
   68         -
            };
   69         -
            if tmp.message.is_none() {
   70         -
                tmp.message = _error_message;
   71         -
            }
   72         -
            tmp
   73         -
        }),
   74         -
        "ResourceInUseException" => crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::ResourceInUseException({
   75         -
            #[allow(unused_mut)]
   76         -
            let mut tmp = {
   77         -
                #[allow(unused_mut)]
   78         -
                let mut output = crate::types::error::builders::ResourceInUseExceptionBuilder::default();
   79         -
                output = crate::protocol_serde::shape_resource_in_use_exception::de_resource_in_use_exception_json_err(_response_body, output)
   80         -
                    .map_err(crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::unhandled)?;
   81         -
                let output = output.meta(generic);
   82         -
                output.build()
   83         -
            };
   84         -
            if tmp.message.is_none() {
   85         -
                tmp.message = _error_message;
   86         -
            }
   87         -
            tmp
   88         -
        }),
   89         -
        _ => crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError::generic(generic),
   90         -
    })
   91         -
}
   92         -
   93         -
#[allow(clippy::unnecessary_wraps)]
   94         -
pub fn de_start_config_rules_evaluation_http_response(
   95         -
    _response_status: u16,
   96         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   97         -
    _response_body: &[u8],
   98         -
) -> std::result::Result<
   99         -
    crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationOutput,
  100         -
    crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationError,
  101         -
> {
  102         -
    Ok({
  103         -
        #[allow(unused_mut)]
  104         -
        let mut output = crate::operation::start_config_rules_evaluation::builders::StartConfigRulesEvaluationOutputBuilder::default();
  105         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  106         -
        output.build()
  107         -
    })
  108         -
}
  109         -
  110         -
pub fn ser_start_config_rules_evaluation_input(
  111         -
    input: &crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationInput,
  112         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  113         -
    let mut out = String::new();
  114         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  115         -
    crate::protocol_serde::shape_start_config_rules_evaluation_input::ser_start_config_rules_evaluation_input_input(&mut object, input)?;
  116         -
    object.finish();
  117         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  118         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_start_config_rules_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_start_config_rules_evaluation_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::start_config_rules_evaluation::StartConfigRulesEvaluationInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.config_rule_names {
    7         -
        let mut array_2 = object.key("ConfigRuleNames").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         -
    Ok(())
   16         -
}

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

@@ -1,0 +112,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_start_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::start_configuration_recorder::StartConfigurationRecorderOutput,
    9         -
    crate::operation::start_configuration_recorder::StartConfigurationRecorderError,
   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::start_configuration_recorder::StartConfigurationRecorderError::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::start_configuration_recorder::StartConfigurationRecorderError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "NoAvailableDeliveryChannelException" => {
   24         -
            crate::operation::start_configuration_recorder::StartConfigurationRecorderError::NoAvailableDeliveryChannelException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::NoAvailableDeliveryChannelExceptionBuilder::default();
   29         -
                    output =
   30         -
                        crate::protocol_serde::shape_no_available_delivery_channel_exception::de_no_available_delivery_channel_exception_json_err(
   31         -
                            _response_body,
   32         -
                            output,
   33         -
                        )
   34         -
                        .map_err(crate::operation::start_configuration_recorder::StartConfigurationRecorderError::unhandled)?;
   35         -
                    let output = output.meta(generic);
   36         -
                    output.build()
   37         -
                };
   38         -
                if tmp.message.is_none() {
   39         -
                    tmp.message = _error_message;
   40         -
                }
   41         -
                tmp
   42         -
            })
   43         -
        }
   44         -
        "NoSuchConfigurationRecorderException" => {
   45         -
            crate::operation::start_configuration_recorder::StartConfigurationRecorderError::NoSuchConfigurationRecorderException({
   46         -
                #[allow(unused_mut)]
   47         -
                let mut tmp = {
   48         -
                    #[allow(unused_mut)]
   49         -
                    let mut output = crate::types::error::builders::NoSuchConfigurationRecorderExceptionBuilder::default();
   50         -
                    output =
   51         -
                        crate::protocol_serde::shape_no_such_configuration_recorder_exception::de_no_such_configuration_recorder_exception_json_err(
   52         -
                            _response_body,
   53         -
                            output,
   54         -
                        )
   55         -
                        .map_err(crate::operation::start_configuration_recorder::StartConfigurationRecorderError::unhandled)?;
   56         -
                    let output = output.meta(generic);
   57         -
                    output.build()
   58         -
                };
   59         -
                if tmp.message.is_none() {
   60         -
                    tmp.message = _error_message;
   61         -
                }
   62         -
                tmp
   63         -
            })
   64         -
        }
   65         -
        "UnmodifiableEntityException" => {
   66         -
            crate::operation::start_configuration_recorder::StartConfigurationRecorderError::UnmodifiableEntityException({
   67         -
                #[allow(unused_mut)]
   68         -
                let mut tmp = {
   69         -
                    #[allow(unused_mut)]
   70         -
                    let mut output = crate::types::error::builders::UnmodifiableEntityExceptionBuilder::default();
   71         -
                    output =
   72         -
                        crate::protocol_serde::shape_unmodifiable_entity_exception::de_unmodifiable_entity_exception_json_err(_response_body, output)
   73         -
                            .map_err(crate::operation::start_configuration_recorder::StartConfigurationRecorderError::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         -
        _ => crate::operation::start_configuration_recorder::StartConfigurationRecorderError::generic(generic),
   84         -
    })
   85         -
}
   86         -
   87         -
#[allow(clippy::unnecessary_wraps)]
   88         -
pub fn de_start_configuration_recorder_http_response(
   89         -
    _response_status: u16,
   90         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   91         -
    _response_body: &[u8],
   92         -
) -> std::result::Result<
   93         -
    crate::operation::start_configuration_recorder::StartConfigurationRecorderOutput,
   94         -
    crate::operation::start_configuration_recorder::StartConfigurationRecorderError,
   95         -
> {
   96         -
    Ok({
   97         -
        #[allow(unused_mut)]
   98         -
        let mut output = crate::operation::start_configuration_recorder::builders::StartConfigurationRecorderOutputBuilder::default();
   99         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  100         -
        output.build()
  101         -
    })
  102         -
}
  103         -
  104         -
pub fn ser_start_configuration_recorder_input(
  105         -
    input: &crate::operation::start_configuration_recorder::StartConfigurationRecorderInput,
  106         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  107         -
    let mut out = String::new();
  108         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  109         -
    crate::protocol_serde::shape_start_configuration_recorder_input::ser_start_configuration_recorder_input_input(&mut object, input)?;
  110         -
    object.finish();
  111         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  112         -
}