AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_recording_group_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidRecordingGroupExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::InvalidRecordingGroupExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_result_token_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidResultTokenExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidResultTokenExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
{
    7         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    8         -
    let tokens = &mut tokens_owned;
    9         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   10         -
    loop {
   11         -
        match tokens.next().transpose()? {
   12         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   13         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   14         -
                "message" => {
   15         -
                    builder = builder.set_message(
   16         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   17         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   18         -
                            .transpose()?,
   19         -
                    );
   20         -
                }
   21         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
            },
   23         -
            other => {
   24         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25         -
                    "expected object key or end object, found: {other:?}"
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_role_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidRoleExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidRoleExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

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

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_s3_key_prefix_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidS3KeyPrefixExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidS3KeyPrefixExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
{
    7         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    8         -
    let tokens = &mut tokens_owned;
    9         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   10         -
    loop {
   11         -
        match tokens.next().transpose()? {
   12         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   13         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   14         -
                "message" => {
   15         -
                    builder = builder.set_message(
   16         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   17         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   18         -
                            .transpose()?,
   19         -
                    );
   20         -
                }
   21         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
            },
   23         -
            other => {
   24         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25         -
                    "expected object key or end object, found: {other:?}"
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

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

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_s3_kms_key_arn_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidS3KmsKeyArnExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidS3KmsKeyArnExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
{
    7         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    8         -
    let tokens = &mut tokens_owned;
    9         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   10         -
    loop {
   11         -
        match tokens.next().transpose()? {
   12         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   13         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   14         -
                "message" => {
   15         -
                    builder = builder.set_message(
   16         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   17         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   18         -
                            .transpose()?,
   19         -
                    );
   20         -
                }
   21         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
            },
   23         -
            other => {
   24         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25         -
                    "expected object key or end object, found: {other:?}"
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

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

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_sns_topic_arn_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidSnsTopicArnExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidSnsTopicArnExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
{
    7         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    8         -
    let tokens = &mut tokens_owned;
    9         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   10         -
    loop {
   11         -
        match tokens.next().transpose()? {
   12         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   13         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   14         -
                "message" => {
   15         -
                    builder = builder.set_message(
   16         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   17         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   18         -
                            .transpose()?,
   19         -
                    );
   20         -
                }
   21         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
            },
   23         -
            other => {
   24         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25         -
                    "expected object key or end object, found: {other:?}"
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_time_range_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidTimeRangeExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidTimeRangeExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_last_delivery_channel_delete_failed_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::LastDeliveryChannelDeleteFailedExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::LastDeliveryChannelDeleteFailedExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_limit_exceeded_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::LimitExceededExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::LimitExceededExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

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

@@ -1,0 +163,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_aggregate_discovered_resources_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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesOutput,
    9         -
    crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError,
   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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::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         -
        "NoSuchConfigurationAggregatorException" => {
   59         -
            crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::NoSuchConfigurationAggregatorException({
   60         -
                #[allow(unused_mut)]
   61         -
                let mut tmp = {
   62         -
                    #[allow(unused_mut)]
   63         -
                    let mut output = crate::types::error::builders::NoSuchConfigurationAggregatorExceptionBuilder::default();
   64         -
                    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::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::unhandled)?;
   65         -
                    let output = output.meta(generic);
   66         -
                    output.build()
   67         -
                };
   68         -
                if tmp.message.is_none() {
   69         -
                    tmp.message = _error_message;
   70         -
                }
   71         -
                tmp
   72         -
            })
   73         -
        }
   74         -
        "ValidationException" => crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::ValidationException({
   75         -
            #[allow(unused_mut)]
   76         -
            let mut tmp = {
   77         -
                #[allow(unused_mut)]
   78         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   79         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   80         -
                    .map_err(crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::unhandled)?;
   81         -
                let output = output.meta(generic);
   82         -
                output.build()
   83         -
            };
   84         -
            if tmp.message.is_none() {
   85         -
                tmp.message = _error_message;
   86         -
            }
   87         -
            tmp
   88         -
        }),
   89         -
        _ => crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::generic(generic),
   90         -
    })
   91         -
}
   92         -
   93         -
#[allow(clippy::unnecessary_wraps)]
   94         -
pub fn de_list_aggregate_discovered_resources_http_response(
   95         -
    _response_status: u16,
   96         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   97         -
    _response_body: &[u8],
   98         -
) -> std::result::Result<
   99         -
    crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesOutput,
  100         -
    crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError,
  101         -
> {
  102         -
    Ok({
  103         -
        #[allow(unused_mut)]
  104         -
        let mut output = crate::operation::list_aggregate_discovered_resources::builders::ListAggregateDiscoveredResourcesOutputBuilder::default();
  105         -
        output = crate::protocol_serde::shape_list_aggregate_discovered_resources::de_list_aggregate_discovered_resources(_response_body, output)
  106         -
            .map_err(crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesError::unhandled)?;
  107         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  108         -
        output.build()
  109         -
    })
  110         -
}
  111         -
  112         -
pub fn ser_list_aggregate_discovered_resources_input(
  113         -
    input: &crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesInput,
  114         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  115         -
    let mut out = String::new();
  116         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  117         -
    crate::protocol_serde::shape_list_aggregate_discovered_resources_input::ser_list_aggregate_discovered_resources_input_input(&mut object, input)?;
  118         -
    object.finish();
  119         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  120         -
}
  121         -
  122         -
pub(crate) fn de_list_aggregate_discovered_resources(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::list_aggregate_discovered_resources::builders::ListAggregateDiscoveredResourcesOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::list_aggregate_discovered_resources::builders::ListAggregateDiscoveredResourcesOutputBuilder,
  127         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  128         -
> {
  129         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  130         -
    let tokens = &mut tokens_owned;
  131         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  132         -
    loop {
  133         -
        match tokens.next().transpose()? {
  134         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  135         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  136         -
                "ResourceIdentifiers" => {
  137         -
                    builder = builder.set_resource_identifiers(
  138         -
                        crate::protocol_serde::shape_discovered_resource_identifier_list::de_discovered_resource_identifier_list(tokens, _value)?,
  139         -
                    );
  140         -
                }
  141         -
                "NextToken" => {
  142         -
                    builder = builder.set_next_token(
  143         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  144         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  145         -
                            .transpose()?,
  146         -
                    );
  147         -
                }
  148         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  149         -
            },
  150         -
            other => {
  151         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  152         -
                    "expected object key or end object, found: {other:?}"
  153         -
                )))
  154         -
            }
  155         -
        }
  156         -
    }
  157         -
    if tokens.next().is_some() {
  158         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  159         -
            "found more JSON tokens after completing parsing",
  160         -
        ));
  161         -
    }
  162         -
    Ok(builder)
  163         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_aggregate_discovered_resources_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_aggregate_discovered_resources::ListAggregateDiscoveredResourcesInput,
    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.resource_type {
   10         -
        object.key("ResourceType").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.filters {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("Filters").start_object();
   15         -
        crate::protocol_serde::shape_resource_filters::ser_resource_filters(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   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         -
    if let Some(var_6) = &input.next_token {
   25         -
        object.key("NextToken").string(var_6.as_str());
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

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

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_configuration_recorders_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_configuration_recorders::ListConfigurationRecordersInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.filters {
    7         -
        let mut array_2 = object.key("Filters").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                #[allow(unused_mut)]
   11         -
                let mut object_4 = array_2.value().start_object();
   12         -
                crate::protocol_serde::shape_configuration_recorder_filter::ser_configuration_recorder_filter(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.max_results {
   19         -
        object.key("MaxResults").number(
   20         -
            #[allow(clippy::useless_conversion)]
   21         -
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
   22         -
        );
   23         -
    }
   24         -
    if let Some(var_6) = &input.next_token {
   25         -
        object.key("NextToken").string(var_6.as_str());
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +159,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_conformance_pack_compliance_scores_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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput,
    9         -
    crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError,
   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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::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         -
        _ => crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::generic(generic),
   79         -
    })
   80         -
}
   81         -
   82         -
#[allow(clippy::unnecessary_wraps)]
   83         -
pub fn de_list_conformance_pack_compliance_scores_http_response(
   84         -
    _response_status: u16,
   85         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   86         -
    _response_body: &[u8],
   87         -
) -> std::result::Result<
   88         -
    crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput,
   89         -
    crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError,
   90         -
> {
   91         -
    Ok({
   92         -
        #[allow(unused_mut)]
   93         -
        let mut output =
   94         -
            crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder::default();
   95         -
        output =
   96         -
            crate::protocol_serde::shape_list_conformance_pack_compliance_scores::de_list_conformance_pack_compliance_scores(_response_body, output)
   97         -
                .map_err(crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::unhandled)?;
   98         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   99         -
        crate::serde_util::list_conformance_pack_compliance_scores_output_output_correct_errors(output)
  100         -
            .build()
  101         -
            .map_err(crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresError::unhandled)?
  102         -
    })
  103         -
}
  104         -
  105         -
pub fn ser_list_conformance_pack_compliance_scores_input(
  106         -
    input: &crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresInput,
  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_list_conformance_pack_compliance_scores_input::ser_list_conformance_pack_compliance_scores_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_list_conformance_pack_compliance_scores(
  119         -
    _value: &[u8],
  120         -
    mut builder: crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder,
  121         -
) -> ::std::result::Result<
  122         -
    crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder,
  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         -
                "NextToken" => {
  133         -
                    builder = builder.set_next_token(
  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         -
                "ConformancePackComplianceScores" => {
  140         -
                    builder = builder.set_conformance_pack_compliance_scores(
  141         -
                        crate::protocol_serde::shape_conformance_pack_compliance_scores::de_conformance_pack_compliance_scores(tokens, _value)?,
  142         -
                    );
  143         -
                }
  144         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  145         -
            },
  146         -
            other => {
  147         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  148         -
                    "expected object key or end object, found: {other:?}"
  149         -
                )))
  150         -
            }
  151         -
        }
  152         -
    }
  153         -
    if tokens.next().is_some() {
  154         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  155         -
            "found more JSON tokens after completing parsing",
  156         -
        ));
  157         -
    }
  158         -
    Ok(builder)
  159         -
}

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

@@ -1,0 +31,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_conformance_pack_compliance_scores_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.filters {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("Filters").start_object();
    9         -
        crate::protocol_serde::shape_conformance_pack_compliance_scores_filters::ser_conformance_pack_compliance_scores_filters(
   10         -
            &mut object_2,
   11         -
            var_1,
   12         -
        )?;
   13         -
        object_2.finish();
   14         -
    }
   15         -
    if let Some(var_3) = &input.sort_order {
   16         -
        object.key("SortOrder").string(var_3.as_str());
   17         -
    }
   18         -
    if let Some(var_4) = &input.sort_by {
   19         -
        object.key("SortBy").string(var_4.as_str());
   20         -
    }
   21         -
    if let Some(var_5) = &input.limit {
   22         -
        object.key("Limit").number(
   23         -
            #[allow(clippy::useless_conversion)]
   24         -
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
   25         -
        );
   26         -
    }
   27         -
    if let Some(var_6) = &input.next_token {
   28         -
        object.key("NextToken").string(var_6.as_str());
   29         -
    }
   30         -
    Ok(())
   31         -
}

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

@@ -1,0 +162,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_discovered_resources_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::list_discovered_resources::ListDiscoveredResourcesOutput,
    9         -
    crate::operation::list_discovered_resources::ListDiscoveredResourcesError,
   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::list_discovered_resources::ListDiscoveredResourcesError::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::list_discovered_resources::ListDiscoveredResourcesError::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::list_discovered_resources::ListDiscoveredResourcesError::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::list_discovered_resources::ListDiscoveredResourcesError::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::list_discovered_resources::ListDiscoveredResourcesError::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::list_discovered_resources::ListDiscoveredResourcesError::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         -
        "NoAvailableConfigurationRecorderException" => {
   58         -
            crate::operation::list_discovered_resources::ListDiscoveredResourcesError::NoAvailableConfigurationRecorderException({
   59         -
                #[allow(unused_mut)]
   60         -
                let mut tmp = {
   61         -
                    #[allow(unused_mut)]
   62         -
                    let mut output = crate::types::error::builders::NoAvailableConfigurationRecorderExceptionBuilder::default();
   63         -
                    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::list_discovered_resources::ListDiscoveredResourcesError::unhandled)?;
   64         -
                    let output = output.meta(generic);
   65         -
                    output.build()
   66         -
                };
   67         -
                if tmp.message.is_none() {
   68         -
                    tmp.message = _error_message;
   69         -
                }
   70         -
                tmp
   71         -
            })
   72         -
        }
   73         -
        "ValidationException" => crate::operation::list_discovered_resources::ListDiscoveredResourcesError::ValidationException({
   74         -
            #[allow(unused_mut)]
   75         -
            let mut tmp = {
   76         -
                #[allow(unused_mut)]
   77         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   78         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   79         -
                    .map_err(crate::operation::list_discovered_resources::ListDiscoveredResourcesError::unhandled)?;
   80         -
                let output = output.meta(generic);
   81         -
                output.build()
   82         -
            };
   83         -
            if tmp.message.is_none() {
   84         -
                tmp.message = _error_message;
   85         -
            }
   86         -
            tmp
   87         -
        }),
   88         -
        _ => crate::operation::list_discovered_resources::ListDiscoveredResourcesError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_list_discovered_resources_http_response(
   94         -
    _response_status: u16,
   95         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   96         -
    _response_body: &[u8],
   97         -
) -> std::result::Result<
   98         -
    crate::operation::list_discovered_resources::ListDiscoveredResourcesOutput,
   99         -
    crate::operation::list_discovered_resources::ListDiscoveredResourcesError,
  100         -
