AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

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

@@ -1,0 +82,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_account_policy<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AccountPolicy>, ::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::AccountPolicyBuilder::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         -
                        "policyName" => {
   19         -
                            builder = builder.set_policy_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         -
                        "policyDocument" => {
   26         -
                            builder = builder.set_policy_document(
   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         -
                        "lastUpdatedTime" => {
   33         -
                            builder = builder.set_last_updated_time(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "policyType" => {
   40         -
                            builder = builder.set_policy_type(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::PolicyType::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "scope" => {
   47         -
                            builder = builder.set_scope(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Scope::from(u.as_ref())))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "selectionCriteria" => {
   54         -
                            builder = builder.set_selection_criteria(
   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         -
                        "accountId" => {
   61         -
                            builder = builder.set_account_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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   68         -
                    },
   69         -
                    other => {
   70         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   71         -
                            "expected object key or end object, found: {other:?}"
   72         -
                        )))
   73         -
                    }
   74         -
                }
   75         -
            }
   76         -
            Ok(Some(builder.build()))
   77         -
        }
   78         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   79         -
            "expected start object or null",
   80         -
        )),
   81         -
    }
   82         -
}

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

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

@@ -1,0 +68,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_add_key_entry(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AddKeyEntry,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("key").string(input.key.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("value").string(input.value.as_str());
   11         -
    }
   12         -
    if input.overwrite_if_exists {
   13         -
        object.key("overwriteIfExists").boolean(input.overwrite_if_exists);
   14         -
    }
   15         -
    Ok(())
   16         -
}
   17         -
   18         -
pub(crate) fn de_add_key_entry<'a, I>(
   19         -
    tokens: &mut ::std::iter::Peekable<I>,
   20         -
    _value: &'a [u8],
   21         -
) -> ::std::result::Result<Option<crate::types::AddKeyEntry>, ::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::AddKeyEntryBuilder::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         -
                        "key" => {
   35         -
                            builder = builder.set_key(
   36         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   37         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   38         -
                                    .transpose()?,
   39         -
                            );
   40         -
                        }
   41         -
                        "value" => {
   42         -
                            builder = builder.set_value(
   43         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   44         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   45         -
                                    .transpose()?,
   46         -
                            );
   47         -
                        }
   48         -
                        "overwriteIfExists" => {
   49         -
                            builder = builder.set_overwrite_if_exists(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(crate::serde_util::add_key_entry_correct_errors(builder).build().map_err(|err| {
   61         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   62         -
            })?))
   63         -
        }
   64         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   65         -
            "expected start object or null",
   66         -
        )),
   67         -
    }
   68         -
}

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

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

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

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

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

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

