Skip to main content

aws_esdk/deps/aws_cryptography_materialProviders/operation/
create_cryptographic_materials_cache.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 `CreateCryptographicMaterialsCache`.
5#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
6#[non_exhaustive]
7pub struct CreateCryptographicMaterialsCache;
8impl CreateCryptographicMaterialsCache {
9    /// Creates a new `CreateCryptographicMaterialsCache`
10    pub fn new() -> Self {
11        Self
12    }
13
14    pub(crate) async fn send(
15        client: &crate::deps::aws_cryptography_materialProviders::client::Client,
16        input: crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput,
17    ) -> ::std::result::Result<
18        crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef,
19        crate::deps::aws_cryptography_materialProviders::types::error::Error,
20    >{
21        crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_for_AwsCryptographicMaterialProviders_CreateCryptographicMaterialsCache(&input)
22            .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?;
23        let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_input::to_dafny(input);
24        let inner_result = ::dafny_runtime::md!(client.dafny_client.clone())
25            .CreateCryptographicMaterialsCache(&inner_input);
26        if matches!(
27            inner_result.as_ref(),
28            crate::r#_Wrappers_Compile::Result::Success { .. }
29        ) {
30            Ok(
31                crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_cache::from_dafny(inner_result.value().clone())
32,
33            )
34        } else {
35            Err(
36                crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(
37                    inner_result.error().clone(),
38                ),
39            )
40        }
41    }
42}
43
44pub use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_output::CreateCryptographicMaterialsCacheOutput;
45
46pub use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_input::CreateCryptographicMaterialsCacheInput;
47
48pub(crate) mod _create_cryptographic_materials_cache_output;
49
50pub(crate) mod _create_cryptographic_materials_cache_input;
51
52/// Builders
53pub mod builders;