AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delete_resource_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_resource_config::DeleteResourceConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_type {
    7         -
        object.key("ResourceType").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.resource_id {
   10         -
        object.key("ResourceId").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

@@ -1,0 +88,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_retention_configuration_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::delete_retention_configuration::DeleteRetentionConfigurationOutput,
    9         -
    crate::operation::delete_retention_configuration::DeleteRetentionConfigurationError,
   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::delete_retention_configuration::DeleteRetentionConfigurationError::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::delete_retention_configuration::DeleteRetentionConfigurationError::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::delete_retention_configuration::DeleteRetentionConfigurationError::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::delete_retention_configuration::DeleteRetentionConfigurationError::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         -
        "NoSuchRetentionConfigurationException" => {
   44         -
            crate::operation::delete_retention_configuration::DeleteRetentionConfigurationError::NoSuchRetentionConfigurationException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::NoSuchRetentionConfigurationExceptionBuilder::default();
   49         -
                    output = crate::protocol_serde::shape_no_such_retention_configuration_exception::de_no_such_retention_configuration_exception_json_err(_response_body, output).map_err(crate::operation::delete_retention_configuration::DeleteRetentionConfigurationError::unhandled)?;
   50         -
                    let output = output.meta(generic);
   51         -
                    output.build()
   52         -
                };
   53         -
                if tmp.message.is_none() {
   54         -
                    tmp.message = _error_message;
   55         -
                }
   56         -
                tmp
   57         -
            })
   58         -
        }
   59         -
        _ => crate::operation::delete_retention_configuration::DeleteRetentionConfigurationError::generic(generic),
   60         -
    })
   61         -
}
   62         -
   63         -
#[allow(clippy::unnecessary_wraps)]
   64         -
pub fn de_delete_retention_configuration_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::delete_retention_configuration::DeleteRetentionConfigurationOutput,
   70         -
    crate::operation::delete_retention_configuration::DeleteRetentionConfigurationError,
   71         -
> {
   72         -
    Ok({
   73         -
        #[allow(unused_mut)]
   74         -
        let mut output = crate::operation::delete_retention_configuration::builders::DeleteRetentionConfigurationOutputBuilder::default();
   75         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   76         -
        output.build()
   77         -
    })
   78         -
}
   79         -
   80         -
pub fn ser_delete_retention_configuration_input(
   81         -
    input: &crate::operation::delete_retention_configuration::DeleteRetentionConfigurationInput,
   82         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   83         -
    let mut out = String::new();
   84         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   85         -
    crate::protocol_serde::shape_delete_retention_configuration_input::ser_delete_retention_configuration_input_input(&mut object, input)?;
   86         -
    object.finish();
   87         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   88         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delete_retention_configuration_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_retention_configuration::DeleteRetentionConfigurationInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.retention_configuration_name {
    7         -
        object.key("RetentionConfigurationName").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

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

@@ -1,0 +161,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_service_linked_configuration_recorder_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderOutput,
    9         -
    crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError,
   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::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(
   20         -
                crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled(generic),
   21         -
            )
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "ConflictException" => crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::ConflictException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp =
   30         -
                 {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output).map_err(crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?;
   34         -
                    let output = output.meta(generic);
   35         -
                    output.build()
   36         -
                }
   37         -
            ;
   38         -
            if tmp.message.is_none() {
   39         -
                                                            tmp.message = _error_message;
   40         -
                                                        }
   41         -
            tmp
   42         -
        }),
   43         -
        "NoSuchConfigurationRecorderException" => crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::NoSuchConfigurationRecorderException({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp =
   46         -
                 {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::NoSuchConfigurationRecorderExceptionBuilder::default();
   49         -
                    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::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?;
   50         -
                    let output = output.meta(generic);
   51         -
                    output.build()
   52         -
                }
   53         -
            ;
   54         -
            if tmp.message.is_none() {
   55         -
                                                            tmp.message = _error_message;
   56         -
                                                        }
   57         -
            tmp
   58         -
        }),
   59         -
        "ValidationException" => crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::ValidationException({
   60         -
            #[allow(unused_mut)]
   61         -
            let mut tmp =
   62         -
                 {
   63         -
                    #[allow(unused_mut)]
   64         -
                    let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   65         -
                    output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output).map_err(crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?;
   66         -
                    let output = output.meta(generic);
   67         -
                    output.build()
   68         -
                }
   69         -
            ;
   70         -
            if tmp.message.is_none() {
   71         -
                                                            tmp.message = _error_message;
   72         -
                                                        }
   73         -
            tmp
   74         -
        }),
   75         -
        _ => crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::generic(generic)
   76         -
    })
   77         -
}
   78         -
   79         -
