AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_configuration_aggregator_sources_status_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusInput,
    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.update_status {
   10         -
        let mut array_3 = object.key("UpdateStatus").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.next_token {
   19         -
        object.key("NextToken").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.limit {
   22         -
        object.key("Limit").number(
   23         -
            #[allow(clippy::useless_conversion)]
   24         -
            ::aws_smithy_types::Number::NegInt((*var_6).into()),
   25         -
        );
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

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

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_configuration_aggregators_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_configuration_aggregators::DescribeConfigurationAggregatorsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.configuration_aggregator_names {
    7         -
        let mut array_2 = object.key("ConfigurationAggregatorNames").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.next_token {
   16         -
        object.key("NextToken").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.limit {
   19         -
        object.key("Limit").number(
   20         -
            #[allow(clippy::useless_conversion)]
   21         -
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
   22         -
        );
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

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

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

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_configuration_recorder_status_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_configuration_recorder_status::DescribeConfigurationRecorderStatusInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.configuration_recorder_names {
    7         -
        let mut array_2 = object.key("ConfigurationRecorderNames").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.service_principal {
   16         -
        object.key("ServicePrincipal").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.arn {
   19         -
        object.key("Arn").string(var_5.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}

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

@@ -1,0 +126,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_configuration_recorders_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::describe_configuration_recorders::DescribeConfigurationRecordersOutput,
    9         -
    crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError,
   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::describe_configuration_recorders::DescribeConfigurationRecordersError::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::describe_configuration_recorders::DescribeConfigurationRecordersError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "NoSuchConfigurationRecorderException" => {
   24         -
            crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::NoSuchConfigurationRecorderException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::NoSuchConfigurationRecorderExceptionBuilder::default();
   29         -
                    output =
   30         -
                        crate::protocol_serde::shape_no_such_configuration_recorder_exception::de_no_such_configuration_recorder_exception_json_err(
   31         -
                            _response_body,
   32         -
                            output,
   33         -
                        )
   34         -
                        .map_err(crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::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         -
        "ValidationException" => crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::ValidationException({
   45         -
            #[allow(unused_mut)]
   46         -
            let mut tmp = {
   47         -
                #[allow(unused_mut)]
   48         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   49         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   50         -
                    .map_err(crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::unhandled)?;
   51         -
                let output = output.meta(generic);
   52         -
                output.build()
   53         -
            };
   54         -
            if tmp.message.is_none() {
   55         -
                tmp.message = _error_message;
   56         -
            }
   57         -
            tmp
   58         -
        }),
   59         -
        _ => crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::generic(generic),
   60         -
    })
   61         -
}
   62         -
   63         -
#[allow(clippy::unnecessary_wraps)]
   64         -
pub fn de_describe_configuration_recorders_http_response(
   65         -
    _response_status: u16,
   66         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   67         -
    _response_body: &[u8],
   68         -
) -> std::result::Result<
   69         -
    crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersOutput,
   70         -
    crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError,
   71         -
> {
   72         -
    Ok({
   73         -
        #[allow(unused_mut)]
   74         -
        let mut output = crate::operation::describe_configuration_recorders::builders::DescribeConfigurationRecordersOutputBuilder::default();
   75         -
        output = crate::protocol_serde::shape_describe_configuration_recorders::de_describe_configuration_recorders(_response_body, output)
   76         -
            .map_err(crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersError::unhandled)?;
   77         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   78         -
        output.build()
   79         -
    })
   80         -
}
   81         -
   82         -
pub fn ser_describe_configuration_recorders_input(
   83         -
    input: &crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersInput,
   84         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   85         -
    let mut out = String::new();
   86         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   87         -
    crate::protocol_serde::shape_describe_configuration_recorders_input::ser_describe_configuration_recorders_input_input(&mut object, input)?;
   88         -
    object.finish();
   89         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   90         -
}
   91         -
   92         -
pub(crate) fn de_describe_configuration_recorders(
   93         -
    _value: &[u8],
   94         -
    mut builder: crate::operation::describe_configuration_recorders::builders::DescribeConfigurationRecordersOutputBuilder,
   95         -
) -> ::std::result::Result<
   96         -
    crate::operation::describe_configuration_recorders::builders::DescribeConfigurationRecordersOutputBuilder,
   97         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   98         -
> {
   99         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  100         -
    let tokens = &mut tokens_owned;
  101         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  102         -
    loop {
  103         -
        match tokens.next().transpose()? {
  104         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  105         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  106         -
                "ConfigurationRecorders" => {
  107         -
                    builder = builder.set_configuration_recorders(
  108         -
                        crate::protocol_serde::shape_configuration_recorder_list::de_configuration_recorder_list(tokens, _value)?,
  109         -
                    );
  110         -
                }
  111         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
            },
  113         -
            other => {
  114         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                    "expected object key or end object, found: {other:?}"
  116         -
                )))
  117         -
            }
  118         -
        }
  119         -
    }
  120         -
    if tokens.next().is_some() {
  121         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  122         -
            "found more JSON tokens after completing parsing",
  123         -
        ));
  124         -
    }
  125         -
    Ok(builder)
  126         -
}

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

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_configuration_recorders_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_configuration_recorders::DescribeConfigurationRecordersInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.configuration_recorder_names {
    7         -
        let mut array_2 = object.key("ConfigurationRecorderNames").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.service_principal {
   16         -
        object.key("ServicePrincipal").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.arn {
   19         -
        object.key("Arn").string(var_5.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}

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

@@ -1,0 +202,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_conformance_pack_compliance_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::describe_conformance_pack_compliance::DescribeConformancePackComplianceOutput,
    9         -
    crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError,
   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::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::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::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidLimitException" => {
   24         -
            crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::InvalidLimitException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InvalidLimitExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_invalid_limit_exception::de_invalid_limit_exception_json_err(_response_body, output)
   30         -
                        .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?;
   31         -
                    let output = output.meta(generic);
   32         -
                    output.build()
   33         -
                };
   34         -
                if tmp.message.is_none() {
   35         -
                    tmp.message = _error_message;
   36         -
                }
   37         -
                tmp
   38         -
            })
   39         -
        }
   40         -
        "InvalidNextTokenException" => {
   41         -
            crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::InvalidNextTokenException({
   42         -
                #[allow(unused_mut)]
   43         -
                let mut tmp = {
   44         -
                    #[allow(unused_mut)]
   45         -
                    let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   46         -
                    output =
   47         -
                        crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   48         -
                            .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::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         -
        }
   58         -
        "InvalidParameterValueException" => {
   59         -
            crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::InvalidParameterValueException({
   60         -
                #[allow(unused_mut)]
   61         -
                let mut tmp = {
   62         -
                    #[allow(unused_mut)]
   63         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   64         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   65         -
                        _response_body,
   66         -
                        output,
   67         -
                    )
   68         -
                    .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?;
   69         -
                    let output = output.meta(generic);
   70         -
                    output.build()
   71         -
                };
   72         -
                if tmp.message.is_none() {
   73         -
                    tmp.message = _error_message;
   74         -
                }
   75         -
                tmp
   76         -
            })
   77         -
        }
   78         -
        "NoSuchConfigRuleInConformancePackException" => {
   79         -
            crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::NoSuchConfigRuleInConformancePackException(
   80         -
                {
   81         -
                    #[allow(unused_mut)]
   82         -
                    let mut tmp = {
   83         -
                        #[allow(unused_mut)]
   84         -
                        let mut output = crate::types::error::builders::NoSuchConfigRuleInConformancePackExceptionBuilder::default();
   85         -
                        output = crate::protocol_serde::shape_no_such_config_rule_in_conformance_pack_exception::de_no_such_config_rule_in_conformance_pack_exception_json_err(_response_body, output).map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?;
   86         -
                        let output = output.meta(generic);
   87         -
                        output.build()
   88         -
                    };
   89         -
                    if tmp.message.is_none() {
   90         -
                        tmp.message = _error_message;
   91         -
                    }
   92         -
                    tmp
   93         -
                },
   94         -
            )
   95         -
        }
   96         -
        "NoSuchConformancePackException" => {
   97         -
            crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::NoSuchConformancePackException({
   98         -
                #[allow(unused_mut)]
   99         -
                let mut tmp = {
  100         -
                    #[allow(unused_mut)]
  101         -
                    let mut output = crate::types::error::builders::NoSuchConformancePackExceptionBuilder::default();
  102         -
                    output = crate::protocol_serde::shape_no_such_conformance_pack_exception::de_no_such_conformance_pack_exception_json_err(
  103         -
                        _response_body,
  104         -
                        output,
  105         -
                    )
  106         -
                    .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?;
  107         -
                    let output = output.meta(generic);
  108         -
                    output.build()
  109         -
                };
  110         -
                if tmp.message.is_none() {
  111         -
                    tmp.message = _error_message;
  112         -
                }
  113         -
                tmp
  114         -
            })
  115         -
        }
  116         -
        _ => crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::generic(generic),
  117         -
    })
  118         -
}
  119         -
  120         -