@@ -1,0 +142,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_anomaly<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Anomaly>, ::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::AnomalyBuilder::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         -
                        "anomalyId" => {
   19         -
                            builder = builder.set_anomaly_id(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "patternId" => {
   26         -
                            builder = builder.set_pattern_id(
   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         -
                        "anomalyDetectorArn" => {
   33         -
                            builder = builder.set_anomaly_detector_arn(
   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         -
                        "patternString" => {
   40         -
                            builder = builder.set_pattern_string(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "patternRegex" => {
   47         -
                            builder = builder.set_pattern_regex(
   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         -
                        "priority" => {
   54         -
                            builder = builder.set_priority(
   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         -
                        "firstSeen" => {
   61         -
                            builder = builder.set_first_seen(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   63         -
                                    .map(i64::try_from)
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "lastSeen" => {
   68         -
                            builder = builder.set_last_seen(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   70         -
                                    .map(i64::try_from)
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        "description" => {
   75         -
                            builder = builder.set_description(
   76         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   77         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   78         -
                                    .transpose()?,
   79         -
                            );
   80         -
                        }
   81         -
                        "active" => {
   82         -
                            builder = builder.set_active(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   83         -
                        }
   84         -
                        "state" => {
   85         -
                            builder = builder.set_state(
   86         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   87         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::State::from(u.as_ref())))
   88         -
                                    .transpose()?,
   89         -
                            );
   90         -
                        }
   91         -
                        "histogram" => {
   92         -
                            builder = builder.set_histogram(crate::protocol_serde::shape_histogram::de_histogram(tokens, _value)?);
   93         -
                        }
   94         -
                        "logSamples" => {
   95         -
                            builder = builder.set_log_samples(crate::protocol_serde::shape_log_samples::de_log_samples(tokens, _value)?);
   96         -
                        }
   97         -
                        "patternTokens" => {
   98         -
                            builder = builder.set_pattern_tokens(crate::protocol_serde::shape_pattern_tokens::de_pattern_tokens(tokens, _value)?);
   99         -
                        }
  100         -
                        "logGroupArnList" => {
  101         -
                            builder = builder
  102         -
                                .set_log_group_arn_list(crate::protocol_serde::shape_log_group_arn_list::de_log_group_arn_list(tokens, _value)?);
  103         -
                        }
  104         -
                        "suppressed" => {
  105         -
                            builder = builder.set_suppressed(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
  106         -
                        }
  107         -
                        "suppressedDate" => {
  108         -
                            builder = builder.set_suppressed_date(
  109         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  110         -
                                    .map(i64::try_from)
  111         -
                                    .transpose()?,
  112         -
                            );
  113         -
                        }
  114         -
                        "suppressedUntil" => {
  115         -
                            builder = builder.set_suppressed_until(
  116         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  117         -
                                    .map(i64::try_from)
  118         -
                                    .transpose()?,
  119         -
                            );
  120         -
                        }
  121         -
                        "isPatternLevelSuppression" => {
  122         -
                            builder =
  123         -
                                builder.set_is_pattern_level_suppression(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
  124         -
                        }
  125         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  126         -
                    },
  127         -
                    other => {
  128         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  129         -
                            "expected object key or end object, found: {other:?}"
  130         -
                        )))
  131         -
                    }
  132         -
                }
  133         -
            }
  134         -
            Ok(Some(crate::serde_util::anomaly_correct_errors(builder).build().map_err(|err| {
  135         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
  136         -
            })?))
  137         -
        }
  138         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  139         -
            "expected start object or null",
  140         -
        )),
  141         -
    }
  142         -
}

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

@@ -1,0 +100,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_anomaly_detector<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AnomalyDetector>, ::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::AnomalyDetectorBuilder::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         -
                        "anomalyDetectorArn" => {
   19         -
                            builder = builder.set_anomaly_detector_arn(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "detectorName" => {
   26         -
                            builder = builder.set_detector_name(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "logGroupArnList" => {
   33         -
                            builder = builder
   34         -
                                .set_log_group_arn_list(crate::protocol_serde::shape_log_group_arn_list::de_log_group_arn_list(tokens, _value)?);
   35         -
                        }
   36         -
                        "evaluationFrequency" => {
   37         -
                            builder = builder.set_evaluation_frequency(
   38         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   39         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::EvaluationFrequency::from(u.as_ref())))
   40         -
                                    .transpose()?,
   41         -
                            );
   42         -
                        }
   43         -
                        "filterPattern" => {
   44         -
                            builder = builder.set_filter_pattern(
   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         -
                        "anomalyDetectorStatus" => {
   51         -
                            builder = builder.set_anomaly_detector_status(
   52         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::AnomalyDetectorStatus::from(u.as_ref())))
   54         -
                                    .transpose()?,
   55         -
                            );
   56         -
                        }
   57         -
                        "kmsKeyId" => {
   58         -
                            builder = builder.set_kms_key_id(
   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         -
                        "creationTimeStamp" => {
   65         -
                            builder = builder.set_creation_time_stamp(
   66         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   67         -
                                    .map(i64::try_from)
   68         -
                                    .transpose()?,
   69         -
                            );
   70         -
                        }
   71         -
                        "lastModifiedTimeStamp" => {
   72         -
                            builder = builder.set_last_modified_time_stamp(
   73         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   74         -
                                    .map(i64::try_from)
   75         -
                                    .transpose()?,
   76         -
                            );
   77         -
                        }
   78         -
                        "anomalyVisibilityTime" => {
   79         -
                            builder = builder.set_anomaly_visibility_time(
   80         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   81         -
                                    .map(i64::try_from)
   82         -
                                    .transpose()?,
   83         -
                            );
   84         -
                        }
   85         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   86         -
                    },
   87         -
                    other => {
   88         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   89         -
                            "expected object key or end object, found: {other:?}"
   90         -
                        )))
   91         -
                    }
   92         -
                }
   93         -
            }
   94         -
            Ok(Some(builder.build()))
   95         -
        }
   96         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   97         -
            "expected start object or null",
   98         -
        )),
   99         -
    }
  100         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_anomaly_detectors<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AnomalyDetector>>, ::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_anomaly_detector::de_anomaly_detector(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_associate_kms_key.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_associate_kms_key_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::associate_kms_key::AssociateKmsKeyOutput, crate::operation::associate_kms_key::AssociateKmsKeyError> {
    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::associate_kms_key::AssociateKmsKeyError::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::associate_kms_key::AssociateKmsKeyError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterException" => crate::operation::associate_kms_key::AssociateKmsKeyError::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::associate_kms_key::AssociateKmsKeyError::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         -
        "OperationAbortedException" => crate::operation::associate_kms_key::AssociateKmsKeyError::OperationAbortedException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::OperationAbortedExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_operation_aborted_exception::de_operation_aborted_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::associate_kms_key::AssociateKmsKeyError::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         -
        "ResourceNotFoundException" => crate::operation::associate_kms_key::AssociateKmsKeyError::ResourceNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::associate_kms_key::AssociateKmsKeyError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "ServiceUnavailableException" => crate::operation::associate_kms_key::AssociateKmsKeyError::ServiceUnavailableException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   70         -
                output =
   71         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   72         -
                        .map_err(crate::operation::associate_kms_key::AssociateKmsKeyError::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::associate_kms_key::AssociateKmsKeyError::generic(generic),
   82         -
    })
   83         -
}
   84         -
   85         -
