AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_tags_log_group_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::list_tags_log_group::ListTagsLogGroupInput,
    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         -
    Ok(())
   10         -
}

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

@@ -1,0 +98,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_list_to_map(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ListToMap,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("source").string(input.source.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("key").string(input.key.as_str());
   11         -
    }
   12         -
    if let Some(var_1) = &input.value_key {
   13         -
        object.key("valueKey").string(var_1.as_str());
   14         -
    }
   15         -
    if let Some(var_2) = &input.target {
   16         -
        object.key("target").string(var_2.as_str());
   17         -
    }
   18         -
    if input.flatten {
   19         -
        object.key("flatten").boolean(input.flatten);
   20         -
    }
   21         -
    if let Some(var_3) = &input.flattened_element {
   22         -
        object.key("flattenedElement").string(var_3.as_str());
   23         -
    }
   24         -
    Ok(())
   25         -
}
   26         -
   27         -
pub(crate) fn de_list_to_map<'a, I>(
   28         -
    tokens: &mut ::std::iter::Peekable<I>,
   29         -
    _value: &'a [u8],
   30         -
) -> ::std::result::Result<Option<crate::types::ListToMap>, ::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::ListToMapBuilder::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         -
                        "source" => {
   44         -
                            builder = builder.set_source(
   45         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   46         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   47         -
                                    .transpose()?,
   48         -
                            );
   49         -
                        }
   50         -
                        "key" => {
   51         -
                            builder = builder.set_key(
   52         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   54         -
                                    .transpose()?,
   55         -
                            );
   56         -
                        }
   57         -
                        "valueKey" => {
   58         -
                            builder = builder.set_value_key(
   59         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   60         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   61         -
                                    .transpose()?,
   62         -
                            );
   63         -
                        }
   64         -
                        "target" => {
   65         -
                            builder = builder.set_target(
   66         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   67         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   68         -
                                    .transpose()?,
   69         -
                            );
   70         -
                        }
   71         -
                        "flatten" => {
   72         -
                            builder = builder.set_flatten(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   73         -
                        }
   74         -
                        "flattenedElement" => {
   75         -
                            builder = builder.set_flattened_element(
   76         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   77         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::FlattenedElement::from(u.as_ref())))
   78         -
                                    .transpose()?,
   79         -
                            );
   80         -
                        }
   81         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   82         -
                    },
   83         -
                    other => {
   84         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   85         -
                            "expected object key or end object, found: {other:?}"
   86         -
                        )))
   87         -
                    }
   88         -
                }
   89         -
            }
   90         -
            Ok(Some(crate::serde_util::list_to_map_correct_errors(builder).build().map_err(|err| {
   91         -
                ::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/cloudwatchlogs/src/protocol_serde/shape_log_event.rs

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_log_event<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LogEvent>, ::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::LogEventBuilder::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         -
                        "timestamp" => {
   19         -
                            builder = builder.set_timestamp(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "message" => {
   26         -
                            builder = builder.set_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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

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

@@ -1,0 +108,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_log_group<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LogGroup>, ::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::LogGroupBuilder::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         -
                        "logGroupName" => {
   19         -
                            builder = builder.set_log_group_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "creationTime" => {
   26         -
                            builder = builder.set_creation_time(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "retentionInDays" => {
   33         -
                            builder = builder.set_retention_in_days(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i32::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "metricFilterCount" => {
   40         -
                            builder = builder.set_metric_filter_count(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42         -
                                    .map(i32::try_from)
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "arn" => {
   47         -
                            builder = builder.set_arn(
   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         -
                        "storedBytes" => {
   54         -
                            builder = builder.set_stored_bytes(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   56         -
                                    .map(i64::try_from)
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "kmsKeyId" => {
   61         -
                            builder = builder.set_kms_key_id(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   63         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "dataProtectionStatus" => {
   68         -
                            builder = builder.set_data_protection_status(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   70         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DataProtectionStatus::from(u.as_ref())))
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        "inheritedProperties" => {
   75         -
                            builder = builder.set_inherited_properties(crate::protocol_serde::shape_inherited_properties::de_inherited_properties(
   76         -
                                tokens, _value,
   77         -
                            )?);
   78         -
                        }
   79         -
                        "logGroupClass" => {
   80         -
                            builder = builder.set_log_group_class(
   81         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   82         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LogGroupClass::from(u.as_ref())))
   83         -
                                    .transpose()?,
   84         -
                            );
   85         -
                        }
   86         -
                        "logGroupArn" => {
   87         -
                            builder = builder.set_log_group_arn(
   88         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   89         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   90         -
                                    .transpose()?,
   91         -
                            );
   92         -
                        }
   93         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   94         -
                    },
   95         -
                    other => {
   96         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   97         -
                            "expected object key or end object, found: {other:?}"
   98         -
                        )))
   99         -
                    }
  100         -
                }
  101         -
            }
  102         -
            Ok(Some(builder.build()))
  103         -
        }
  104         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  105         -
            "expected start object or null",
  106         -
        )),
  107         -
    }
  108         -
}

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

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

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_log_group_field<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LogGroupField>, ::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::LogGroupFieldBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "name" => {
   19         -
                            builder = builder.set_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "percent" => {
   26         -
                            builder = builder.set_percent(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i32::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

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

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

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

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

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

@@ -1,0 +54,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_log_group_summary<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LogGroupSummary>, ::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::LogGroupSummaryBuilder::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         -
                        "logGroupName" => {
   19         -
                            builder = builder.set_log_group_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "logGroupArn" => {
   26         -
                            builder = builder.set_log_group_arn(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "logGroupClass" => {
   33         -
                            builder = builder.set_log_group_class(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LogGroupClass::from(u.as_ref())))
   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_log_groups.rs

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

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

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

@@ -1,0 +89,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_log_stream<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LogStream>, ::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::LogStreamBuilder::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         -
                        "logStreamName" => {
   19         -
                            builder = builder.set_log_stream_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "creationTime" => {
   26         -
                            builder = builder.set_creation_time(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "firstEventTimestamp" => {
   33         -
                            builder = builder.set_first_event_timestamp(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "lastEventTimestamp" => {
   40         -
                            builder = builder.set_last_event_timestamp(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42         -
                                    .map(i64::try_from)
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "lastIngestionTime" => {
   47         -
                            builder = builder.set_last_ingestion_time(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   49         -
                                    .map(i64::try_from)
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "uploadSequenceToken" => {
   54         -
                            builder = builder.set_upload_sequence_token(
   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         -
                        "arn" => {
   61         -
                            builder = builder.set_arn(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   63         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "storedBytes" => {
   68         -
                            builder = builder.set_stored_bytes(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   70         -
                                    .map(i64::try_from)
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   75         -
                    },
   76         -
                    other => {
   77         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   78         -
                            "expected object key or end object, found: {other:?}"
   79         -
                        )))
   80         -
                    }
   81         -
                }
   82         -
            }
   83         -
            Ok(Some(builder.build()))
   84         -
        }
   85         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   86         -
            "expected start object or null",
   87         -
        )),
   88         -
    }
   89         -
}

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

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