#[allow(clippy::unnecessary_wraps)]
  121         -
pub fn de_describe_conformance_pack_compliance_http_response(
  122         -
    _response_status: u16,
  123         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  124         -
    _response_body: &[u8],
  125         -
) -> std::result::Result<
  126         -
    crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceOutput,
  127         -
    crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError,
  128         -
> {
  129         -
    Ok({
  130         -
        #[allow(unused_mut)]
  131         -
        let mut output = crate::operation::describe_conformance_pack_compliance::builders::DescribeConformancePackComplianceOutputBuilder::default();
  132         -
        output = crate::protocol_serde::shape_describe_conformance_pack_compliance::de_describe_conformance_pack_compliance(_response_body, output)
  133         -
            .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?;
  134         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  135         -
        crate::serde_util::describe_conformance_pack_compliance_output_output_correct_errors(output)
  136         -
            .build()
  137         -
            .map_err(crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceError::unhandled)?
  138         -
    })
  139         -
}
  140         -
  141         -
pub fn ser_describe_conformance_pack_compliance_input(
  142         -
    input: &crate::operation::describe_conformance_pack_compliance::DescribeConformancePackComplianceInput,
  143         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  144         -
    let mut out = String::new();
  145         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  146         -
    crate::protocol_serde::shape_describe_conformance_pack_compliance_input::ser_describe_conformance_pack_compliance_input_input(
  147         -
        &mut object,
  148         -
        input,
  149         -
    )?;
  150         -
    object.finish();
  151         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  152         -
}
  153         -
  154         -
