AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_deliveries.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_deliveries<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Delivery>>, ::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::de_delivery(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/cloudwatchlogs/src/protocol_serde/shape_delivery.rs

@@ -1,0 +86,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_delivery<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Delivery>, ::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::DeliveryBuilder::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         -
                        "id" => {
   19         -
                            builder = builder.set_id(
   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         -
                        "arn" => {
   26         -
                            builder = builder.set_arn(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "deliverySourceName" => {
   33         -
                            builder = builder.set_delivery_source_name(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "deliveryDestinationArn" => {
   40         -
                            builder = builder.set_delivery_destination_arn(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "deliveryDestinationType" => {
   47         -
                            builder = builder.set_delivery_destination_type(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DeliveryDestinationType::from(u.as_ref())))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "recordFields" => {
   54         -
                            builder = builder.set_record_fields(crate::protocol_serde::shape_record_fields::de_record_fields(tokens, _value)?);
   55         -
                        }
   56         -
                        "fieldDelimiter" => {
   57         -
                            builder = builder.set_field_delimiter(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   59         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        "s3DeliveryConfiguration" => {
   64         -
                            builder = builder.set_s3_delivery_configuration(
   65         -
                                crate::protocol_serde::shape_s3_delivery_configuration::de_s3_delivery_configuration(tokens, _value)?,
   66         -
                            );
   67         -
                        }
   68         -
                        "tags" => {
   69         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   70         -
                        }
   71         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   72         -
                    },
   73         -
                    other => {
   74         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   75         -
                            "expected object key or end object, found: {other:?}"
   76         -
                        )))
   77         -
                    }
   78         -
                }
   79         -
            }
   80         -
            Ok(Some(builder.build()))
   81         -
        }
   82         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   83         -
            "expected start object or null",
   84         -
        )),
   85         -
    }
   86         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_delivery_destination.rs

@@ -1,0 +71,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_delivery_destination<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::DeliveryDestination>, ::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::DeliveryDestinationBuilder::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         -
                        "arn" => {
   26         -
                            builder = builder.set_arn(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "deliveryDestinationType" => {
   33         -
                            builder = builder.set_delivery_destination_type(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DeliveryDestinationType::from(u.as_ref())))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "outputFormat" => {
   40         -
                            builder = builder.set_output_format(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::OutputFormat::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "deliveryDestinationConfiguration" => {
   47         -
                            builder = builder.set_delivery_destination_configuration(
   48         -
                                crate::protocol_serde::shape_delivery_destination_configuration::de_delivery_destination_configuration(
   49         -
                                    tokens, _value,
   50         -
                                )?,
   51         -
                            );
   52         -
                        }
   53         -
                        "tags" => {
   54         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   55         -
                        }
   56         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   57         -
                    },
   58         -
                    other => {
   59         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   60         -
                            "expected object key or end object, found: {other:?}"
   61         -
                        )))
   62         -
                    }
   63         -
                }
   64         -
            }
   65         -
            Ok(Some(builder.build()))
   66         -
        }
   67         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   68         -
            "expected start object or null",
   69         -
        )),
   70         -
    }
   71         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_delivery_destination_configuration.rs

@@ -1,0 +54,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_delivery_destination_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeliveryDestinationConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("destinationResourceArn").string(input.destination_resource_arn.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}
   11         -
   12         -
