AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

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

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

@@ -1,0 +76,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_tag_log_group_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::tag_log_group::TagLogGroupOutput, crate::operation::tag_log_group::TagLogGroupError> {
    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::tag_log_group::TagLogGroupError::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::tag_log_group::TagLogGroupError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::tag_log_group::TagLogGroupError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::tag_log_group::TagLogGroupError::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         -
        "ResourceNotFoundException" => crate::operation::tag_log_group::TagLogGroupError::ResourceNotFoundException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::tag_log_group::TagLogGroupError::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         -
        _ => crate::operation::tag_log_group::TagLogGroupError::generic(generic),
   51         -
    })
   52         -
}
   53         -
   54         -
#[allow(clippy::unnecessary_wraps)]
   55         -
pub fn de_tag_log_group_http_response(
   56         -
    _response_status: u16,
   57         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   58         -
    _response_body: &[u8],
   59         -
) -> std::result::Result<crate::operation::tag_log_group::TagLogGroupOutput, crate::operation::tag_log_group::TagLogGroupError> {
   60         -
    Ok({
   61         -
        #[allow(unused_mut)]
   62         -
        let mut output = crate::operation::tag_log_group::builders::TagLogGroupOutputBuilder::default();
   63         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   64         -
        output.build()
   65         -
    })
   66         -
}
   67         -
   68         -
pub fn ser_tag_log_group_input(
   69         -
    input: &crate::operation::tag_log_group::TagLogGroupInput,
   70         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   71         -
    let mut out = String::new();
   72         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   73         -
    crate::protocol_serde::shape_tag_log_group_input::ser_tag_log_group_input_input(&mut object, input)?;
   74         -
    object.finish();
   75         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   76         -
}

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

@@ -1,0 +20,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_tag_log_group_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::tag_log_group::TagLogGroupInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.log_group_name {
    7         -
        object.key("logGroupName").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.tags {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("tags").start_object();
   12         -
        for (key_4, value_5) in var_2 {
   13         -
            {
   14         -
                object_3.key(key_4.as_str()).string(value_5.as_str());
   15         -
            }
   16         -
        }
   17         -
        object_3.finish();
   18         -
    }
   19         -
    Ok(())
   20         -
}

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

@@ -1,0 +107,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_tag_resource_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::tag_resource::TagResourceOutput, crate::operation::tag_resource::TagResourceError> {
    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::tag_resource::TagResourceError::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::tag_resource::TagResourceError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::tag_resource::TagResourceError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::tag_resource::TagResourceError::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         -
        "ResourceNotFoundException" => crate::operation::tag_resource::TagResourceError::ResourceNotFoundException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::tag_resource::TagResourceError::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         -
        "ServiceUnavailableException" => crate::operation::tag_resource::TagResourceError::ServiceUnavailableException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   55         -
                output =
   56         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   57         -
                        .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                output.build()
   60         -
            };
   61         -
            if tmp.message.is_none() {
   62         -
                tmp.message = _error_message;
   63         -
            }
   64         -
            tmp
   65         -
        }),
   66         -
        "TooManyTagsException" => crate::operation::tag_resource::TagResourceError::TooManyTagsException({
   67         -
            #[allow(unused_mut)]
   68         -
            let mut tmp = {
   69         -
                #[allow(unused_mut)]
   70         -
                let mut output = crate::types::error::builders::TooManyTagsExceptionBuilder::default();
   71         -
                output = crate::protocol_serde::shape_too_many_tags_exception::de_too_many_tags_exception_json_err(_response_body, output)
   72         -
                    .map_err(crate::operation::tag_resource::TagResourceError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                output.build()
   75         -
            };
   76         -
            if tmp.message.is_none() {
   77         -
                tmp.message = _error_message;
   78         -
            }
   79         -
            tmp
   80         -
        }),
   81         -
        _ => crate::operation::tag_resource::TagResourceError::generic(generic),
   82         -
    })
   83         -
}
   84         -
   85         -
#[allow(clippy::unnecessary_wraps)]
   86         -
pub fn de_tag_resource_http_response(
   87         -
    _response_status: u16,
   88         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   89         -
    _response_body: &[u8],
   90         -
) -> std::result::Result<crate::operation::tag_resource::TagResourceOutput, crate::operation::tag_resource::TagResourceError> {
   91         -
    Ok({
   92         -
        #[allow(unused_mut)]
   93         -
        let mut output = crate::operation::tag_resource::builders::TagResourceOutputBuilder::default();
   94         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   95         -
        output.build()
   96         -
    })
   97         -
}
   98         -
   99         -
pub fn ser_tag_resource_input(
  100         -
    input: &crate::operation::tag_resource::TagResourceInput,
  101         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  102         -
    let mut out = String::new();
  103         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  104         -
    crate::protocol_serde::shape_tag_resource_input::ser_tag_resource_input_input(&mut object, input)?;
  105         -
    object.finish();
  106         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  107         -
}

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

