AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

@@ -1,0 +77,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_ebs_tag_specification(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::EbsTagSpecification,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("resourceType").string(input.resource_type.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.tags {
   10         -
        let mut array_2 = object.key("tags").start_array();
   11         -
        for item_3 in var_1 {
   12         -
            {
   13         -
                #[allow(unused_mut)]
   14         -
                let mut object_4 = array_2.value().start_object();
   15         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_4, item_3)?;
   16         -
                object_4.finish();
   17         -
            }
   18         -
        }
   19         -
        array_2.finish();
   20         -
    }
   21         -
    if let Some(var_5) = &input.propagate_tags {
   22         -
        object.key("propagateTags").string(var_5.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}
   26         -
   27         -
pub(crate) fn de_ebs_tag_specification<'a, I>(
   28         -
    tokens: &mut ::std::iter::Peekable<I>,
   29         -
    _value: &'a [u8],
   30         -
) -> ::std::result::Result<Option<crate::types::EbsTagSpecification>, ::aws_smithy_json::deserialize::error::DeserializeError>
   31         -
where
   32         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   33         -
{
   34         -
    match tokens.next().transpose()? {
   35         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   36         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   37         -
            #[allow(unused_mut)]
   38         -
            let mut builder = crate::types::builders::EbsTagSpecificationBuilder::default();
   39         -
            loop {
   40         -
                match tokens.next().transpose()? {
   41         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   42         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   43         -
                        "resourceType" => {
   44         -
                            builder = builder.set_resource_type(
   45         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   46         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EbsResourceType::from(u.as_ref())))
   47         -
                                    .transpose()?,
   48         -
                            );
   49         -
                        }
   50         -
                        "tags" => {
   51         -
                            builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
   52         -
                        }
   53         -
                        "propagateTags" => {
   54         -
                            builder = builder.set_propagate_tags(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   56         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::PropagateTags::from(u.as_ref())))
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   61         -
                    },
   62         -
                    other => {
   63         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   64         -
                            "expected object key or end object, found: {other:?}"
   65         -
                        )))
   66         -
                    }
   67         -
                }
   68         -
            }
   69         -
            Ok(Some(crate::serde_util::ebs_tag_specification_correct_errors(builder).build().map_err(
   70         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   71         -
            )?))
   72         -
        }
   73         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   74         -
            "expected start object or null",
   75         -
        )),
   76         -
    }
   77         -
}

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

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

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_efs_authorization_config(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::EfsAuthorizationConfig,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.access_point_id {
    7         -
        object.key("accessPointId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.iam {
   10         -
        object.key("iam").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_efs_authorization_config<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::EfsAuthorizationConfig>, ::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::EfsAuthorizationConfigBuilder::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         -
                        "accessPointId" => {
   32         -
                            builder = builder.set_access_point_id(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "iam" => {
   39         -
                            builder = builder.set_iam(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EfsAuthorizationConfigIam::from(u.as_ref())))
   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_efs_volume_configuration.rs

@@ -1,0 +98,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_efs_volume_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::EfsVolumeConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("fileSystemId").string(input.file_system_id.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.root_directory {
   10         -
        object.key("rootDirectory").string(var_1.as_str());
   11         -
    }
   12         -
    if let Some(var_2) = &input.transit_encryption {
   13         -
        object.key("transitEncryption").string(var_2.as_str());
   14         -
    }
   15         -
    if let Some(var_3) = &input.transit_encryption_port {
   16         -
        object.key("transitEncryptionPort").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_4) = &input.authorization_config {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_5 = object.key("authorizationConfig").start_object();
   24         -
        crate::protocol_serde::shape_efs_authorization_config::ser_efs_authorization_config(&mut object_5, var_4)?;
   25         -
        object_5.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}
   29         -
   30         -
pub(crate) fn de_efs_volume_configuration<'a, I>(
   31         -
    tokens: &mut ::std::iter::Peekable<I>,
   32         -
    _value: &'a [u8],
   33         -
) -> ::std::result::Result<Option<crate::types::EfsVolumeConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   34         -
where
   35         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   36         -
{
   37         -
    match tokens.next().transpose()? {
   38         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   39         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   40         -
            #[allow(unused_mut)]
   41         -
            let mut builder = crate::types::builders::EfsVolumeConfigurationBuilder::default();
   42         -
            loop {
   43         -
                match tokens.next().transpose()? {
   44         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   45         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   46         -
                        "fileSystemId" => {
   47         -
                            builder = builder.set_file_system_id(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "rootDirectory" => {
   54         -
                            builder = builder.set_root_directory(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   56         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "transitEncryption" => {
   61         -
                            builder = builder.set_transit_encryption(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   63         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EfsTransitEncryption::from(u.as_ref())))
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "transitEncryptionPort" => {
   68         -
                            builder = builder.set_transit_encryption_port(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   70         -
                                    .map(i32::try_from)
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        "authorizationConfig" => {
   75         -
                            builder = builder.set_authorization_config(
   76         -
                                crate::protocol_serde::shape_efs_authorization_config::de_efs_authorization_config(tokens, _value)?,
   77         -
                            );
   78         -
                        }
   79         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   80         -
                    },
   81         -
                    other => {
   82         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   83         -
                            "expected object key or end object, found: {other:?}"
   84         -
                        )))
   85         -
                    }
   86         -
                }
   87         -
            }
   88         -
            Ok(Some(
   89         -
                crate::serde_util::efs_volume_configuration_correct_errors(builder)
   90         -
                    .build()
   91         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   92         -
            ))
   93         -
        }
   94         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   95         -
            "expected start object or null",
   96         -
        )),
   97         -
    }
   98         -
}

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

@@ -1,0 +62,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_environment_file(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::EnvironmentFile,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("value").string(input.value.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("type").string(input.r#type.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_environment_file<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::EnvironmentFile>, ::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::EnvironmentFileBuilder::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         -
                        "value" => {
   32         -
                            builder = builder.set_value(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "type" => {
   39         -
                            builder = builder.set_type(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EnvironmentFileType::from(u.as_ref())))
   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(crate::serde_util::environment_file_correct_errors(builder).build().map_err(
   55         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   56         -
            )?))
   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_environment_files.rs

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

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

@@ -1,0 +53,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_ephemeral_storage(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::EphemeralStorage,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("sizeInGiB").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((input.size_in_gib).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_ephemeral_storage<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::EphemeralStorage>, ::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::EphemeralStorageBuilder::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         -
                        "sizeInGiB" => {
   32         -
                            builder = builder.set_size_in_gib(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34         -
                                    .map(i32::try_from)
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   39         -
                    },
   40         -
                    other => {
   41         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   42         -
                            "expected object key or end object, found: {other:?}"
   43         -
                        )))
   44         -
                    }
   45         -
                }
   46         -
            }
   47         -
            Ok(Some(crate::serde_util::ephemeral_storage_correct_errors(builder).build()))
   48         -
        }
   49         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   50         -
            "expected start object or null",
   51         -
        )),
   52         -
    }
   53         -
}

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_excluded_instance_type_set<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::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 = ::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         -
                        if let Some(value) = value {
   24         -
                            items.push(value);
   25         -
                        } else {
   26         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   27         -
                                "dense list cannot contain null values",
   28         -
                            ));
   29         -
                        }
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(items))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start array or null",
   37         -
        )),
   38         -
    }
   39         -
}

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