> {
  101         -
    Ok({
  102         -
        #[allow(unused_mut)]
  103         -
        let mut output = crate::operation::list_discovered_resources::builders::ListDiscoveredResourcesOutputBuilder::default();
  104         -
        output = crate::protocol_serde::shape_list_discovered_resources::de_list_discovered_resources(_response_body, output)
  105         -
            .map_err(crate::operation::list_discovered_resources::ListDiscoveredResourcesError::unhandled)?;
  106         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  107         -
        output.build()
  108         -
    })
  109         -
}
  110         -
  111         -
pub fn ser_list_discovered_resources_input(
  112         -
    input: &crate::operation::list_discovered_resources::ListDiscoveredResourcesInput,
  113         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  114         -
    let mut out = String::new();
  115         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  116         -
    crate::protocol_serde::shape_list_discovered_resources_input::ser_list_discovered_resources_input_input(&mut object, input)?;
  117         -
    object.finish();
  118         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  119         -
}
  120         -
  121         -
pub(crate) fn de_list_discovered_resources(
  122         -
    _value: &[u8],
  123         -
    mut builder: crate::operation::list_discovered_resources::builders::ListDiscoveredResourcesOutputBuilder,
  124         -
) -> ::std::result::Result<
  125         -
    crate::operation::list_discovered_resources::builders::ListDiscoveredResourcesOutputBuilder,
  126         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  127         -
> {
  128         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  129         -
    let tokens = &mut tokens_owned;
  130         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  131         -
    loop {
  132         -
        match tokens.next().transpose()? {
  133         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  134         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  135         -
                "resourceIdentifiers" => {
  136         -
                    builder = builder.set_resource_identifiers(crate::protocol_serde::shape_resource_identifier_list::de_resource_identifier_list(
  137         -
                        tokens, _value,
  138         -
                    )?);
  139         -
                }
  140         -
                "nextToken" => {
  141         -
                    builder = builder.set_next_token(
  142         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  143         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  144         -
                            .transpose()?,
  145         -
                    );
  146         -
                }
  147         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  148         -
            },
  149         -
            other => {
  150         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  151         -
                    "expected object key or end object, found: {other:?}"
  152         -
                )))
  153         -
            }
  154         -
        }
  155         -
    }
  156         -
    if tokens.next().is_some() {
  157         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  158         -
            "found more JSON tokens after completing parsing",
  159         -
        ));
  160         -
    }
  161         -
    Ok(builder)
  162         -
}