#[allow(clippy::unnecessary_wraps)]
   86         -
pub fn de_associate_kms_key_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::associate_kms_key::AssociateKmsKeyOutput, crate::operation::associate_kms_key::AssociateKmsKeyError> {
   91         -
    Ok({
   92         -
        #[allow(unused_mut)]
   93         -
        let mut output = crate::operation::associate_kms_key::builders::AssociateKmsKeyOutputBuilder::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_associate_kms_key_input(
  100         -
    input: &crate::operation::associate_kms_key::AssociateKmsKeyInput,
  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_associate_kms_key_input::ser_associate_kms_key_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_associate_kms_key_input.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_associate_kms_key_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::associate_kms_key::AssociateKmsKeyInput,
    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.kms_key_id {
   10         -
        object.key("kmsKeyId").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.resource_identifier {
   13         -
        object.key("resourceIdentifier").string(var_3.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/protocol_serde/shape_cancel_export_task.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_cancel_export_task_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::cancel_export_task::CancelExportTaskOutput, crate::operation::cancel_export_task::CancelExportTaskError> {
    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::cancel_export_task::CancelExportTaskError::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::cancel_export_task::CancelExportTaskError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidOperationException" => crate::operation::cancel_export_task::CancelExportTaskError::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::cancel_export_task::CancelExportTaskError::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::cancel_export_task::CancelExportTaskError::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::cancel_export_task::CancelExportTaskError::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         -
        "ResourceNotFoundException" => crate::operation::cancel_export_task::CancelExportTaskError::ResourceNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::cancel_export_task::CancelExportTaskError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "ServiceUnavailableException" => crate::operation::cancel_export_task::CancelExportTaskError::ServiceUnavailableException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
   70         -
                output =
   71         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
   72         -
                        .map_err(crate::operation::cancel_export_task::CancelExportTaskError::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::cancel_export_task::CancelExportTaskError::generic(generic),
   82         -
    })
   83         -
}
   84         -
   85         -
#[allow(clippy::unnecessary_wraps)]
   86         -
pub fn de_cancel_export_task_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::cancel_export_task::CancelExportTaskOutput, crate::operation::cancel_export_task::CancelExportTaskError> {
   91         -
    Ok({
   92         -
        #[allow(unused_mut)]
   93         -
        let mut output = crate::operation::cancel_export_task::builders::CancelExportTaskOutputBuilder::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_cancel_export_task_input(
  100         -
    input: &crate::operation::cancel_export_task::CancelExportTaskInput,
  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_cancel_export_task_input::ser_cancel_export_task_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_cancel_export_task_input.rs

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