AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_capacity_provider.rs

@@ -1,0 +95,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_capacity_provider<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::CapacityProvider>, ::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::CapacityProviderBuilder::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         -
                        "capacityProviderArn" => {
   19         -
                            builder = builder.set_capacity_provider_arn(
   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         -
                        "name" => {
   26         -
                            builder = builder.set_name(
   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         -
                        "cluster" => {
   33         -
                            builder = builder.set_cluster(
   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         -
                        "status" => {
   40         -
                            builder = builder.set_status(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::CapacityProviderStatus::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "autoScalingGroupProvider" => {
   47         -
                            builder = builder.set_auto_scaling_group_provider(
   48         -
                                crate::protocol_serde::shape_auto_scaling_group_provider::de_auto_scaling_group_provider(tokens, _value)?,
   49         -
                            );
   50         -
                        }
   51         -
                        "managedInstancesProvider" => {
   52         -
                            builder = builder.set_managed_instances_provider(
   53         -
                                crate::protocol_serde::shape_managed_instances_provider::de_managed_instances_provider(tokens, _value)?,
   54         -
                            );
   55         -
                        }
   56         -
                        "updateStatus" => {
   57         -
                            builder = builder.set_update_status(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   59         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::CapacityProviderUpdateStatus::from(u.as_ref())))
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        "updateStatusReason" => {
   64         -
                            builder = builder.set_update_status_reason(
   65         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   66         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   67         -
                                    .transpose()?,
   68         -
                            );
   69         -
                        }
   70         -
                        "tags" => {
   71         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   72         -
                        }
   73         -
                        "type" => {
   74         -
                            builder = builder.set_type(
   75         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   76         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::CapacityProviderType::from(u.as_ref())))
   77         -
                                    .transpose()?,
   78         -
                            );
   79         -
                        }
   80         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   81         -
                    },
   82         -
                    other => {
   83         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   84         -
                            "expected object key or end object, found: {other:?}"
   85         -
                        )))
   86         -
                    }
   87         -
                }
   88         -
            }
   89         -
            Ok(Some(builder.build()))
   90         -
        }
   91         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   92         -
            "expected start object or null",
   93         -
        )),
   94         -
    }
   95         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_capacity_provider_strategy.rs

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

@@ -1,0 +80,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_capacity_provider_strategy_item(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CapacityProviderStrategyItem,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("capacityProvider").string(input.capacity_provider.as_str());
    8         -
    }
    9         -
    if input.weight != 0 {
   10         -
        object.key("weight").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((input.weight).into()),
   13         -
        );
   14         -
    }
   15         -
    if input.base != 0 {
   16         -
        object.key("base").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((input.base).into()),
   19         -
        );
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_capacity_provider_strategy_item<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::CapacityProviderStrategyItem>, ::aws_smithy_json::deserialize::error::DeserializeError>
   28         -
