aws_esdk/deps/aws_cryptography_primitives/operation/
rsa_decrypt.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4/// Orchestration and serialization glue logic for `RsaDecrypt`.
5#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
6#[non_exhaustive]
7pub struct RsaDecrypt;
8impl RsaDecrypt {
9    /// Creates a new `RsaDecrypt`
10    pub fn new() -> Self {
11        Self
12    }
13
14    pub(crate) async fn send(
15        client: &crate::deps::aws_cryptography_primitives::client::Client,
16        input: crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput,
17    ) -> ::std::result::Result<
18        ::aws_smithy_types::Blob,
19        crate::deps::aws_cryptography_primitives::types::error::Error,
20    > {
21        crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_for_AwsCryptographicPrimitives_RSADecrypt(&input)
22            .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?;
23        let inner_input = crate::deps::aws_cryptography_primitives::conversions::rsa_decrypt::_rsa_decrypt_input::to_dafny(input);
24        let inner_result =
25            ::dafny_runtime::md!(client.dafny_client.clone()).RSADecrypt(&inner_input);
26        if matches!(
27            inner_result.as_ref(),
28            crate::r#_Wrappers_Compile::Result::Success { .. }
29        ) {
30            Ok(crate::standard_library_conversions::blob_from_dafny(
31                inner_result.value().clone(),
32            ))
33        } else {
34            Err(
35                crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(
36                    inner_result.error().clone(),
37                ),
38            )
39        }
40    }
41}
42
43pub use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_output::RsaDecryptOutput;
44
45pub use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_input::RsaDecryptInput;
46
47pub(crate) mod _rsa_decrypt_output;
48
49pub(crate) mod _rsa_decrypt_input;
50
51/// Builders
52pub mod builders;