@@ -1,0 +204,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_execute_command_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::execute_command::ExecuteCommandOutput, crate::operation::execute_command::ExecuteCommandError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::execute_command::ExecuteCommandError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::execute_command::ExecuteCommandError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "ClientException" => crate::operation::execute_command::ExecuteCommandError::ClientException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        "ClusterNotFoundException" => crate::operation::execute_command::ExecuteCommandError::ClusterNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "InvalidParameterException" => crate::operation::execute_command::ExecuteCommandError::InvalidParameterException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "ServerException" => crate::operation::execute_command::ExecuteCommandError::ServerException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        "TargetNotConnectedException" => crate::operation::execute_command::ExecuteCommandError::TargetNotConnectedException({
   96         -
            #[allow(unused_mut)]
   97         -
            let mut tmp = {
   98         -
                #[allow(unused_mut)]
   99         -
                let mut output = crate::types::error::builders::TargetNotConnectedExceptionBuilder::default();
  100         -
                output =
  101         -
                    crate::protocol_serde::shape_target_not_connected_exception::de_target_not_connected_exception_json_err(_response_body, output)
  102         -
                        .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
  103         -
                let output = output.meta(generic);
  104         -
                output.build()
  105         -
            };
  106         -
            if tmp.message.is_none() {
  107         -
                tmp.message = _error_message;
  108         -
            }
  109         -
            tmp
  110         -
        }),
  111         -
        _ => crate::operation::execute_command::ExecuteCommandError::generic(generic),
  112         -
    })
  113         -
}
  114         -
  115         -
#[allow(clippy::unnecessary_wraps)]
  116         -
pub fn de_execute_command_http_response(
  117         -
    _response_status: u16,
  118         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  119         -
    _response_body: &[u8],
  120         -
) -> std::result::Result<crate::operation::execute_command::ExecuteCommandOutput, crate::operation::execute_command::ExecuteCommandError> {
  121         -
    Ok({
  122         -
        #[allow(unused_mut)]
  123         -
        let mut output = crate::operation::execute_command::builders::ExecuteCommandOutputBuilder::default();
  124         -
        output = crate::protocol_serde::shape_execute_command::de_execute_command(_response_body, output)
  125         -
            .map_err(crate::operation::execute_command::ExecuteCommandError::unhandled)?;
  126         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  127         -
        output.build()
  128         -
    })
  129         -
}
  130         -
  131         -