#[allow(clippy::unnecessary_wraps)]
   80         -
pub fn de_delete_service_linked_configuration_recorder_http_response(
   81         -
    _response_status: u16,
   82         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   83         -
    _response_body: &[u8],
   84         -
) -> std::result::Result<
   85         -
    crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderOutput,
   86         -
    crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError,
   87         -
> {
   88         -
    Ok({
   89         -
        #[allow(unused_mut)]
   90         -
        let mut output =
   91         -
            crate::operation::delete_service_linked_configuration_recorder::builders::DeleteServiceLinkedConfigurationRecorderOutputBuilder::default(
   92         -
            );
   93         -
        output = crate::protocol_serde::shape_delete_service_linked_configuration_recorder::de_delete_service_linked_configuration_recorder(
   94         -
            _response_body,
   95         -
            output,
   96         -
        )
   97         -
        .map_err(crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?;
   98         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   99         -
        crate::serde_util::delete_service_linked_configuration_recorder_output_output_correct_errors(output)
  100         -
            .build()
  101         -
            .map_err(crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderError::unhandled)?
  102         -
    })
  103         -
}
  104         -
  105         -
pub fn ser_delete_service_linked_configuration_recorder_input(
  106         -
    input: &crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderInput,
  107         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  108         -
    let mut out = String::new();
  109         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  110         -
    crate::protocol_serde::shape_delete_service_linked_configuration_recorder_input::ser_delete_service_linked_configuration_recorder_input_input(
  111         -
        &mut object,
  112         -
        input,
  113         -
    )?;
  114         -
    object.finish();
  115         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  116         -
}
  117         -
  118         -
pub(crate) fn de_delete_service_linked_configuration_recorder(
  119         -
    _value: &[u8],
  120         -
    mut builder: crate::operation::delete_service_linked_configuration_recorder::builders::DeleteServiceLinkedConfigurationRecorderOutputBuilder,
  121         -
) -> ::std::result::Result<
  122         -
    crate::operation::delete_service_linked_configuration_recorder::builders::DeleteServiceLinkedConfigurationRecorderOutputBuilder,
  123         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  124         -
> {
  125         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  126         -
    let tokens = &mut tokens_owned;
  127         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  128         -
    loop {
  129         -
        match tokens.next().transpose()? {
  130         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  131         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  132         -
                "Arn" => {
  133         -
                    builder = builder.set_arn(
  134         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  135         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  136         -
                            .transpose()?,
  137         -
                    );
  138         -
                }
  139         -
                "Name" => {
  140         -
                    builder = builder.set_name(
  141         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  142         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  143         -
                            .transpose()?,
  144         -
                    );
  145         -
                }
  146         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  147         -
            },
  148         -
            other => {
  149         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  150         -
                    "expected object key or end object, found: {other:?}"
  151         -
                )))
  152         -
            }
  153         -
        }
  154         -
    }
  155         -
    if tokens.next().is_some() {
  156         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  157         -
            "found more JSON tokens after completing parsing",
  158         -
        ));
  159         -
    }
  160         -
    Ok(builder)
  161         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delete_service_linked_configuration_recorder_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_service_linked_configuration_recorder::DeleteServiceLinkedConfigurationRecorderInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.service_principal {
    7         -
        object.key("ServicePrincipal").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

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

@@ -1,0 +78,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_stored_query_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::delete_stored_query::DeleteStoredQueryOutput, crate::operation::delete_stored_query::DeleteStoredQueryError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::delete_stored_query::DeleteStoredQueryError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    let error_code = match generic.code() {
   15         -
        Some(code) => code,
   16         -
        None => return Err(crate::operation::delete_stored_query::DeleteStoredQueryError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "ResourceNotFoundException" => crate::operation::delete_stored_query::DeleteStoredQueryError::ResourceNotFoundException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::delete_stored_query::DeleteStoredQueryError::unhandled)?;
   28         -
                let output = output.meta(generic);
   29         -
                output.build()
   30         -
            };
   31         -
            if tmp.message.is_none() {
   32         -
                tmp.message = _error_message;
   33         -
            }
   34         -
            tmp
   35         -
        }),
   36         -
        "ValidationException" => crate::operation::delete_stored_query::DeleteStoredQueryError::ValidationException({
   37         -
            #[allow(unused_mut)]
   38         -
            let mut tmp = {
   39         -
                #[allow(unused_mut)]
   40         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   41         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   42         -
                    .map_err(crate::operation::delete_stored_query::DeleteStoredQueryError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        _ => crate::operation::delete_stored_query::DeleteStoredQueryError::generic(generic),
   52         -
    })
   53         -
}
   54         -
   55         -
#[allow(clippy::unnecessary_wraps)]
   56         -
pub fn de_delete_stored_query_http_response(
   57         -
    _response_status: u16,
   58         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   59         -
    _response_body: &[u8],
   60         -
) -> std::result::Result<crate::operation::delete_stored_query::DeleteStoredQueryOutput, crate::operation::delete_stored_query::DeleteStoredQueryError>
   61         -
{
   62         -
    Ok({
   63         -
        #[allow(unused_mut)]
   64         -
        let mut output = crate::operation::delete_stored_query::builders::DeleteStoredQueryOutputBuilder::default();
   65         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   66         -
        output.build()
   67         -
    })
   68         -
}
   69         -
   70         -
pub fn ser_delete_stored_query_input(
   71         -
    input: &crate::operation::delete_stored_query::DeleteStoredQueryInput,
   72         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   73         -
    let mut out = String::new();
   74         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   75         -
    crate::protocol_serde::shape_delete_stored_query_input::ser_delete_stored_query_input_input(&mut object, input)?;
   76         -
    object.finish();
   77         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   78         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delete_stored_query_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::delete_stored_query::DeleteStoredQueryInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.query_name {
    7         -
        object.key("QueryName").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

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

@@ -1,0 +142,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_deliver_config_snapshot_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::deliver_config_snapshot::DeliverConfigSnapshotOutput,
    9         -
    crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError,
   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::deliver_config_snapshot::DeliverConfigSnapshotError::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::deliver_config_snapshot::DeliverConfigSnapshotError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "NoAvailableConfigurationRecorderException" => {
   24         -
            crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::NoAvailableConfigurationRecorderException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::NoAvailableConfigurationRecorderExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_no_available_configuration_recorder_exception::de_no_available_configuration_recorder_exception_json_err(_response_body, output).map_err(crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::unhandled)?;
   30         -
                    let output = output.meta(generic);
   31         -
                    output.build()
   32         -
                };
   33         -
                if tmp.message.is_none() {
   34         -
                    tmp.message = _error_message;
   35         -
                }
   36         -
                tmp
   37         -
            })
   38         -
        }
   39         -
        "NoRunningConfigurationRecorderException" => {
   40         -
            crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::NoRunningConfigurationRecorderException({
   41         -
                #[allow(unused_mut)]
   42         -
                let mut tmp = {
   43         -
                    #[allow(unused_mut)]
   44         -
                    let mut output = crate::types::error::builders::NoRunningConfigurationRecorderExceptionBuilder::default();
   45         -
                    output = crate::protocol_serde::shape_no_running_configuration_recorder_exception::de_no_running_configuration_recorder_exception_json_err(_response_body, output).map_err(crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::unhandled)?;
   46         -
                    let output = output.meta(generic);
   47         -
                    output.build()
   48         -
                };
   49         -
                if tmp.message.is_none() {
   50         -
                    tmp.message = _error_message;
   51         -
                }
   52         -
                tmp
   53         -
            })
   54         -
        }
   55         -
        "NoSuchDeliveryChannelException" => crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::NoSuchDeliveryChannelException({
   56         -
            #[allow(unused_mut)]
   57         -
            let mut tmp = {
   58         -
                #[allow(unused_mut)]
   59         -
                let mut output = crate::types::error::builders::NoSuchDeliveryChannelExceptionBuilder::default();
   60         -
                output = crate::protocol_serde::shape_no_such_delivery_channel_exception::de_no_such_delivery_channel_exception_json_err(
   61         -
                    _response_body,
   62         -
                    output,
   63         -
                )
   64         -
                .map_err(crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::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         -
        _ => crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::generic(generic),
   74         -
    })
   75         -
}
   76         -
   77         -
#[allow(clippy::unnecessary_wraps)]
   78         -
pub fn de_deliver_config_snapshot_http_response(
   79         -
    _response_status: u16,
   80         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   81         -
    _response_body: &[u8],
   82         -
) -> std::result::Result<
   83         -
    crate::operation::deliver_config_snapshot::DeliverConfigSnapshotOutput,
   84         -
    crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError,
   85         -
> {
   86         -
    Ok({
   87         -
        #[allow(unused_mut)]
   88         -
        let mut output = crate::operation::deliver_config_snapshot::builders::DeliverConfigSnapshotOutputBuilder::default();
   89         -
        output = crate::protocol_serde::shape_deliver_config_snapshot::de_deliver_config_snapshot(_response_body, output)
   90         -
            .map_err(crate::operation::deliver_config_snapshot::DeliverConfigSnapshotError::unhandled)?;
   91         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   92         -
        output.build()
   93         -
    })
   94         -
}
   95         -
   96         -
pub fn ser_deliver_config_snapshot_input(
   97         -
    input: &crate::operation::deliver_config_snapshot::DeliverConfigSnapshotInput,
   98         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   99         -
    let mut out = String::new();
  100         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  101         -
    crate::protocol_serde::shape_deliver_config_snapshot_input::ser_deliver_config_snapshot_input_input(&mut object, input)?;
  102         -
    object.finish();
  103         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  104         -
}
  105         -
  106         -
pub(crate) fn de_deliver_config_snapshot(
  107         -
    _value: &[u8],
  108         -
    mut builder: crate::operation::deliver_config_snapshot::builders::DeliverConfigSnapshotOutputBuilder,
  109         -
) -> ::std::result::Result<
  110         -
    crate::operation::deliver_config_snapshot::builders::DeliverConfigSnapshotOutputBuilder,
  111         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  112         -
> {
  113         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  114         -
    let tokens = &mut tokens_owned;
  115         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  116         -
    loop {
  117         -
        match tokens.next().transpose()? {
  118         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  119         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  120         -
                "configSnapshotId" => {
  121         -
                    builder = builder.set_config_snapshot_id(
  122         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  123         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  124         -
                            .transpose()?,
  125         -
                    );
  126         -
                }
  127         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  128         -
            },
  129         -
            other => {
  130         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  131         -
                    "expected object key or end object, found: {other:?}"
  132         -
                )))
  133         -
            }
  134         -
        }
  135         -
    }
  136         -
    if tokens.next().is_some() {
  137         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  138         -
            "found more JSON tokens after completing parsing",
  139         -
        ));
  140         -
    }
  141         -
    Ok(builder)
  142         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deliver_config_snapshot_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::deliver_config_snapshot::DeliverConfigSnapshotInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.delivery_channel_name {
    7         -
        object.key("deliveryChannelName").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

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

@@ -1,0 +103,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delivery_channel(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeliveryChannel,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.name {
    7         -
        object.key("name").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.s3_bucket_name {
   10         -
        object.key("s3BucketName").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.s3_key_prefix {
   13         -
        object.key("s3KeyPrefix").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.s3_kms_key_arn {
   16         -
        object.key("s3KmsKeyArn").string(var_4.as_str());
   17         -
    }
   18         -
    if let Some(var_5) = &input.sns_topic_arn {
   19         -
        object.key("snsTopicARN").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.config_snapshot_delivery_properties {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_7 = object.key("configSnapshotDeliveryProperties").start_object();
   24         -
        crate::protocol_serde::shape_config_snapshot_delivery_properties::ser_config_snapshot_delivery_properties(&mut object_7, var_6)?;
   25         -
        object_7.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}
   29         -
   30         -
pub(crate) fn de_delivery_channel<'a, I>(
   31         -
    tokens: &mut ::std::iter::Peekable<I>,
   32         -
    _value: &'a [u8],
   33         -
) -> ::std::result::Result<Option<crate::types::DeliveryChannel>, ::aws_smithy_json::deserialize::error::DeserializeError>
   34         -
where
   35         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   36         -
{
   37         -
    match tokens.next().transpose()? {
   38         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   39         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   40         -
            #[allow(unused_mut)]
   41         -
            let mut builder = crate::types::builders::DeliveryChannelBuilder::default();
   42         -
            loop {
   43         -
                match tokens.next().transpose()? {
   44         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   45         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   46         -
                        "name" => {
   47         -
                            builder = builder.set_name(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "s3BucketName" => {
   54         -
                            builder = builder.set_s3_bucket_name(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   56         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "s3KeyPrefix" => {
   61         -
                            builder = builder.set_s3_key_prefix(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   63         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "s3KmsKeyArn" => {
   68         -
                            builder = builder.set_s3_kms_key_arn(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   70         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        "snsTopicARN" => {
   75         -
                            builder = builder.set_sns_topic_arn(
   76         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   77         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   78         -
                                    .transpose()?,
   79         -
                            );
   80         -
                        }
   81         -
                        "configSnapshotDeliveryProperties" => {
   82         -
                            builder = builder.set_config_snapshot_delivery_properties(
   83         -
                                crate::protocol_serde::shape_config_snapshot_delivery_properties::de_config_snapshot_delivery_properties(
   84         -
                                    tokens, _value,
   85         -
                                )?,
   86         -
                            );
   87         -
                        }
   88         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   89         -
                    },
   90         -
                    other => {
   91         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   92         -
                            "expected object key or end object, found: {other:?}"
   93         -
                        )))
   94         -
                    }
   95         -
                }
   96         -
            }
   97         -
            Ok(Some(builder.build()))
   98         -
        }
   99         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  100         -
            "expected start object or null",
  101         -
        )),
  102         -
    }
  103         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_delivery_channel_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_delivery_channel_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeliveryChannel>>, ::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_delivery_channel::de_delivery_channel(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_delivery_channel_status.rs

@@ -1,0 +55,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_delivery_channel_status<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::DeliveryChannelStatus>, ::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::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::DeliveryChannelStatusBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "name" => {
   19         -
                            builder = builder.set_name(
   20         -
                                ::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         -
                            );
   24         -
                        }
   25         -
                        "configSnapshotDeliveryInfo" => {
   26         -
                            builder = builder.set_config_snapshot_delivery_info(
   27         -
                                crate::protocol_serde::shape_config_export_delivery_info::de_config_export_delivery_info(tokens, _value)?,
   28         -
                            );
   29         -
                        }
   30         -
                        "configHistoryDeliveryInfo" => {
   31         -
                            builder = builder.set_config_history_delivery_info(
   32         -
                                crate::protocol_serde::shape_config_export_delivery_info::de_config_export_delivery_info(tokens, _value)?,
   33         -
                            );
   34         -
                        }
   35         -
                        "configStreamDeliveryInfo" => {
   36         -
                            builder = builder.set_config_stream_delivery_info(
   37         -
                                crate::protocol_serde::shape_config_stream_delivery_info::de_config_stream_delivery_info(tokens, _value)?,
   38         -
                            );
   39         -
                        }
   40         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   41         -
                    },
   42         -
                    other => {
   43         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   44         -
                            "expected object key or end object, found: {other:?}"
   45         -
                        )))
   46         -
                    }
   47         -
                }
   48         -
            }
   49         -
            Ok(Some(builder.build()))
   50         -
        }
   51         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   52         -
            "expected start object or null",
   53         -
        )),
   54         -
    }
   55         -
}

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_delivery_channel_status_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_delivery_channel_status_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeliveryChannelStatus>>, ::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_delivery_channel_status::de_delivery_channel_status(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_describe_aggregate_compliance_by_config_rules.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/protocol_serde/shape_describe_aggregate_compliance_by_config_rules_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_aggregate_compliance_by_config_rules_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_aggregate_compliance_by_config_rules::DescribeAggregateComplianceByConfigRulesInput,
    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.filters {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("Filters").start_object();
   12         -
        crate::protocol_serde::shape_config_rule_compliance_filters::ser_config_rule_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_aggregate_compliance_by_conformance_packs.rs

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