AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_re_encrypt_input.rs

@@ -1,0 +54,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_re_encrypt_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::re_encrypt::ReEncryptInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.ciphertext_blob {
    7         -
        object.key("CiphertextBlob").string_unchecked(&::aws_smithy_types::base64::encode(var_1));
    8         -
    }
    9         -
    if let Some(var_2) = &input.source_encryption_context {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("SourceEncryptionContext").start_object();
   12         -
        for (key_4, value_5) in var_2 {
   13         -
            {
   14         -
                object_3.key(key_4.as_str()).string(value_5.as_str());
   15         -
            }
   16         -
        }
   17         -
        object_3.finish();
   18         -
    }
   19         -
    if let Some(var_6) = &input.source_key_id {
   20         -
        object.key("SourceKeyId").string(var_6.as_str());
   21         -
    }
   22         -
    if let Some(var_7) = &input.destination_key_id {
   23         -
        object.key("DestinationKeyId").string(var_7.as_str());
   24         -
    }
   25         -
    if let Some(var_8) = &input.destination_encryption_context {
   26         -
        #[allow(unused_mut)]
   27         -
        let mut object_9 = object.key("DestinationEncryptionContext").start_object();
   28         -
        for (key_10, value_11) in var_8 {
   29         -
            {
   30         -
                object_9.key(key_10.as_str()).string(value_11.as_str());
   31         -
            }
   32         -
        }
   33         -
        object_9.finish();
   34         -
    }
   35         -
    if let Some(var_12) = &input.source_encryption_algorithm {
   36         -
        object.key("SourceEncryptionAlgorithm").string(var_12.as_str());
   37         -
    }
   38         -
    if let Some(var_13) = &input.destination_encryption_algorithm {
   39         -
        object.key("DestinationEncryptionAlgorithm").string(var_13.as_str());
   40         -
    }
   41         -
    if let Some(var_14) = &input.grant_tokens {
   42         -
        let mut array_15 = object.key("GrantTokens").start_array();
   43         -
        for item_16 in var_14 {
   44         -
            {
   45         -
                array_15.value().string(item_16.as_str());
   46         -
            }
   47         -
        }
   48         -
        array_15.finish();
   49         -
    }
   50         -
    if let Some(var_17) = &input.dry_run {
   51         -
        object.key("DryRun").boolean(*var_17);
   52         -
    }
   53         -
    Ok(())
   54         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_recipient_info.rs