pub fn ser_execute_command_input(
  132         -
    input: &crate::operation::execute_command::ExecuteCommandInput,
  133         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  134         -
    let mut out = String::new();
  135         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  136         -
    crate::protocol_serde::shape_execute_command_input::ser_execute_command_input_input(&mut object, input)?;
  137         -
    object.finish();
  138         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  139         -
}
  140         -
  141         -
pub(crate) fn de_execute_command(
  142         -
    _value: &[u8],
  143         -
    mut builder: crate::operation::execute_command::builders::ExecuteCommandOutputBuilder,
  144         -
) -> ::std::result::Result<
  145         -
    crate::operation::execute_command::builders::ExecuteCommandOutputBuilder,
  146         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  147         -
> {
  148         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  149         -
    let tokens = &mut tokens_owned;
  150         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  151         -
    loop {
  152         -
        match tokens.next().transpose()? {
  153         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  154         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  155         -
                "clusterArn" => {
  156         -
                    builder = builder.set_cluster_arn(
  157         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  158         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  159         -
                            .transpose()?,
  160         -
                    );
  161         -
                }
  162         -
                "containerArn" => {
  163         -
                    builder = builder.set_container_arn(
  164         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  165         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  166         -
                            .transpose()?,
  167         -
                    );
  168         -
                }
  169         -
                "containerName" => {
  170         -
                    builder = builder.set_container_name(
  171         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  172         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  173         -
                            .transpose()?,
  174         -
                    );
  175         -
                }
  176         -
                "interactive" => {
  177         -
                    builder = builder.set_interactive(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
  178         -
                }
  179         -
                "session" => {
  180         -
                    builder = builder.set_session(crate::protocol_serde::shape_session::de_session(tokens, _value)?);
  181         -
                }
  182         -
                "taskArn" => {
  183         -
                    builder = builder.set_task_arn(
  184         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  185         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  186         -
                            .transpose()?,
  187         -
                    );
  188         -
                }
  189         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  190         -
            },
  191         -
            other => {
  192         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  193         -
                    "expected object key or end object, found: {other:?}"
  194         -
                )))
  195         -
            }
  196         -
        }
  197         -
    }
  198         -
    if tokens.next().is_some() {
  199         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  200         -
            "found more JSON tokens after completing parsing",
  201         -
        ));
  202         -
    }
  203         -
    Ok(builder)
  204         -
}

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