pub(crate) fn de_describe_conformance_pack_compliance(
  155         -
    _value: &[u8],
  156         -
    mut builder: crate::operation::describe_conformance_pack_compliance::builders::DescribeConformancePackComplianceOutputBuilder,
  157         -
) -> ::std::result::Result<
  158         -
    crate::operation::describe_conformance_pack_compliance::builders::DescribeConformancePackComplianceOutputBuilder,
  159         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  160         -
> {
  161         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  162         -
    let tokens = &mut tokens_owned;
  163         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  164         -
    loop {
  165         -
        match tokens.next().transpose()? {
  166         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  167         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  168         -
                "ConformancePackName" => {
  169         -
                    builder = builder.set_conformance_pack_name(
  170         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  171         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  172         -
                            .transpose()?,
  173         -
                    );
  174         -
                }
  175         -
                "ConformancePackRuleComplianceList" => {
  176         -
                    builder = builder.set_conformance_pack_rule_compliance_list(
  177         -
                        crate::protocol_serde::shape_conformance_pack_rule_compliance_list::de_conformance_pack_rule_compliance_list(tokens, _value)?,
  178         -
                    );
  179         -
                }
  180         -
                "NextToken" => {
  181         -
                    builder = builder.set_next_token(
  182         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  183         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  184         -
                            .transpose()?,
  185         -
                    );
  186         -
                }
  187         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  188         -
            },
  189         -
            other => {
  190         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  191         -
                    "expected object key or end object, found: {other:?}"
  192         -
                )))
  193         -
            }
  194         -
        }
  195         -
    }
  196         -
    if tokens.next().is_some() {
  197         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  198         -
            "found more JSON tokens after completing parsing",
  199         -
        ));
  200         -
    }
  201         -
    Ok(builder)
  202         -
}

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

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

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

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

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

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

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

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