@@ -1,0 +20,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_tag_resource_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::tag_resource::TagResourceInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.resource_arn {
    7         -
        object.key("resourceArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.tags {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("tags").start_object();
   12         -
        for (key_4, value_5) in var_2 {
   13         -
            {
   14         -
                object_3.key(key_4.as_str()).string(value_5.as_str());
   15         -
            }
   16         -
        }
   17         -
        object_3.finish();
   18         -
    }
   19         -
    Ok(())
   20         -
}

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

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_tags<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<
    6         -
    Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
>
    9         -
where
   10         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   11         -
{
   12         -
    match tokens.next().transpose()? {
   13         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15         -
            let mut map = ::std::collections::HashMap::new();
   16         -
            loop {
   17         -
                match tokens.next().transpose()? {
   18         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   22         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   23         -
                            .transpose()?;
   24         -
                        match value {
   25         -
                            Some(value) => {
   26         -
                                map.insert(key, value);
   27         -
                            }
   28         -
                            None => {
   29         -
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   30         -
                                    "dense map cannot contain null values",
   31         -
                                ))
   32         -
                            }
   33         -
                        }
   34         -
                    }
   35         -
                    other => {
   36         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   37         -
                            "expected object key or end object, found: {other:?}"
   38         -
                        )))
   39         -
                    }
   40         -
                }
   41         -
            }
   42         -
            Ok(Some(map))
   43         -
        }
   44         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
            "expected start object or null",
   46         -
        )),
   47         -
    }
   48         -
}

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

@@ -1,0 +115,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_test_metric_filter_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::test_metric_filter::TestMetricFilterOutput, crate::operation::test_metric_filter::TestMetricFilterError> {
    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::test_metric_filter::TestMetricFilterError::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::test_metric_filter::TestMetricFilterError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::test_metric_filter::TestMetricFilterError::InvalidParameterException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::test_metric_filter::TestMetricFilterError::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         -
        "ServiceUnavailableException" => crate::operation::test_metric_filter::TestMetricFilterError::ServiceUnavailableException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   40         -
                output =
   41         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   42         -
                        .map_err(crate::operation::test_metric_filter::TestMetricFilterError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        _ => crate::operation::test_metric_filter::TestMetricFilterError::generic(generic),
   52         -
    })
   53         -
}
   54         -
   55         -
#[allow(clippy::unnecessary_wraps)]
   56         -
pub fn de_test_metric_filter_http_response(
   57         -
    _response_status: u16,
   58         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   59         -
    _response_body: &[u8],
   60         -
) -> std::result::Result<crate::operation::test_metric_filter::TestMetricFilterOutput, crate::operation::test_metric_filter::TestMetricFilterError> {
   61         -
    Ok({
   62         -
        #[allow(unused_mut)]
   63         -
        let mut output = crate::operation::test_metric_filter::builders::TestMetricFilterOutputBuilder::default();
   64         -
        output = crate::protocol_serde::shape_test_metric_filter::de_test_metric_filter(_response_body, output)
   65         -
            .map_err(crate::operation::test_metric_filter::TestMetricFilterError::unhandled)?;
   66         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   67         -
        output.build()
   68         -
    })
   69         -
}
   70         -
   71         -
pub fn ser_test_metric_filter_input(
   72         -
    input: &crate::operation::test_metric_filter::TestMetricFilterInput,
   73         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   74         -
    let mut out = String::new();
   75         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   76         -
    crate::protocol_serde::shape_test_metric_filter_input::ser_test_metric_filter_input_input(&mut object, input)?;
   77         -
    object.finish();
   78         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   79         -
}
   80         -
   81         -
pub(crate) fn de_test_metric_filter(
   82         -
    _value: &[u8],
   83         -
    mut builder: crate::operation::test_metric_filter::builders::TestMetricFilterOutputBuilder,
   84         -
) -> ::std::result::Result<
   85         -
    crate::operation::test_metric_filter::builders::TestMetricFilterOutputBuilder,
   86         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   87         -
> {
   88         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   89         -
    let tokens = &mut tokens_owned;
   90         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   91         -
    loop {
   92         -
        match tokens.next().transpose()? {
   93         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   94         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   95         -
                "matches" => {
   96         -
                    builder = builder.set_matches(crate::protocol_serde::shape_metric_filter_matches::de_metric_filter_matches(
   97         -
                        tokens, _value,
   98         -
                    )?);
   99         -
                }
  100         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  101         -
            },
  102         -
            other => {
  103         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  104         -
                    "expected object key or end object, found: {other:?}"
  105         -
                )))
  106         -
            }
  107         -
        }
  108         -
    }
  109         -
    if tokens.next().is_some() {
  110         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  111         -
            "found more JSON tokens after completing parsing",
  112         -
        ));
  113         -
    }
  114         -
    Ok(builder)
  115         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_test_metric_filter_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::test_metric_filter::TestMetricFilterInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.filter_pattern {
    7         -
        object.key("filterPattern").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.log_event_messages {
   10         -
        let mut array_3 = object.key("logEventMessages").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +128,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_test_transformer_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::test_transformer::TestTransformerOutput, crate::operation::test_transformer::TestTransformerError> {
    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::test_transformer::TestTransformerError::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::test_transformer::TestTransformerError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidOperationException" => crate::operation::test_transformer::TestTransformerError::InvalidOperationException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidOperationExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_operation_exception::de_invalid_operation_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::test_transformer::TestTransformerError::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         -
        "InvalidParameterException" => crate::operation::test_transformer::TestTransformerError::InvalidParameterException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::test_transformer::TestTransformerError::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         -
        "ServiceUnavailableException" => crate::operation::test_transformer::TestTransformerError::ServiceUnavailableException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   55         -
                output =
   56         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   57         -
                        .map_err(crate::operation::test_transformer::TestTransformerError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                output.build()
   60         -
            };
   61         -
            if tmp.message.is_none() {
   62         -
                tmp.message = _error_message;
   63         -
            }
   64         -
            tmp
   65         -
        }),
   66         -
        _ => crate::operation::test_transformer::TestTransformerError::generic(generic),
   67         -
    })
   68         -
}
   69         -
   70         -