@@ -1,0 +15,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_recipient_info(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::RecipientInfo,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.key_encryption_algorithm {
    7         -
        object.key("KeyEncryptionAlgorithm").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.attestation_document {
   10         -
        object
   11         -
            .key("AttestationDocument")
   12         -
            .string_unchecked(&::aws_smithy_types::base64::encode(var_2));
   13         -
    }
   14         -
    Ok(())
   15         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_replicate_key.rs

@@ -1,0 +246,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_replicate_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::replicate_key::ReplicateKeyOutput, crate::operation::replicate_key::ReplicateKeyError> {
    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::replicate_key::ReplicateKeyError::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::replicate_key::ReplicateKeyError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AlreadyExistsException" => crate::operation::replicate_key::ReplicateKeyError::AlreadyExistsException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AlreadyExistsExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_already_exists_exception::de_already_exists_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::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         -
        "DisabledException" => crate::operation::replicate_key::ReplicateKeyError::DisabledException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::DisabledExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_disabled_exception::de_disabled_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::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         -
        "InvalidArnException" => crate::operation::replicate_key::ReplicateKeyError::InvalidArnException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::InvalidArnExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_invalid_arn_exception::de_invalid_arn_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::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         -
        "KMSInternalException" => crate::operation::replicate_key::ReplicateKeyError::KmsInternalException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::KmsInternalExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_kms_internal_exception::de_kms_internal_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "KMSInvalidStateException" => crate::operation::replicate_key::ReplicateKeyError::KmsInvalidStateException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        "LimitExceededException" => crate::operation::replicate_key::ReplicateKeyError::LimitExceededException({
   96         -
            #[allow(unused_mut)]
   97         -
            let mut tmp = {
   98         -
                #[allow(unused_mut)]
   99         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
  100         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
  101         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  102         -
                let output = output.meta(generic);
  103         -
                output.build()
  104         -
            };
  105         -
            if tmp.message.is_none() {
  106         -
                tmp.message = _error_message;
  107         -
            }
  108         -
            tmp
  109         -
        }),
  110         -
        "MalformedPolicyDocumentException" => crate::operation::replicate_key::ReplicateKeyError::MalformedPolicyDocumentException({
  111         -
            #[allow(unused_mut)]
  112         -
            let mut tmp = {
  113         -
                #[allow(unused_mut)]
  114         -
                let mut output = crate::types::error::builders::MalformedPolicyDocumentExceptionBuilder::default();
  115         -
                output = crate::protocol_serde::shape_malformed_policy_document_exception::de_malformed_policy_document_exception_json_err(
  116         -
                    _response_body,
  117         -
                    output,
  118         -
                )
  119         -
                .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  120         -
                let output = output.meta(generic);
  121         -
                output.build()
  122         -
            };
  123         -
            if tmp.message.is_none() {
  124         -
                tmp.message = _error_message;
  125         -
            }
  126         -
            tmp
  127         -
        }),
  128         -
        "NotFoundException" => crate::operation::replicate_key::ReplicateKeyError::NotFoundException({
  129         -
            #[allow(unused_mut)]
  130         -
            let mut tmp = {
  131         -
                #[allow(unused_mut)]
  132         -
                let mut output = crate::types::error::builders::NotFoundExceptionBuilder::default();
  133         -
                output = crate::protocol_serde::shape_not_found_exception::de_not_found_exception_json_err(_response_body, output)
  134         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  135         -
                let output = output.meta(generic);
  136         -
                output.build()
  137         -
            };
  138         -
            if tmp.message.is_none() {
  139         -
                tmp.message = _error_message;
  140         -
            }
  141         -
            tmp
  142         -
        }),
  143         -
        "TagException" => crate::operation::replicate_key::ReplicateKeyError::TagException({
  144         -
            #[allow(unused_mut)]
  145         -
            let mut tmp = {
  146         -
                #[allow(unused_mut)]
  147         -
                let mut output = crate::types::error::builders::TagExceptionBuilder::default();
  148         -
                output = crate::protocol_serde::shape_tag_exception::de_tag_exception_json_err(_response_body, output)
  149         -
                    .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  150         -
                let output = output.meta(generic);
  151         -
                output.build()
  152         -
            };
  153         -
            if tmp.message.is_none() {
  154         -
                tmp.message = _error_message;
  155         -
            }
  156         -
            tmp
  157         -
        }),
  158         -
        "UnsupportedOperationException" => crate::operation::replicate_key::ReplicateKeyError::UnsupportedOperationException({
  159         -
            #[allow(unused_mut)]
  160         -
            let mut tmp = {
  161         -
                #[allow(unused_mut)]
  162         -
                let mut output = crate::types::error::builders::UnsupportedOperationExceptionBuilder::default();
  163         -
                output =
  164         -
                    crate::protocol_serde::shape_unsupported_operation_exception::de_unsupported_operation_exception_json_err(_response_body, output)
  165         -
                        .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  166         -
                let output = output.meta(generic);
  167         -
                output.build()
  168         -
            };
  169         -
            if tmp.message.is_none() {
  170         -
                tmp.message = _error_message;
  171         -
            }
  172         -
            tmp
  173         -
        }),
  174         -
        _ => crate::operation::replicate_key::ReplicateKeyError::generic(generic),
  175         -
    })
  176         -
}
  177         -
  178         -
#[allow(clippy::unnecessary_wraps)]
  179         -
pub fn de_replicate_key_http_response(
  180         -
    _response_status: u16,
  181         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  182         -
    _response_body: &[u8],
  183         -
) -> std::result::Result<crate::operation::replicate_key::ReplicateKeyOutput, crate::operation::replicate_key::ReplicateKeyError> {
  184         -
    Ok({
  185         -
        #[allow(unused_mut)]
  186         -
        let mut output = crate::operation::replicate_key::builders::ReplicateKeyOutputBuilder::default();
  187         -
        output = crate::protocol_serde::shape_replicate_key::de_replicate_key(_response_body, output)
  188         -
            .map_err(crate::operation::replicate_key::ReplicateKeyError::unhandled)?;
  189         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  190         -
        output.build()
  191         -
    })
  192         -
}
  193         -
  194         -