where
   29         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   30         -
{
   31         -
    match tokens.next().transpose()? {
   32         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   33         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   34         -
            #[allow(unused_mut)]
   35         -
            let mut builder = crate::types::builders::CapacityProviderStrategyItemBuilder::default();
   36         -
            loop {
   37         -
                match tokens.next().transpose()? {
   38         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   39         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   40         -
                        "capacityProvider" => {
   41         -
                            builder = builder.set_capacity_provider(
   42         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   43         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   44         -
                                    .transpose()?,
   45         -
                            );
   46         -
                        }
   47         -
                        "weight" => {
   48         -
                            builder = builder.set_weight(
   49         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   50         -
                                    .map(i32::try_from)
   51         -
                                    .transpose()?,
   52         -
                            );
   53         -
                        }
   54         -
                        "base" => {
   55         -
                            builder = builder.set_base(
   56         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   57         -
                                    .map(i32::try_from)
   58         -
                                    .transpose()?,
   59         -
                            );
   60         -
                        }
   61         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   62         -
                    },
   63         -
                    other => {
   64         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   65         -
                            "expected object key or end object, found: {other:?}"
   66         -
                        )))
   67         -
                    }
   68         -
                }
   69         -
            }
   70         -
            Ok(Some(
   71         -
                crate::serde_util::capacity_provider_strategy_item_correct_errors(builder)
   72         -
                    .build()
   73         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   74         -
            ))
   75         -
        }
   76         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77         -
            "expected start object or null",
   78         -
        )),
   79         -
    }
   80         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_capacity_providers.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_capacity_providers<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::CapacityProvider>>, ::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_capacity_provider::de_capacity_provider(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/ecs/src/protocol_serde/shape_client_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_client_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClientExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ClientExceptionBuilder, ::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/ecs/src/protocol_serde/shape_cluster.rs

@@ -1,0 +119,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cluster<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Cluster>, ::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::ClusterBuilder::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         -
                        "clusterArn" => {
   19         -
                            builder = builder.set_cluster_arn(
   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         -
                        "clusterName" => {
   26         -
                            builder = builder.set_cluster_name(
   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         -
                        "configuration" => {
   33         -
                            builder = builder.set_configuration(crate::protocol_serde::shape_cluster_configuration::de_cluster_configuration(
   34         -
                                tokens, _value,
   35         -
                            )?);
   36         -
                        }
   37         -
                        "status" => {
   38         -
                            builder = builder.set_status(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "registeredContainerInstancesCount" => {
   45         -
                            builder = builder.set_registered_container_instances_count(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   47         -
                                    .map(i32::try_from)
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        "runningTasksCount" => {
   52         -
                            builder = builder.set_running_tasks_count(
   53         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   54         -
                                    .map(i32::try_from)
   55         -
                                    .transpose()?,
   56         -
                            );
   57         -
                        }
   58         -
                        "pendingTasksCount" => {
   59         -
                            builder = builder.set_pending_tasks_count(
   60         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   61         -
                                    .map(i32::try_from)
   62         -
                                    .transpose()?,
   63         -
                            );
   64         -
                        }
   65         -
                        "activeServicesCount" => {
   66         -
                            builder = builder.set_active_services_count(
   67         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   68         -
                                    .map(i32::try_from)
   69         -
                                    .transpose()?,
   70         -
                            );
   71         -
                        }
   72         -
                        "statistics" => {
   73         -
                            builder = builder.set_statistics(crate::protocol_serde::shape_statistics::de_statistics(tokens, _value)?);
   74         -
                        }
   75         -
                        "tags" => {
   76         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   77         -
                        }
   78         -
                        "settings" => {
   79         -
                            builder = builder.set_settings(crate::protocol_serde::shape_cluster_settings::de_cluster_settings(tokens, _value)?);
   80         -
                        }
   81         -
                        "capacityProviders" => {
   82         -
                            builder = builder.set_capacity_providers(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   83         -
                        }
   84         -
                        "defaultCapacityProviderStrategy" => {
   85         -
                            builder = builder.set_default_capacity_provider_strategy(
   86         -
                                crate::protocol_serde::shape_capacity_provider_strategy::de_capacity_provider_strategy(tokens, _value)?,
   87         -
                            );
   88         -
                        }
   89         -
                        "attachments" => {
   90         -
                            builder = builder.set_attachments(crate::protocol_serde::shape_attachments::de_attachments(tokens, _value)?);
   91         -
                        }
   92         -
                        "attachmentsStatus" => {
   93         -
                            builder = builder.set_attachments_status(
   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         -
                        "serviceConnectDefaults" => {
  100         -
                            builder = builder.set_service_connect_defaults(
  101         -
                                crate::protocol_serde::shape_cluster_service_connect_defaults::de_cluster_service_connect_defaults(tokens, _value)?,
  102         -
                            );
  103         -
                        }
  104         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  105         -
                    },
  106         -
                    other => {
  107         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  108         -
                            "expected object key or end object, found: {other:?}"
  109         -
                        )))
  110         -
                    }
  111         -
                }
  112         -
            }
  113         -
            Ok(Some(builder.build()))
  114         -
        }
  115         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  116         -
            "expected start object or null",
  117         -
        )),
  118         -
    }
  119         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_cluster_configuration.rs

@@ -1,0 +62,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_cluster_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ClusterConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.execute_command_configuration {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("executeCommandConfiguration").start_object();
    9         -
        crate::protocol_serde::shape_execute_command_configuration::ser_execute_command_configuration(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.managed_storage_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("managedStorageConfiguration").start_object();
   15         -
        crate::protocol_serde::shape_managed_storage_configuration::ser_managed_storage_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_cluster_configuration<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::ClusterConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::ClusterConfigurationBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "executeCommandConfiguration" => {
   38         -
                            builder = builder.set_execute_command_configuration(
   39         -
                                crate::protocol_serde::shape_execute_command_configuration::de_execute_command_configuration(tokens, _value)?,
   40         -
                            );
   41         -
                        }
   42         -
                        "managedStorageConfiguration" => {
   43         -
                            builder = builder.set_managed_storage_configuration(
   44         -
                                crate::protocol_serde::shape_managed_storage_configuration::de_managed_storage_configuration(tokens, _value)?,
   45         -
                            );
   46         -
                        }
   47         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   48         -
                    },
   49         -
                    other => {
   50         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   51         -
                            "expected object key or end object, found: {other:?}"
   52         -
                        )))
   53         -
                    }
   54         -
                }
   55         -
            }
   56         -
            Ok(Some(builder.build()))
   57         -
        }
   58         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   59         -
            "expected start object or null",
   60         -
        )),
   61         -
    }
   62         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_cluster_contains_capacity_provider_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_cluster_contains_capacity_provider_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClusterContainsCapacityProviderExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::ClusterContainsCapacityProviderExceptionBuilder,
    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/ecs/src/protocol_serde/shape_cluster_contains_container_instances_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_cluster_contains_container_instances_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClusterContainsContainerInstancesExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::ClusterContainsContainerInstancesExceptionBuilder,
    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/ecs/src/protocol_serde/shape_cluster_contains_services_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_cluster_contains_services_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClusterContainsServicesExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::ClusterContainsServicesExceptionBuilder,
    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/ecs/src/protocol_serde/shape_cluster_contains_tasks_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_cluster_contains_tasks_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClusterContainsTasksExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ClusterContainsTasksExceptionBuilder, ::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/ecs/src/protocol_serde/shape_cluster_not_found_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_cluster_not_found_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ClusterNotFoundExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ClusterNotFoundExceptionBuilder, ::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/ecs/src/protocol_serde/shape_cluster_service_connect_defaults.rs

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cluster_service_connect_defaults<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ClusterServiceConnectDefaults>, ::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::ClusterServiceConnectDefaultsBuilder::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         -
                        "namespace" => {
   19         -
                            builder = builder.set_namespace(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   26         -
                    },
   27         -
                    other => {
   28         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   29         -
                            "expected object key or end object, found: {other:?}"
   30         -
                        )))
   31         -
                    }
   32         -
                }
   33         -
            }
   34         -
            Ok(Some(builder.build()))
   35         -
        }
   36         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37         -
            "expected start object or null",
   38         -
        )),
   39         -
    }
   40         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_cluster_service_connect_defaults_request.rs

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_cluster_setting.rs

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_cluster_settings.rs

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