pub(crate) fn de_delivery_destination_configuration<'a, I>(
   13         -
    tokens: &mut ::std::iter::Peekable<I>,
   14         -
    _value: &'a [u8],
   15         -
) -> ::std::result::Result<Option<crate::types::DeliveryDestinationConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   16         -
where
   17         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   18         -
{
   19         -
    match tokens.next().transpose()? {
   20         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   21         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   22         -
            #[allow(unused_mut)]
   23         -
            let mut builder = crate::types::builders::DeliveryDestinationConfigurationBuilder::default();
   24         -
            loop {
   25         -
                match tokens.next().transpose()? {
   26         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   27         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   28         -
                        "destinationResourceArn" => {
   29         -
                            builder = builder.set_destination_resource_arn(
   30         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   31         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   32         -
                                    .transpose()?,
   33         -
                            );
   34         -
                        }
   35         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   36         -
                    },
   37         -
                    other => {
   38         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   39         -
                            "expected object key or end object, found: {other:?}"
   40         -
                        )))
   41         -
                    }
   42         -
                }
   43         -
            }
   44         -
            Ok(Some(
   45         -
                crate::serde_util::delivery_destination_configuration_correct_errors(builder)
   46         -
                    .build()
   47         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   48         -
            ))
   49         -
        }
   50         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51         -
            "expected start object or null",
   52         -
        )),
   53         -
    }
   54         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_delivery_destinations.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_destinations<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeliveryDestination>>, ::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_destination::de_delivery_destination(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/cloudwatchlogs/src/protocol_serde/shape_delivery_source.rs

@@ -1,0 +67,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_delivery_source<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::DeliverySource>, ::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::DeliverySourceBuilder::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         -
                        "arn" => {
   26         -
                            builder = builder.set_arn(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "resourceArns" => {
   33         -
                            builder = builder.set_resource_arns(crate::protocol_serde::shape_resource_arns::de_resource_arns(tokens, _value)?);
   34         -
                        }
   35         -
                        "service" => {
   36         -
                            builder = builder.set_service(
   37         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   38         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   39         -
                                    .transpose()?,
   40         -
                            );
   41         -
                        }
   42         -
                        "logType" => {
   43         -
                            builder = builder.set_log_type(
   44         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   45         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   46         -
                                    .transpose()?,
   47         -
                            );
   48         -
                        }
   49         -
                        "tags" => {
   50         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   51         -
                        }
   52         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   53         -
                    },
   54         -
                    other => {
   55         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   56         -
                            "expected object key or end object, found: {other:?}"
   57         -
                        )))
   58         -
                    }
   59         -
                }
   60         -
            }
   61         -
            Ok(Some(builder.build()))
   62         -
        }
   63         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   64         -
            "expected start object or null",
   65         -
        )),
   66         -
    }
   67         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_delivery_sources.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_sources<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeliverySource>>, ::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_source::de_delivery_source(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/cloudwatchlogs/src/protocol_serde/shape_describe_account_policies.rs

@@ -1,0 +160,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_account_policies_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_account_policies::DescribeAccountPoliciesOutput,
    9         -
    crate::operation::describe_account_policies::DescribeAccountPoliciesError,
   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_account_policies::DescribeAccountPoliciesError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterException" => crate::operation::describe_account_policies::DescribeAccountPoliciesError::InvalidParameterException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::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         -
        "OperationAbortedException" => crate::operation::describe_account_policies::DescribeAccountPoliciesError::OperationAbortedException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::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         -
        "ResourceNotFoundException" => crate::operation::describe_account_policies::DescribeAccountPoliciesError::ResourceNotFoundException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::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         -
        "ServiceUnavailableException" => crate::operation::describe_account_policies::DescribeAccountPoliciesError::ServiceUnavailableException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   77         -
                output =
   78         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   79         -
                        .map_err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::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::describe_account_policies::DescribeAccountPoliciesError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_describe_account_policies_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::describe_account_policies::DescribeAccountPoliciesOutput,
   99         -
    crate::operation::describe_account_policies::DescribeAccountPoliciesError,
  100         -
> {
  101         -
    Ok({
  102         -
        #[allow(unused_mut)]
  103         -
        let mut output = crate::operation::describe_account_policies::builders::DescribeAccountPoliciesOutputBuilder::default();
  104         -
        output = crate::protocol_serde::shape_describe_account_policies::de_describe_account_policies(_response_body, output)
  105         -
            .map_err(crate::operation::describe_account_policies::DescribeAccountPoliciesError::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_describe_account_policies_input(
  112         -
    input: &crate::operation::describe_account_policies::DescribeAccountPoliciesInput,
  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_describe_account_policies_input::ser_describe_account_policies_input_input(&mut object, input)?;
  117         -
    object.finish();
  118         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  119         -
}
  120         -
  121         -
pub(crate) fn de_describe_account_policies(
  122         -
    _value: &[u8],
  123         -
    mut builder: crate::operation::describe_account_policies::builders::DescribeAccountPoliciesOutputBuilder,
  124         -
) -> ::std::result::Result<
  125         -
    crate::operation::describe_account_policies::builders::DescribeAccountPoliciesOutputBuilder,
  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         -
                "accountPolicies" => {
  136         -
                    builder = builder.set_account_policies(crate::protocol_serde::shape_account_policies::de_account_policies(tokens, _value)?);
  137         -
                }
  138         -
                "nextToken" => {
  139         -
                    builder = builder.set_next_token(
  140         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  141         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  142         -
                            .transpose()?,
  143         -
                    );
  144         -
                }
  145         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  146         -
            },
  147         -
            other => {
  148         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  149         -
                    "expected object key or end object, found: {other:?}"
  150         -
                )))
  151         -
            }
  152         -
        }
  153         -
    }
  154         -
    if tokens.next().is_some() {
  155         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  156         -
            "found more JSON tokens after completing parsing",
  157         -
        ));
  158         -
    }
  159         -
    Ok(builder)
  160         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_describe_account_policies_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_account_policies_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_account_policies::DescribeAccountPoliciesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.policy_type {
    7         -
        object.key("policyType").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.policy_name {
   10         -
        object.key("policyName").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.account_identifiers {
   13         -
        let mut array_4 = object.key("accountIdentifiers").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                array_4.value().string(item_5.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_4.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.next_token {
   22         -
        object.key("nextToken").string(var_6.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_describe_configuration_templates.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_describe_configuration_templates_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesOutput,
    9         -
    crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ResourceNotFoundException" => {
   24         -
            crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::ResourceNotFoundException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   29         -
                    output =
   30         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   31         -
                            .map_err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::unhandled)?;
   32         -
                    let output = output.meta(generic);
   33         -
                    output.build()
   34         -
                };
   35         -
                if tmp.message.is_none() {
   36         -
                    tmp.message = _error_message;
   37         -
                }
   38         -
                tmp
   39         -
            })
   40         -
        }
   41         -
        "ServiceUnavailableException" => {
   42         -
            crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::ServiceUnavailableException({
   43         -
                #[allow(unused_mut)]
   44         -
                let mut tmp = {
   45         -
                    #[allow(unused_mut)]
   46         -
                    let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   47         -
                    output =
   48         -
                        crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   49         -
                            .map_err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::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         -
        "ThrottlingException" => crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::ThrottlingException({
   60         -
            #[allow(unused_mut)]
   61         -
            let mut tmp = {
   62         -
                #[allow(unused_mut)]
   63         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   64         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   65         -
                    .map_err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::unhandled)?;
   66         -
                let output = output.meta(generic);
   67         -
                output.build()
   68         -
            };
   69         -
            if tmp.message.is_none() {
   70         -
                tmp.message = _error_message;
   71         -
            }
   72         -
            tmp
   73         -
        }),
   74         -
        "ValidationException" => crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::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::describe_configuration_templates::DescribeConfigurationTemplatesError::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::describe_configuration_templates::DescribeConfigurationTemplatesError::generic(generic),
   90         -
    })
   91         -
}
   92         -
   93         -
#[allow(clippy::unnecessary_wraps)]
   94         -
pub fn de_describe_configuration_templates_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::describe_configuration_templates::DescribeConfigurationTemplatesOutput,
  100         -
    crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError,
  101         -
> {
  102         -
    Ok({
  103         -
        #[allow(unused_mut)]
  104         -
        let mut output = crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesOutputBuilder::default();
  105         -
        output = crate::protocol_serde::shape_describe_configuration_templates::de_describe_configuration_templates(_response_body, output)
  106         -
            .map_err(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesError::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_describe_configuration_templates_input(
  113         -
    input: &crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput,
  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_describe_configuration_templates_input::ser_describe_configuration_templates_input_input(&mut object, input)?;
  118         -
    object.finish();
  119         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  120         -
}
  121         -
  122         -
pub(crate) fn de_describe_configuration_templates(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesOutputBuilder,
  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         -
                "configurationTemplates" => {
  137         -
                    builder = builder.set_configuration_templates(crate::protocol_serde::shape_configuration_templates::de_configuration_templates(
  138         -
                        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/cloudwatchlogs/src/protocol_serde/shape_describe_configuration_templates_input.rs

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_configuration_templates_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.service {
    7         -
        object.key("service").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.log_types {
   10         -
        let mut array_3 = object.key("logTypes").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.resource_types {
   19         -
        let mut array_6 = object.key("resourceTypes").start_array();
   20         -
        for item_7 in var_5 {
   21         -
            {
   22         -
                array_6.value().string(item_7.as_str());
   23         -
            }
   24         -
        }
   25         -
        array_6.finish();
   26         -
    }
   27         -
    if let Some(var_8) = &input.delivery_destination_types {
   28         -
        let mut array_9 = object.key("deliveryDestinationTypes").start_array();
   29         -
        for item_10 in var_8 {
   30         -
            {
   31         -
                array_9.value().string(item_10.as_str());
   32         -
            }
   33         -
        }
   34         -
        array_9.finish();
   35         -
    }
   36         -
    if let Some(var_11) = &input.next_token {
   37         -
        object.key("nextToken").string(var_11.as_str());
   38         -
    }
   39         -
    if let Some(var_12) = &input.limit {
   40         -
        object.key("limit").number(
   41         -
            #[allow(clippy::useless_conversion)]
   42         -
            ::aws_smithy_types::Number::NegInt((*var_12).into()),
   43         -
        );
   44         -
    }
   45         -
    Ok(())
   46         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_describe_deliveries.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_describe_deliveries_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_deliveries::DescribeDeliveriesOutput,
    9         -
    crate::operation::describe_deliveries::DescribeDeliveriesError,
   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_deliveries::DescribeDeliveriesError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_deliveries::DescribeDeliveriesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ServiceQuotaExceededException" => crate::operation::describe_deliveries::DescribeDeliveriesError::ServiceQuotaExceededException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   29         -
                    _response_body,
   30         -
                    output,
   31         -
                )
   32         -
                .map_err(crate::operation::describe_deliveries::DescribeDeliveriesError::unhandled)?;
   33         -
                let output = output.meta(generic);
   34         -
                output.build()
   35         -
            };
   36         -
            if tmp.message.is_none() {
   37         -
                tmp.message = _error_message;
   38         -
            }
   39         -
            tmp
   40         -
        }),
   41         -
        "ServiceUnavailableException" => crate::operation::describe_deliveries::DescribeDeliveriesError::ServiceUnavailableException({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   46         -
                output =
   47         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   48         -
                        .map_err(crate::operation::describe_deliveries::DescribeDeliveriesError::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         -
        "ThrottlingException" => crate::operation::describe_deliveries::DescribeDeliveriesError::ThrottlingException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::describe_deliveries::DescribeDeliveriesError::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         -
        "ValidationException" => crate::operation::describe_deliveries::DescribeDeliveriesError::ValidationException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   77         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   78         -
                    .map_err(crate::operation::describe_deliveries::DescribeDeliveriesError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        _ => crate::operation::describe_deliveries::DescribeDeliveriesError::generic(generic),
   88         -
    })
   89         -
}
   90         -
   91         -
#[allow(clippy::unnecessary_wraps)]
   92         -
pub fn de_describe_deliveries_http_response(
   93         -
    _response_status: u16,
   94         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   95         -
    _response_body: &[u8],
   96         -
) -> std::result::Result<
   97         -
    crate::operation::describe_deliveries::DescribeDeliveriesOutput,
   98         -
    crate::operation::describe_deliveries::DescribeDeliveriesError,
   99         -
> {
  100         -
    Ok({
  101         -
        #[allow(unused_mut)]
  102         -
        let mut output = crate::operation::describe_deliveries::builders::DescribeDeliveriesOutputBuilder::default();
  103         -
        output = crate::protocol_serde::shape_describe_deliveries::de_describe_deliveries(_response_body, output)
  104         -
            .map_err(crate::operation::describe_deliveries::DescribeDeliveriesError::unhandled)?;
  105         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  106         -
        output.build()
  107         -
    })
  108         -
}
  109         -
  110         -
pub fn ser_describe_deliveries_input(
  111         -
    input: &crate::operation::describe_deliveries::DescribeDeliveriesInput,
  112         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  113         -
    let mut out = String::new();
  114         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  115         -
    crate::protocol_serde::shape_describe_deliveries_input::ser_describe_deliveries_input_input(&mut object, input)?;
  116         -
    object.finish();
  117         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  118         -
}
  119         -
  120         -
pub(crate) fn de_describe_deliveries(
  121         -
    _value: &[u8],
  122         -
    mut builder: crate::operation::describe_deliveries::builders::DescribeDeliveriesOutputBuilder,
  123         -
) -> ::std::result::Result<
  124         -
    crate::operation::describe_deliveries::builders::DescribeDeliveriesOutputBuilder,
  125         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  126         -
> {
  127         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  128         -
    let tokens = &mut tokens_owned;
  129         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  130         -
    loop {
  131         -
        match tokens.next().transpose()? {
  132         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  133         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  134         -
                "deliveries" => {
  135         -
                    builder = builder.set_deliveries(crate::protocol_serde::shape_deliveries::de_deliveries(tokens, _value)?);
  136         -
                }
  137         -
                "nextToken" => {
  138         -
                    builder = builder.set_next_token(
  139         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  140         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  141         -
                            .transpose()?,
  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/cloudwatchlogs/src/protocol_serde/shape_describe_deliveries_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_describe_delivery_destinations.rs

@@ -1,0 +165,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_delivery_destinations_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_delivery_destinations::DescribeDeliveryDestinationsOutput,
    9         -
    crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError,
   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_delivery_destinations::DescribeDeliveryDestinationsError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ServiceQuotaExceededException" => {
   24         -
            crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ServiceQuotaExceededException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::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         -
        "ServiceUnavailableException" => {
   44         -
            crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ServiceUnavailableException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   49         -
                    output =
   50         -
                        crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   51         -
                            .map_err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::unhandled)?;
   52         -
                    let output = output.meta(generic);
   53         -
                    output.build()
   54         -
                };
   55         -
                if tmp.message.is_none() {
   56         -
                    tmp.message = _error_message;
   57         -
                }
   58         -
                tmp
   59         -
            })
   60         -
        }
   61         -
        "ThrottlingException" => crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ThrottlingException({
   62         -
            #[allow(unused_mut)]
   63         -
            let mut tmp = {
   64         -
                #[allow(unused_mut)]
   65         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   66         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   67         -
                    .map_err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::unhandled)?;
   68         -
                let output = output.meta(generic);
   69         -
                output.build()
   70         -
            };
   71         -
            if tmp.message.is_none() {
   72         -
                tmp.message = _error_message;
   73         -
            }
   74         -
            tmp
   75         -
        }),
   76         -
        "ValidationException" => crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ValidationException({
   77         -
            #[allow(unused_mut)]
   78         -
            let mut tmp = {
   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)
   82         -
                    .map_err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::unhandled)?;
   83         -
                let output = output.meta(generic);
   84         -
                output.build()
   85         -
            };
   86         -
            if tmp.message.is_none() {
   87         -
                tmp.message = _error_message;
   88         -
            }
   89         -
            tmp
   90         -
        }),
   91         -
        _ => crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::generic(generic),
   92         -
    })
   93         -
}
   94         -
   95         -
#[allow(clippy::unnecessary_wraps)]
   96         -
pub fn de_describe_delivery_destinations_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_delivery_destinations::DescribeDeliveryDestinationsOutput,
  102         -
    crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError,
  103         -
> {
  104         -
    Ok({
  105         -
        #[allow(unused_mut)]
  106         -
        let mut output = crate::operation::describe_delivery_destinations::builders::DescribeDeliveryDestinationsOutputBuilder::default();
  107         -
        output = crate::protocol_serde::shape_describe_delivery_destinations::de_describe_delivery_destinations(_response_body, output)
  108         -
            .map_err(crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::unhandled)?;
  109         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  110         -
        output.build()
  111         -
    })
  112         -
}
  113         -
  114         -
pub fn ser_describe_delivery_destinations_input(
  115         -
    input: &crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput,
  116         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  117         -
    let mut out = String::new();
  118         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  119         -
    crate::protocol_serde::shape_describe_delivery_destinations_input::ser_describe_delivery_destinations_input_input(&mut object, input)?;
  120         -
    object.finish();
  121         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  122         -
}
  123         -
  124         -
pub(crate) fn de_describe_delivery_destinations(
  125         -
    _value: &[u8],
  126         -
    mut builder: crate::operation::describe_delivery_destinations::builders::DescribeDeliveryDestinationsOutputBuilder,
  127         -
) -> ::std::result::Result<
  128         -
    crate::operation::describe_delivery_destinations::builders::DescribeDeliveryDestinationsOutputBuilder,
  129         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  130         -
> {
  131         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  132         -
    let tokens = &mut tokens_owned;
  133         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  134         -
    loop {
  135         -
        match tokens.next().transpose()? {
  136         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  137         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  138         -
                "deliveryDestinations" => {
  139         -
                    builder = builder.set_delivery_destinations(crate::protocol_serde::shape_delivery_destinations::de_delivery_destinations(
  140         -
                        tokens, _value,
  141         -
                    )?);
  142         -
                }
  143         -
                "nextToken" => {
  144         -
                    builder = builder.set_next_token(
  145         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  146         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  147         -
                            .transpose()?,
  148         -
                    );
  149         -
                }
  150         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  151         -
            },
  152         -
            other => {
  153         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  154         -
                    "expected object key or end object, found: {other:?}"
  155         -
                )))
  156         -
            }
  157         -
        }
  158         -
    }
  159         -
    if tokens.next().is_some() {
  160         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  161         -
            "found more JSON tokens after completing parsing",
  162         -
        ));
  163         -
    }
  164         -
    Ok(builder)
  165         -
}