pub fn ser_replicate_key_input(
  195         -
    input: &crate::operation::replicate_key::ReplicateKeyInput,
  196         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  197         -
    let mut out = String::new();
  198         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  199         -
    crate::protocol_serde::shape_replicate_key_input::ser_replicate_key_input_input(&mut object, input)?;
  200         -
    object.finish();
  201         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  202         -
}
  203         -
  204         -
pub(crate) fn de_replicate_key(
  205         -
    _value: &[u8],
  206         -
    mut builder: crate::operation::replicate_key::builders::ReplicateKeyOutputBuilder,
  207         -
) -> ::std::result::Result<
  208         -
    crate::operation::replicate_key::builders::ReplicateKeyOutputBuilder,
  209         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  210         -
> {
  211         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  212         -
    let tokens = &mut tokens_owned;
  213         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  214         -
    loop {
  215         -
        match tokens.next().transpose()? {
  216         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  217         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  218         -
                "ReplicaKeyMetadata" => {
  219         -
                    builder = builder.set_replica_key_metadata(crate::protocol_serde::shape_key_metadata::de_key_metadata(tokens, _value)?);
  220         -
                }
  221         -
                "ReplicaPolicy" => {
  222         -
                    builder = builder.set_replica_policy(
  223         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  224         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  225         -
                            .transpose()?,
  226         -
                    );
  227         -
                }
  228         -
                "ReplicaTags" => {
  229         -
                    builder = builder.set_replica_tags(crate::protocol_serde::shape_tag_list::de_tag_list(tokens, _value)?);
  230         -
                }
  231         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  232         -
            },
  233         -
            other => {
  234         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  235         -
                    "expected object key or end object, found: {other:?}"
  236         -
                )))
  237         -
            }
  238         -
        }
  239         -
    }
  240         -
    if tokens.next().is_some() {
  241         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  242         -
            "found more JSON tokens after completing parsing",
  243         -
        ));
  244         -
    }
  245         -
    Ok(builder)
  246         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_replicate_key_input.rs