@@ -1,0 +71,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_execute_command_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ExecuteCommandConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.kms_key_id {
    7         -
        object.key("kmsKeyId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.logging {
   10         -
        object.key("logging").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.log_configuration {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_4 = object.key("logConfiguration").start_object();
   15         -
        crate::protocol_serde::shape_execute_command_log_configuration::ser_execute_command_log_configuration(&mut object_4, var_3)?;
   16         -
        object_4.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_execute_command_configuration<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::ExecuteCommandConfiguration>, ::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::ExecuteCommandConfigurationBuilder::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         -
                        "kmsKeyId" => {
   38         -
                            builder = builder.set_kms_key_id(
   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         -
                        "logging" => {
   45         -
                            builder = builder.set_logging(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   47         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ExecuteCommandLogging::from(u.as_ref())))
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        "logConfiguration" => {
   52         -
                            builder = builder.set_log_configuration(
   53         -
                                crate::protocol_serde::shape_execute_command_log_configuration::de_execute_command_log_configuration(tokens, _value)?,
   54         -
                            );
   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/ecs/src/protocol_serde/shape_execute_command_input.rs

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_execute_command_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::execute_command::ExecuteCommandInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.cluster {
    7         -
        object.key("cluster").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.container {
   10         -
        object.key("container").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.command {
   13         -
        object.key("command").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.interactive {
   16         -
        object.key("interactive").boolean(*var_4);
   17         -
    }
   18         -
    if let Some(var_5) = &input.task {
   19         -
        object.key("task").string(var_5.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}

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

@@ -1,0 +83,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_execute_command_log_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ExecuteCommandLogConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.cloud_watch_log_group_name {
    7         -
        object.key("cloudWatchLogGroupName").string(var_1.as_str());
    8         -
    }
    9         -
    if input.cloud_watch_encryption_enabled {
   10         -
        object.key("cloudWatchEncryptionEnabled").boolean(input.cloud_watch_encryption_enabled);
   11         -
    }
   12         -
    if let Some(var_2) = &input.s3_bucket_name {
   13         -
        object.key("s3BucketName").string(var_2.as_str());
   14         -
    }
   15         -
    if input.s3_encryption_enabled {
   16         -
        object.key("s3EncryptionEnabled").boolean(input.s3_encryption_enabled);
   17         -
    }
   18         -
    if let Some(var_3) = &input.s3_key_prefix {
   19         -
        object.key("s3KeyPrefix").string(var_3.as_str());
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_execute_command_log_configuration<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::ExecuteCommandLogConfiguration>, ::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::ExecuteCommandLogConfigurationBuilder::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         -
                        "cloudWatchLogGroupName" => {
   41         -
                            builder = builder.set_cloud_watch_log_group_name(
   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         -
                        "cloudWatchEncryptionEnabled" => {
   48         -
                            builder = builder
   49         -
                                .set_cloud_watch_encryption_enabled(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   50         -
                        }
   51         -
                        "s3BucketName" => {
   52         -
                            builder = builder.set_s3_bucket_name(
   53         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   54         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   55         -
                                    .transpose()?,
   56         -
                            );
   57         -
                        }
   58         -
                        "s3EncryptionEnabled" => {
   59         -
                            builder = builder.set_s3_encryption_enabled(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   60         -
                        }
   61         -
                        "s3KeyPrefix" => {
   62         -
                            builder = builder.set_s3_key_prefix(
   63         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   64         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   65         -
                                    .transpose()?,
   66         -
                            );
   67         -
                        }
   68         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   69         -
                    },
   70         -
                    other => {
   71         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   72         -
                            "expected object key or end object, found: {other:?}"
   73         -
                        )))
   74         -
                    }
   75         -
                }
   76         -
            }
   77         -
            Ok(Some(builder.build()))
   78         -
        }
   79         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   80         -
            "expected start object or null",
   81         -
        )),
   82         -
    }
   83         -
}

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

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_f_sx_windows_file_server_authorization_config(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::FSxWindowsFileServerAuthorizationConfig,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("credentialsParameter").string(input.credentials_parameter.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("domain").string(input.domain.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_f_sx_windows_file_server_authorization_config<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::FSxWindowsFileServerAuthorizationConfig>, ::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::FSxWindowsFileServerAuthorizationConfigBuilder::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         -
                        "credentialsParameter" => {
   32         -
                            builder = builder.set_credentials_parameter(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "domain" => {
   39         -
                            builder = builder.set_domain(
   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(
   55         -
                crate::serde_util::f_sx_windows_file_server_authorization_config_correct_errors(builder)
   56         -
                    .build()
   57         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   58         -
            ))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

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

@@ -1,0 +78,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_f_sx_windows_file_server_volume_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::FSxWindowsFileServerVolumeConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("fileSystemId").string(input.file_system_id.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("rootDirectory").string(input.root_directory.as_str());
   11         -
    }
   12         -
    if let Some(var_1) = &input.authorization_config {
   13         -
        #[allow(unused_mut)]
   14         -
        let mut object_2 = object.key("authorizationConfig").start_object();
   15         -
        crate::protocol_serde::shape_f_sx_windows_file_server_authorization_config::ser_f_sx_windows_file_server_authorization_config(
   16         -
            &mut object_2,
   17         -
            var_1,
   18         -
        )?;
   19         -
        object_2.finish();
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_f_sx_windows_file_server_volume_configuration<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::FSxWindowsFileServerVolumeConfiguration>, ::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::FSxWindowsFileServerVolumeConfigurationBuilder::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         -
                        "fileSystemId" => {
   41         -
                            builder = builder.set_file_system_id(
   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         -
                        "rootDirectory" => {
   48         -
                            builder = builder.set_root_directory(
   49         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   50         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   51         -
                                    .transpose()?,
   52         -
                            );
   53         -
                        }
   54         -
                        "authorizationConfig" => {
   55         -
                            builder = builder.set_authorization_config(
   56         -
                                    crate::protocol_serde::shape_f_sx_windows_file_server_authorization_config::de_f_sx_windows_file_server_authorization_config(tokens, _value)?
   57         -
                                );
   58         -
                        }
   59         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   60         -
                    },
   61         -
                    other => {
   62         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                            "expected object key or end object, found: {other:?}"
   64         -
                        )))
   65         -
                    }
   66         -
                }
   67         -
            }
   68         -
            Ok(Some(
   69         -
                crate::serde_util::f_sx_windows_file_server_volume_configuration_correct_errors(builder)
   70         -
                    .build()
   71         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   72         -
            ))
   73         -
        }
   74         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   75         -
            "expected start object or null",
   76         -
        )),
   77         -
    }
   78         -
}