aws_db_esdk/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/
client.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.
4use aws_smithy_types::error::operation::BuildError;
5
6#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)]
7#[allow(missing_docs)]
8pub struct Client {
9    pub(crate) dafny_client: ::dafny_runtime::Object<dyn crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbEncryptionClient>
10}
11
12impl Client {
13    /// Creates a new client from the service [`Config`](crate::Config).
14    #[track_caller]
15    pub fn from_conf(
16        input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig,
17    ) -> Result<Self, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error>
18    {
19        crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbEncryptionConfig(&input)
20            .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err)?;
21        let inner =
22            crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::_default::DynamoDbEncryption(
23                &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_encryption_config::_dynamo_db_encryption_config::to_dafny(input),
24            );
25        if matches!(
26            inner.as_ref(),
27            crate::_Wrappers_Compile::Result::Failure { .. }
28        ) {
29            return Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny(inner.as_ref().error().clone()));
30        }
31        Ok(Self {
32            dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()),
33        })
34    }
35}
36
37mod create_dynamo_db_encryption_branch_key_id_supplier;
38
39mod get_encrypted_data_key_description;