@@ -1,0 +34,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_replicate_key_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::replicate_key::ReplicateKeyInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.key_id {
    7         -
        object.key("KeyId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.replica_region {
   10         -
        object.key("ReplicaRegion").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.policy {
   13         -
        object.key("Policy").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.bypass_policy_lockout_safety_check {
   16         -
        object.key("BypassPolicyLockoutSafetyCheck").boolean(*var_4);
   17         -
    }
   18         -
    if let Some(var_5) = &input.description {
   19         -
        object.key("Description").string(var_5.as_str());
   20         -
    }
   21         -
    if let Some(var_6) = &input.tags {
   22         -
        let mut array_7 = object.key("Tags").start_array();
   23         -
        for item_8 in var_6 {
   24         -
            {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut object_9 = array_7.value().start_object();
   27         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_9, item_8)?;
   28         -
                object_9.finish();
   29         -
            }
   30         -
        }
   31         -
        array_7.finish();
   32         -
    }
   33         -
    Ok(())
   34         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_retire_grant.rs

@@ -1,0 +167,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_retire_grant_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::retire_grant::RetireGrantOutput, crate::operation::retire_grant::RetireGrantError> {
    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::retire_grant::RetireGrantError::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::retire_grant::RetireGrantError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "DependencyTimeoutException" => crate::operation::retire_grant::RetireGrantError::DependencyTimeoutException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::DependencyTimeoutExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_dependency_timeout_exception::de_dependency_timeout_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::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         -
        "DryRunOperationException" => crate::operation::retire_grant::RetireGrantError::DryRunOperationException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::DryRunOperationExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_dry_run_operation_exception::de_dry_run_operation_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::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         -
        "InvalidArnException" => crate::operation::retire_grant::RetireGrantError::InvalidArnException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::InvalidArnExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_invalid_arn_exception::de_invalid_arn_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::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         -
        "InvalidGrantIdException" => crate::operation::retire_grant::RetireGrantError::InvalidGrantIdException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::InvalidGrantIdExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_invalid_grant_id_exception::de_invalid_grant_id_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "InvalidGrantTokenException" => crate::operation::retire_grant::RetireGrantError::InvalidGrantTokenException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::InvalidGrantTokenExceptionBuilder::default();
   85         -
                output =
   86         -
                    crate::protocol_serde::shape_invalid_grant_token_exception::de_invalid_grant_token_exception_json_err(_response_body, output)
   87         -
                        .map_err(crate::operation::retire_grant::RetireGrantError::unhandled)?;
   88         -
                let output = output.meta(generic);
   89         -
                output.build()
   90         -
            };
   91         -
            if tmp.message.is_none() {
   92         -
                tmp.message = _error_message;
   93         -
            }
   94         -
            tmp
   95         -
        }),
   96         -
        "KMSInternalException" => crate::operation::retire_grant::RetireGrantError::KmsInternalException({
   97         -
            #[allow(unused_mut)]
   98         -
            let mut tmp = {
   99         -
                #[allow(unused_mut)]
  100         -
                let mut output = crate::types::error::builders::KmsInternalExceptionBuilder::default();
  101         -
                output = crate::protocol_serde::shape_kms_internal_exception::de_kms_internal_exception_json_err(_response_body, output)
  102         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::unhandled)?;
  103         -
                let output = output.meta(generic);
  104         -
                output.build()
  105         -
            };
  106         -
            if tmp.message.is_none() {
  107         -
                tmp.message = _error_message;
  108         -
            }
  109         -
            tmp
  110         -
        }),
  111         -
        "KMSInvalidStateException" => crate::operation::retire_grant::RetireGrantError::KmsInvalidStateException({
  112         -
            #[allow(unused_mut)]
  113         -
            let mut tmp = {
  114         -
                #[allow(unused_mut)]
  115         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
  116         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
  117         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::unhandled)?;
  118         -
                let output = output.meta(generic);
  119         -
                output.build()
  120         -
            };
  121         -
            if tmp.message.is_none() {
  122         -
                tmp.message = _error_message;
  123         -
            }
  124         -
            tmp
  125         -
        }),
  126         -
        "NotFoundException" => crate::operation::retire_grant::RetireGrantError::NotFoundException({
  127         -
            #[allow(unused_mut)]
  128         -
            let mut tmp = {
  129         -
                #[allow(unused_mut)]
  130         -
                let mut output = crate::types::error::builders::NotFoundExceptionBuilder::default();
  131         -
                output = crate::protocol_serde::shape_not_found_exception::de_not_found_exception_json_err(_response_body, output)
  132         -
                    .map_err(crate::operation::retire_grant::RetireGrantError::unhandled)?;
  133         -
                let output = output.meta(generic);
  134         -
                output.build()
  135         -
            };
  136         -
            if tmp.message.is_none() {
  137         -
                tmp.message = _error_message;
  138         -
            }
  139         -
            tmp
  140         -
        }),
  141         -
        _ => crate::operation::retire_grant::RetireGrantError::generic(generic),
  142         -
    })
  143         -
}
  144         -
  145         -
#[allow(clippy::unnecessary_wraps)]
  146         -
pub fn de_retire_grant_http_response(
  147         -
    _response_status: u16,
  148         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  149         -
    _response_body: &[u8],
  150         -
) -> std::result::Result<crate::operation::retire_grant::RetireGrantOutput, crate::operation::retire_grant::RetireGrantError> {
  151         -
    Ok({
  152         -
        #[allow(unused_mut)]
  153         -
        let mut output = crate::operation::retire_grant::builders::RetireGrantOutputBuilder::default();
  154         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  155         -
        output.build()
  156         -
    })
  157         -
}
  158         -
  159         -