#[allow(clippy::unnecessary_wraps)]
   71         -
pub fn de_test_transformer_http_response(
   72         -
    _response_status: u16,
   73         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   74         -
    _response_body: &[u8],
   75         -
) -> std::result::Result<crate::operation::test_transformer::TestTransformerOutput, crate::operation::test_transformer::TestTransformerError> {
   76         -
    Ok({
   77         -
        #[allow(unused_mut)]
   78         -
        let mut output = crate::operation::test_transformer::builders::TestTransformerOutputBuilder::default();
   79         -
        output = crate::protocol_serde::shape_test_transformer::de_test_transformer(_response_body, output)
   80         -
            .map_err(crate::operation::test_transformer::TestTransformerError::unhandled)?;
   81         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   82         -
        output.build()
   83         -
    })
   84         -
}
   85         -
   86         -
pub fn ser_test_transformer_input(
   87         -
    input: &crate::operation::test_transformer::TestTransformerInput,
   88         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   89         -
    let mut out = String::new();
   90         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   91         -
    crate::protocol_serde::shape_test_transformer_input::ser_test_transformer_input_input(&mut object, input)?;
   92         -
    object.finish();
   93         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   94         -
}
   95         -
   96         -
pub(crate) fn de_test_transformer(
   97         -
    _value: &[u8],
   98         -
    mut builder: crate::operation::test_transformer::builders::TestTransformerOutputBuilder,
   99         -
) -> ::std::result::Result<
  100         -
    crate::operation::test_transformer::builders::TestTransformerOutputBuilder,
  101         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  102         -
> {
  103         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  104         -
    let tokens = &mut tokens_owned;
  105         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  106         -
    loop {
  107         -
        match tokens.next().transpose()? {
  108         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  109         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  110         -
                "transformedLogs" => {
  111         -
                    builder = builder.set_transformed_logs(crate::protocol_serde::shape_transformed_logs::de_transformed_logs(tokens, _value)?);
  112         -
                }
  113         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  114         -
            },
  115         -
            other => {
  116         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  117         -
                    "expected object key or end object, found: {other:?}"
  118         -
                )))
  119         -
            }
  120         -
        }
  121         -
    }
  122         -
    if tokens.next().is_some() {
  123         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  124         -
            "found more JSON tokens after completing parsing",
  125         -
        ));
  126         -
    }
  127         -
    Ok(builder)
  128         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_test_transformer_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::test_transformer::TestTransformerInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.transformer_config {
    7         -
        let mut array_2 = object.key("transformerConfig").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                #[allow(unused_mut)]
   11         -
                let mut object_4 = array_2.value().start_object();
   12         -
                crate::protocol_serde::shape_processor::ser_processor(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.log_event_messages {
   19         -
        let mut array_6 = object.key("logEventMessages").start_array();
   20         -
        for item_7 in var_5 {
   21         -
            {
   22         -
                array_6.value().string(item_7.as_str());
   23         -
            }
   24         -
        }
   25         -
        array_6.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_throttling_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_throttling_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ThrottlingExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ThrottlingExceptionBuilder, ::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/cloudwatchlogs/src/protocol_serde/shape_too_many_tags_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_too_many_tags_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::TooManyTagsExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::TooManyTagsExceptionBuilder, ::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         -
                "resourceName" => {
   21         -
                    builder = builder.set_resource_name(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

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

@@ -1,0 +54,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_transformed_log_record<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::TransformedLogRecord>, ::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::TransformedLogRecordBuilder::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         -
                        "eventNumber" => {
   19         -
                            builder = builder.set_event_number(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "eventMessage" => {
   26         -
                            builder = builder.set_event_message(
   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         -
                        "transformedEventMessage" => {
   33         -
                            builder = builder.set_transformed_event_message(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   40         -
                    },
   41         -
                    other => {
   42         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   43         -
                            "expected object key or end object, found: {other:?}"
   44         -
                        )))
   45         -
                    }
   46         -
                }
   47         -
            }
   48         -
            Ok(Some(builder.build()))
   49         -
        }
   50         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51         -
            "expected start object or null",
   52         -
        )),
   53         -
    }
   54         -
}

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

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

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

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

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_trim_string_with_keys<'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         -
}