pub fn ser_retire_grant_input(
  160         -
    input: &crate::operation::retire_grant::RetireGrantInput,
  161         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  162         -
    let mut out = String::new();
  163         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  164         -
    crate::protocol_serde::shape_retire_grant_input::ser_retire_grant_input_input(&mut object, input)?;
  165         -
    object.finish();
  166         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  167         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_retire_grant_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_retire_grant_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::retire_grant::RetireGrantInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.grant_token {
    7         -
        object.key("GrantToken").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.key_id {
   10         -
        object.key("KeyId").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.grant_id {
   13         -
        object.key("GrantId").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.dry_run {
   16         -
        object.key("DryRun").boolean(*var_4);
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_revoke_grant.rs

@@ -1,0 +151,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_revoke_grant_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::revoke_grant::RevokeGrantOutput, crate::operation::revoke_grant::RevokeGrantError> {
    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::revoke_grant::RevokeGrantError::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::revoke_grant::RevokeGrantError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "DependencyTimeoutException" => crate::operation::revoke_grant::RevokeGrantError::DependencyTimeoutException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::DependencyTimeoutExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_dependency_timeout_exception::de_dependency_timeout_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::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         -
        "DryRunOperationException" => crate::operation::revoke_grant::RevokeGrantError::DryRunOperationException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::DryRunOperationExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_dry_run_operation_exception::de_dry_run_operation_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::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         -
        "InvalidArnException" => crate::operation::revoke_grant::RevokeGrantError::InvalidArnException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::InvalidArnExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_invalid_arn_exception::de_invalid_arn_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::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         -
        "InvalidGrantIdException" => crate::operation::revoke_grant::RevokeGrantError::InvalidGrantIdException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::InvalidGrantIdExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_invalid_grant_id_exception::de_invalid_grant_id_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "KMSInternalException" => crate::operation::revoke_grant::RevokeGrantError::KmsInternalException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::KmsInternalExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_kms_internal_exception::de_kms_internal_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        "KMSInvalidStateException" => crate::operation::revoke_grant::RevokeGrantError::KmsInvalidStateException({
   96         -
            #[allow(unused_mut)]
   97         -
            let mut tmp = {
   98         -
                #[allow(unused_mut)]
   99         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
  100         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
  101         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::unhandled)?;
  102         -
                let output = output.meta(generic);
  103         -
                output.build()
  104         -
            };
  105         -
            if tmp.message.is_none() {
  106         -
                tmp.message = _error_message;
  107         -
            }
  108         -
            tmp
  109         -
        }),
  110         -
        "NotFoundException" => crate::operation::revoke_grant::RevokeGrantError::NotFoundException({
  111         -
            #[allow(unused_mut)]
  112         -
            let mut tmp = {
  113         -
                #[allow(unused_mut)]
  114         -
                let mut output = crate::types::error::builders::NotFoundExceptionBuilder::default();
  115         -
                output = crate::protocol_serde::shape_not_found_exception::de_not_found_exception_json_err(_response_body, output)
  116         -
                    .map_err(crate::operation::revoke_grant::RevokeGrantError::unhandled)?;
  117         -
                let output = output.meta(generic);
  118         -
                output.build()
  119         -
            };
  120         -
            if tmp.message.is_none() {
  121         -
                tmp.message = _error_message;
  122         -
            }
  123         -
            tmp
  124         -
        }),
  125         -
        _ => crate::operation::revoke_grant::RevokeGrantError::generic(generic),
  126         -
    })
  127         -
}
  128         -
  129         -
#[allow(clippy::unnecessary_wraps)]
  130         -
pub fn de_revoke_grant_http_response(
  131         -
    _response_status: u16,
  132         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  133         -
    _response_body: &[u8],
  134         -
) -> std::result::Result<crate::operation::revoke_grant::RevokeGrantOutput, crate::operation::revoke_grant::RevokeGrantError> {
  135         -
    Ok({
  136         -
        #[allow(unused_mut)]
  137         -
        let mut output = crate::operation::revoke_grant::builders::RevokeGrantOutputBuilder::default();
  138         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  139         -
        output.build()
  140         -
    })
  141         -
}
  142         -
  143         -
pub fn ser_revoke_grant_input(
  144         -
    input: &crate::operation::revoke_grant::RevokeGrantInput,
  145         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  146         -
    let mut out = String::new();
  147         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  148         -
    crate::protocol_serde::shape_revoke_grant_input::ser_revoke_grant_input_input(&mut object, input)?;
  149         -
    object.finish();
  150         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  151         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_revoke_grant_input.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_revoke_grant_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::revoke_grant::RevokeGrantInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.key_id {
    7         -
        object.key("KeyId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.grant_id {
   10         -
        object.key("GrantId").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.dry_run {
   13         -
        object.key("DryRun").boolean(*var_3);
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_rotate_key_on_demand.rs

@@ -1,0 +228,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_rotate_key_on_demand_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput,
    9         -
    crate::operation::rotate_key_on_demand::RotateKeyOnDemandError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ConflictException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::ConflictException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "DependencyTimeoutException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::DependencyTimeoutException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::DependencyTimeoutExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_dependency_timeout_exception::de_dependency_timeout_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "DisabledException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::DisabledException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::DisabledExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_disabled_exception::de_disabled_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "InvalidArnException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::InvalidArnException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::InvalidArnExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_invalid_arn_exception::de_invalid_arn_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                output.build()
   77         -
            };
   78         -
            if tmp.message.is_none() {
   79         -
                tmp.message = _error_message;
   80         -
            }
   81         -
            tmp
   82         -
        }),
   83         -
        "KMSInternalException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInternalException({
   84         -
            #[allow(unused_mut)]
   85         -
            let mut tmp = {
   86         -
                #[allow(unused_mut)]
   87         -
                let mut output = crate::types::error::builders::KmsInternalExceptionBuilder::default();
   88         -
                output = crate::protocol_serde::shape_kms_internal_exception::de_kms_internal_exception_json_err(_response_body, output)
   89         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
   90         -
                let output = output.meta(generic);
   91         -
                output.build()
   92         -
            };
   93         -
            if tmp.message.is_none() {
   94         -
                tmp.message = _error_message;
   95         -
            }
   96         -
            tmp
   97         -
        }),
   98         -
        "KMSInvalidStateException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInvalidStateException({
   99         -
            #[allow(unused_mut)]
  100         -
            let mut tmp = {
  101         -
                #[allow(unused_mut)]
  102         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
  103         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
  104         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
  105         -
                let output = output.meta(generic);
  106         -
                output.build()
  107         -
            };
  108         -
            if tmp.message.is_none() {
  109         -
                tmp.message = _error_message;
  110         -
            }
  111         -
            tmp
  112         -
        }),
  113         -
        "LimitExceededException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::LimitExceededException({
  114         -
            #[allow(unused_mut)]
  115         -
            let mut tmp = {
  116         -
                #[allow(unused_mut)]
  117         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
  118         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
  119         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
  120         -
                let output = output.meta(generic);
  121         -
                output.build()
  122         -
            };
  123         -
            if tmp.message.is_none() {
  124         -
                tmp.message = _error_message;
  125         -
            }
  126         -
            tmp
  127         -
        }),
  128         -
        "NotFoundException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::NotFoundException({
  129         -
            #[allow(unused_mut)]
  130         -
            let mut tmp = {
  131         -
                #[allow(unused_mut)]
  132         -
                let mut output = crate::types::error::builders::NotFoundExceptionBuilder::default();
  133         -
                output = crate::protocol_serde::shape_not_found_exception::de_not_found_exception_json_err(_response_body, output)
  134         -
                    .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
  135         -
                let output = output.meta(generic);
  136         -
                output.build()
  137         -
            };
  138         -
            if tmp.message.is_none() {
  139         -
                tmp.message = _error_message;
  140         -
            }
  141         -
            tmp
  142         -
        }),
  143         -
        "UnsupportedOperationException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::UnsupportedOperationException({
  144         -
            #[allow(unused_mut)]
  145         -
            let mut tmp = {
  146         -
                #[allow(unused_mut)]
  147         -
                let mut output = crate::types::error::builders::UnsupportedOperationExceptionBuilder::default();
  148         -
                output =
  149         -
                    crate::protocol_serde::shape_unsupported_operation_exception::de_unsupported_operation_exception_json_err(_response_body, output)
  150         -
                        .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
  151         -
                let output = output.meta(generic);
  152         -
                output.build()
  153         -
            };
  154         -
            if tmp.message.is_none() {
  155         -
                tmp.message = _error_message;
  156         -
            }
  157         -
            tmp
  158         -
        }),
  159         -
        _ => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::generic(generic),
  160         -
    })
  161         -
}
  162         -
  163         -
#[allow(clippy::unnecessary_wraps)]
  164         -
pub fn de_rotate_key_on_demand_http_response(
  165         -
    _response_status: u16,
  166         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  167         -
    _response_body: &[u8],
  168         -
) -> std::result::Result<
  169         -
    crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput,
  170         -
    crate::operation::rotate_key_on_demand::RotateKeyOnDemandError,
  171         -
> {
  172         -
    Ok({
  173         -
        #[allow(unused_mut)]
  174         -
        let mut output = crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandOutputBuilder::default();
  175         -
        output = crate::protocol_serde::shape_rotate_key_on_demand::de_rotate_key_on_demand(_response_body, output)
  176         -
            .map_err(crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::unhandled)?;
  177         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  178         -
        output.build()
  179         -
    })
  180         -
}
  181         -
  182         -
pub fn ser_rotate_key_on_demand_input(
  183         -
    input: &crate::operation::rotate_key_on_demand::RotateKeyOnDemandInput,
  184         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  185         -
    let mut out = String::new();
  186         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  187         -
    crate::protocol_serde::shape_rotate_key_on_demand_input::ser_rotate_key_on_demand_input_input(&mut object, input)?;
  188         -
    object.finish();
  189         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  190         -
}
  191         -
  192         -
pub(crate) fn de_rotate_key_on_demand(
  193         -
    _value: &[u8],
  194         -
    mut builder: crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandOutputBuilder,
  195         -
) -> ::std::result::Result<
  196         -
    crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandOutputBuilder,
  197         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  198         -
> {
  199         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  200         -
    let tokens = &mut tokens_owned;
  201         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  202         -
    loop {
  203         -
        match tokens.next().transpose()? {
  204         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  205         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  206         -
                "KeyId" => {
  207         -
                    builder = builder.set_key_id(
  208         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  209         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  210         -
                            .transpose()?,
  211         -
                    );
  212         -
                }
  213         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  214         -
            },
  215         -
            other => {
  216         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  217         -
                    "expected object key or end object, found: {other:?}"
  218         -
                )))
  219         -
            }
  220         -
        }
  221         -
    }
  222         -
    if tokens.next().is_some() {
  223         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  224         -
            "found more JSON tokens after completing parsing",
  225         -
        ));
  226         -
    }
  227         -
    Ok(builder)
  228         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_rotate_key_on_demand_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_rotations_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_rotations_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::RotationsListEntry>>, ::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_rotations_list_entry::de_rotations_list_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/kms/src/protocol_serde/shape_rotations_list_entry.rs

@@ -1,0 +94,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_rotations_list_entry<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::RotationsListEntry>, ::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::RotationsListEntryBuilder::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         -
                        "KeyId" => {
   19         -
                            builder = builder.set_key_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         -
                        "KeyMaterialId" => {
   26         -
                            builder = builder.set_key_material_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         -
                        "KeyMaterialDescription" => {
   33         -
                            builder = builder.set_key_material_description(
   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         -
                        "ImportState" => {
   40         -
                            builder = builder.set_import_state(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ImportState::from(u.as_ref())))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "KeyMaterialState" => {
   47         -
                            builder = builder.set_key_material_state(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::KeyMaterialState::from(u.as_ref())))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "ExpirationModel" => {
   54         -
                            builder = builder.set_expiration_model(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   56         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ExpirationModelType::from(u.as_ref())))
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "ValidTo" => {
   61         -
                            builder = builder.set_valid_to(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   62         -
                                tokens.next(),
   63         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   64         -
                            )?);
   65         -
                        }
   66         -
                        "RotationDate" => {
   67         -
                            builder = builder.set_rotation_date(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   68         -
                                tokens.next(),
   69         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   70         -
                            )?);
   71         -
                        }
   72         -
                        "RotationType" => {
   73         -
                            builder = builder.set_rotation_type(
   74         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   75         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::RotationType::from(u.as_ref())))
   76         -
                                    .transpose()?,
   77         -
                            );
   78         -
                        }
   79         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   80         -
                    },
   81         -
                    other => {
   82         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   83         -
                            "expected object key or end object, found: {other:?}"
   84         -
                        )))
   85         -
                    }
   86         -
                }
   87         -
            }
   88         -
            Ok(Some(builder.build()))
   89         -
        }
   90         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   91         -
            "expected start object or null",
   92         -
        )),
   93         -
    }
   94         -
}