diff --git a/DynamoDbEncryption/runtimes/rust/Cargo.toml b/DynamoDbEncryption/runtimes/rust/Cargo.toml index 976214473..9dcc9c7dc 100644 --- a/DynamoDbEncryption/runtimes/rust/Cargo.toml +++ b/DynamoDbEncryption/runtimes/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-db-esdk" -version = "0.1.1" +version = "0.2.0" edition = "2021" rust-version = "1.81.0" keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] diff --git a/DynamoDbEncryption/runtimes/rust/src/README.md b/DynamoDbEncryption/runtimes/rust/src/README.md deleted file mode 100644 index 9e2235750..000000000 --- a/DynamoDbEncryption/runtimes/rust/src/README.md +++ /dev/null @@ -1,51 +0,0 @@ -## Building the AWS Database Encryption SDK for DynamoDB - -To build, the AWS Database Encryption SDK for DynamoDB requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH. - -You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone. - -To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run: - -``` -cd DynamoDbEncryption -# Polymorph smithy to Rust -make polymorph_rust -# Transpile Dafny to Rust -make transpile_rust -# Build Project -cd runtimes/rust -cargo build -``` - -### (Optional) Set up the AWS Database Encryption SDK for DynamoDB to work with AWS KMS - -If you set up the AWS Database Encryption SDK for DynamoDB to use the AWS KMS Keyring, -the AWS Database Encryption SDK for DynamoDB will make calls to AWS KMS on your behalf, -using the appropriate AWS SDK. - -However, you must first set up AWS credentials for use with the AWS SDK. - -## Testing the AWS Database Encryption SDK for DynamoDB for Rust - -### Configure AWS credentials - -To run the test suite you must first set up AWS credentials for use with the AWS SDK. -This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK. - -### Run the tests - -Run the test suite with: - -``` -cd DynamoDbEncryption -make test_rust -``` - -Run tests on examples, to ensure they are up to date: - -``` -cd DynamoDbEncryption/runtimes/rust/ -cargo test --examples -``` - -Please note that tests require internet access and valid AWS credentials, since calls to KMS and DynamoDB are made as part of the workflow. diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml index beedebb42..9dcc9c7dc 100644 --- a/releases/rust/db_esdk/Cargo.toml +++ b/releases/rust/db_esdk/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "aws-db-esdk" -version = "0.1.1" +version = "0.2.0" edition = "2021" -rust-version = "1.80.0" +rust-version = "1.81.0" keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] license = "ISC AND (Apache-2.0 OR ISC)" description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB." @@ -16,18 +16,19 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -aws-config = "1.5.10" -aws-lc-rs = "1.11.1" -aws-lc-sys = "0.23.1" -aws-sdk-dynamodb = "1.54.0" -aws-sdk-kms = "1.50.0" +aws-config = "1.5.11" +aws-lc-rs = "1.12.0" +aws-lc-sys = "0.24.0" +aws-sdk-dynamodb = "1.56.0" +aws-sdk-kms = "1.52.0" aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } -aws-smithy-types = "1.2.9" -chrono = "0.4.38" +aws-smithy-types = "1.2.10" +chrono = "0.4.39" +cpu-time = "1.0.0" dafny-runtime = "0.1.1" dashmap = "6.1.0" pem = "3.0.4" -tokio = {version = "1.41.1", features = ["full"] } +tokio = {version = "1.42.0", features = ["full"] } uuid = { version = "1.11.0", features = ["v4"] } [[example]] diff --git a/releases/rust/db_esdk/README.md b/releases/rust/db_esdk/README.md index 3244a4cc9..1773293b2 100644 --- a/releases/rust/db_esdk/README.md +++ b/releases/rust/db_esdk/README.md @@ -1,64 +1,30 @@ # AWS Database Encryption SDK for DynamoDB -AWS Database Encryption SDK for DynamoDB +[![build status](https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/workflows/daily_ci.yml/badge.svg?branch=main)](https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/workflows/daily_ci.yml) +[![crates.io](https://img.shields.io/crates/v/aws-db-esdk.svg)](https://crates.io/crates/aws-db-esdk) +[![docs](https://docs.rs/aws-db-esdk/badge.svg)](https://docs.rs/aws-db-esdk) +[![rustc](https://img.shields.io/badge/rust-1.81%2B-orange.svg)](https://img.shields.io/badge/rust-1.81%2B-orange.svg) -## Using the AWS Database Encryption SDK for DynamoDB for Rust +This is the official [AWS Database Encryption SDK (DB-ESDK) for DynamoDB in Rust](https://crates.io/crates/aws-db-esdk). -The AWS Database Encryption SDK for DynamoDB is available on [Crates.io](https://www.crates.io/). +## [CHANGELOG](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/CHANGELOG.md) -## Building the AWS Database Encryption SDK for DynamoDB +## Overview -To build, the AWS Database Encryption SDK for DynamoDB requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH. +The AWS Database Encryption SDK (DB-ESDK) for DynamoDB is a client-side encryption +library that allows you to perform attribute-level encryption, enabling you to encrypt specific +attribute values within items before storing them in your DynamoDB table. All encryption and +decryption are performed within your application. This lets you protect sensitive data in-transit +and at-rest, as data cannot be exposed unless decrypted by your application. -You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone. +For more details about the design and architecture of the DB-ESDK for DynamoDB, +see the [AWS Database Encryption SDK Developer Guide](https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/). -To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run: +## Examples for AWS Database Encryption SDK in Rust -``` -cd DynamoDbEncryption -# Polymorph smithy to Rust -make polymorph_rust -# Transpile Dafny to Rust -make transpile_rust -# Build Project -cd runtimes/rust -cargo build -``` +Please look at the Examples on how to use the AWS Database Encryption SDK in Rust [here](https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/DynamoDbEncryption/runtimes/rust/examples). -### (Optional) Set up the AWS Database Encryption SDK for DynamoDB to work with AWS KMS - -If you set up the AWS Database Encryption SDK for DynamoDB to use the AWS KMS Keyring, -the AWS Database Encryption SDK for DynamoDB will make calls to AWS KMS on your behalf, -using the appropriate AWS SDK. - -However, you must first set up AWS credentials for use with the AWS SDK. - -## Testing the AWS Database Encryption SDK for DynamoDB for Rust - -### Configure AWS credentials - -To run the test suite you must first set up AWS credentials for use with the AWS SDK. -This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK. - -### Run the tests - -Run the test suite with: - -``` -cd AwsEncryptionSDK -make test_rust -``` - -Run tests on examples, to ensure they are up to date: - -``` -cd AwsEncryptionSDK/runtimes/rust/ -cargo test --examples -``` - -Please look at the Examples on how to use the Encryption SDK in Rust [here](examples). - -Please note that tests and test vectors require internet access and valid AWS credentials, since calls to KMS are made as part of the test workflow. +Please note that some examples MAY require internet access and valid AWS credentials, since calls to KMS are made. ## License diff --git a/releases/rust/db_esdk/examples/basic_get_put_example.rs b/releases/rust/db_esdk/examples/basic_get_put_example.rs index c3e68e6b5..ffbfeb916 100644 --- a/releases/rust/db_esdk/examples/basic_get_put_example.rs +++ b/releases/rust/db_esdk/examples/basic_get_put_example.rs @@ -5,12 +5,12 @@ use crate::test_utils; use aws_sdk_dynamodb::types::AttributeValue; use std::collections::HashMap; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; @@ -116,7 +116,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 5. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs b/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs index 0dbae3b73..eb315e761 100644 --- a/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs +++ b/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs @@ -3,11 +3,11 @@ use super::regional_role_client_supplier::RegionalRoleClientSupplier; use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::DiscoveryFilter; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -123,7 +123,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 5. Create a new AWS SDK DynamoDb client using the DynamoDb Config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); @@ -215,7 +215,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { .build()?; let only_replica_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)) + .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)?) .build(); let only_replica_ddb = aws_sdk_dynamodb::Client::from_conf(only_replica_dynamo_config); diff --git a/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs b/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs index f8ea8cc6a..353645640 100644 --- a/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs +++ b/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 use aws_config::Region; -use aws_db_esdk::aws_cryptography_materialProviders::operation::get_client::GetClientInput; -use aws_db_esdk::aws_cryptography_materialProviders::types::error::Error; -use aws_db_esdk::aws_cryptography_materialProviders::types::ClientSupplier; -use aws_db_esdk::deps::com_amazonaws_kms::client::Client as kms_client; +use aws_db_esdk::material_providers::operation::get_client::GetClientInput; +use aws_db_esdk::material_providers::types::error::Error; +use aws_db_esdk::material_providers::types::ClientSupplier; +use aws_db_esdk::com_amazonaws_kms::client::Client as kms_client; /* Example class demonstrating an implementation of a custom client supplier. @@ -44,7 +44,7 @@ impl ClientSupplier for RegionalRoleClientSupplier { .build(); let inner_client = aws_sdk_kms::Client::from_conf(kms_config); - Ok(aws_db_esdk::deps::com_amazonaws_kms::client::Client { + Ok(kms_client { inner: inner_client, }) } diff --git a/releases/rust/db_esdk/examples/create_keystore_key.rs b/releases/rust/db_esdk/examples/create_keystore_key.rs index cf4b20fdd..65bd03944 100644 --- a/releases/rust/db_esdk/examples/create_keystore_key.rs +++ b/releases/rust/db_esdk/examples/create_keystore_key.rs @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; /* The Hierarchical Keyring Example and Searchable Encryption Examples diff --git a/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs index 234a2df55..d0649cbb8 100644 --- a/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs +++ b/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion; +use aws_db_esdk::dynamodb::client as dbesdk_client; +use aws_db_esdk::dynamodb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; +use aws_db_esdk::dynamodb::types::GetEncryptedDataKeyDescriptionUnion; use aws_sdk_dynamodb::types::AttributeValue; use std::collections::HashMap; diff --git a/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs b/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs index 12928c29c..92e95a5ca 100644 --- a/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs +++ b/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs @@ -5,13 +5,13 @@ use crate::test_utils; use aws_sdk_dynamodb::types::AttributeValue; use std::collections::HashMap; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client as enc_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::item_encryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig; +use aws_db_esdk::item_encryptor::client as enc_client; +use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId; /* This example sets up a DynamoDb Item Encryptor and uses diff --git a/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs b/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs index dbd7958d9..9d8fbbb07 100644 --- a/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs +++ b/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs @@ -1,10 +1,10 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbKeyBranchKeyIdSupplier; +use aws_db_esdk::dynamodb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput; +use aws_db_esdk::dynamodb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput; +use aws_db_esdk::dynamodb::types::error::Error; +use aws_db_esdk::dynamodb::types::DynamoDbKeyBranchKeyIdSupplier; // Used in the 'HierarchicalKeyringExample'. // In that example, we have a table where we distinguish multiple tenants diff --git a/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs b/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs index 90f350f69..287a8c659 100644 --- a/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs @@ -3,15 +3,15 @@ use super::branch_key_id_supplier::ExampleBranchKeyIdSupplier; use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::dynamodb::client as dbesdk_client; +use aws_db_esdk::dynamodb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -181,7 +181,7 @@ pub async fn put_item_get_item( // 7. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs b/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs index 61468c27b..e65ffa829 100644 --- a/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -15,7 +15,7 @@ use std::fs::File; use std::io::Read; use std::io::Write; use std::path::Path; - + /* This example sets up DynamoDb Encryption for the AWS SDK client using the KMS RSA Keyring. This keyring uses a KMS RSA key pair to @@ -151,7 +151,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 6. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs b/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs index 3cbb12e9e..55f895562 100644 --- a/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::DiscoveryFilter; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -115,7 +115,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 5. Create a new AWS SDK DynamoDb client using the config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); @@ -182,7 +182,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { .build()?; let dynamo_config_for_decrypt = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs_for_decrypt)) + .interceptor(DbEsdkInterceptor::new(table_configs_for_decrypt)?) .build(); let ddb_for_decrypt = aws_sdk_dynamodb::Client::from_conf(dynamo_config_for_decrypt); diff --git a/releases/rust/db_esdk/examples/keyring/multi_keyring.rs b/releases/rust/db_esdk/examples/keyring/multi_keyring.rs index 9ad1d8180..2fcfe8cd7 100644 --- a/releases/rust/db_esdk/examples/keyring/multi_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/multi_keyring.rs @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::AesWrappingAlg; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -148,7 +148,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 7. Create a new AWS SDK DynamoDb client using the config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); @@ -217,7 +217,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { .build()?; let only_aes_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(only_aes_table_configs)) + .interceptor(DbEsdkInterceptor::new(only_aes_table_configs)?) .build(); let only_aes_ddb = aws_sdk_dynamodb::Client::from_conf(only_aes_dynamo_config); diff --git a/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs b/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs index 20bd6c5e6..115f3c16d 100644 --- a/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -136,7 +136,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 5. Create the DynamoDb Encryption Interceptor let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); @@ -218,7 +218,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { .build()?; let only_replica_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)) + .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)?) .build(); let only_replica_ddb = aws_sdk_dynamodb::Client::from_conf(only_replica_dynamo_config); @@ -266,7 +266,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { .build()?; let only_srk_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(only_srk_table_configs)) + .interceptor(DbEsdkInterceptor::new(only_srk_table_configs)?) .build(); let only_srk_ddb = aws_sdk_dynamodb::Client::from_conf(only_srk_dynamo_config); diff --git a/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs b/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs index ecf8d7d03..91775090e 100644 --- a/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::AesWrappingAlg; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -113,7 +113,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 5. Create a new AWS SDK DynamoDb client using the Config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs b/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs index 88f32ac60..4c6c6d331 100644 --- a/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs +++ b/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::PaddingScheme; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::material_providers::types::PaddingScheme; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -151,7 +151,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> { // 6. Create a new AWS SDK DynamoDb client using the config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/multi_get_put_example.rs b/releases/rust/db_esdk/examples/multi_get_put_example.rs index b5b5e11ca..02aab30fc 100644 --- a/releases/rust/db_esdk/examples/multi_get_put_example.rs +++ b/releases/rust/db_esdk/examples/multi_get_put_example.rs @@ -5,12 +5,12 @@ use crate::test_utils; use aws_sdk_dynamodb::types::AttributeValue; use std::collections::HashMap; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; @@ -116,7 +116,7 @@ pub async fn multi_put_get() -> Result<(), crate::BoxError> { // 5. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs index 55d0fd05d..d9b8cc47d 100644 --- a/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs +++ b/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs @@ -5,19 +5,19 @@ use crate::test_utils; use aws_sdk_dynamodb::types::AttributeValue; use std::collections::HashMap; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_materialProviders::client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::material_providers::client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::dynamodb::types::BeaconKeySource; +use aws_db_esdk::dynamodb::types::BeaconVersion; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::dynamodb::types::SearchConfig; +use aws_db_esdk::dynamodb::types::SingleKeyStore; +use aws_db_esdk::dynamodb::types::StandardBeacon; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; @@ -249,7 +249,7 @@ pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate: // 7. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs index a7d359dfc..45701af7b 100644 --- a/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs +++ b/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs @@ -2,22 +2,22 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::*; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::BeaconKeySource; +use aws_db_esdk::dynamodb::types::BeaconStyle; +use aws_db_esdk::dynamodb::types::BeaconVersion; +use aws_db_esdk::dynamodb::types::CompoundBeacon; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::dynamodb::types::EncryptedPart; +use aws_db_esdk::dynamodb::types::SearchConfig; +use aws_db_esdk::dynamodb::types::SingleKeyStore; +use aws_db_esdk::dynamodb::types::StandardBeacon; +use aws_db_esdk::dynamodb::types::*; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use aws_sdk_dynamodb::types::AttributeValue; @@ -268,7 +268,7 @@ pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate: // 10. Create a new AWS SDK DynamoDb client using the DynamoDb Config above let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(encryption_config)) + .interceptor(DbEsdkInterceptor::new(encryption_config)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs index 5d248c425..39adb19be 100644 --- a/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs @@ -1,23 +1,23 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::BeaconKeySource; +use aws_db_esdk::dynamodb::types::BeaconVersion; +use aws_db_esdk::dynamodb::types::CompoundBeacon; +use aws_db_esdk::dynamodb::types::Constructor; +use aws_db_esdk::dynamodb::types::ConstructorPart; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::dynamodb::types::EncryptedPart; +use aws_db_esdk::dynamodb::types::SearchConfig; +use aws_db_esdk::dynamodb::types::SignedPart; +use aws_db_esdk::dynamodb::types::SingleKeyStore; +use aws_db_esdk::dynamodb::types::StandardBeacon; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; use std::collections::HashMap; @@ -547,7 +547,7 @@ pub async fn setup_beacon_config( // 13. Create a new AWS SDK DynamoDb client using the config above let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(table_configs)) + .interceptor(DbEsdkInterceptor::new(table_configs)?) .build(); Ok(aws_sdk_dynamodb::Client::from_conf(dynamo_config)) diff --git a/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs index c78f14576..9246dcc4e 100644 --- a/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs +++ b/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs @@ -2,20 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::BeaconKeySource; +use aws_db_esdk::dynamodb::types::BeaconVersion; +use aws_db_esdk::dynamodb::types::CompoundBeacon; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::dynamodb::types::EncryptedPart; +use aws_db_esdk::dynamodb::types::SearchConfig; +use aws_db_esdk::dynamodb::types::SingleKeyStore; +use aws_db_esdk::dynamodb::types::StandardBeacon; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; use aws_db_esdk::client as transform_client; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; @@ -260,7 +260,7 @@ pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate: // 12. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(encryption_config)) + .interceptor(DbEsdkInterceptor::new(encryption_config)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs index 6de40463e..a324534ce 100644 --- a/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs +++ b/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs @@ -2,22 +2,22 @@ // SPDX-License-Identifier: Apache-2.0 use crate::test_utils; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform; -use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; -use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; -use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; -use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; -use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; -use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::dynamodb::types::BeaconKeySource; +use aws_db_esdk::dynamodb::types::BeaconVersion; +use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::dynamodb::types::GetPrefix; +use aws_db_esdk::dynamodb::types::SearchConfig; +use aws_db_esdk::dynamodb::types::SingleKeyStore; +use aws_db_esdk::dynamodb::types::StandardBeacon; +use aws_db_esdk::dynamodb::types::VirtualField; +use aws_db_esdk::dynamodb::types::VirtualPart; +use aws_db_esdk::dynamodb::types::VirtualTransform; +use aws_db_esdk::CryptoAction; +use aws_db_esdk::key_store::client as keystore_client; +use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::key_store::types::KmsConfiguration; +use aws_db_esdk::material_providers::client as mpl_client; +use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig; use aws_db_esdk::client as transform_client; use aws_db_esdk::intercept::DbEsdkInterceptor; use aws_db_esdk::DynamoDbTablesEncryptionConfig; @@ -350,7 +350,7 @@ pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate: // 13. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) - .interceptor(DbEsdkInterceptor::new(encryption_config)) + .interceptor(DbEsdkInterceptor::new(encryption_config)?) .build(); let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); diff --git a/releases/rust/db_esdk/src/aes_gcm.rs b/releases/rust/db_esdk/src/aes_gcm.rs index 21bf9230f..8867c539d 100644 --- a/releases/rust/db_esdk/src/aes_gcm.rs +++ b/releases/rust/db_esdk/src/aes_gcm.rs @@ -52,11 +52,13 @@ impl AES_GCM { )) } else if *self.keyLength() == 32i32 { Ok(&aws_lc_rs::aead::AES_256_GCM) + } else if *self.keyLength() == 24i32 { + Ok(&aws_lc_rs::aead::AES_192_GCM) } else if *self.keyLength() == 16i32 { Ok(&aws_lc_rs::aead::AES_128_GCM) } else { Err(format!( - "Key length of {} not supported in Rust. Key length must be 16 or 32.", + "Key length of {} not supported in Rust. Key length must be 16, 24 or 32.", self.keyLength() )) } diff --git a/releases/rust/db_esdk/src/client.rs b/releases/rust/db_esdk/src/client.rs index b32c05b27..ec261e0bd 100644 --- a/releases/rust/db_esdk/src/client.rs +++ b/releases/rust/db_esdk/src/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig, + input: crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig, ) -> Result { + crate::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbTablesEncryptionConfig(&input) + .map_err(crate::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::_default::DynamoDbEncryptionTransforms( - &crate::conversions::dynamo_db_tables_encryption_config::_dynamo_db_tables_encryption_config::to_dafny(conf), + &crate::conversions::dynamo_db_tables_encryption_config::_dynamo_db_tables_encryption_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/dafny_libraries.rs b/releases/rust/db_esdk/src/dafny_libraries.rs index a5e7f437f..4afd94ac5 100644 --- a/releases/rust/db_esdk/src/dafny_libraries.rs +++ b/releases/rust/db_esdk/src/dafny_libraries.rs @@ -4,6 +4,7 @@ #![deny(warnings, unconditional_panic)] #![deny(nonstandard_style)] #![deny(clippy::all)] +#![allow(dead_code)] #[allow(non_snake_case)] pub mod DafnyLibraries { @@ -83,7 +84,13 @@ pub mod DafnyLibraries { use std::io::Write; use std::path::Path; - pub fn INTERNAL_ReadBytesFromFile( + // Attempts to read all bytes from the file at {@code path}, and returns a tuple of the following values: + // isError : true iff an exception was thrown during path string conversion or when reading the file + // bytesRead : the sequence of bytes read from the file, or an empty sequence if {@code isError} is true + // errorMsg : the error message of the thrown exception if {@code isError} is true, or an empty equence otherwise + // We return these values individually because Result is not defined in the runtime but + // instead in library code. It is the responsibility of library code to construct an equivalent Result value. + pub(crate) fn INTERNAL_ReadBytesFromFile( file: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, ) -> ( bool, @@ -122,28 +129,62 @@ pub mod DafnyLibraries { } } + // Get the current dirctory for use in error messages fn curr_dir() -> String { let path = std::env::current_dir(); match path { Ok(path) => format!("{}", path.display()), - Err(_) => "unknown".to_string(), + Err(_) => "Error while getting the path of current directory".to_string(), } } - pub fn INTERNAL_WriteBytesToFile( + // Attempts to append bytes to the file at path, creating nonexistent parent + // See SendBytesToFile for details + pub(crate) fn INTERNAL_AppendBytesToFile( path: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, bytes: &::dafny_runtime::Sequence, ) -> ( bool, ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + ) { + SendBytesToFile(path, bytes, true) + } + + // Attempts to write bytes to the file at path, creating nonexistent parent + // See SendBytesToFile for details + pub(crate) fn INTERNAL_WriteBytesToFile( + path: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + bytes: &::dafny_runtime::Sequence, + ) -> ( + bool, + ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + ) { + SendBytesToFile(path, bytes, false) + } + + // Attempts to write bytes to the file at path, creating nonexistent parent + // directories as necessary, and returns a tuple of the following values: + // isError : true iff an exception was thrown during path string conversion or when writing to the file + // errorMsg : the error message of the thrown exception if {@code isError} is true, or an empty sequence otherwise + // We return these values individually because {@code Result} is not defined in the runtime but + // instead in library code. It is the responsibility of library code to construct an equivalent Result value. + // if append is false, the file is truncated, otherwise we append to the existing file. + fn SendBytesToFile( + path: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + bytes: &::dafny_runtime::Sequence, + append: bool, + ) -> ( + bool, + ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, ) { let file_name = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(path); let path = Path::new(&file_name); let maybe_file = std::fs::OpenOptions::new() + .append(append) .write(true) .create(true) - .truncate(true) + .truncate(!append) .open(path); let mut file = match maybe_file { Err(why) => { diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs index 785f5c48d..b90004f8a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, ) -> Result { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbEncryptionConfig(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::_default::DynamoDbEncryption( - &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_encryption_config::_dynamo_db_encryption_config::to_dafny(conf), + &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_encryption_config::_dynamo_db_encryption_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs index c08454165..386bf8508 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs @@ -18,12 +18,8 @@ impl CreateDynamoDbEncryptionBranchKeyIdSupplier { crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, > { - if input.ddb_key_branch_key_id_supplier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ddb_key_branch_key_id_supplier", - "ddb_key_branch_key_id_supplier was not specified but it is required when building CreateDynamoDbEncryptionBranchKeyIdSupplierInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput_for_DynamoDbEncryption_CreateDynamoDbEncryptionBranchKeyIdSupplier(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateDynamoDbEncryptionBranchKeyIdSupplier(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs index f5cab0429..fa9f7cd50 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs @@ -18,12 +18,8 @@ impl GetBranchKeyIdFromDdbKey { crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, > { - if input.ddb_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ddb_key", - "ddb_key was not specified but it is required when building GetBranchKeyIdFromDdbKeyInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput_for_DynamoDbKeyBranchKeyIdSupplier_GetBranchKeyIdFromDdbKey(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err)?; dynamo_db_key_branch_key_id_supplier.inner.borrow_mut().get_branch_key_id_from_ddb_key(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs index dbec11ba7..f0b8e0f64 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs @@ -18,12 +18,8 @@ impl GetEncryptedDataKeyDescription { crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, > { - if input.input.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "input", - "input was not specified but it is required when building GetEncryptedDataKeyDescriptionInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput_for_DynamoDbEncryption_GetEncryptedDataKeyDescription(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description::_get_encrypted_data_key_description_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetEncryptedDataKeyDescription(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs index 98a189074..d7e9a9eb6 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `DynamoDbEncryptionConfig` pub mod dynamo_db_encryption_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/validation.rs new file mode 100644 index 000000000..687321c05 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/validation.rs @@ -0,0 +1,515 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput_DddbKeyBranchKeyIdSupplier(&input.ddb_key_branch_key_id_supplier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput_for_DynamoDbEncryption_CreateDynamoDbEncryptionBranchKeyIdSupplier(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput_DddbKeyBranchKeyIdSupplier(&input.ddb_key_branch_key_id_supplier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierInput_DddbKeyBranchKeyIdSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ddb_key_branch_key_id_supplier", + "ddb_key_branch_key_id_supplier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbKeyBranchKeyIdSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierOutput_DbranchKeyIdSupplier(&input.branch_key_id_supplier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierOutput_for_DynamoDbEncryption_CreateDynamoDbEncryptionBranchKeyIdSupplier(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierOutput_DbranchKeyIdSupplier(&input.branch_key_id_supplier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HCreateDynamoDbEncryptionBranchKeyIdSupplierOutput_DbranchKeyIdSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_id_supplier", + "branch_key_id_supplier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HBranchKeyIdSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbEncryptionConfig(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HDynamoDbKeyBranchKeyIdSupplierReference(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DkeyProviderId(&input.key_provider_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DkeyProviderInfo(&input.key_provider_info)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DbranchKeyId(&input.branch_key_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DbranchKeyVersion(&input.branch_key_version)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DbranchKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DbranchKeyVersion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DkeyProviderId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_id", + "key_provider_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription_DkeyProviderInfo(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescriptionList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescriptionList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescriptionList_Dmember(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescription(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput_DddbKey(&input.ddb_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput_for_DynamoDbKeyBranchKeyIdSupplier_GetBranchKeyIdFromDdbKey(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput_DddbKey(&input.ddb_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyInput_DddbKey(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ddb_key", + "ddb_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyOutput_DbranchKeyId(&input.branch_key_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyOutput_for_DynamoDbKeyBranchKeyIdSupplier_GetBranchKeyIdFromDdbKey(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyOutput_DbranchKeyId(&input.branch_key_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetBranchKeyIdFromDdbKeyOutput_DbranchKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_id", + "branch_key_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput_Dinput(&input.input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput_for_DynamoDbEncryption_GetEncryptedDataKeyDescription(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput_Dinput(&input.input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionInput_Dinput(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "input", + "input is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionOutput_DEncryptedDataKeyDescriptionOutput(&input.encrypted_data_key_description_output)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionOutput_for_DynamoDbEncryption_GetEncryptedDataKeyDescription(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionOutput_DEncryptedDataKeyDescriptionOutput(&input.encrypted_data_key_description_output)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionOutput_DEncryptedDataKeyDescriptionOutput(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_key_description_output", + "encrypted_data_key_description_output is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HEncryptedDataKeyDescriptionList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header(ref inner) = &input { + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion_Dheader(inner)?; +} +if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item(ref inner) = &input { + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion_Ditem(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion_Dheader(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HGetEncryptedDataKeyDescriptionUnion_Ditem(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HBranchKeyIdSupplierReference(input: &crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let aws_sdk_dynamodb::types::AttributeValue::S(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::N(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DN(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::B(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DB(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Ss(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DSS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Ns(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Bs(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::M(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DM(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::L(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DL(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Null(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNULL(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Bool(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBOOL(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DB(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBOOL(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBS(input: &::std::vec::Vec<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DL(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HListAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DM(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DN(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNS(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNULL(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DS(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DSS(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue(input: &::std::vec::Vec<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue_Dmember(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HKey_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HKey_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HListAttributeValue(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HListAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HListAttributeValue_Dmember(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs index c8e95aaa0..f90957d1c 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, ) -> Result { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::_default::DynamoDbItemEncryptor( - &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::dynamo_db_item_encryptor_config::_dynamo_db_item_encryptor_config::to_dafny(conf), + &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::dynamo_db_item_encryptor_config::_dynamo_db_item_encryptor_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs index 61c9a2abd..0058025c8 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs @@ -18,12 +18,8 @@ impl DecryptItem { crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, > { - if input.encrypted_item.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_item", - "encrypted_item was not specified but it is required when building DecryptItemInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput_for_DynamoDbItemEncryptor_DecryptItem(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::decrypt_item::_decrypt_item_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DecryptItem(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs index eab09549c..fac65546f 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs @@ -18,12 +18,8 @@ impl EncryptItem { crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, > { - if input.plaintext_item.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "plaintext_item", - "plaintext_item was not specified but it is required when building EncryptItemInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput_for_DynamoDbItemEncryptor_EncryptItem(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::encrypt_item::_encrypt_item_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).EncryptItem(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs index b5d3a3f31..df1c17aec 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `DynamoDbItemEncryptorConfig` pub mod dynamo_db_item_encryptor_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/validation.rs new file mode 100644 index 000000000..a62668c1c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/validation.rs @@ -0,0 +1,876 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions(input: &::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions_Dkey(inner_key)?; + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions_Dvalue(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyDynamoDbEncryptorReference(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptorRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_Dpolicy(&input.policy)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_Dencryptor(&input.encryptor)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_DattributeActionsOnEncrypt(&input.attribute_actions_on_encrypt)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_DdefaultAttributeFlag(&input.default_attribute_flag)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_DattributeActionsOnEncrypt(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "attribute_actions_on_encrypt", + "attribute_actions_on_encrypt is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_DdefaultAttributeFlag(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_Dencryptor(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryptor", + "encryptor is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyDynamoDbEncryptorReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride_Dpolicy(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "policy", + "policy is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput_DencryptedItem(&input.encrypted_item)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput_for_DynamoDbItemEncryptor_DecryptItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput_DencryptedItem(&input.encrypted_item)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemInput_DencryptedItem(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_item", + "encrypted_item is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DplaintextItem(&input.plaintext_item)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_for_DynamoDbItemEncryptor_DecryptItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DplaintextItem(&input.plaintext_item)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDecryptItemOutput_DplaintextItem(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_item", + "plaintext_item is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DlogicalTableName(&input.logical_table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DpartitionKeyName(&input.partition_key_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DsortKeyName(&input.sort_key_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DattributeActionsOnEncrypt(&input.attribute_actions_on_encrypt)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DallowedUnsignedAttributes(&input.allowed_unsigned_attributes)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DallowedUnsignedAttributePrefix(&input.allowed_unsigned_attribute_prefix)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_Dkeyring(&input.keyring)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DlegacyOverride(&input.legacy_override)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DplaintextOverride(&input.plaintext_override)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DallowedUnsignedAttributePrefix(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DallowedUnsignedAttributes(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(&input.len()) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "allowed_unsigned_attributes", + "allowed_unsigned_attributes failed to satisfy constraint: Member must have length greater than or equal to 1", + )); +} +validate_com_Pamazonaws_Pdynamodb_HAttributeNameList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DattributeActionsOnEncrypt(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "attribute_actions_on_encrypt", + "attribute_actions_on_encrypt is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_Dcmm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_Dkeyring(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DlegacyOverride(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HLegacyOverride(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DlogicalTableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "logical_table_name", + "logical_table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DpartitionKeyName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "partition_key_name", + "partition_key_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=255).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "partition_key_name", + "partition_key_name failed to satisfy constraint: Member must have length between 1 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DplaintextOverride(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HDynamoDbItemEncryptorConfig_DsortKeyName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=255).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "sort_key_name", + "sort_key_name failed to satisfy constraint: Member must have length between 1 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput_DplaintextItem(&input.plaintext_item)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput_for_DynamoDbItemEncryptor_EncryptItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput_DplaintextItem(&input.plaintext_item)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemInput_DplaintextItem(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_item", + "plaintext_item is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DencryptedItem(&input.encrypted_item)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_for_DynamoDbItemEncryptor_EncryptItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DencryptedItem(&input.encrypted_item)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DencryptedItem(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_item", + "encrypted_item is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HEncryptItemOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader(input: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DattributeActionsOnEncrypt(&input.attribute_actions_on_encrypt)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DstoredEncryptionContext(&input.stored_encryption_context)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DselectorContext(&input.selector_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite_id", + "algorithm_suite_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DattributeActionsOnEncrypt(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "attribute_actions_on_encrypt", + "attribute_actions_on_encrypt is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_HAttributeActions(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DencryptedDataKeys(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_keys", + "encrypted_data_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DselectorContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "selector_context", + "selector_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_com_Pamazonaws_Pdynamodb_HKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PdynamoDb_PitemEncryptor_HParsedHeader_DstoredEncryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "stored_encryption_context", + "stored_encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(&input.key_provider_id)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(&input.key_provider_info)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(&input.ciphertext)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ciphertext", + "ciphertext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_id", + "key_provider_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_info", + "key_provider_info is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input: &::std::collections::HashMap<::std::string::String, ::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(inner_key)?; + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeMap_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeNameList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HAttributeNameList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeNameList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "member", + "member failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let aws_sdk_dynamodb::types::AttributeValue::S(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::N(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DN(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::B(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DB(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Ss(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DSS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Ns(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Bs(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBS(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::M(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DM(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::L(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DL(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Null(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNULL(inner)?; +} +if let aws_sdk_dynamodb::types::AttributeValue::Bool(ref inner) = &input { + validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBOOL(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DB(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBOOL(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DBS(input: &::std::vec::Vec<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DL(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HListAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DM(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DN(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNS(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DNULL(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DS(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HAttributeValue_DSS(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue(input: &::std::vec::Vec<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HBinarySetAttributeValue_Dmember(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HKey_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HKey_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HKey_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HListAttributeValue(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HListAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HListAttributeValue_Dmember(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue(input: &::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dkey(inner_key)?; + validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(0..=65535).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key", + "key failed to satisfy constraint: Member must have length between 0 and 65535, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HMapAttributeValue_Dvalue(input: &aws_sdk_dynamodb::types::AttributeValue) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_com_Pamazonaws_Pdynamodb_HAttributeValue(input)?; + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HNumberSetAttributeValue_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_com_Pamazonaws_Pdynamodb_HStringSetAttributeValue_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs index 6d695e208..61506e2bd 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, ) -> Result { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredEncryptionConfig(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::_default::StructuredEncryption( - &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_encryption_config::_structured_encryption_config::to_dafny(conf), + &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_encryption_config::_structured_encryption_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs index 1dc513b7c..83437124d 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs @@ -18,24 +18,8 @@ impl DecryptPathStructure { crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, > { - if input.table_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "table_name", - "table_name was not specified but it is required when building DecryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.encrypted_structure.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_structure", - "encrypted_structure was not specified but it is required when building DecryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.cmm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cmm", - "cmm was not specified but it is required when building DecryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_for_StructuredEncryption_DecryptPathStructure(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_path_structure::_decrypt_path_structure_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DecryptPathStructure(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs index 2d678b218..32e24c6b9 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs @@ -18,30 +18,8 @@ impl DecryptStructure { crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, > { - if input.table_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "table_name", - "table_name was not specified but it is required when building DecryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.encrypted_structure.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_structure", - "encrypted_structure was not specified but it is required when building DecryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.authenticate_schema.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "authenticate_schema", - "authenticate_schema was not specified but it is required when building DecryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.cmm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cmm", - "cmm was not specified but it is required when building DecryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_for_StructuredEncryption_DecryptStructure(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_structure::_decrypt_structure_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DecryptStructure(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs index fb9e319c3..15fda1519 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs @@ -18,24 +18,8 @@ impl EncryptPathStructure { crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, > { - if input.table_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "table_name", - "table_name was not specified but it is required when building EncryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.plaintext_structure.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "plaintext_structure", - "plaintext_structure was not specified but it is required when building EncryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.cmm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cmm", - "cmm was not specified but it is required when building EncryptPathStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_for_StructuredEncryption_EncryptPathStructure(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_path_structure::_encrypt_path_structure_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).EncryptPathStructure(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs index 0fa70539d..8df27660d 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs @@ -18,30 +18,8 @@ impl EncryptStructure { crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, > { - if input.table_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "table_name", - "table_name was not specified but it is required when building EncryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.plaintext_structure.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "plaintext_structure", - "plaintext_structure was not specified but it is required when building EncryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.crypto_schema.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "crypto_schema", - "crypto_schema was not specified but it is required when building EncryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.cmm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cmm", - "cmm was not specified but it is required when building EncryptStructureInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_for_StructuredEncryption_EncryptStructure(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_structure::_encrypt_structure_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).EncryptStructure(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs index 1b6c893fd..2f703f80e 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs @@ -18,24 +18,8 @@ impl ResolveAuthActions { crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, > { - if input.table_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "table_name", - "table_name was not specified but it is required when building ResolveAuthActionsInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.auth_actions.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "auth_actions", - "auth_actions was not specified but it is required when building ResolveAuthActionsInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} -if input.header_bytes.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "header_bytes", - "header_bytes was not specified but it is required when building ResolveAuthActionsInput", - )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::validation::validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_for_StructuredEncryption_ResolveAuthActions(&input) + .map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::resolve_auth_actions::_resolve_auth_actions_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ResolveAuthActions(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs index 2e98d3072..57a4e8c05 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `StructuredEncryptionConfig` pub mod structured_encryption_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/validation.rs new file mode 100644 index 000000000..6adaa06ba --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/validation.rs @@ -0,0 +1,1186 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap(input: &::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap_Dkey(inner_key)?; + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap_Dvalue(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Dkey(&input.key)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Ddata(&input.data)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Daction(&input.action)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Daction(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "action", + "action is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Ddata(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "data", + "data is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem_Dkey(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPath(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthList_Dmember(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthItem(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Dkey(&input.key)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Ddata(&input.data)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Daction(&input.action)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Daction(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "action", + "action is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Ddata(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "data", + "data is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem_Dkey(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPath(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList_Dmember(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoItem(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap(input: &::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap_Dkey(inner_key)?; + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap_Dvalue(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_for_StructuredEncryption_DecryptPathStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_Dcmm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptedStructure(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureInput_DtableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_for_StructuredEncryption_DecryptPathStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "parsed_header", + "parsed_header is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptPathStructureOutput_DplaintextStructure(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DauthenticateSchema(&input.authenticate_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_for_StructuredEncryption_DecryptStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DauthenticateSchema(&input.authenticate_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DauthenticateSchema(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "authenticate_schema", + "authenticate_schema is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthenticateSchemaMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_Dcmm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptedStructure(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureInput_DtableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_for_StructuredEncryption_DecryptStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DcryptoSchema(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "crypto_schema", + "crypto_schema is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "parsed_header", + "parsed_header is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HDecryptStructureOutput_DplaintextStructure(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_for_StructuredEncryption_EncryptPathStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_Dcmm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DplaintextStructure(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureInput_DtableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_for_StructuredEncryption_EncryptPathStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DencryptedStructure(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptPathStructureOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "parsed_header", + "parsed_header is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_for_StructuredEncryption_EncryptStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DplaintextStructure(&input.plaintext_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_Dcmm(&input.cmm)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_Dcmm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DcryptoSchema(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "crypto_schema", + "crypto_schema is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DplaintextStructure(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureInput_DtableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_for_StructuredEncryption_EncryptStructure(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DencryptedStructure(&input.encrypted_structure)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DcryptoSchema(&input.crypto_schema)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DparsedHeader(&input.parsed_header)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DcryptoSchema(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "crypto_schema", + "crypto_schema is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoSchemaMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DencryptedStructure(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HEncryptStructureOutput_DparsedHeader(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "parsed_header", + "parsed_header is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DstoredEncryptionContext(&input.stored_encryption_context)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite_id", + "algorithm_suite_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DencryptedDataKeys(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_keys", + "encrypted_data_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HParsedHeader_DstoredEncryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "stored_encryption_context", + "stored_encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPath(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPath_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPath_Dmember(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPathSegment(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPathSegment(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member(ref inner) = &input { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPathSegment_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HPathSegment_Dmember(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructureSegment(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DauthActions(&input.auth_actions)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DheaderBytes(&input.header_bytes)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_for_StructuredEncryption_ResolveAuthActions(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DtableName(&input.table_name)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DauthActions(&input.auth_actions)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DheaderBytes(&input.header_bytes)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DauthActions(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "auth_actions", + "auth_actions is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HAuthList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DheaderBytes(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "header_bytes", + "header_bytes is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsInput_DtableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsOutput(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsOutput_DcryptoActions(&input.crypto_actions)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsOutput_for_StructuredEncryption_ResolveAuthActions(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsOutput_DcryptoActions(&input.crypto_actions)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HResolveAuthActionsOutput_DcryptoActions(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "crypto_actions", + "crypto_actions is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HCryptoList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap(input: &::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap_Dkey(inner_key)?; + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataMap_Dvalue(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal_Dvalue(&input.value)?; +validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal_DtypeId(&input.type_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal_DtypeId(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "type_id", + "type_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(2..=2).contains(&input.as_ref().len()) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "type_id", + "type_id failed to satisfy constraint: Member must have length between 2 and 2, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredDataTerminal_Dvalue(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "value", + "value is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructuredEncryptionConfig(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructureSegment(input: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructureSegment_Dkey(&input.key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PdbEncryptionSdk_PstructuredEncryption_HStructureSegment_Dkey(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(&input.key_provider_id)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(&input.key_provider_info)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(&input.ciphertext)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ciphertext", + "ciphertext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_id", + "key_provider_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_info", + "key_provider_info is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input: &::std::collections::HashMap<::std::string::String, ::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(inner_key)?; + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client.rs index 5dfefe95f..31fc09ea6 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig, + input: crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig, ) -> Result { + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::keystore::internaldafny::_default::KeyStore( - &crate::deps::aws_cryptography_keyStore::conversions::key_store_config::_key_store_config::to_dafny(conf), + &crate::deps::aws_cryptography_keyStore::conversions::key_store_config::_key_store_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs index 7534e597c..7fd1886b1 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs @@ -18,7 +18,8 @@ impl CreateKey { crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_for_KeyStore_CreateKey(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::create_key::_create_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs index 53149e557..876d7abd7 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs @@ -18,7 +18,8 @@ impl CreateKeyStore { crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreInput_for_KeyStore_CreateKeyStore(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::create_key_store::_create_key_store_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateKeyStore(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs index 6eef1ad6d..48327c275 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs @@ -18,12 +18,8 @@ impl GetActiveBranchKey { crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - if input.branch_key_identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "branch_key_identifier", - "branch_key_identifier was not specified but it is required when building GetActiveBranchKeyInput", - )).map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput_for_KeyStore_GetActiveBranchKey(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::get_active_branch_key::_get_active_branch_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetActiveBranchKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs index 9ff33667a..2ecfe1736 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs @@ -18,12 +18,8 @@ impl GetBeaconKey { crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - if input.branch_key_identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "branch_key_identifier", - "branch_key_identifier was not specified but it is required when building GetBeaconKeyInput", - )).map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput_for_KeyStore_GetBeaconKey(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::get_beacon_key::_get_beacon_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetBeaconKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs index 580394eb1..1d3aba8ac 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs @@ -18,18 +18,8 @@ impl GetBranchKeyVersion { crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - if input.branch_key_identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "branch_key_identifier", - "branch_key_identifier was not specified but it is required when building GetBranchKeyVersionInput", - )).map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err); -} -if input.branch_key_version.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "branch_key_version", - "branch_key_version was not specified but it is required when building GetBranchKeyVersionInput", - )).map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_for_KeyStore_GetBranchKeyVersion(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::get_branch_key_version::_get_branch_key_version_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetBranchKeyVersion(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs index 1dcb871ca..72abebb3a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs @@ -18,7 +18,8 @@ impl GetKeyStoreInfo { crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - + crate::deps::aws_cryptography_keyStore::validation::validate_smithy_Papi_HUnit_for_KeyStore_GetKeyStoreInfo(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = (); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetKeyStoreInfo(); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs index 3673ebd82..057f4fb87 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs @@ -18,12 +18,8 @@ impl VersionKey { crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput, crate::deps::aws_cryptography_keyStore::types::error::Error, > { - if input.branch_key_identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "branch_key_identifier", - "branch_key_identifier was not specified but it is required when building VersionKeyInput", - )).map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_keyStore::validation::validate_aws_Pcryptography_PkeyStore_HVersionKeyInput_for_KeyStore_VersionKey(&input) + .map_err(crate::deps::aws_cryptography_keyStore::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_keyStore::conversions::version_key::_version_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).VersionKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types.rs index dba654686..ec5a4cbf8 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `KeyStoreConfig` pub mod key_store_config; +pub use crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/validation.rs new file mode 100644 index 000000000..96a4c7230 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/validation.rs @@ -0,0 +1,861 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials(input: &crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKeyIdentifier(&input.beacon_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKey(&input.beacon_key)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DhmacKeys(&input.hmac_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "beacon_key_identifier", + "beacon_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DhmacKeys(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HHmacKeyMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials(input: &crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyVersion(&input.branch_key_version)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKey(&input.branch_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key", + "branch_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyVersion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_version", + "branch_key_version is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyInput(input: &crate::deps::aws_cryptography_keyStore::types::CreateKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_for_KeyStore_CreateKey(input: &crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyOutput(input: &crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyOutput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyOutput_for_KeyStore_CreateKey(input: &crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyOutput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyOutput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreInput(input: &crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreInput_for_KeyStore_CreateKeyStore(input: &crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreOutput(input: &crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreOutput_DtableArn(&input.table_arn)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreOutput_for_KeyStore_CreateKeyStore(input: &crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreOutput_DtableArn(&input.table_arn)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HCreateKeyStoreOutput_DtableArn(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_arn", + "table_arn is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=1024).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "table_arn", + "table_arn failed to satisfy constraint: Member must have length between 1 and 1024, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HDdbClientReference(input: &crate::deps::com_amazonaws_dynamodb::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HDiscovery(input: &crate::deps::aws_cryptography_keyStore::types::Discovery) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input: &::std::collections::HashMap<::std::string::String, ::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dkey(inner_key)?; + validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dvalue(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput(input: &crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput_for_KeyStore_GetActiveBranchKey(input: &crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyInput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyOutput(input: &crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyOutput_DbranchKeyMaterials(&input.branch_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyOutput_for_KeyStore_GetActiveBranchKey(input: &crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyOutput_DbranchKeyMaterials(&input.branch_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetActiveBranchKeyOutput_DbranchKeyMaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_materials", + "branch_key_materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput(input: &crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput_for_KeyStore_GetBeaconKey(input: &crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyInput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyOutput(input: &crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyOutput_DbeaconKeyMaterials(&input.beacon_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyOutput_for_KeyStore_GetBeaconKey(input: &crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyOutput_DbeaconKeyMaterials(&input.beacon_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBeaconKeyOutput_DbeaconKeyMaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "beacon_key_materials", + "beacon_key_materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput(input: &crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyVersion(&input.branch_key_version)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_for_KeyStore_GetBranchKeyVersion(input: &crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyVersion(&input.branch_key_version)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionInput_DbranchKeyVersion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_version", + "branch_key_version is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionOutput(input: &crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionOutput_DbranchKeyMaterials(&input.branch_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionOutput_for_KeyStore_GetBranchKeyVersion(input: &crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionOutput_DbranchKeyMaterials(&input.branch_key_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetBranchKeyVersionOutput_DbranchKeyMaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_materials", + "branch_key_materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput(input: &crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreId(&input.key_store_id)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreName(&input.key_store_name)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DlogicalKeyStoreName(&input.logical_key_store_name)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DgrantTokens(&input.grant_tokens)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkmsConfiguration(&input.kms_configuration)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_for_KeyStore_GetKeyStoreInfo(input: &crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreId(&input.key_store_id)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreName(&input.key_store_name)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DlogicalKeyStoreName(&input.logical_key_store_name)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DgrantTokens(&input.grant_tokens)?; +validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkmsConfiguration(&input.kms_configuration)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "grant_tokens", + "grant_tokens is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_store_id", + "key_store_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkeyStoreName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_store_name", + "key_store_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(3..=255).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key_store_name", + "key_store_name failed to satisfy constraint: Member must have length between 3 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DkmsConfiguration(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_configuration", + "kms_configuration is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HKMSConfiguration(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGetKeyStoreInfoOutput_DlogicalKeyStoreName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "logical_key_store_name", + "logical_key_store_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGrantTokenList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PkeyStore_HGrantTokenList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HGrantTokenList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap(input: &::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dkey(inner_key)?; + validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dvalue(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig(input: &crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DddbTableName(&input.ddb_table_name)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DkmsConfiguration(&input.kms_configuration)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DlogicalKeyStoreName(&input.logical_key_store_name)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_Did(&input.id)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DgrantTokens(&input.grant_tokens)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DddbClient(&input.ddb_client)?; +validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DkmsClient(&input.kms_client)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DddbClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HDdbClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DddbTableName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ddb_table_name", + "ddb_table_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(3..=255).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "ddb_table_name", + "ddb_table_name failed to satisfy constraint: Member must have length between 3 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_Did(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DkmsConfiguration(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_configuration", + "kms_configuration is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HKMSConfiguration(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKeyStoreConfig_DlogicalKeyStoreName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "logical_key_store_name", + "logical_key_store_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKmsClientReference(input: &crate::deps::com_amazonaws_kms::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKMSConfiguration(input: &crate::deps::aws_cryptography_keyStore::types::KmsConfiguration) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(ref inner) = &input { + validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DkmsKeyArn(inner)?; +} +if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(ref inner) = &input { + validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DkmsMRKeyArn(inner)?; +} +if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(ref inner) = &input { + validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_Ddiscovery(inner)?; +} +if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(ref inner) = &input { + validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DmrDiscovery(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_Ddiscovery(input: &crate::deps::aws_cryptography_keyStore::types::Discovery) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HDiscovery(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DkmsKeyArn(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(1..=2048).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "kms_key_arn", + "kms_key_arn failed to satisfy constraint: Member must have length between 1 and 2048, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DkmsMRKeyArn(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if !(1..=2048).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "kms_mr_key_arn", + "kms_mr_key_arn failed to satisfy constraint: Member must have length between 1 and 2048, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HKMSConfiguration_DmrDiscovery(input: &crate::deps::aws_cryptography_keyStore::types::MrDiscovery) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HMRDiscovery(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HMRDiscovery(input: &crate::deps::aws_cryptography_keyStore::types::MrDiscovery) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HMRDiscovery_Dregion(&input.region)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HMRDiscovery_Dregion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "region", + "region is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=32).contains(&input.chars().map(::std::primitive::char::len_utf16).fold(0usize, ::std::ops::Add::add)) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "region", + "region failed to satisfy constraint: Member must have length between 1 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HVersionKeyInput(input: &crate::deps::aws_cryptography_keyStore::types::VersionKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HVersionKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HVersionKeyInput_for_KeyStore_VersionKey(input: &crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HVersionKeyInput_DbranchKeyIdentifier(&input.branch_key_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HVersionKeyInput_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HVersionKeyOutput(input: &crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HVersionKeyOutput_for_KeyStore_VersionKey(input: &crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_smithy_Papi_HUnit(input: &()) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_smithy_Papi_HUnit_for_KeyStore_GetKeyStoreInfo(input: &crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::Unit) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs index 4d1510900..7c44301a8 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig, + input: crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig, ) -> Result { + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HMaterialProvidersConfig(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::materialproviders::internaldafny::_default::MaterialProviders( - &crate::deps::aws_cryptography_materialProviders::conversions::material_providers_config::_material_providers_config::to_dafny(conf), + &crate::deps::aws_cryptography_materialProviders::conversions::material_providers_config::_material_providers_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs index 01e6e418b..5b070bd90 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs @@ -18,12 +18,8 @@ impl CreateAwsKmsDiscoveryKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.kms_client.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_client", - "kms_client was not specified but it is required when building CreateAwsKmsDiscoveryKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_discovery_keyring::_create_aws_kms_discovery_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsDiscoveryKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs index 0695a53f8..8dd313e81 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs @@ -18,12 +18,8 @@ impl CreateAwsKmsDiscoveryMultiKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.regions.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "regions", - "regions was not specified but it is required when building CreateAwsKmsDiscoveryMultiKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryMultiKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_discovery_multi_keyring::_create_aws_kms_discovery_multi_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsDiscoveryMultiKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs index aa9da5528..88c3d6990 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs @@ -18,24 +18,8 @@ impl CreateAwsKmsEcdhKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.key_agreement_scheme.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_agreement_scheme", - "key_agreement_scheme was not specified but it is required when building CreateAwsKmsEcdhKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.curve_spec.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "curve_spec", - "curve_spec was not specified but it is required when building CreateAwsKmsEcdhKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.kms_client.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_client", - "kms_client was not specified but it is required when building CreateAwsKmsEcdhKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsEcdhKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_ecdh_keyring::_create_aws_kms_ecdh_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsEcdhKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs index 1b73da6c1..c1bb6595a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs @@ -18,24 +18,8 @@ impl CreateAwsKmsHierarchicalKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.key_store.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_store", - "key_store was not specified but it is required when building CreateAwsKmsHierarchicalKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.ttl_seconds.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ttl_seconds", - "ttl_seconds was not specified but it is required when building CreateAwsKmsHierarchicalKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.ttl_seconds, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "ttl_seconds", - "ttl_seconds failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsHierarchicalKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_hierarchical_keyring::_create_aws_kms_hierarchical_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsHierarchicalKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs index 9e558d210..1b8d86734 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs @@ -18,18 +18,8 @@ impl CreateAwsKmsKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.kms_key_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_key_id", - "kms_key_id was not specified but it is required when building CreateAwsKmsKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.kms_client.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_client", - "kms_client was not specified but it is required when building CreateAwsKmsKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_keyring::_create_aws_kms_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs index 8a85f4f85..1e90b2795 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs @@ -18,18 +18,8 @@ impl CreateAwsKmsMrkDiscoveryKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.kms_client.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_client", - "kms_client was not specified but it is required when building CreateAwsKmsMrkDiscoveryKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.region.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "region", - "region was not specified but it is required when building CreateAwsKmsMrkDiscoveryKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_mrk_discovery_keyring::_create_aws_kms_mrk_discovery_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsMrkDiscoveryKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs index 7d3f579ac..461e7fb17 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs @@ -18,12 +18,8 @@ impl CreateAwsKmsMrkDiscoveryMultiKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.regions.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "regions", - "regions was not specified but it is required when building CreateAwsKmsMrkDiscoveryMultiKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryMultiKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_mrk_discovery_multi_keyring::_create_aws_kms_mrk_discovery_multi_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsMrkDiscoveryMultiKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs index 4a760427b..d70d4df62 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs @@ -18,18 +18,8 @@ impl CreateAwsKmsMrkKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.kms_key_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_key_id", - "kms_key_id was not specified but it is required when building CreateAwsKmsMrkKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.kms_client.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_client", - "kms_client was not specified but it is required when building CreateAwsKmsMrkKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_mrk_keyring::_create_aws_kms_mrk_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsMrkKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs index 7fbb3d031..bd4aa9941 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs @@ -18,7 +18,8 @@ impl CreateAwsKmsMrkMultiKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkMultiKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_mrk_multi_keyring::_create_aws_kms_mrk_multi_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsMrkMultiKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs index 1c64df8da..d0f16e149 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs @@ -18,7 +18,8 @@ impl CreateAwsKmsMultiKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMultiKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_multi_keyring::_create_aws_kms_multi_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsMultiKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs index 5abb7251c..da350e9f7 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs @@ -18,18 +18,8 @@ impl CreateAwsKmsRsaKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.kms_key_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kms_key_id", - "kms_key_id was not specified but it is required when building CreateAwsKmsRsaKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_algorithm", - "encryption_algorithm was not specified but it is required when building CreateAwsKmsRsaKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsRsaKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_aws_kms_rsa_keyring::_create_aws_kms_rsa_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateAwsKmsRsaKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs index 55e35e487..eb2646e8e 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs @@ -18,12 +18,8 @@ impl CreateCryptographicMaterialsCache { crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.cache.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cache", - "cache was not specified but it is required when building CreateCryptographicMaterialsCacheInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_for_AwsCryptographicMaterialProviders_CreateCryptographicMaterialsCache(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateCryptographicMaterialsCache(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs index 2d81f7447..334d05b32 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs @@ -18,7 +18,8 @@ impl CreateDefaultClientSupplier { crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierInput_for_AwsCryptographicMaterialProviders_CreateDefaultClientSupplier(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_default_client_supplier::_create_default_client_supplier_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateDefaultClientSupplier(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs index 9f72087bc..e1533da52 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs @@ -18,12 +18,8 @@ impl CreateDefaultCryptographicMaterialsManager { crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.keyring.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "keyring", - "keyring was not specified but it is required when building CreateDefaultCryptographicMaterialsManagerInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput_for_AwsCryptographicMaterialProviders_CreateDefaultCryptographicMaterialsManager(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_default_cryptographic_materials_manager::_create_default_cryptographic_materials_manager_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateDefaultCryptographicMaterialsManager(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs index 31e7d2b8b..9da312aaf 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs @@ -18,12 +18,8 @@ impl CreateMultiKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.child_keyrings.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "child_keyrings", - "child_keyrings was not specified but it is required when building CreateMultiKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateMultiKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_multi_keyring::_create_multi_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateMultiKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs index 8a6a3efff..9d63e526a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs @@ -18,30 +18,8 @@ impl CreateRawAesKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.key_namespace.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_namespace", - "key_namespace was not specified but it is required when building CreateRawAesKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.key_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_name", - "key_name was not specified but it is required when building CreateRawAesKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.wrapping_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "wrapping_key", - "wrapping_key was not specified but it is required when building CreateRawAesKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.wrapping_alg.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "wrapping_alg", - "wrapping_alg was not specified but it is required when building CreateRawAesKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawAesKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_raw_aes_keyring::_create_raw_aes_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateRawAesKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs index 91b9f6bdd..d80ead84c 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs @@ -18,18 +18,8 @@ impl CreateRawEcdhKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.key_agreement_scheme.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_agreement_scheme", - "key_agreement_scheme was not specified but it is required when building CreateRawEcdhKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.curve_spec.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "curve_spec", - "curve_spec was not specified but it is required when building CreateRawEcdhKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawEcdhKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_raw_ecdh_keyring::_create_raw_ecdh_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateRawEcdhKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs index 4c8f617b8..f584a2071 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs @@ -18,24 +18,8 @@ impl CreateRawRsaKeyring { crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.key_namespace.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_namespace", - "key_namespace was not specified but it is required when building CreateRawRsaKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.key_name.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key_name", - "key_name was not specified but it is required when building CreateRawRsaKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.padding_scheme.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "padding_scheme", - "padding_scheme was not specified but it is required when building CreateRawRsaKeyringInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawRsaKeyring(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_raw_rsa_keyring::_create_raw_rsa_keyring_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateRawRsaKeyring(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs index 4aea3629f..d541c1c37 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs @@ -18,12 +18,8 @@ impl CreateRequiredEncryptionContextCmm { crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.required_encryption_context_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "required_encryption_context_keys", - "required_encryption_context_keys was not specified but it is required when building CreateRequiredEncryptionContextCmmInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_for_AwsCryptographicMaterialProviders_CreateRequiredEncryptionContextCMM(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::create_required_encryption_context_cmm::_create_required_encryption_context_cmm_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CreateRequiredEncryptionContextCMM(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs index 7f29f63a4..180c92175 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs @@ -18,30 +18,8 @@ impl DecryptMaterials { crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm_suite_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm_suite_id", - "algorithm_suite_id was not specified but it is required when building DecryptMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.commitment_policy.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "commitment_policy", - "commitment_policy was not specified but it is required when building DecryptMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encrypted_data_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_data_keys", - "encrypted_data_keys was not specified but it is required when building DecryptMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building DecryptMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_for_CryptographicMaterialsManager_DecryptMaterials(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_manager.inner.borrow_mut().decrypt_materials(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs index e940a8106..250fb887a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs @@ -18,24 +18,8 @@ impl DecryptionMaterialsWithPlaintextDataKey { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm_suite.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm_suite", - "algorithm_suite was not specified but it is required when building DecryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building DecryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.required_encryption_context_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "required_encryption_context_keys", - "required_encryption_context_keys was not specified but it is required when building DecryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_for_AwsCryptographicMaterialProviders_DecryptionMaterialsWithPlaintextDataKey(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials_with_plaintext_data_key::_decryption_materials_with_plaintext_data_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DecryptionMaterialsWithPlaintextDataKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs index 8ab002d54..d4712e577 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs @@ -18,12 +18,8 @@ impl DeleteCacheEntry { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "identifier", - "identifier was not specified but it is required when building DeleteCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput_for_CryptographicMaterialsCache_DeleteCacheEntry(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_cache.inner.borrow_mut().delete_cache_entry(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs index 7da02cb35..b96c67006 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs @@ -18,30 +18,8 @@ impl EncryptionMaterialsHasPlaintextDataKey { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm_suite.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm_suite", - "algorithm_suite was not specified but it is required when building EncryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building EncryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encrypted_data_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_data_keys", - "encrypted_data_keys was not specified but it is required when building EncryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.required_encryption_context_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "required_encryption_context_keys", - "required_encryption_context_keys was not specified but it is required when building EncryptionMaterials", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_for_AwsCryptographicMaterialProviders_EncryptionMaterialsHasPlaintextDataKey(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials_has_plaintext_data_key::_encryption_materials_has_plaintext_data_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).EncryptionMaterialsHasPlaintextDataKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs index 0817eb446..8e0629d9b 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs @@ -18,12 +18,8 @@ impl GetAlgorithmSuiteInfo { crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.binary_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "binary_id", - "binary_id was not specified but it is required when building GetAlgorithmSuiteInfoInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput_for_AwsCryptographicMaterialProviders_GetAlgorithmSuiteInfo(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::standard_library_conversions::blob_to_dafny(&input.binary_id.unwrap()); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetAlgorithmSuiteInfo(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs index cda085422..d8c375c6d 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs @@ -18,12 +18,8 @@ impl GetBranchKeyId { crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building GetBranchKeyIdInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput_for_BranchKeyIdSupplier_GetBranchKeyId(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; branch_key_id_supplier.inner.borrow_mut().get_branch_key_id(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs index af2899554..b20b3b848 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs @@ -18,12 +18,8 @@ impl GetCacheEntry { crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "identifier", - "identifier was not specified but it is required when building GetCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_for_CryptographicMaterialsCache_GetCacheEntry(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_cache.inner.borrow_mut().get_cache_entry(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs index 6b552f7f4..507757c65 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs @@ -18,12 +18,8 @@ impl GetClient { crate::deps::com_amazonaws_kms::client::Client, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.region.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "region", - "region was not specified but it is required when building GetClientInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HGetClientInput_for_ClientSupplier_GetClient(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; client_supplier.inner.borrow_mut().get_client(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs index a437352a6..0bb78b48b 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs @@ -18,18 +18,8 @@ impl GetEncryptionMaterials { crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building GetEncryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.commitment_policy.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "commitment_policy", - "commitment_policy was not specified but it is required when building GetEncryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_for_CryptographicMaterialsManager_GetEncryptionMaterials(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_manager.inner.borrow_mut().get_encryption_materials(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs index ce56dad8a..da98d1283 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs @@ -18,24 +18,8 @@ impl InitializeDecryptionMaterials { crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm_suite_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm_suite_id", - "algorithm_suite_id was not specified but it is required when building InitializeDecryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building InitializeDecryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.required_encryption_context_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "required_encryption_context_keys", - "required_encryption_context_keys was not specified but it is required when building InitializeDecryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_for_AwsCryptographicMaterialProviders_InitializeDecryptionMaterials(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::initialize_decryption_materials::_initialize_decryption_materials_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).InitializeDecryptionMaterials(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs index bbccb29e6..705c857d7 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs @@ -18,24 +18,8 @@ impl InitializeEncryptionMaterials { crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm_suite_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm_suite_id", - "algorithm_suite_id was not specified but it is required when building InitializeEncryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encryption_context.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encryption_context", - "encryption_context was not specified but it is required when building InitializeEncryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.required_encryption_context_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "required_encryption_context_keys", - "required_encryption_context_keys was not specified but it is required when building InitializeEncryptionMaterialsInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_for_AwsCryptographicMaterialProviders_InitializeEncryptionMaterials(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::initialize_encryption_materials::_initialize_encryption_materials_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).InitializeEncryptionMaterials(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs index d6c9ef2a6..3b8aae79b 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs @@ -18,18 +18,8 @@ impl OnDecrypt { crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.materials.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "materials", - "materials was not specified but it is required when building OnDecryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encrypted_data_keys.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypted_data_keys", - "encrypted_data_keys was not specified but it is required when building OnDecryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_for_Keyring_OnDecrypt(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; keyring.inner.borrow_mut().on_decrypt(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs index b37df09c0..1fc3ca3d1 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs @@ -18,12 +18,8 @@ impl OnEncrypt { crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.materials.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "materials", - "materials was not specified but it is required when building OnEncryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_for_Keyring_OnEncrypt(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; keyring.inner.borrow_mut().on_encrypt(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs index c498f6ff9..5fd0c7884 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs @@ -18,54 +18,8 @@ impl PutCacheEntry { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "identifier", - "identifier was not specified but it is required when building PutCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.materials.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "materials", - "materials was not specified but it is required when building PutCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.creation_time.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "creation_time", - "creation_time was not specified but it is required when building PutCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.creation_time, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "creation_time", - "creation_time failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.expiry_time.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "expiry_time", - "expiry_time was not specified but it is required when building PutCacheEntryInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.expiry_time, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "expiry_time", - "expiry_time failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.messages_used, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "messages_used", - "messages_used failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.bytes_used, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "bytes_used", - "bytes_used failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_for_CryptographicMaterialsCache_PutCacheEntry(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_cache.inner.borrow_mut().put_cache_entry(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs index f68be1150..1c1d2a9d2 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs @@ -18,24 +18,8 @@ impl UpdateUsageMetadata { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.identifier.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "identifier", - "identifier was not specified but it is required when building UpdateUsageMetadataInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.bytes_used.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "bytes_used", - "bytes_used was not specified but it is required when building UpdateUsageMetadataInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if matches!(input.bytes_used, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "bytes_used", - "bytes_used failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_for_CryptographicMaterialsCache_UpdateUsageMetadata(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; cryptographic_materials_cache.inner.borrow_mut().update_usage_metadata(input) } } diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs index 2e5c12e0b..340afc10a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs @@ -18,60 +18,8 @@ impl ValidAlgorithmSuiteInfo { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.binary_id.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "binary_id", - "binary_id was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.message_version.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "message_version", - "message_version was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.encrypt.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "encrypt", - "encrypt was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.kdf.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "kdf", - "kdf was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.commitment.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "commitment", - "commitment was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.signature.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signature", - "signature was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.symmetric_signature.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "symmetric_signature", - "symmetric_signature was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.edk_wrapping.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "edk_wrapping", - "edk_wrapping was not specified but it is required when building AlgorithmSuiteInfo", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_for_AwsCryptographicMaterialProviders_ValidAlgorithmSuiteInfo(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::valid_algorithm_suite_info::_valid_algorithm_suite_info_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidAlgorithmSuiteInfo(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs index da9636ef9..8e538e1c5 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs @@ -18,18 +18,8 @@ impl ValidDecryptionMaterialsTransition { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.start.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "start", - "start was not specified but it is required when building ValidDecryptionMaterialsTransitionInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.stop.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "stop", - "stop was not specified but it is required when building ValidDecryptionMaterialsTransitionInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_for_AwsCryptographicMaterialProviders_ValidDecryptionMaterialsTransition(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::valid_decryption_materials_transition::_valid_decryption_materials_transition_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidDecryptionMaterialsTransition(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs index f78743cd2..ef480966a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs @@ -18,18 +18,8 @@ impl ValidEncryptionMaterialsTransition { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.start.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "start", - "start was not specified but it is required when building ValidEncryptionMaterialsTransitionInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.stop.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "stop", - "stop was not specified but it is required when building ValidEncryptionMaterialsTransitionInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_for_AwsCryptographicMaterialProviders_ValidEncryptionMaterialsTransition(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::valid_encryption_materials_transition::_valid_encryption_materials_transition_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidEncryptionMaterialsTransition(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs index 581c27351..e1214fc9f 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs @@ -18,18 +18,8 @@ impl ValidateCommitmentPolicyOnDecrypt { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm", - "algorithm was not specified but it is required when building ValidateCommitmentPolicyOnDecryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.commitment_policy.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "commitment_policy", - "commitment_policy was not specified but it is required when building ValidateCommitmentPolicyOnDecryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_for_AwsCryptographicMaterialProviders_ValidateCommitmentPolicyOnDecrypt(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::validate_commitment_policy_on_decrypt::_validate_commitment_policy_on_decrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidateCommitmentPolicyOnDecrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs index 8ec0fe938..f96d93c81 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs @@ -18,18 +18,8 @@ impl ValidateCommitmentPolicyOnEncrypt { (), crate::deps::aws_cryptography_materialProviders::types::error::Error, > { - if input.algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "algorithm", - "algorithm was not specified but it is required when building ValidateCommitmentPolicyOnEncryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} -if input.commitment_policy.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "commitment_policy", - "commitment_policy was not specified but it is required when building ValidateCommitmentPolicyOnEncryptInput", - )).map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_for_AwsCryptographicMaterialProviders_ValidateCommitmentPolicyOnEncrypt(&input) + .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::validate_commitment_policy_on_encrypt::_validate_commitment_policy_on_encrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidateCommitmentPolicyOnEncrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs index 7b1a18979..682c72231 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `MaterialProvidersConfig` pub mod material_providers_config; +pub use crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/validation.rs new file mode 100644 index 000000000..e9d12b768 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/validation.rs @@ -0,0 +1,4537 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials(input: &crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKeyIdentifier(&input.beacon_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKey(&input.beacon_key)?; +validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DhmacKeys(&input.hmac_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DbeaconKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "beacon_key_identifier", + "beacon_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials_DhmacKeys(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HHmacKeyMap(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials(input: &crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyIdentifier(&input.branch_key_identifier)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyVersion(&input.branch_key_version)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKey(&input.branch_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key", + "branch_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_identifier", + "branch_key_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DbranchKeyVersion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_version", + "branch_key_version is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext(input: &::std::collections::HashMap<::std::string::String, ::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dkey(inner_key)?; + validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HEncryptionContext_Dvalue(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap(input: &::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dkey(inner_key)?; + validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PkeyStore_HHmacKeyMap_Dvalue(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAccountIdList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HAccountIdList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAccountIdList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input: &crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId_DESDK(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId_DDBE(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId_DDBE(input: &crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId_DESDK(input: &crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo(input: &crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Did(&input.id)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DbinaryId(&input.binary_id)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DmessageVersion(&input.message_version)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dencrypt(&input.encrypt)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dkdf(&input.kdf)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dcommitment(&input.commitment)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dsignature(&input.signature)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DsymmetricSignature(&input.symmetric_signature)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DedkWrapping(&input.edk_wrapping)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_for_AwsCryptographicMaterialProviders_ValidAlgorithmSuiteInfo(input: &crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Did(&input.id)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DbinaryId(&input.binary_id)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DmessageVersion(&input.message_version)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dencrypt(&input.encrypt)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dkdf(&input.kdf)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dcommitment(&input.commitment)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dsignature(&input.signature)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DsymmetricSignature(&input.symmetric_signature)?; +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DedkWrapping(&input.edk_wrapping)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DbinaryId(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "binary_id", + "binary_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dcommitment(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "commitment", + "commitment is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DedkWrapping(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "edk_wrapping", + "edk_wrapping is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dencrypt(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypt", + "encrypt is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncrypt(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Did(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "id", + "id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dkdf(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kdf", + "kdf is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DmessageVersion(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "message_version", + "message_version is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_Dsignature(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature", + "signature is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo_DsymmetricSignature(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "symmetric_signature", + "symmetric_signature is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HBranchKeyIdSupplierReference(input: &crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType(input: &crate::deps::aws_cryptography_materialProviders::types::CacheType) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::Default(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DDefault(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CacheType::No(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DNo(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DSingleThreaded(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DMultiThreaded(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DStormTracking(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCacheType_DShared(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DDefault(input: &crate::deps::aws_cryptography_materialProviders::types::DefaultCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDefaultCache(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DMultiThreaded(input: &crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DNo(input: &crate::deps::aws_cryptography_materialProviders::types::NoCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HNoCache(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DShared(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsCacheReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DSingleThreaded(input: &crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCacheType_DStormTracking(input: &crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy(input: &crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy_DESDK(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy_DDBE(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy_DDBE(input: &crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy_DESDK(input: &crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DdiscoveryFilter(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_client", + "kms_client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_Dregions(&input.regions)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_Dregions(&input.regions)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DclientSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DdiscoveryFilter(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsDiscoveryMultiKeyringInput_Dregions(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "regions", + "regions is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HRegionList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DKeyAgreementScheme(&input.key_agreement_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DcurveSpec(&input.curve_spec)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsEcdhKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DKeyAgreementScheme(&input.key_agreement_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DcurveSpec(&input.curve_spec)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DcurveSpec(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "curve_spec", + "curve_spec is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DKeyAgreementScheme(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_agreement_scheme", + "key_agreement_scheme is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsEcdhKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_client", + "kms_client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyId(&input.branch_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyIdSupplier(&input.branch_key_id_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DkeyStore(&input.key_store)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DttlSeconds(&input.ttl_seconds)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_Dcache(&input.cache)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DpartitionId(&input.partition_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsHierarchicalKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyId(&input.branch_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyIdSupplier(&input.branch_key_id_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DkeyStore(&input.key_store)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DttlSeconds(&input.ttl_seconds)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_Dcache(&input.cache)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DpartitionId(&input.partition_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DbranchKeyIdSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HBranchKeyIdSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_Dcache(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCacheType(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DkeyStore(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_store", + "key_store is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyStoreReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DpartitionId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsHierarchicalKeyringInput_DttlSeconds(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ttl_seconds", + "ttl_seconds is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "ttl_seconds", + "ttl_seconds failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_client", + "kms_client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsKeyringInput_DkmsKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_key_id", + "kms_key_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DgrantTokens(&input.grant_tokens)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_Dregion(&input.region)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DgrantTokens(&input.grant_tokens)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_Dregion(&input.region)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DdiscoveryFilter(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_client", + "kms_client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryKeyringInput_Dregion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "region", + "region is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_Dregions(&input.regions)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_Dregions(&input.regions)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DdiscoveryFilter(&input.discovery_filter)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DclientSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DdiscoveryFilter(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkDiscoveryMultiKeyringInput_Dregions(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "regions", + "regions is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HRegionList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_client", + "kms_client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkKeyringInput_DkmsKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_key_id", + "kms_key_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DkmsKeyIds(&input.kms_key_ids)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DkmsKeyIds(&input.kms_key_ids)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DclientSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_Dgenerator(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMrkMultiKeyringInput_DkmsKeyIds(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsKeyIdList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DkmsKeyIds(&input.kms_key_ids)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DkmsKeyIds(&input.kms_key_ids)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DclientSupplier(&input.client_supplier)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DclientSupplier(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_Dgenerator(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsMultiKeyringInput_DkmsKeyIds(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsKeyIdList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DencryptionAlgorithm(&input.encryption_algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_for_AwsCryptographicMaterialProviders_CreateAwsKmsRsaKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsKeyId(&input.kms_key_id)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DencryptionAlgorithm(&input.encryption_algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsClient(&input.kms_client)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DgrantTokens(&input.grant_tokens)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DencryptionAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_algorithm", + "encryption_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DgrantTokens(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsClient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DkmsKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "kms_key_id", + "kms_key_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateAwsKmsRsaKeyringInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_Dcache(&input.cache)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_for_AwsCryptographicMaterialProviders_CreateCryptographicMaterialsCache(input: &crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_Dcache(&input.cache)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheInput_Dcache(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cache", + "cache is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCacheType(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheOutput(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheOutput_DmaterialsCache(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheOutput_for_AwsCryptographicMaterialProviders_CreateCryptographicMaterialsCache(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheOutput_DmaterialsCache(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsCacheOutput_DmaterialsCache(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials_cache", + "materials_cache is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsCacheReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsManagerOutput(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsManagerOutput_DmaterialsManager(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsManagerOutput_for_AwsCryptographicMaterialProviders_CreateDefaultCryptographicMaterialsManager(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsManagerOutput_DmaterialsManager(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateCryptographicMaterialsManagerOutput_DmaterialsManager(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials_manager", + "materials_manager is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierInput_for_AwsCryptographicMaterialProviders_CreateDefaultClientSupplier(input: &crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierOutput(input: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierOutput_Dclient(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierOutput_for_AwsCryptographicMaterialProviders_CreateDefaultClientSupplier(input: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierOutput_Dclient(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultClientSupplierOutput_Dclient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "client", + "client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HClientSupplierReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput_Dkeyring(&input.keyring)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput_for_AwsCryptographicMaterialProviders_CreateDefaultCryptographicMaterialsManager(input: &crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput_Dkeyring(&input.keyring)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateDefaultCryptographicMaterialsManagerInput_Dkeyring(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "keyring", + "keyring is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsHierarchicalKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateRawAesKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateRawRsaKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateRawEcdhKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMrkDiscoveryMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsRsaKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsDiscoveryKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_for_AwsCryptographicMaterialProviders_CreateAwsKmsEcdhKeyring(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateKeyringOutput_Dkeyring(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "keyring", + "keyring is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_DchildKeyrings(&input.child_keyrings)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_for_AwsCryptographicMaterialProviders_CreateMultiKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_Dgenerator(&input.generator)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_DchildKeyrings(&input.child_keyrings)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_DchildKeyrings(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "child_keyrings", + "child_keyrings is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateMultiKeyringInput_Dgenerator(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyNamespace(&input.key_namespace)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyName(&input.key_name)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingKey(&input.wrapping_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingAlg(&input.wrapping_alg)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawAesKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyNamespace(&input.key_namespace)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyName(&input.key_name)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingKey(&input.wrapping_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingAlg(&input.wrapping_alg)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_name", + "key_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DkeyNamespace(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_namespace", + "key_namespace is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingAlg(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "wrapping_alg", + "wrapping_alg is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawAesKeyringInput_DwrappingKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "wrapping_key", + "wrapping_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DKeyAgreementScheme(&input.key_agreement_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DcurveSpec(&input.curve_spec)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawEcdhKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DKeyAgreementScheme(&input.key_agreement_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DcurveSpec(&input.curve_spec)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DcurveSpec(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "curve_spec", + "curve_spec is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawEcdhKeyringInput_DKeyAgreementScheme(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_agreement_scheme", + "key_agreement_scheme is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyNamespace(&input.key_namespace)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyName(&input.key_name)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpaddingScheme(&input.padding_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_for_AwsCryptographicMaterialProviders_CreateRawRsaKeyring(input: &crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyNamespace(&input.key_namespace)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyName(&input.key_name)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpaddingScheme(&input.padding_scheme)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyName(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_name", + "key_name is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DkeyNamespace(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_namespace", + "key_namespace is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpaddingScheme(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "padding_scheme", + "padding_scheme is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DprivateKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRawRsaKeyringInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput(input: &crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DunderlyingCMM(&input.underlying_cmm)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_Dkeyring(&input.keyring)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_for_AwsCryptographicMaterialProviders_CreateRequiredEncryptionContextCMM(input: &crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DunderlyingCMM(&input.underlying_cmm)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_Dkeyring(&input.keyring)?; +validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_Dkeyring(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "required_encryption_context_keys", + "required_encryption_context_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMInput_DunderlyingCMM(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMOutput(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMOutput_DmaterialsManager(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMOutput_for_AwsCryptographicMaterialProviders_CreateRequiredEncryptionContextCMM(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMOutput_DmaterialsManager(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCreateRequiredEncryptionContextCMMOutput_DmaterialsManager(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials_manager", + "materials_manager is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsCacheReference(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HCryptographicMaterialsManagerReference(input: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DalgorithmSuite(&input.algorithm_suite)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DplaintextDataKey(&input.plaintext_data_key)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DsymmetricSigningKey(&input.symmetric_signing_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_for_AwsCryptographicMaterialProviders_DecryptionMaterialsWithPlaintextDataKey(input: &crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DalgorithmSuite(&input.algorithm_suite)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DplaintextDataKey(&input.plaintext_data_key)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DsymmetricSigningKey(&input.symmetric_signing_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DalgorithmSuite(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite", + "algorithm_suite is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DplaintextDataKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "required_encryption_context_keys", + "required_encryption_context_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DsymmetricSigningKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials_DverificationKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput(input: &crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DcommitmentPolicy(&input.commitment_policy)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DreproducedEncryptionContext(&input.reproduced_encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_for_CryptographicMaterialsManager_DecryptMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DcommitmentPolicy(&input.commitment_policy)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DreproducedEncryptionContext(&input.reproduced_encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite_id", + "algorithm_suite_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DcommitmentPolicy(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "commitment_policy", + "commitment_policy is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptedDataKeys(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_keys", + "encrypted_data_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsInput_DreproducedEncryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsOutput(input: &crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsOutput_DdecryptionMaterials(&input.decryption_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsOutput_for_CryptographicMaterialsManager_DecryptMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsOutput_DdecryptionMaterials(&input.decryption_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDecryptMaterialsOutput_DdecryptionMaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "decryption_materials", + "decryption_materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDefaultCache(input: &crate::deps::aws_cryptography_materialProviders::types::DefaultCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDefaultCache_DentryCapacity(&input.entry_capacity)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDefaultCache_DentryCapacity(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "entry_capacity", + "entry_capacity is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_capacity", + "entry_capacity failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput(input: &crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput_Didentifier(&input.identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput_for_CryptographicMaterialsCache_DeleteCacheEntry(input: &crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput_Didentifier(&input.identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDeleteCacheEntryInput_Didentifier(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "identifier", + "identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm(input: &crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DHKDF(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DIDENTITY(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DNone(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DHKDF(input: &crate::deps::aws_cryptography_materialProviders::types::Hkdf) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HHKDF(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DIDENTITY(input: &crate::deps::aws_cryptography_materialProviders::types::Identity) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HIDENTITY(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm_DNone(input: &crate::deps::aws_cryptography_materialProviders::types::None) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HNone(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDIRECT__KEY__WRAPPING(input: &crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter(input: &crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter_DaccountIds(&input.account_ids)?; +validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter_Dpartition(&input.partition)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter_DaccountIds(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "account_ids", + "account_ids is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAccountIdList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HDiscoveryFilter_Dpartition(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "partition", + "partition is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HECDSA(input: &crate::deps::aws_cryptography_materialProviders::types::Ecdsa) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HECDSA_Dcurve(&input.curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HECDSA_Dcurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "curve", + "curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm(input: &crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm_DDIRECT__KEY__WRAPPING(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm_DIntermediateKeyWrapping(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm_DDIRECT__KEY__WRAPPING(input: &crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDIRECT__KEY__WRAPPING(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEdkWrappingAlgorithm_DIntermediateKeyWrapping(input: &crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncrypt(input: &crate::deps::aws_cryptography_materialProviders::types::Encrypt) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HEncrypt_DAES__GCM(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncrypt_DAES__GCM(input: &crate::deps::aws_cryptography_primitives::types::AesGcm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAES__GCM(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(&input.key_provider_id)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(&input.key_provider_info)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(&input.ciphertext)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_Dciphertext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ciphertext", + "ciphertext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_id", + "key_provider_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey_DkeyProviderInfo(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_provider_info", + "key_provider_info is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList_Dmember(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input: &::std::collections::HashMap<::std::string::String, ::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for (inner_key, inner_val) in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(inner_key)?; + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(inner_val)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dkey(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext_Dvalue(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DalgorithmSuite(&input.algorithm_suite)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DplaintextDataKey(&input.plaintext_data_key)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsymmetricSigningKeys(&input.symmetric_signing_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_for_AwsCryptographicMaterialProviders_EncryptionMaterialsHasPlaintextDataKey(input: &crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DalgorithmSuite(&input.algorithm_suite)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptedDataKeys(&input.encrypted_data_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DplaintextDataKey(&input.plaintext_data_key)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsymmetricSigningKeys(&input.symmetric_signing_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DalgorithmSuite(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite", + "algorithm_suite is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteInfo(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptedDataKeys(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_keys", + "encrypted_data_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DplaintextDataKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "required_encryption_context_keys", + "required_encryption_context_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsigningKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials_DsymmetricSigningKeys(input: &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HSymmetricSigningKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEphemeralPrivateKeyToStaticPublicKeyInput(input: &crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEphemeralPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(&input.recipient_public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HEphemeralPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "recipient_public_key", + "recipient_public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput_DbinaryId(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput_for_AwsCryptographicMaterialProviders_GetAlgorithmSuiteInfo(input: &crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfoInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput_DbinaryId(&input.binary_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetAlgorithmSuiteInfoInput_DbinaryId(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "binary_id", + "binary_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput(input: &crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput_for_BranchKeyIdSupplier_GetBranchKeyId(input: &crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput_DencryptionContext(&input.encryption_context)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdOutput(input: &crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdOutput_DbranchKeyId(&input.branch_key_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdOutput_for_BranchKeyIdSupplier_GetBranchKeyId(input: &crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdOutput_DbranchKeyId(&input.branch_key_id)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetBranchKeyIdOutput_DbranchKeyId(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "branch_key_id", + "branch_key_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput(input: &crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_for_CryptographicMaterialsCache_GetCacheEntry(input: &crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_DbytesUsed(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryInput_Didentifier(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "identifier", + "identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput(input: &crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DcreationTime(&input.creation_time)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DexpiryTime(&input.expiry_time)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DmessagesUsed(&input.messages_used)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_for_CryptographicMaterialsCache_GetCacheEntry(input: &crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DcreationTime(&input.creation_time)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DexpiryTime(&input.expiry_time)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DmessagesUsed(&input.messages_used)?; +validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DbytesUsed(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "bytes_used", + "bytes_used is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "bytes_used", + "bytes_used failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DcreationTime(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "creation_time", + "creation_time is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "creation_time", + "creation_time failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DexpiryTime(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expiry_time", + "expiry_time is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expiry_time", + "expiry_time failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetCacheEntryOutput_DmessagesUsed(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "messages_used", + "messages_used is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "messages_used", + "messages_used failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientInput(input: &crate::deps::aws_cryptography_materialProviders::types::GetClientInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetClientInput_Dregion(&input.region)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientInput_for_ClientSupplier_GetClient(input: &crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetClientInput_Dregion(&input.region)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientInput_Dregion(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "region", + "region is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientOutput(input: &crate::deps::com_amazonaws_kms::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetClientOutput_Dclient(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientOutput_for_ClientSupplier_GetClient(input: &crate::deps::com_amazonaws_kms::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetClientOutput_Dclient(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetClientOutput_Dclient(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "client", + "client is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput(input: &crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DcommitmentPolicy(&input.commitment_policy)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DmaxPlaintextLength(&input.max_plaintext_length)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_for_CryptographicMaterialsManager_GetEncryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DcommitmentPolicy(&input.commitment_policy)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DmaxPlaintextLength(&input.max_plaintext_length)?; +validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DcommitmentPolicy(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "commitment_policy", + "commitment_policy is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DmaxPlaintextLength(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsInput_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsOutput(input: &crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsOutput_DencryptionMaterials(&input.encryption_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsOutput_for_CryptographicMaterialsManager_GetEncryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsOutput_DencryptionMaterials(&input.encryption_materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGetEncryptionMaterialsOutput_DencryptionMaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_materials", + "encryption_materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HGrantTokenList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HHKDF(input: &crate::deps::aws_cryptography_materialProviders::types::Hkdf) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HHKDF_Dhmac(&input.hmac)?; +validate_aws_Pcryptography_PmaterialProviders_HHKDF_DsaltLength(&input.salt_length)?; +validate_aws_Pcryptography_PmaterialProviders_HHKDF_DinputKeyLength(&input.input_key_length)?; +validate_aws_Pcryptography_PmaterialProviders_HHKDF_DoutputKeyLength(&input.output_key_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HHKDF_Dhmac(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "hmac", + "hmac is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HHKDF_DinputKeyLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "input_key_length", + "input_key_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "input_key_length", + "input_key_length failed to satisfy constraint: Member must be between 1 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HHKDF_DoutputKeyLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "output_key_length", + "output_key_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "output_key_length", + "output_key_length failed to satisfy constraint: Member must be between 1 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HHKDF_DsaltLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "salt_length", + "salt_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "salt_length", + "salt_length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HIDENTITY(input: &crate::deps::aws_cryptography_materialProviders::types::Identity) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput(input: &crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_for_AwsCryptographicMaterialProviders_InitializeDecryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite_id", + "algorithm_suite_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeDecryptionMaterialsInput_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "required_encryption_context_keys", + "required_encryption_context_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput(input: &crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DverificationKey(&input.verification_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_for_AwsCryptographicMaterialProviders_InitializeEncryptionMaterials(input: &crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DalgorithmSuiteId(&input.algorithm_suite_id)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DencryptionContext(&input.encryption_context)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DrequiredEncryptionContextKeys(&input.required_encryption_context_keys)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DverificationKey(&input.verification_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DalgorithmSuiteId(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm_suite_id", + "algorithm_suite_id is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DencryptionContext(input: &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encryption_context", + "encryption_context is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContext(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DrequiredEncryptionContextKeys(input: &::std::option::Option<::std::vec::Vec<::std::string::String>>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "required_encryption_context_keys", + "required_encryption_context_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionContextKeys(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DsigningKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HInitializeEncryptionMaterialsInput_DverificationKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping(input: &crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DkeyEncryptionKeyKdf(&input.key_encryption_key_kdf)?; +validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DmacKeyKdf(&input.mac_key_kdf)?; +validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DpdkEncryptAlgorithm(&input.pdk_encrypt_algorithm)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DkeyEncryptionKeyKdf(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_encryption_key_kdf", + "key_encryption_key_kdf is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DmacKeyKdf(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "mac_key_kdf", + "mac_key_kdf is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDerivationAlgorithm(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HIntermediateKeyWrapping_DpdkEncryptAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "pdk_encrypt_algorithm", + "pdk_encrypt_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncrypt(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKeyringList(input: &::std::vec::Vec) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HKeyringList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKeyringList_Dmember(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKeyringReference(input: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKeyStoreReference(input: &crate::deps::aws_cryptography_keyStore::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsClientReference(input: &crate::deps::com_amazonaws_kms::client::Client) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations(input: &crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations_DKmsPublicKeyDiscovery(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations_DKmsPrivateKeyToStaticPublicKey(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations_DKmsPrivateKeyToStaticPublicKey(input: &crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsEcdhStaticConfigurations_DKmsPublicKeyDiscovery(input: &crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HKmsPublicKeyDiscoveryInput(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsKeyIdList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HKmsKeyIdList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsKeyIdList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput(input: &crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DsenderKmsIdentifier(&input.sender_kms_identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DsenderPublicKey(&input.sender_public_key)?; +validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(&input.recipient_public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "recipient_public_key", + "recipient_public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DsenderKmsIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "sender_kms_identifier", + "sender_kms_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPrivateKeyToStaticPublicKeyInput_DsenderPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPublicKeyDiscoveryInput(input: &crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HKmsPublicKeyDiscoveryInput_DrecipientKmsIdentifier(&input.recipient_kms_identifier)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HKmsPublicKeyDiscoveryInput_DrecipientKmsIdentifier(input: &::std::option::Option<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "recipient_kms_identifier", + "recipient_kms_identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterialProvidersConfig(input: &crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterials(input: &crate::deps::aws_cryptography_materialProviders::types::Materials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HMaterials_DEncryption(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HMaterials_DDecryption(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HMaterials_DBranchKey(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HMaterials_DBeaconKey(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterials_DBeaconKey(input: &crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBeaconKeyMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterials_DBranchKey(input: &crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PkeyStore_HBranchKeyMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterials_DDecryption(input: &crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMaterials_DEncryption(input: &crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache(input: &crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache_DentryCapacity(&input.entry_capacity)?; +validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache_DentryPruningTailSize(&input.entry_pruning_tail_size)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache_DentryCapacity(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "entry_capacity", + "entry_capacity is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_capacity", + "entry_capacity failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HMultiThreadedCache_DentryPruningTailSize(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_pruning_tail_size", + "entry_pruning_tail_size failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HNoCache(input: &crate::deps::aws_cryptography_materialProviders::types::NoCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HNone(input: &crate::deps::aws_cryptography_materialProviders::types::None) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput(input: &crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_DencryptedDataKeys(&input.encrypted_data_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_for_Keyring_OnDecrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_DencryptedDataKeys(&input.encrypted_data_keys)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_DencryptedDataKeys(input: &::std::option::Option<::std::vec::Vec>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_data_keys", + "encrypted_data_keys is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptedDataKeyList(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptOutput(input: &crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnDecryptOutput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptOutput_for_Keyring_OnDecrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnDecryptOutput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnDecryptOutput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput(input: &crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_for_Keyring_OnEncrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptOutput(input: &crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnEncryptOutput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptOutput_for_Keyring_OnEncrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HOnEncryptOutput_Dmaterials(&input.materials)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HOnEncryptOutput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPublicKeyDiscoveryInput(input: &crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HPublicKeyDiscoveryInput_DrecipientStaticPrivateKey(&input.recipient_static_private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPublicKeyDiscoveryInput_DrecipientStaticPrivateKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "recipient_static_private_key", + "recipient_static_private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput(input: &crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DcreationTime(&input.creation_time)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DexpiryTime(&input.expiry_time)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DmessagesUsed(&input.messages_used)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_for_CryptographicMaterialsCache_PutCacheEntry(input: &crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Dmaterials(&input.materials)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DcreationTime(&input.creation_time)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DexpiryTime(&input.expiry_time)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DmessagesUsed(&input.messages_used)?; +validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DbytesUsed(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "bytes_used", + "bytes_used failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DcreationTime(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "creation_time", + "creation_time is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "creation_time", + "creation_time failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DexpiryTime(input: &::std::option::Option<::std::primitive::i64>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expiry_time", + "expiry_time is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expiry_time", + "expiry_time failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Didentifier(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "identifier", + "identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_Dmaterials(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "materials", + "materials is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HPutCacheEntryInput_DmessagesUsed(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "messages_used", + "messages_used failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations(input: &crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DPublicKeyDiscovery(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DRawPrivateKeyToStaticPublicKey(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DEphemeralPrivateKeyToStaticPublicKey(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DEphemeralPrivateKeyToStaticPublicKey(input: &crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HEphemeralPrivateKeyToStaticPublicKeyInput(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DPublicKeyDiscovery(input: &crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HPublicKeyDiscoveryInput(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawEcdhStaticConfigurations_DRawPrivateKeyToStaticPublicKey(input: &crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput(input: &crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput_DsenderStaticPrivateKey(&input.sender_static_private_key)?; +validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(&input.recipient_public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput_DrecipientPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "recipient_public_key", + "recipient_public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRawPrivateKeyToStaticPublicKeyInput_DsenderStaticPrivateKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "sender_static_private_key", + "sender_static_private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRegionList(input: &::std::vec::Vec<::std::string::String>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HRegionList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HRegionList_Dmember(input: &::std::string::String) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm(input: &crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm_DECDSA(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm_DNone(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm_DECDSA(input: &crate::deps::aws_cryptography_materialProviders::types::Ecdsa) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HECDSA(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSignatureAlgorithm_DNone(input: &crate::deps::aws_cryptography_materialProviders::types::None) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HNone(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache(input: &crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache_DentryCapacity(&input.entry_capacity)?; +validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache_DentryPruningTailSize(&input.entry_pruning_tail_size)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache_DentryCapacity(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "entry_capacity", + "entry_capacity is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_capacity", + "entry_capacity failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSingleThreadedCache_DentryPruningTailSize(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_pruning_tail_size", + "entry_pruning_tail_size failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache(input: &crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DentryCapacity(&input.entry_capacity)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DentryPruningTailSize(&input.entry_pruning_tail_size)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DgracePeriod(&input.grace_period)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DgraceInterval(&input.grace_interval)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DfanOut(&input.fan_out)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DinFlightTTL(&input.in_flight_ttl)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DsleepMilli(&input.sleep_milli)?; +validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DtimeUnits(&input.time_units)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DentryCapacity(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "entry_capacity", + "entry_capacity is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_capacity", + "entry_capacity failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DentryPruningTailSize(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "entry_pruning_tail_size", + "entry_pruning_tail_size failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DfanOut(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "fan_out", + "fan_out is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "fan_out", + "fan_out failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DgraceInterval(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "grace_interval", + "grace_interval is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "grace_interval", + "grace_interval failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DgracePeriod(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "grace_period", + "grace_period is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "grace_period", + "grace_period failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DinFlightTTL(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "in_flight_ttl", + "in_flight_ttl is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "in_flight_ttl", + "in_flight_ttl failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DsleepMilli(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "sleep_milli", + "sleep_milli is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "sleep_milli", + "sleep_milli failed to satisfy constraint: Member must be greater than or equal to 1", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HStormTrackingCache_DtimeUnits(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm(input: &crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if let crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm_DHMAC(inner)?; +} +if let crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None(ref inner) = &input { + validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm_DNone(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm_DHMAC(input: &crate::deps::aws_cryptography_primitives::types::DigestAlgorithm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSymmetricSignatureAlgorithm_DNone(input: &crate::deps::aws_cryptography_materialProviders::types::None) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HNone(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSymmetricSigningKeyList(input: &::std::vec::Vec<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + for inner in input.iter() { + validate_aws_Pcryptography_PmaterialProviders_HSymmetricSigningKeyList_Dmember(inner)?; +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HSymmetricSigningKeyList_Dmember(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput(input: &crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_for_CryptographicMaterialsCache_UpdateUsageMetadata(input: &crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_Didentifier(&input.identifier)?; +validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_DbytesUsed(&input.bytes_used)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_DbytesUsed(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "bytes_used", + "bytes_used is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "bytes_used", + "bytes_used failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HUpdateUsageMetadataInput_Didentifier(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "identifier", + "identifier is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput(input: &crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_Dalgorithm(&input.algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_DcommitmentPolicy(&input.commitment_policy)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_for_AwsCryptographicMaterialProviders_ValidateCommitmentPolicyOnDecrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_Dalgorithm(&input.algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_DcommitmentPolicy(&input.commitment_policy)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_Dalgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm", + "algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnDecryptInput_DcommitmentPolicy(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "commitment_policy", + "commitment_policy is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput(input: &crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_Dalgorithm(&input.algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_DcommitmentPolicy(&input.commitment_policy)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_for_AwsCryptographicMaterialProviders_ValidateCommitmentPolicyOnEncrypt(input: &crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_Dalgorithm(&input.algorithm)?; +validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_DcommitmentPolicy(&input.commitment_policy)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_Dalgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "algorithm", + "algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HAlgorithmSuiteId(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidateCommitmentPolicyOnEncryptInput_DcommitmentPolicy(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "commitment_policy", + "commitment_policy is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HCommitmentPolicy(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput(input: &crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstart(&input.start)?; +validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstop(&input.stop)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_for_AwsCryptographicMaterialProviders_ValidDecryptionMaterialsTransition(input: &crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstart(&input.start)?; +validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstop(&input.stop)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstart(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "start", + "start is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidDecryptionMaterialsTransitionInput_Dstop(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "stop", + "stop is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HDecryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput(input: &crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstart(&input.start)?; +validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstop(&input.stop)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_for_AwsCryptographicMaterialProviders_ValidEncryptionMaterialsTransition(input: &crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstart(&input.start)?; +validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstop(&input.stop)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstart(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "start", + "start is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_PmaterialProviders_HValidEncryptionMaterialsTransitionInput_Dstop(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "stop", + "stop is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_PmaterialProviders_HEncryptionMaterials(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM(input: &crate::deps::aws_cryptography_primitives::types::AesGcm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(&input.key_length)?; +validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(&input.tag_length)?; +validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(&input.iv_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "iv_length", + "iv_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..=255).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "iv_length", + "iv_length failed to satisfy constraint: Member must be between 0 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_length", + "key_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key_length", + "key_length failed to satisfy constraint: Member must be between 1 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "tag_length", + "tag_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "tag_length", + "tag_length failed to satisfy constraint: Member must be between 0 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_smithy_Papi_HUnit(input: &()) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_smithy_Papi_HUnit_for_KeyStore_GetKeyStoreInfo(input: &crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::Unit) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives.rs index e118e5215..e3614bb67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives.rs @@ -8,4 +8,5 @@ pub mod error; /// All operations that this crate can perform. pub mod operation; pub mod conversions; +pub mod validation; pub mod deps; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client.rs index ef0e6631e..dd322ebb2 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client.rs @@ -13,11 +13,13 @@ impl Client { /// Creates a new client from the service [`Config`](crate::Config). #[track_caller] pub fn from_conf( - conf: crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig, + input: crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig, ) -> Result { + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HCryptoConfig(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner = crate::software::amazon::cryptography::primitives::internaldafny::_default::AtomicPrimitives( - &crate::deps::aws_cryptography_primitives::conversions::crypto_config::_crypto_config::to_dafny(conf), + &crate::deps::aws_cryptography_primitives::conversions::crypto_config::_crypto_config::to_dafny(input), ); if matches!( inner.as_ref(), diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs index 61bc4abb6..b37fce66f 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs @@ -18,42 +18,8 @@ impl AesDecrypt { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.enc_alg.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "enc_alg", - "enc_alg was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key", - "key was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.cipher_txt.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cipher_txt", - "cipher_txt was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.auth_tag.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "auth_tag", - "auth_tag was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.iv.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "iv", - "iv was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.aad.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "aad", - "aad was not specified but it is required when building AesDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_for_AwsCryptographicPrimitives_AESDecrypt(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::aes_decrypt::_aes_decrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).AESDecrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs index 116608779..a76195cfd 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs @@ -18,36 +18,8 @@ impl AesEncrypt { crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.enc_alg.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "enc_alg", - "enc_alg was not specified but it is required when building AesEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.iv.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "iv", - "iv was not specified but it is required when building AesEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key", - "key was not specified but it is required when building AesEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.msg.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "msg", - "msg was not specified but it is required when building AesEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.aad.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "aad", - "aad was not specified but it is required when building AesEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_for_AwsCryptographicPrimitives_AESEncrypt(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::aes_encrypt::_aes_encrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).AESEncrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs index 701ef36c4..ba6f253bc 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs @@ -18,24 +18,8 @@ impl AesKdfCounterMode { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.ikm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ikm", - "ikm was not specified but it is required when building AesKdfCtrInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.expected_length.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "expected_length", - "expected_length was not specified but it is required when building AesKdfCtrInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.expected_length, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "expected_length", - "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_for_AwsCryptographicPrimitives_AesKdfCounterMode(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::aes_kdf_counter_mode::_aes_kdf_counter_mode_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).AesKdfCounterMode(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs index c53de31cd..2eaee37db 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs @@ -18,18 +18,8 @@ impl CompressPublicKey { crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building CompressPublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building CompressPublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_for_AwsCryptographicPrimitives_CompressPublicKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::compress_public_key::_compress_public_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).CompressPublicKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs index 5250af0a1..aae37a25a 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs @@ -18,18 +18,8 @@ impl DecompressPublicKey { crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.compressed_public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "compressed_public_key", - "compressed_public_key was not specified but it is required when building DecompressPublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building DecompressPublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_for_AwsCryptographicPrimitives_DecompressPublicKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::decompress_public_key::_decompress_public_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DecompressPublicKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs index f28d5c639..cb1e883a3 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs @@ -18,24 +18,8 @@ impl DeriveSharedSecret { crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building DeriveSharedSecretInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.private_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "private_key", - "private_key was not specified but it is required when building DeriveSharedSecretInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building DeriveSharedSecretInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_for_AwsCryptographicPrimitives_DeriveSharedSecret(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::derive_shared_secret::_derive_shared_secret_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).DeriveSharedSecret(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs index 2c88644a6..a5ccc1de7 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs @@ -18,18 +18,8 @@ impl Digest { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building DigestInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.message.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "message", - "message was not specified but it is required when building DigestInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HDigestInput_for_AwsCryptographicPrimitives_Digest(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::digest::_digest_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).Digest(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs index 764285cd4..7b77b80b2 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs @@ -18,24 +18,8 @@ impl EcdsaSign { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.signature_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signature_algorithm", - "signature_algorithm was not specified but it is required when building EcdsaSignInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.signing_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signing_key", - "signing_key was not specified but it is required when building EcdsaSignInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.message.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "message", - "message was not specified but it is required when building EcdsaSignInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HECDSASignInput_for_AwsCryptographicPrimitives_ECDSASign(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::ecdsa_sign::_ecdsa_sign_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ECDSASign(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs index cb477c2bb..381a45a39 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs @@ -18,30 +18,8 @@ impl EcdsaVerify { ::std::primitive::bool, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.signature_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signature_algorithm", - "signature_algorithm was not specified but it is required when building EcdsaVerifyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.verification_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "verification_key", - "verification_key was not specified but it is required when building EcdsaVerifyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.message.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "message", - "message was not specified but it is required when building EcdsaVerifyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.signature.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signature", - "signature was not specified but it is required when building EcdsaVerifyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_for_AwsCryptographicPrimitives_ECDSAVerify(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::ecdsa_verify::_ecdsa_verify_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ECDSAVerify(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs index 60e52161d..ff66dcc75 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs @@ -18,12 +18,8 @@ impl GenerateEccKeyPair { crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building GenerateEccKeyPairInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_for_AwsCryptographicPrimitives_GenerateECCKeyPair(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::generate_ecc_key_pair::_generate_ecc_key_pair_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GenerateECCKeyPair(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs index 7d3cebb2d..ff551006b 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs @@ -18,12 +18,8 @@ impl GenerateEcdsaSignatureKey { crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.signature_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "signature_algorithm", - "signature_algorithm was not specified but it is required when building GenerateEcdsaSignatureKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_for_AwsCryptographicPrimitives_GenerateECDSASignatureKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GenerateECDSASignatureKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs index 056a246e0..cc5a61a67 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs @@ -18,18 +18,8 @@ impl GenerateRandomBytes { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.length.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "length", - "length was not specified but it is required when building GenerateRandomBytesInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.length, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "length", - "length failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_for_AwsCryptographicPrimitives_GenerateRandomBytes(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::generate_random_bytes::_generate_random_bytes_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GenerateRandomBytes(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs index a36347a7c..76002db09 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs @@ -18,18 +18,8 @@ impl GenerateRsaKeyPair { crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.length_bits.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "length_bits", - "length_bits was not specified but it is required when building GenerateRsaKeyPairInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.length_bits, Some(x) if !(81..=4096).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "length_bits", - "length_bits failed to satisfy constraint: Member must be between 81 and 4096, inclusive", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_for_AwsCryptographicPrimitives_GenerateRSAKeyPair(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::generate_rsa_key_pair::_generate_rsa_key_pair_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GenerateRSAKeyPair(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs index 43244b450..f568135af 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs @@ -18,18 +18,8 @@ impl GetPublicKeyFromPrivateKey { crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building GetPublicKeyFromPrivateKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.private_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "private_key", - "private_key was not specified but it is required when building GetPublicKeyFromPrivateKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_for_AwsCryptographicPrimitives_GetPublicKeyFromPrivateKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::get_public_key_from_private_key::_get_public_key_from_private_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetPublicKeyFromPrivateKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs index 5f6fad61e..ff9863d8c 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs @@ -18,12 +18,8 @@ impl GetRsaKeyModulusLength { crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building GetRsaKeyModulusLengthInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_for_AwsCryptographicPrimitives_GetRSAKeyModulusLength(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).GetRSAKeyModulusLength(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs index e7f02530d..4fba8fdae 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs @@ -18,24 +18,8 @@ impl HMac { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building HMacInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "key", - "key was not specified but it is required when building HMacInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.message.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "message", - "message was not specified but it is required when building HMacInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HHMacInput_for_AwsCryptographicPrimitives_HMac(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::h_mac::_h_mac_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).HMac(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs index e6239e24a..1a96a6419 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs @@ -18,36 +18,8 @@ impl Hkdf { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building HkdfInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.ikm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ikm", - "ikm was not specified but it is required when building HkdfInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.info.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "info", - "info was not specified but it is required when building HkdfInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.expected_length.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "expected_length", - "expected_length was not specified but it is required when building HkdfInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.expected_length, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "expected_length", - "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HHkdfInput_for_AwsCryptographicPrimitives_Hkdf(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::hkdf::_hkdf_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).Hkdf(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs index 20ca1bef9..89b84ab26 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs @@ -18,36 +18,8 @@ impl HkdfExpand { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building HkdfExpandInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.prk.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "prk", - "prk was not specified but it is required when building HkdfExpandInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.info.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "info", - "info was not specified but it is required when building HkdfExpandInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.expected_length.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "expected_length", - "expected_length was not specified but it is required when building HkdfExpandInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.expected_length, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "expected_length", - "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_for_AwsCryptographicPrimitives_HkdfExpand(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::hkdf_expand::_hkdf_expand_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).HkdfExpand(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs index 65b9a7d29..ec2a02d2e 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs @@ -18,18 +18,8 @@ impl HkdfExtract { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building HkdfExtractInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.ikm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ikm", - "ikm was not specified but it is required when building HkdfExtractInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_for_AwsCryptographicPrimitives_HkdfExtract(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::hkdf_extract::_hkdf_extract_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).HkdfExtract(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs index 467b3162e..d8da94989 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs @@ -18,30 +18,8 @@ impl KdfCounterMode { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.digest_algorithm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "digest_algorithm", - "digest_algorithm was not specified but it is required when building KdfCtrInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.ikm.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ikm", - "ikm was not specified but it is required when building KdfCtrInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.expected_length.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "expected_length", - "expected_length was not specified but it is required when building KdfCtrInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if matches!(input.expected_length, Some(x) if !(0..).contains(&x)) { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( - "expected_length", - "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_for_AwsCryptographicPrimitives_KdfCounterMode(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::kdf_counter_mode::_kdf_counter_mode_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).KdfCounterMode(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs index f22f60519..d47addd48 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs @@ -18,12 +18,8 @@ impl ParsePublicKey { crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building ParsePublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_for_AwsCryptographicPrimitives_ParsePublicKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::parse_public_key::_parse_public_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ParsePublicKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs index 2a3a2606c..36b745e79 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs @@ -18,24 +18,8 @@ impl RsaDecrypt { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.padding.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "padding", - "padding was not specified but it is required when building RsaDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.private_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "private_key", - "private_key was not specified but it is required when building RsaDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.cipher_text.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "cipher_text", - "cipher_text was not specified but it is required when building RsaDecryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_for_AwsCryptographicPrimitives_RSADecrypt(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::rsa_decrypt::_rsa_decrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).RSADecrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs index d9dafa601..fc489c74d 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs @@ -18,24 +18,8 @@ impl RsaEncrypt { ::aws_smithy_types::Blob, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.padding.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "padding", - "padding was not specified but it is required when building RsaEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building RsaEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.plaintext.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "plaintext", - "plaintext was not specified but it is required when building RsaEncryptInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_for_AwsCryptographicPrimitives_RSAEncrypt(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::rsa_encrypt::_rsa_encrypt_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).RSAEncrypt(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs index b4bfc5bbd..215f41201 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs @@ -18,18 +18,8 @@ impl ValidatePublicKey { crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput, crate::deps::aws_cryptography_primitives::types::error::Error, > { - if input.ecc_curve.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "ecc_curve", - "ecc_curve was not specified but it is required when building ValidatePublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} -if input.public_key.is_none() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "public_key", - "public_key was not specified but it is required when building ValidatePublicKeyInput", - )).map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err); -} + crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_for_AwsCryptographicPrimitives_ValidatePublicKey(&input) + .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?; let inner_input = crate::deps::aws_cryptography_primitives::conversions::validate_public_key::_validate_public_key_input::to_dafny(input); let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).ValidatePublicKey(&inner_input); diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types.rs index 7638d7aba..0291fd6af 100644 --- a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types.rs +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types.rs @@ -3,6 +3,7 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. /// Types for the `CryptoConfig` pub mod crypto_config; +pub use crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig; pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/validation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/validation.rs new file mode 100644 index 000000000..5acefaa3b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/validation.rs @@ -0,0 +1,2486 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM(input: &crate::deps::aws_cryptography_primitives::types::AesGcm) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(&input.key_length)?; +validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(&input.tag_length)?; +validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(&input.iv_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "iv_length", + "iv_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..=255).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "iv_length", + "iv_length failed to satisfy constraint: Member must be between 0 and 255, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key_length", + "key_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(1..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "key_length", + "key_length failed to satisfy constraint: Member must be between 1 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "tag_length", + "tag_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..=32).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "tag_length", + "tag_length failed to satisfy constraint: Member must be between 0 and 32, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput(input: &crate::deps::aws_cryptography_primitives::types::AesDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(&input.enc_alg)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(&input.cipher_txt)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(&input.auth_tag)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(&input.iv)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(&input.aad)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_for_AwsCryptographicPrimitives_AESDecrypt(input: &crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(&input.enc_alg)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(&input.cipher_txt)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(&input.auth_tag)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(&input.iv)?; +validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(&input.aad)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "aad", + "aad is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "auth_tag", + "auth_tag is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cipher_txt", + "cipher_txt is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "enc_alg", + "enc_alg is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HAES__GCM(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "iv", + "iv is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_for_AwsCryptographicPrimitives_AESDecrypt(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext", + "plaintext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput(input: &crate::deps::aws_cryptography_primitives::types::AesEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(&input.enc_alg)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(&input.iv)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(&input.msg)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(&input.aad)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_for_AwsCryptographicPrimitives_AESEncrypt(input: &crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(&input.enc_alg)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(&input.iv)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(&input.msg)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(&input.aad)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "aad", + "aad is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "enc_alg", + "enc_alg is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HAES__GCM(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "iv", + "iv is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "msg", + "msg is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput(input: &crate::deps::aws_cryptography_primitives::types::AesEncryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(&input.cipher_text)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(&input.auth_tag)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_for_AwsCryptographicPrimitives_AESEncrypt(input: &crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(&input.cipher_text)?; +validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(&input.auth_tag)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "auth_tag", + "auth_tag is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cipher_text", + "cipher_text is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput(input: &crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(&input.expected_length)?; +validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(&input.nonce)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_for_AwsCryptographicPrimitives_AesKdfCounterMode(input: &crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(&input.expected_length)?; +validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(&input.nonce)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expected_length", + "expected_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expected_length", + "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ikm", + "ikm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_for_AwsCryptographicPrimitives_AesKdfCounterMode(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "okm", + "okm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput(input: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_for_AwsCryptographicPrimitives_CompressPublicKey(input: &crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(&input.compressed_public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_for_AwsCryptographicPrimitives_CompressPublicKey(input: &crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(&input.compressed_public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "compressed_public_key", + "compressed_public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCryptoConfig(input: &crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput(input: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(&input.compressed_public_key)?; +validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_for_AwsCryptographicPrimitives_DecompressPublicKey(input: &crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(&input.compressed_public_key)?; +validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "compressed_public_key", + "compressed_public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_for_AwsCryptographicPrimitives_DecompressPublicKey(input: &crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput(input: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_for_AwsCryptographicPrimitives_DeriveSharedSecret(input: &crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput(input: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(&input.shared_secret)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_for_AwsCryptographicPrimitives_DeriveSharedSecret(input: &crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(&input.shared_secret)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "shared_secret", + "shared_secret is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput(input: &crate::deps::aws_cryptography_primitives::types::DigestInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_for_AwsCryptographicPrimitives_Digest(input: &crate::deps::aws_cryptography_primitives::operation::digest::DigestInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "message", + "message is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput_for_AwsCryptographicPrimitives_Digest(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest", + "digest is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input: &crate::deps::aws_cryptography_primitives::types::EccPrivateKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECCPrivateKey_Dpem(&input.pem)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPrivateKey_Dpem(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "pem", + "pem is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input: &crate::deps::aws_cryptography_primitives::types::EccPublicKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECCPublicKey_Dder(&input.der)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPublicKey_Dder(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "der", + "der is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput(input: &crate::deps::aws_cryptography_primitives::types::EcdsaSignInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_for_AwsCryptographicPrimitives_ECDSASign(input: &crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(&input.signing_key)?; +validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "message", + "message is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature_algorithm", + "signature_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signing_key", + "signing_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_for_AwsCryptographicPrimitives_ECDSASign(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature", + "signature is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput(input: &crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(&input.message)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(&input.signature)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_for_AwsCryptographicPrimitives_ECDSAVerify(input: &crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(&input.message)?; +validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(&input.signature)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "message", + "message is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature", + "signature is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature_algorithm", + "signature_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "verification_key", + "verification_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_for_AwsCryptographicPrimitives_ECDSAVerify(input: &::std::primitive::bool) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(input: &::std::option::Option<::std::primitive::bool>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "success", + "success is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput(input: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_for_AwsCryptographicPrimitives_GenerateECCKeyPair(input: &crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(&input.ecc_curve)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput(input: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_for_AwsCryptographicPrimitives_GenerateECCKeyPair(input: &crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput(input: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(&input.signature_algorithm)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_for_AwsCryptographicPrimitives_GenerateECDSASignatureKey(input: &crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(&input.signature_algorithm)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature_algorithm", + "signature_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(&input.signing_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_for_AwsCryptographicPrimitives_GenerateECDSASignatureKey(input: &crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(&input.signature_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(&input.verification_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(&input.signing_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signature_algorithm", + "signature_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "signing_key", + "signing_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "verification_key", + "verification_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput(input: &crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(&input.length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_for_AwsCryptographicPrimitives_GenerateRandomBytes(input: &crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(&input.length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "length", + "length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "length", + "length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_for_AwsCryptographicPrimitives_GenerateRandomBytes(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "data", + "data is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput(input: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(&input.length_bits)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_for_AwsCryptographicPrimitives_GenerateRSAKeyPair(input: &crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(&input.length_bits)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "length_bits", + "length_bits is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(81..=4096).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "length_bits", + "length_bits failed to satisfy constraint: Member must be between 81 and 4096, inclusive", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput(input: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_for_AwsCryptographicPrimitives_GenerateRSAKeyPair(input: &crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HRSAPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput(input: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_for_AwsCryptographicPrimitives_GetPublicKeyFromPrivateKey(input: &crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(&input.private_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_for_AwsCryptographicPrimitives_GetPublicKeyFromPrivateKey(input: &crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput(input: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_for_AwsCryptographicPrimitives_GetRSAKeyModulusLength(input: &crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput(input: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(&input.length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_for_AwsCryptographicPrimitives_GetRSAKeyModulusLength(input: &crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(&input.length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "length", + "length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(81..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "length", + "length failed to satisfy constraint: Member must be greater than or equal to 81", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput(input: &crate::deps::aws_cryptography_primitives::types::HkdfExpandInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(&input.prk)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(&input.info)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(&input.expected_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_for_AwsCryptographicPrimitives_HkdfExpand(input: &crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(&input.prk)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(&input.info)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(&input.expected_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expected_length", + "expected_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expected_length", + "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "info", + "info is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "prk", + "prk is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_for_AwsCryptographicPrimitives_HkdfExpand(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "okm", + "okm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput(input: &crate::deps::aws_cryptography_primitives::types::HkdfExtractInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(&input.salt)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(&input.ikm)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_for_AwsCryptographicPrimitives_HkdfExtract(input: &crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(&input.salt)?; +validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(&input.ikm)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ikm", + "ikm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_for_AwsCryptographicPrimitives_HkdfExtract(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "prk", + "prk is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput(input: &crate::deps::aws_cryptography_primitives::types::HkdfInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(&input.salt)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(&input.info)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(&input.expected_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_for_AwsCryptographicPrimitives_Hkdf(input: &crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(&input.salt)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(&input.info)?; +validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(&input.expected_length)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expected_length", + "expected_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expected_length", + "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ikm", + "ikm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "info", + "info is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput_for_AwsCryptographicPrimitives_Hkdf(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "okm", + "okm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput(input: &crate::deps::aws_cryptography_primitives::types::HMacInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_for_AwsCryptographicPrimitives_HMac(input: &crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(&input.key)?; +validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(&input.message)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "key", + "key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "message", + "message is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput_for_AwsCryptographicPrimitives_HMac(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest", + "digest is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput(input: &crate::deps::aws_cryptography_primitives::types::KdfCtrInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(&input.expected_length)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(&input.purpose)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(&input.nonce)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_for_AwsCryptographicPrimitives_KdfCounterMode(input: &crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(&input.digest_algorithm)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(&input.ikm)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(&input.expected_length)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(&input.purpose)?; +validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(&input.nonce)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "digest_algorithm", + "digest_algorithm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "expected_length", + "expected_length is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(0..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "expected_length", + "expected_length failed to satisfy constraint: Member must be greater than or equal to 0", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ikm", + "ikm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_for_AwsCryptographicPrimitives_KdfCounterMode(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "okm", + "okm is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput(input: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_for_AwsCryptographicPrimitives_ParsePublicKey(input: &crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_for_AwsCryptographicPrimitives_ParsePublicKey(input: &crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput(input: &crate::deps::aws_cryptography_primitives::types::RsaDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(&input.padding)?; +validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(&input.cipher_text)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_for_AwsCryptographicPrimitives_RSADecrypt(input: &crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(&input.padding)?; +validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(&input.private_key)?; +validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(&input.cipher_text)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cipher_text", + "cipher_text is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "padding", + "padding is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "private_key", + "private_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_for_AwsCryptographicPrimitives_RSADecrypt(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext", + "plaintext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput(input: &crate::deps::aws_cryptography_primitives::types::RsaEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(&input.padding)?; +validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(&input.plaintext)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_for_AwsCryptographicPrimitives_RSAEncrypt(input: &crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(&input.padding)?; +validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(&input.public_key)?; +validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(&input.plaintext)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "padding", + "padding is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext", + "plaintext is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_for_AwsCryptographicPrimitives_RSAEncrypt(input: &::aws_smithy_types::Blob) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(&Some(input.clone()))?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cipher_text", + "cipher_text is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey(input: &crate::deps::aws_cryptography_primitives::types::RsaPrivateKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_DlengthBits(&input.length_bits)?; +validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_Dpem(&input.pem)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_DlengthBits(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "length_bits", + "length_bits is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(81..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "length_bits", + "length_bits failed to satisfy constraint: Member must be greater than or equal to 81", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_Dpem(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "pem", + "pem is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey(input: &crate::deps::aws_cryptography_primitives::types::RsaPublicKey) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_DlengthBits(&input.length_bits)?; +validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_Dpem(&input.pem)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_DlengthBits(input: &::std::option::Option<::std::primitive::i32>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "length_bits", + "length_bits is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + +if !(81..).contains(input) { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field( + "length_bits", + "length_bits failed to satisfy constraint: Member must be greater than or equal to 81", + )); +} + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_Dpem(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "pem", + "pem is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput(input: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_for_AwsCryptographicPrimitives_ValidatePublicKey(input: &crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(&input.ecc_curve)?; +validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(&input.public_key)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(input: &::std::option::Option) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ecc_curve", + "ecc_curve is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(input: &::std::option::Option<::aws_smithy_types::Blob>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "public_key", + "public_key is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput(input: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(&input.success)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_for_AwsCryptographicPrimitives_ValidatePublicKey(input: &crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(&input.success)?; + Ok(()) +} +pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(input: &::std::option::Option<::std::primitive::bool>) + -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> +{ + if input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "success", + "success is required but was not specified", + )); +} +if input.is_none() { + return ::std::result::Result::Ok(()); +} +let input = input.as_ref().unwrap(); + + Ok(()) +} diff --git a/releases/rust/db_esdk/src/ecdh.rs b/releases/rust/db_esdk/src/ecdh.rs index 15e179505..eb44091cd 100644 --- a/releases/rust/db_esdk/src/ecdh.rs +++ b/releases/rust/db_esdk/src/ecdh.rs @@ -74,6 +74,9 @@ pub mod ECDH { const ELEM_MAX_BYTES: usize = (ELEM_MAX_BITS + 7) / 8; const PUBLIC_KEY_MAX_LEN: usize = 1 + (2 * ELEM_MAX_BYTES); + // This is the value checked in the Dafny test + const INVALID_KEY: &str = "Invalid X509 Public Key."; + pub(crate) fn X509_to_X962( public_key: &[u8], compress: bool, @@ -86,7 +89,7 @@ pub mod ECDH { let evp_pkey = unsafe { EVP_parse_public_key(&mut cbs) }; if evp_pkey.is_null() { - return Err("Invalid X509 Public Key.".to_string()); + return Err(INVALID_KEY.to_string()); } let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; @@ -326,7 +329,29 @@ pub mod ECDH { // for the moment, it's valid if we can use it to generate a shared secret fn valid_public_key(alg: &ECDHCurveSpec, public_key: &[u8]) -> Result<(), String> { - X509_to_X962(public_key, false, Some(get_nid(alg)))?; + let mut cbs = CBS { + data: public_key.as_ptr(), + len: public_key.len(), + }; + + let evp_pkey = unsafe { EVP_parse_public_key(&mut cbs) }; + if evp_pkey.is_null() { + return Err(INVALID_KEY.to_string()); + } + let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; + + if unsafe {aws_lc_sys::EC_KEY_check_fips(ec_key)} != 1 { + return Err(INVALID_KEY.to_string()); + } + let ec_group = unsafe { EC_KEY_get0_group(ec_key) }; + if ec_group.is_null() { + return Err(INVALID_KEY.to_string()); + } + if get_nid(alg) != unsafe { EC_GROUP_get_curve_name(ec_group) } { + return Err(INVALID_KEY.to_string()); + } + unsafe { EVP_PKEY_free(evp_pkey) }; + Ok(()) } diff --git a/releases/rust/db_esdk/src/implementation_from_dafny.rs b/releases/rust/db_esdk/src/implementation_from_dafny.rs index a1c33d20a..d8ed0e176 100644 --- a/releases/rust/db_esdk/src/implementation_from_dafny.rs +++ b/releases/rust/db_esdk/src/implementation_from_dafny.rs @@ -28,7 +28,8 @@ pub mod AESEncryption { pub use ::dafny_runtime::Sequence; pub use ::std::rc::Rc; pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput; - pub use ::dafny_runtime::int; + pub use ::std::convert::Into; + pub use ::dafny_runtime::DafnyInt; pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput; pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Error; @@ -42,8 +43,8 @@ pub mod AESEncryption { impl _default { pub fn EncryptionOutputFromByteSeq(s: &Sequence, encAlg: &Rc) -> Rc { - let mut cipherText: Sequence = s.take(&(s.cardinality() - int!(encAlg.tagLength().clone()))); - let mut authTag: Sequence = s.drop(&(s.cardinality() - int!(encAlg.tagLength().clone()))); + let mut cipherText: Sequence = s.take(&(s.cardinality() - Into::::into(encAlg.tagLength().clone()))); + let mut authTag: Sequence = s.drop(&(s.cardinality() - Into::::into(encAlg.tagLength().clone()))); Rc::new(AESEncryptOutput::AESEncryptOutput { cipherText: cipherText.clone(), authTag: authTag.clone() @@ -52,7 +53,7 @@ pub mod AESEncryption { pub fn AESEncrypt(input: &Rc) -> Rc, Rc>> { let mut res = MaybePlacebo::, Rc>>>::new(); let mut valueOrError0 = MaybePlacebo::>>>::new(); - valueOrError0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(input.iv().cardinality() == int!(input.encAlg().ivLength().clone()) && input.key().cardinality() == int!(input.encAlg().keyLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { + valueOrError0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(input.iv().cardinality() == Into::::into(input.encAlg().ivLength().clone()) && input.key().cardinality() == Into::::into(input.encAlg().keyLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { message: string_utf16_of("Request does not match algorithm.") }))); if valueOrError0.read().IsFailure() { @@ -83,7 +84,7 @@ pub mod AESEncryption { return res.read(); }; let mut valueOrError3 = MaybePlacebo::>>>::new(); - valueOrError3 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(value.authTag().cardinality() == int!(encAlg.tagLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { + valueOrError3 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(value.authTag().cardinality() == Into::::into(encAlg.tagLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { message: string_utf16_of("AESEncryption did not return valid tag") }))); if valueOrError3.read().IsFailure() { @@ -98,7 +99,7 @@ pub mod AESEncryption { pub fn AESDecrypt(input: &Rc) -> Rc, Rc>> { let mut res = MaybePlacebo::, Rc>>>::new(); let mut valueOrError0 = MaybePlacebo::>>>::new(); - valueOrError0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(input.key().cardinality() == int!(input.encAlg().keyLength().clone()) && input.iv().cardinality() == int!(input.encAlg().ivLength().clone()) && input.authTag().cardinality() == int!(input.encAlg().tagLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { + valueOrError0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(input.key().cardinality() == Into::::into(input.encAlg().keyLength().clone()) && input.iv().cardinality() == Into::::into(input.encAlg().ivLength().clone()) && input.authTag().cardinality() == Into::::into(input.encAlg().tagLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { message: string_utf16_of("Request does not match algorithm.") }))); if valueOrError0.read().IsFailure() { @@ -165,7 +166,7 @@ pub mod r#_Actions_Compile { pub use ::dafny_runtime::DafnyInt; pub use ::dafny_runtime::integer_range; pub use ::dafny_runtime::int; - pub use ::dafny_runtime::rd; + pub use ::dafny_runtime::md; pub use ::std::rc::Rc; pub use ::std::default::Default; pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result::Success; @@ -189,7 +190,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut r = MaybePlacebo::<_R>::new(); let mut _out0 = MaybePlacebo::<_R>::new(); - _out0 = MaybePlacebo::from(DeterministicAction::<_A, _R>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(DeterministicAction::<_A, _R>::Invoke(md!(action.clone()), &s.get(&i))); r = MaybePlacebo::from(_out0.read()); rs = rs.concat(&seq![r.read()]); } @@ -203,7 +204,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut valueOrError0 = MaybePlacebo::>>::new(); let mut _out0 = MaybePlacebo::>>::new(); - _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc>>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc>>::Invoke(md!(action.clone()), &s.get(&i))); valueOrError0 = MaybePlacebo::from(_out0.read()); if valueOrError0.read().IsFailure() { res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); @@ -224,7 +225,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut r = MaybePlacebo::>::new(); let mut _out0 = MaybePlacebo::>::new(); - _out0 = MaybePlacebo::from(DeterministicAction::<_A, Sequence<_R>>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(DeterministicAction::<_A, Sequence<_R>>::Invoke(md!(action.clone()), &s.get(&i))); r = MaybePlacebo::from(_out0.read()); rs = rs.concat(&r.read()); } @@ -238,7 +239,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut valueOrError0 = MaybePlacebo::, _E>>>::new(); let mut _out0 = MaybePlacebo::, _E>>>::new(); - _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc, _E>>>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc, _E>>>::Invoke(md!(action.clone()), &s.get(&i))); valueOrError0 = MaybePlacebo::from(_out0.read()); if valueOrError0.read().IsFailure() { res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); @@ -260,7 +261,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut r: bool = ::default(); let mut _out0: bool = ::default(); - _out0 = DeterministicAction::<_A, bool>::Invoke(rd!(action.clone()), &s.get(&i)); + _out0 = DeterministicAction::<_A, bool>::Invoke(md!(action.clone()), &s.get(&i)); r = _out0; if r { rs = rs.concat(&seq![s.get(&i)]); @@ -276,7 +277,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut valueOrError0 = MaybePlacebo::>>::new(); let mut _out0 = MaybePlacebo::>>::new(); - _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc>>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(DeterministicAction::<_A, Rc>>::Invoke(md!(action.clone()), &s.get(&i))); valueOrError0 = MaybePlacebo::from(_out0.read()); if valueOrError0.read().IsFailure() { res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); @@ -299,7 +300,7 @@ pub mod r#_Actions_Compile { for i in integer_range(int!(0), _hi0.clone()) { let mut attempt = MaybePlacebo::>>::new(); let mut _out0 = MaybePlacebo::>>::new(); - _out0 = MaybePlacebo::from(Action::<_A, Rc>>::Invoke(rd!(action.clone()), &s.get(&i))); + _out0 = MaybePlacebo::from(Action::<_A, Rc>>::Invoke(md!(action.clone()), &s.get(&i))); attempt = MaybePlacebo::from(_out0.read()); attemptedResults = attemptedResults.concat(&seq![attempt.read()]); if matches!((&attempt.read()).as_ref(), Success{ .. }) { @@ -390,8 +391,8 @@ pub mod r#_Actions_Compile { } impl AsRef> - for ActionInvoke { - fn as_ref(&self) -> &Self { + for &ActionInvoke { + fn as_ref(&self) -> Self { self } } @@ -1417,8 +1418,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -1493,8 +1494,8 @@ pub mod software { } impl AsRef - for AES_CTR { - fn as_ref(&self) -> &Self { + for &AES_CTR { + fn as_ref(&self) -> Self { self } } @@ -1579,8 +1580,8 @@ pub mod software { } impl AsRef - for AES_GCM { - fn as_ref(&self) -> &Self { + for &AES_GCM { + fn as_ref(&self) -> Self { self } } @@ -1695,8 +1696,8 @@ pub mod software { } impl AsRef - for AESDecryptInput { - fn as_ref(&self) -> &Self { + for &AESDecryptInput { + fn as_ref(&self) -> Self { self } } @@ -1801,8 +1802,8 @@ pub mod software { } impl AsRef - for AESEncryptInput { - fn as_ref(&self) -> &Self { + for &AESEncryptInput { + fn as_ref(&self) -> Self { self } } @@ -1877,8 +1878,8 @@ pub mod software { } impl AsRef - for AESEncryptOutput { - fn as_ref(&self) -> &Self { + for &AESEncryptOutput { + fn as_ref(&self) -> Self { self } } @@ -1963,8 +1964,8 @@ pub mod software { } impl AsRef - for AesKdfCtrInput { - fn as_ref(&self) -> &Self { + for &AesKdfCtrInput { + fn as_ref(&self) -> Self { self } } @@ -2079,8 +2080,8 @@ pub mod software { } impl AsRef - for CompressPublicKeyInput { - fn as_ref(&self) -> &Self { + for &CompressPublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -2145,8 +2146,8 @@ pub mod software { } impl AsRef - for CompressPublicKeyOutput { - fn as_ref(&self) -> &Self { + for &CompressPublicKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -2205,8 +2206,8 @@ pub mod software { } impl AsRef - for CryptoConfig { - fn as_ref(&self) -> &Self { + for &CryptoConfig { + fn as_ref(&self) -> Self { self } } @@ -2281,8 +2282,8 @@ pub mod software { } impl AsRef - for DecompressPublicKeyInput { - fn as_ref(&self) -> &Self { + for &DecompressPublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -2347,8 +2348,8 @@ pub mod software { } impl AsRef - for DecompressPublicKeyOutput { - fn as_ref(&self) -> &Self { + for &DecompressPublicKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -2433,8 +2434,8 @@ pub mod software { } impl AsRef - for DeriveSharedSecretInput { - fn as_ref(&self) -> &Self { + for &DeriveSharedSecretInput { + fn as_ref(&self) -> Self { self } } @@ -2499,8 +2500,8 @@ pub mod software { } impl AsRef - for DeriveSharedSecretOutput { - fn as_ref(&self) -> &Self { + for &DeriveSharedSecretOutput { + fn as_ref(&self) -> Self { self } } @@ -2575,8 +2576,8 @@ pub mod software { } impl AsRef - for DigestAlgorithm { - fn as_ref(&self) -> &Self { + for &DigestAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -2651,8 +2652,8 @@ pub mod software { } impl AsRef - for DigestInput { - fn as_ref(&self) -> &Self { + for &DigestInput { + fn as_ref(&self) -> Self { self } } @@ -2717,8 +2718,8 @@ pub mod software { } impl AsRef - for ECCPrivateKey { - fn as_ref(&self) -> &Self { + for &ECCPrivateKey { + fn as_ref(&self) -> Self { self } } @@ -2783,8 +2784,8 @@ pub mod software { } impl AsRef - for ECCPublicKey { - fn as_ref(&self) -> &Self { + for &ECCPublicKey { + fn as_ref(&self) -> Self { self } } @@ -2867,8 +2868,8 @@ pub mod software { } impl AsRef - for ECDHCurveSpec { - fn as_ref(&self) -> &Self { + for &ECDHCurveSpec { + fn as_ref(&self) -> Self { self } } @@ -2935,8 +2936,8 @@ pub mod software { } impl AsRef - for ECDSASignatureAlgorithm { - fn as_ref(&self) -> &Self { + for &ECDSASignatureAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -3021,8 +3022,8 @@ pub mod software { } impl AsRef - for ECDSASignInput { - fn as_ref(&self) -> &Self { + for &ECDSASignInput { + fn as_ref(&self) -> Self { self } } @@ -3117,8 +3118,8 @@ pub mod software { } impl AsRef - for ECDSAVerifyInput { - fn as_ref(&self) -> &Self { + for &ECDSAVerifyInput { + fn as_ref(&self) -> Self { self } } @@ -3183,8 +3184,8 @@ pub mod software { } impl AsRef - for GenerateECCKeyPairInput { - fn as_ref(&self) -> &Self { + for &GenerateECCKeyPairInput { + fn as_ref(&self) -> Self { self } } @@ -3269,8 +3270,8 @@ pub mod software { } impl AsRef - for GenerateECCKeyPairOutput { - fn as_ref(&self) -> &Self { + for &GenerateECCKeyPairOutput { + fn as_ref(&self) -> Self { self } } @@ -3335,8 +3336,8 @@ pub mod software { } impl AsRef - for GenerateECDSASignatureKeyInput { - fn as_ref(&self) -> &Self { + for &GenerateECDSASignatureKeyInput { + fn as_ref(&self) -> Self { self } } @@ -3421,8 +3422,8 @@ pub mod software { } impl AsRef - for GenerateECDSASignatureKeyOutput { - fn as_ref(&self) -> &Self { + for &GenerateECDSASignatureKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -3487,8 +3488,8 @@ pub mod software { } impl AsRef - for GenerateRandomBytesInput { - fn as_ref(&self) -> &Self { + for &GenerateRandomBytesInput { + fn as_ref(&self) -> Self { self } } @@ -3553,8 +3554,8 @@ pub mod software { } impl AsRef - for GenerateRSAKeyPairInput { - fn as_ref(&self) -> &Self { + for &GenerateRSAKeyPairInput { + fn as_ref(&self) -> Self { self } } @@ -3629,8 +3630,8 @@ pub mod software { } impl AsRef - for GenerateRSAKeyPairOutput { - fn as_ref(&self) -> &Self { + for &GenerateRSAKeyPairOutput { + fn as_ref(&self) -> Self { self } } @@ -3705,8 +3706,8 @@ pub mod software { } impl AsRef - for GetPublicKeyFromPrivateKeyInput { - fn as_ref(&self) -> &Self { + for &GetPublicKeyFromPrivateKeyInput { + fn as_ref(&self) -> Self { self } } @@ -3791,8 +3792,8 @@ pub mod software { } impl AsRef - for GetPublicKeyFromPrivateKeyOutput { - fn as_ref(&self) -> &Self { + for &GetPublicKeyFromPrivateKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -3857,8 +3858,8 @@ pub mod software { } impl AsRef - for GetRSAKeyModulusLengthInput { - fn as_ref(&self) -> &Self { + for &GetRSAKeyModulusLengthInput { + fn as_ref(&self) -> Self { self } } @@ -3923,8 +3924,8 @@ pub mod software { } impl AsRef - for GetRSAKeyModulusLengthOutput { - fn as_ref(&self) -> &Self { + for &GetRSAKeyModulusLengthOutput { + fn as_ref(&self) -> Self { self } } @@ -4019,8 +4020,8 @@ pub mod software { } impl AsRef - for HkdfExpandInput { - fn as_ref(&self) -> &Self { + for &HkdfExpandInput { + fn as_ref(&self) -> Self { self } } @@ -4105,8 +4106,8 @@ pub mod software { } impl AsRef - for HkdfExtractInput { - fn as_ref(&self) -> &Self { + for &HkdfExtractInput { + fn as_ref(&self) -> Self { self } } @@ -4211,8 +4212,8 @@ pub mod software { } impl AsRef - for HkdfInput { - fn as_ref(&self) -> &Self { + for &HkdfInput { + fn as_ref(&self) -> Self { self } } @@ -4297,8 +4298,8 @@ pub mod software { } impl AsRef - for HMacInput { - fn as_ref(&self) -> &Self { + for &HMacInput { + fn as_ref(&self) -> Self { self } } @@ -4403,8 +4404,8 @@ pub mod software { } impl AsRef - for KdfCtrInput { - fn as_ref(&self) -> &Self { + for &KdfCtrInput { + fn as_ref(&self) -> Self { self } } @@ -4469,8 +4470,8 @@ pub mod software { } impl AsRef - for ParsePublicKeyInput { - fn as_ref(&self) -> &Self { + for &ParsePublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -4535,8 +4536,8 @@ pub mod software { } impl AsRef - for ParsePublicKeyOutput { - fn as_ref(&self) -> &Self { + for &ParsePublicKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -4623,8 +4624,8 @@ pub mod software { } impl AsRef - for RSADecryptInput { - fn as_ref(&self) -> &Self { + for &RSADecryptInput { + fn as_ref(&self) -> Self { self } } @@ -4709,8 +4710,8 @@ pub mod software { } impl AsRef - for RSAEncryptInput { - fn as_ref(&self) -> &Self { + for &RSAEncryptInput { + fn as_ref(&self) -> Self { self } } @@ -4805,8 +4806,8 @@ pub mod software { } impl AsRef - for RSAPaddingMode { - fn as_ref(&self) -> &Self { + for &RSAPaddingMode { + fn as_ref(&self) -> Self { self } } @@ -4881,8 +4882,8 @@ pub mod software { } impl AsRef - for RSAPrivateKey { - fn as_ref(&self) -> &Self { + for &RSAPrivateKey { + fn as_ref(&self) -> Self { self } } @@ -4957,8 +4958,8 @@ pub mod software { } impl AsRef - for RSAPublicKey { - fn as_ref(&self) -> &Self { + for &RSAPublicKey { + fn as_ref(&self) -> Self { self } } @@ -5039,8 +5040,8 @@ pub mod software { } impl AsRef - for ValidatePublicKeyInput { - fn as_ref(&self) -> &Self { + for &ValidatePublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -5105,8 +5106,8 @@ pub mod software { } impl AsRef - for ValidatePublicKeyOutput { - fn as_ref(&self) -> &Self { + for &ValidatePublicKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -5242,8 +5243,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -5293,7 +5294,7 @@ pub mod software { pub use ::dafny_runtime::cast_object; pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient; pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IAwsCryptographicMaterialProvidersClient; - pub use ::dafny_runtime::rd; + pub use ::dafny_runtime::md; pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput; pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::legacy::InternalLegacyOverride; pub use crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::Config; @@ -5422,7 +5423,7 @@ pub mod software { let mut matProv: Object = valueOrError5.read().Extract(); let mut maybeCmm = MaybePlacebo::, Rc>>>::new(); let mut _out2 = MaybePlacebo::, Rc>>>::new(); - _out2 = MaybePlacebo::from(IAwsCryptographicMaterialProvidersClient::CreateDefaultCryptographicMaterialsManager(rd!(matProv.clone()), &Rc::new(CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { + _out2 = MaybePlacebo::from(IAwsCryptographicMaterialProvidersClient::CreateDefaultCryptographicMaterialsManager(md!(matProv.clone()), &Rc::new(CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { keyring: keyring.clone() }))); maybeCmm = MaybePlacebo::from(_out2.read()); @@ -5671,8 +5672,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -5737,8 +5738,8 @@ pub mod software { } impl AsRef - for DecryptItemInput { - fn as_ref(&self) -> &Self { + for &DecryptItemInput { + fn as_ref(&self) -> Self { self } } @@ -5813,8 +5814,8 @@ pub mod software { } impl AsRef - for DecryptItemOutput { - fn as_ref(&self) -> &Self { + for &DecryptItemOutput { + fn as_ref(&self) -> Self { self } } @@ -5997,8 +5998,8 @@ pub mod software { } impl AsRef - for DynamoDbItemEncryptorConfig { - fn as_ref(&self) -> &Self { + for &DynamoDbItemEncryptorConfig { + fn as_ref(&self) -> Self { self } } @@ -6063,8 +6064,8 @@ pub mod software { } impl AsRef - for EncryptItemInput { - fn as_ref(&self) -> &Self { + for &EncryptItemInput { + fn as_ref(&self) -> Self { self } } @@ -6139,8 +6140,8 @@ pub mod software { } impl AsRef - for EncryptItemOutput { - fn as_ref(&self) -> &Self { + for &EncryptItemOutput { + fn as_ref(&self) -> Self { self } } @@ -6255,8 +6256,8 @@ pub mod software { } impl AsRef - for ParsedHeader { - fn as_ref(&self) -> &Self { + for &ParsedHeader { + fn as_ref(&self) -> Self { self } } @@ -6537,8 +6538,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -7232,8 +7233,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -7298,8 +7299,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementInputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -7364,8 +7365,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementInputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -7440,8 +7441,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementOutputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -7506,8 +7507,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -7572,8 +7573,8 @@ pub mod software { } impl AsRef - for BatchGetItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchGetItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -7638,8 +7639,8 @@ pub mod software { } impl AsRef - for BatchGetItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchGetItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -7714,8 +7715,8 @@ pub mod software { } impl AsRef - for BatchGetItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchGetItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -7780,8 +7781,8 @@ pub mod software { } impl AsRef - for BatchGetItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchGetItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -7846,8 +7847,8 @@ pub mod software { } impl AsRef - for BatchWriteItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -7912,8 +7913,8 @@ pub mod software { } impl AsRef - for BatchWriteItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -7988,8 +7989,8 @@ pub mod software { } impl AsRef - for BatchWriteItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8054,8 +8055,8 @@ pub mod software { } impl AsRef - for BatchWriteItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8120,8 +8121,8 @@ pub mod software { } impl AsRef - for DeleteItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &DeleteItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8186,8 +8187,8 @@ pub mod software { } impl AsRef - for DeleteItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &DeleteItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8262,8 +8263,8 @@ pub mod software { } impl AsRef - for DeleteItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &DeleteItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8328,8 +8329,8 @@ pub mod software { } impl AsRef - for DeleteItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &DeleteItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8437,8 +8438,8 @@ pub mod software { } impl AsRef - for ExecuteStatementInputTransformInput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8503,8 +8504,8 @@ pub mod software { } impl AsRef - for ExecuteStatementInputTransformOutput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8579,8 +8580,8 @@ pub mod software { } impl AsRef - for ExecuteStatementOutputTransformInput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8645,8 +8646,8 @@ pub mod software { } impl AsRef - for ExecuteStatementOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8711,8 +8712,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionInputTransformInput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8777,8 +8778,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionInputTransformOutput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8853,8 +8854,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionOutputTransformInput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -8919,8 +8920,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -8985,8 +8986,8 @@ pub mod software { } impl AsRef - for GetItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &GetItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9051,8 +9052,8 @@ pub mod software { } impl AsRef - for GetItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &GetItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9127,8 +9128,8 @@ pub mod software { } impl AsRef - for GetItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &GetItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9193,8 +9194,8 @@ pub mod software { } impl AsRef - for GetItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &GetItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9259,8 +9260,8 @@ pub mod software { } impl AsRef - for PutItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &PutItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9325,8 +9326,8 @@ pub mod software { } impl AsRef - for PutItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &PutItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9401,8 +9402,8 @@ pub mod software { } impl AsRef - for PutItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &PutItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9467,8 +9468,8 @@ pub mod software { } impl AsRef - for PutItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &PutItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9533,8 +9534,8 @@ pub mod software { } impl AsRef - for QueryInputTransformInput { - fn as_ref(&self) -> &Self { + for &QueryInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9599,8 +9600,8 @@ pub mod software { } impl AsRef - for QueryInputTransformOutput { - fn as_ref(&self) -> &Self { + for &QueryInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9675,8 +9676,8 @@ pub mod software { } impl AsRef - for QueryOutputTransformInput { - fn as_ref(&self) -> &Self { + for &QueryOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -9741,8 +9742,8 @@ pub mod software { } impl AsRef - for QueryOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &QueryOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -9827,8 +9828,8 @@ pub mod software { } impl AsRef - for ResolveAttributesInput { - fn as_ref(&self) -> &Self { + for &ResolveAttributesInput { + fn as_ref(&self) -> Self { self } } @@ -9903,8 +9904,8 @@ pub mod software { } impl AsRef - for ResolveAttributesOutput { - fn as_ref(&self) -> &Self { + for &ResolveAttributesOutput { + fn as_ref(&self) -> Self { self } } @@ -9969,8 +9970,8 @@ pub mod software { } impl AsRef - for ScanInputTransformInput { - fn as_ref(&self) -> &Self { + for &ScanInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10035,8 +10036,8 @@ pub mod software { } impl AsRef - for ScanInputTransformOutput { - fn as_ref(&self) -> &Self { + for &ScanInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10111,8 +10112,8 @@ pub mod software { } impl AsRef - for ScanOutputTransformInput { - fn as_ref(&self) -> &Self { + for &ScanOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10177,8 +10178,8 @@ pub mod software { } impl AsRef - for ScanOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &ScanOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10243,8 +10244,8 @@ pub mod software { } impl AsRef - for TransactGetItemsInputTransformInput { - fn as_ref(&self) -> &Self { + for &TransactGetItemsInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10309,8 +10310,8 @@ pub mod software { } impl AsRef - for TransactGetItemsInputTransformOutput { - fn as_ref(&self) -> &Self { + for &TransactGetItemsInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10385,8 +10386,8 @@ pub mod software { } impl AsRef - for TransactGetItemsOutputTransformInput { - fn as_ref(&self) -> &Self { + for &TransactGetItemsOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10451,8 +10452,8 @@ pub mod software { } impl AsRef - for TransactGetItemsOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &TransactGetItemsOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10517,8 +10518,8 @@ pub mod software { } impl AsRef - for TransactWriteItemsInputTransformInput { - fn as_ref(&self) -> &Self { + for &TransactWriteItemsInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10583,8 +10584,8 @@ pub mod software { } impl AsRef - for TransactWriteItemsInputTransformOutput { - fn as_ref(&self) -> &Self { + for &TransactWriteItemsInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10659,8 +10660,8 @@ pub mod software { } impl AsRef - for TransactWriteItemsOutputTransformInput { - fn as_ref(&self) -> &Self { + for &TransactWriteItemsOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10725,8 +10726,8 @@ pub mod software { } impl AsRef - for TransactWriteItemsOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &TransactWriteItemsOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10791,8 +10792,8 @@ pub mod software { } impl AsRef - for UpdateItemInputTransformInput { - fn as_ref(&self) -> &Self { + for &UpdateItemInputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10857,8 +10858,8 @@ pub mod software { } impl AsRef - for UpdateItemInputTransformOutput { - fn as_ref(&self) -> &Self { + for &UpdateItemInputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -10933,8 +10934,8 @@ pub mod software { } impl AsRef - for UpdateItemOutputTransformInput { - fn as_ref(&self) -> &Self { + for &UpdateItemOutputTransformInput { + fn as_ref(&self) -> Self { self } } @@ -10999,8 +11000,8 @@ pub mod software { } impl AsRef - for UpdateItemOutputTransformOutput { - fn as_ref(&self) -> &Self { + for &UpdateItemOutputTransformOutput { + fn as_ref(&self) -> Self { self } } @@ -11281,8 +11282,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -11420,7 +11421,7 @@ pub mod software { pub use ::std::any::Any; pub use ::dafny_runtime::UpcastObjectFn; pub use ::dafny_runtime::MaybePlacebo; - pub use ::dafny_runtime::rd; + pub use ::dafny_runtime::md; pub use ::dafny_runtime::Map; pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction; pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeNameList; @@ -11553,8 +11554,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -11613,8 +11614,8 @@ pub mod software { } impl AsRef - for AsSet { - fn as_ref(&self) -> &Self { + for &AsSet { + fn as_ref(&self) -> Self { self } } @@ -11700,8 +11701,8 @@ pub mod software { } impl AsRef - for BeaconKeySource { - fn as_ref(&self) -> &Self { + for &BeaconKeySource { + fn as_ref(&self) -> Self { self } } @@ -11829,8 +11830,8 @@ pub mod software { } impl AsRef - for BeaconStyle { - fn as_ref(&self) -> &Self { + for &BeaconStyle { + fn as_ref(&self) -> Self { self } } @@ -11965,8 +11966,8 @@ pub mod software { } impl AsRef - for BeaconVersion { - fn as_ref(&self) -> &Self { + for &BeaconVersion { + fn as_ref(&self) -> Self { self } } @@ -12075,8 +12076,8 @@ pub mod software { } impl AsRef - for CompoundBeacon { - fn as_ref(&self) -> &Self { + for &CompoundBeacon { + fn as_ref(&self) -> Self { self } } @@ -12143,8 +12144,8 @@ pub mod software { } impl AsRef - for Constructor { - fn as_ref(&self) -> &Self { + for &Constructor { + fn as_ref(&self) -> Self { self } } @@ -12221,8 +12222,8 @@ pub mod software { } impl AsRef - for ConstructorPart { - fn as_ref(&self) -> &Self { + for &ConstructorPart { + fn as_ref(&self) -> Self { self } } @@ -12289,8 +12290,8 @@ pub mod software { } impl AsRef - for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { - fn as_ref(&self) -> &Self { + for &CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn as_ref(&self) -> Self { self } } @@ -12355,8 +12356,8 @@ pub mod software { } impl AsRef - for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { - fn as_ref(&self) -> &Self { + for &CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn as_ref(&self) -> Self { self } } @@ -12433,8 +12434,8 @@ pub mod software { } impl AsRef - for DynamoDbEncryptionConfig { - fn as_ref(&self) -> &Self { + for &DynamoDbEncryptionConfig { + fn as_ref(&self) -> Self { self } } @@ -12456,7 +12457,7 @@ pub mod software { fn GetBranchKeyIdFromDdbKey(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier::r#_GetBranchKeyIdFromDdbKey_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier::r#_GetBranchKeyIdFromDdbKey_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -12633,8 +12634,8 @@ pub mod software { } impl AsRef - for DynamoDbTableEncryptionConfig { - fn as_ref(&self) -> &Self { + for &DynamoDbTableEncryptionConfig { + fn as_ref(&self) -> Self { self } } @@ -12699,8 +12700,8 @@ pub mod software { } impl AsRef - for DynamoDbTablesEncryptionConfig { - fn as_ref(&self) -> &Self { + for &DynamoDbTablesEncryptionConfig { + fn as_ref(&self) -> Self { self } } @@ -12795,8 +12796,8 @@ pub mod software { } impl AsRef - for EncryptedDataKeyDescription { - fn as_ref(&self) -> &Self { + for &EncryptedDataKeyDescription { + fn as_ref(&self) -> Self { self } } @@ -12871,8 +12872,8 @@ pub mod software { } impl AsRef - for EncryptedPart { - fn as_ref(&self) -> &Self { + for &EncryptedPart { + fn as_ref(&self) -> Self { self } } @@ -12939,8 +12940,8 @@ pub mod software { } impl AsRef - for GetBranchKeyIdFromDdbKeyInput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyIdFromDdbKeyInput { + fn as_ref(&self) -> Self { self } } @@ -13005,8 +13006,8 @@ pub mod software { } impl AsRef - for GetBranchKeyIdFromDdbKeyOutput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyIdFromDdbKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -13071,8 +13072,8 @@ pub mod software { } impl AsRef - for GetEncryptedDataKeyDescriptionInput { - fn as_ref(&self) -> &Self { + for &GetEncryptedDataKeyDescriptionInput { + fn as_ref(&self) -> Self { self } } @@ -13137,8 +13138,8 @@ pub mod software { } impl AsRef - for GetEncryptedDataKeyDescriptionOutput { - fn as_ref(&self) -> &Self { + for &GetEncryptedDataKeyDescriptionOutput { + fn as_ref(&self) -> Self { self } } @@ -13222,8 +13223,8 @@ pub mod software { } impl AsRef - for GetEncryptedDataKeyDescriptionUnion { - fn as_ref(&self) -> &Self { + for &GetEncryptedDataKeyDescriptionUnion { + fn as_ref(&self) -> Self { self } } @@ -13288,8 +13289,8 @@ pub mod software { } impl AsRef - for GetPrefix { - fn as_ref(&self) -> &Self { + for &GetPrefix { + fn as_ref(&self) -> Self { self } } @@ -13364,8 +13365,8 @@ pub mod software { } impl AsRef - for GetSegment { - fn as_ref(&self) -> &Self { + for &GetSegment { + fn as_ref(&self) -> Self { self } } @@ -13450,8 +13451,8 @@ pub mod software { } impl AsRef - for GetSegments { - fn as_ref(&self) -> &Self { + for &GetSegments { + fn as_ref(&self) -> Self { self } } @@ -13526,8 +13527,8 @@ pub mod software { } impl AsRef - for GetSubstring { - fn as_ref(&self) -> &Self { + for &GetSubstring { + fn as_ref(&self) -> Self { self } } @@ -13592,8 +13593,8 @@ pub mod software { } impl AsRef - for GetSuffix { - fn as_ref(&self) -> &Self { + for &GetSuffix { + fn as_ref(&self) -> Self { self } } @@ -13658,8 +13659,8 @@ pub mod software { } impl AsRef - for Insert { - fn as_ref(&self) -> &Self { + for &Insert { + fn as_ref(&self) -> Self { self } } @@ -13769,8 +13770,8 @@ pub mod software { } impl AsRef - for LegacyOverride { - fn as_ref(&self) -> &Self { + for &LegacyOverride { + fn as_ref(&self) -> Self { self } } @@ -13845,8 +13846,8 @@ pub mod software { } impl AsRef - for LegacyPolicy { - fn as_ref(&self) -> &Self { + for &LegacyPolicy { + fn as_ref(&self) -> Self { self } } @@ -13905,8 +13906,8 @@ pub mod software { } impl AsRef - for Lower { - fn as_ref(&self) -> &Self { + for &Lower { + fn as_ref(&self) -> Self { self } } @@ -13991,8 +13992,8 @@ pub mod software { } impl AsRef - for MultiKeyStore { - fn as_ref(&self) -> &Self { + for &MultiKeyStore { + fn as_ref(&self) -> Self { self } } @@ -14051,8 +14052,8 @@ pub mod software { } impl AsRef - for PartOnly { - fn as_ref(&self) -> &Self { + for &PartOnly { + fn as_ref(&self) -> Self { self } } @@ -14127,8 +14128,8 @@ pub mod software { } impl AsRef - for PlaintextOverride { - fn as_ref(&self) -> &Self { + for &PlaintextOverride { + fn as_ref(&self) -> Self { self } } @@ -14205,8 +14206,8 @@ pub mod software { } impl AsRef - for SearchConfig { - fn as_ref(&self) -> &Self { + for &SearchConfig { + fn as_ref(&self) -> Self { self } } @@ -14271,8 +14272,8 @@ pub mod software { } impl AsRef - for Shared { - fn as_ref(&self) -> &Self { + for &Shared { + fn as_ref(&self) -> Self { self } } @@ -14337,8 +14338,8 @@ pub mod software { } impl AsRef - for SharedSet { - fn as_ref(&self) -> &Self { + for &SharedSet { + fn as_ref(&self) -> Self { self } } @@ -14423,8 +14424,8 @@ pub mod software { } impl AsRef - for SignedPart { - fn as_ref(&self) -> &Self { + for &SignedPart { + fn as_ref(&self) -> Self { self } } @@ -14501,8 +14502,8 @@ pub mod software { } impl AsRef - for SingleKeyStore { - fn as_ref(&self) -> &Self { + for &SingleKeyStore { + fn as_ref(&self) -> Self { self } } @@ -14597,8 +14598,8 @@ pub mod software { } impl AsRef - for StandardBeacon { - fn as_ref(&self) -> &Self { + for &StandardBeacon { + fn as_ref(&self) -> Self { self } } @@ -14661,8 +14662,8 @@ pub mod software { } impl AsRef - for Upper { - fn as_ref(&self) -> &Self { + for &Upper { + fn as_ref(&self) -> Self { self } } @@ -14739,8 +14740,8 @@ pub mod software { } impl AsRef - for VirtualField { - fn as_ref(&self) -> &Self { + for &VirtualField { + fn as_ref(&self) -> Self { self } } @@ -14817,8 +14818,8 @@ pub mod software { } impl AsRef - for VirtualPart { - fn as_ref(&self) -> &Self { + for &VirtualPart { + fn as_ref(&self) -> Self { self } } @@ -15060,8 +15061,8 @@ pub mod software { } impl AsRef - for VirtualTransform { - fn as_ref(&self) -> &Self { + for &VirtualTransform { + fn as_ref(&self) -> Self { self } } @@ -15344,8 +15345,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -15629,8 +15630,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -15697,8 +15698,8 @@ pub mod software { } impl AsRef - for AuthenticateAction { - fn as_ref(&self) -> &Self { + for &AuthenticateAction { + fn as_ref(&self) -> Self { self } } @@ -15783,8 +15784,8 @@ pub mod software { } impl AsRef - for AuthItem { - fn as_ref(&self) -> &Self { + for &AuthItem { + fn as_ref(&self) -> Self { self } } @@ -15867,8 +15868,8 @@ pub mod software { } impl AsRef - for CryptoAction { - fn as_ref(&self) -> &Self { + for &CryptoAction { + fn as_ref(&self) -> Self { self } } @@ -15953,8 +15954,8 @@ pub mod software { } impl AsRef - for CryptoItem { - fn as_ref(&self) -> &Self { + for &CryptoItem { + fn as_ref(&self) -> Self { self } } @@ -16049,8 +16050,8 @@ pub mod software { } impl AsRef - for DecryptPathStructureInput { - fn as_ref(&self) -> &Self { + for &DecryptPathStructureInput { + fn as_ref(&self) -> Self { self } } @@ -16125,8 +16126,8 @@ pub mod software { } impl AsRef - for DecryptPathStructureOutput { - fn as_ref(&self) -> &Self { + for &DecryptPathStructureOutput { + fn as_ref(&self) -> Self { self } } @@ -16231,8 +16232,8 @@ pub mod software { } impl AsRef - for DecryptStructureInput { - fn as_ref(&self) -> &Self { + for &DecryptStructureInput { + fn as_ref(&self) -> Self { self } } @@ -16317,8 +16318,8 @@ pub mod software { } impl AsRef - for DecryptStructureOutput { - fn as_ref(&self) -> &Self { + for &DecryptStructureOutput { + fn as_ref(&self) -> Self { self } } @@ -16423,8 +16424,8 @@ pub mod software { } impl AsRef - for EncryptPathStructureInput { - fn as_ref(&self) -> &Self { + for &EncryptPathStructureInput { + fn as_ref(&self) -> Self { self } } @@ -16499,8 +16500,8 @@ pub mod software { } impl AsRef - for EncryptPathStructureOutput { - fn as_ref(&self) -> &Self { + for &EncryptPathStructureOutput { + fn as_ref(&self) -> Self { self } } @@ -16615,8 +16616,8 @@ pub mod software { } impl AsRef - for EncryptStructureInput { - fn as_ref(&self) -> &Self { + for &EncryptStructureInput { + fn as_ref(&self) -> Self { self } } @@ -16701,8 +16702,8 @@ pub mod software { } impl AsRef - for EncryptStructureOutput { - fn as_ref(&self) -> &Self { + for &EncryptStructureOutput { + fn as_ref(&self) -> Self { self } } @@ -16797,8 +16798,8 @@ pub mod software { } impl AsRef - for ParsedHeader { - fn as_ref(&self) -> &Self { + for &ParsedHeader { + fn as_ref(&self) -> Self { self } } @@ -16863,8 +16864,8 @@ pub mod software { } impl AsRef - for PathSegment { - fn as_ref(&self) -> &Self { + for &PathSegment { + fn as_ref(&self) -> Self { self } } @@ -16949,8 +16950,8 @@ pub mod software { } impl AsRef - for ResolveAuthActionsInput { - fn as_ref(&self) -> &Self { + for &ResolveAuthActionsInput { + fn as_ref(&self) -> Self { self } } @@ -17015,8 +17016,8 @@ pub mod software { } impl AsRef - for ResolveAuthActionsOutput { - fn as_ref(&self) -> &Self { + for &ResolveAuthActionsOutput { + fn as_ref(&self) -> Self { self } } @@ -17091,8 +17092,8 @@ pub mod software { } impl AsRef - for StructuredDataTerminal { - fn as_ref(&self) -> &Self { + for &StructuredDataTerminal { + fn as_ref(&self) -> Self { self } } @@ -17172,8 +17173,8 @@ pub mod software { } impl AsRef - for StructuredEncryptionConfig { - fn as_ref(&self) -> &Self { + for &StructuredEncryptionConfig { + fn as_ref(&self) -> Self { self } } @@ -17238,8 +17239,8 @@ pub mod software { } impl AsRef - for StructureSegment { - fn as_ref(&self) -> &Self { + for &StructureSegment { + fn as_ref(&self) -> Self { self } } @@ -17429,8 +17430,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -17861,8 +17862,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -17957,8 +17958,8 @@ pub mod software { } impl AsRef - for BeaconKeyMaterials { - fn as_ref(&self) -> &Self { + for &BeaconKeyMaterials { + fn as_ref(&self) -> Self { self } } @@ -18053,8 +18054,8 @@ pub mod software { } impl AsRef - for BranchKeyMaterials { - fn as_ref(&self) -> &Self { + for &BranchKeyMaterials { + fn as_ref(&self) -> Self { self } } @@ -18129,8 +18130,8 @@ pub mod software { } impl AsRef - for CreateKeyInput { - fn as_ref(&self) -> &Self { + for &CreateKeyInput { + fn as_ref(&self) -> Self { self } } @@ -18195,8 +18196,8 @@ pub mod software { } impl AsRef - for CreateKeyOutput { - fn as_ref(&self) -> &Self { + for &CreateKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -18255,8 +18256,8 @@ pub mod software { } impl AsRef - for CreateKeyStoreInput { - fn as_ref(&self) -> &Self { + for &CreateKeyStoreInput { + fn as_ref(&self) -> Self { self } } @@ -18321,8 +18322,8 @@ pub mod software { } impl AsRef - for CreateKeyStoreOutput { - fn as_ref(&self) -> &Self { + for &CreateKeyStoreOutput { + fn as_ref(&self) -> Self { self } } @@ -18381,8 +18382,8 @@ pub mod software { } impl AsRef - for Discovery { - fn as_ref(&self) -> &Self { + for &Discovery { + fn as_ref(&self) -> Self { self } } @@ -18447,8 +18448,8 @@ pub mod software { } impl AsRef - for GetActiveBranchKeyInput { - fn as_ref(&self) -> &Self { + for &GetActiveBranchKeyInput { + fn as_ref(&self) -> Self { self } } @@ -18513,8 +18514,8 @@ pub mod software { } impl AsRef - for GetActiveBranchKeyOutput { - fn as_ref(&self) -> &Self { + for &GetActiveBranchKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -18579,8 +18580,8 @@ pub mod software { } impl AsRef - for GetBeaconKeyInput { - fn as_ref(&self) -> &Self { + for &GetBeaconKeyInput { + fn as_ref(&self) -> Self { self } } @@ -18645,8 +18646,8 @@ pub mod software { } impl AsRef - for GetBeaconKeyOutput { - fn as_ref(&self) -> &Self { + for &GetBeaconKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -18721,8 +18722,8 @@ pub mod software { } impl AsRef - for GetBranchKeyVersionInput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyVersionInput { + fn as_ref(&self) -> Self { self } } @@ -18787,8 +18788,8 @@ pub mod software { } impl AsRef - for GetBranchKeyVersionOutput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyVersionOutput { + fn as_ref(&self) -> Self { self } } @@ -18893,8 +18894,8 @@ pub mod software { } impl AsRef - for GetKeyStoreInfoOutput { - fn as_ref(&self) -> &Self { + for &GetKeyStoreInfoOutput { + fn as_ref(&self) -> Self { self } } @@ -19042,8 +19043,8 @@ pub mod software { } impl AsRef - for KeyStoreConfig { - fn as_ref(&self) -> &Self { + for &KeyStoreConfig { + fn as_ref(&self) -> Self { self } } @@ -19171,8 +19172,8 @@ pub mod software { } impl AsRef - for KMSConfiguration { - fn as_ref(&self) -> &Self { + for &KMSConfiguration { + fn as_ref(&self) -> Self { self } } @@ -19237,8 +19238,8 @@ pub mod software { } impl AsRef - for MRDiscovery { - fn as_ref(&self) -> &Self { + for &MRDiscovery { + fn as_ref(&self) -> Self { self } } @@ -19303,8 +19304,8 @@ pub mod software { } impl AsRef - for VersionKeyInput { - fn as_ref(&self) -> &Self { + for &VersionKeyInput { + fn as_ref(&self) -> Self { self } } @@ -19363,8 +19364,8 @@ pub mod software { } impl AsRef - for VersionKeyOutput { - fn as_ref(&self) -> &Self { + for &VersionKeyOutput { + fn as_ref(&self) -> Self { self } } @@ -19552,8 +19553,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -19887,7 +19888,7 @@ pub mod software { pub use ::std::any::Any; pub use ::dafny_runtime::UpcastObjectFn; pub use ::dafny_runtime::MaybePlacebo; - pub use ::dafny_runtime::rd; + pub use ::dafny_runtime::md; pub use crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient; pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; pub use ::dafny_runtime::DafnyCharUTF16; @@ -19990,8 +19991,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -20066,8 +20067,8 @@ pub mod software { } impl AsRef - for AesWrappingAlg { - fn as_ref(&self) -> &Self { + for &AesWrappingAlg { + fn as_ref(&self) -> Self { self } } @@ -20151,8 +20152,8 @@ pub mod software { } impl AsRef - for AlgorithmSuiteId { - fn as_ref(&self) -> &Self { + for &AlgorithmSuiteId { + fn as_ref(&self) -> Self { self } } @@ -20297,8 +20298,8 @@ pub mod software { } impl AsRef - for AlgorithmSuiteInfo { - fn as_ref(&self) -> &Self { + for &AlgorithmSuiteInfo { + fn as_ref(&self) -> Self { self } } @@ -20365,7 +20366,7 @@ pub mod software { fn GetBranchKeyId(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier::r#_GetBranchKeyId_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier::r#_GetBranchKeyId_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -20547,8 +20548,8 @@ pub mod software { } impl AsRef - for CacheType { - fn as_ref(&self) -> &Self { + for &CacheType { + fn as_ref(&self) -> Self { self } } @@ -20570,7 +20571,7 @@ pub mod software { fn GetClient(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier::r#_GetClient_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier::r#_GetClient_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -20656,8 +20657,8 @@ pub mod software { } impl AsRef - for CommitmentPolicy { - fn as_ref(&self) -> &Self { + for &CommitmentPolicy { + fn as_ref(&self) -> Self { self } } @@ -20744,8 +20745,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsDiscoveryKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsDiscoveryKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -20840,8 +20841,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsDiscoveryMultiKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsDiscoveryMultiKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -20936,8 +20937,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsEcdhKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsEcdhKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21052,8 +21053,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsHierarchicalKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsHierarchicalKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21138,8 +21139,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21234,8 +21235,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsMrkDiscoveryKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsMrkDiscoveryKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21330,8 +21331,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsMrkDiscoveryMultiKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21416,8 +21417,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsMrkKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsMrkKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21512,8 +21513,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsMrkMultiKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsMrkMultiKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21608,8 +21609,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsMultiKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsMultiKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21714,8 +21715,8 @@ pub mod software { } impl AsRef - for CreateAwsKmsRsaKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateAwsKmsRsaKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -21780,8 +21781,8 @@ pub mod software { } impl AsRef - for CreateCryptographicMaterialsCacheInput { - fn as_ref(&self) -> &Self { + for &CreateCryptographicMaterialsCacheInput { + fn as_ref(&self) -> Self { self } } @@ -21840,8 +21841,8 @@ pub mod software { } impl AsRef - for CreateDefaultClientSupplierInput { - fn as_ref(&self) -> &Self { + for &CreateDefaultClientSupplierInput { + fn as_ref(&self) -> Self { self } } @@ -21906,8 +21907,8 @@ pub mod software { } impl AsRef - for CreateDefaultCryptographicMaterialsManagerInput { - fn as_ref(&self) -> &Self { + for &CreateDefaultCryptographicMaterialsManagerInput { + fn as_ref(&self) -> Self { self } } @@ -21982,8 +21983,8 @@ pub mod software { } impl AsRef - for CreateMultiKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateMultiKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -22078,8 +22079,8 @@ pub mod software { } impl AsRef - for CreateRawAesKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateRawAesKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -22154,8 +22155,8 @@ pub mod software { } impl AsRef - for CreateRawEcdhKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateRawEcdhKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -22260,8 +22261,8 @@ pub mod software { } impl AsRef - for CreateRawRsaKeyringInput { - fn as_ref(&self) -> &Self { + for &CreateRawRsaKeyringInput { + fn as_ref(&self) -> Self { self } } @@ -22346,8 +22347,8 @@ pub mod software { } impl AsRef - for CreateRequiredEncryptionContextCMMInput { - fn as_ref(&self) -> &Self { + for &CreateRequiredEncryptionContextCMMInput { + fn as_ref(&self) -> Self { self } } @@ -22369,7 +22370,7 @@ pub mod software { fn PutCacheEntry(&self, input: &Rc) -> Rc>> { let mut output = MaybePlacebo::>>>::new(); let mut _out0 = MaybePlacebo::>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_PutCacheEntry_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_PutCacheEntry_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22377,7 +22378,7 @@ pub mod software { fn UpdateUsageMetadata(&self, input: &Rc) -> Rc>> { let mut output = MaybePlacebo::>>>::new(); let mut _out0 = MaybePlacebo::>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_UpdateUsageMetadata_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_UpdateUsageMetadata_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22385,7 +22386,7 @@ pub mod software { fn GetCacheEntry(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_GetCacheEntry_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_GetCacheEntry_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22393,7 +22394,7 @@ pub mod software { fn DeleteCacheEntry(&self, input: &Rc) -> Rc>> { let mut output = MaybePlacebo::>>>::new(); let mut _out0 = MaybePlacebo::>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_DeleteCacheEntry_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache::r#_DeleteCacheEntry_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22417,7 +22418,7 @@ pub mod software { fn GetEncryptionMaterials(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager::r#_GetEncryptionMaterials_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager::r#_GetEncryptionMaterials_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22425,7 +22426,7 @@ pub mod software { fn DecryptMaterials(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager::r#_DecryptMaterials_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager::r#_DecryptMaterials_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -22494,8 +22495,8 @@ pub mod software { } impl AsRef - for DBEAlgorithmSuiteId { - fn as_ref(&self) -> &Self { + for &DBEAlgorithmSuiteId { + fn as_ref(&self) -> Self { self } } @@ -22554,8 +22555,8 @@ pub mod software { } impl AsRef - for DBECommitmentPolicy { - fn as_ref(&self) -> &Self { + for &DBECommitmentPolicy { + fn as_ref(&self) -> Self { self } } @@ -22670,8 +22671,8 @@ pub mod software { } impl AsRef - for DecryptionMaterials { - fn as_ref(&self) -> &Self { + for &DecryptionMaterials { + fn as_ref(&self) -> Self { self } } @@ -22776,8 +22777,8 @@ pub mod software { } impl AsRef - for DecryptMaterialsInput { - fn as_ref(&self) -> &Self { + for &DecryptMaterialsInput { + fn as_ref(&self) -> Self { self } } @@ -22842,8 +22843,8 @@ pub mod software { } impl AsRef - for DecryptMaterialsOutput { - fn as_ref(&self) -> &Self { + for &DecryptMaterialsOutput { + fn as_ref(&self) -> Self { self } } @@ -22908,8 +22909,8 @@ pub mod software { } impl AsRef - for DefaultCache { - fn as_ref(&self) -> &Self { + for &DefaultCache { + fn as_ref(&self) -> Self { self } } @@ -22974,8 +22975,8 @@ pub mod software { } impl AsRef - for DeleteCacheEntryInput { - fn as_ref(&self) -> &Self { + for &DeleteCacheEntryInput { + fn as_ref(&self) -> Self { self } } @@ -23080,8 +23081,8 @@ pub mod software { } impl AsRef - for DerivationAlgorithm { - fn as_ref(&self) -> &Self { + for &DerivationAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -23140,8 +23141,8 @@ pub mod software { } impl AsRef - for DIRECT_KEY_WRAPPING { - fn as_ref(&self) -> &Self { + for &DIRECT_KEY_WRAPPING { + fn as_ref(&self) -> Self { self } } @@ -23216,8 +23217,8 @@ pub mod software { } impl AsRef - for DiscoveryFilter { - fn as_ref(&self) -> &Self { + for &DiscoveryFilter { + fn as_ref(&self) -> Self { self } } @@ -23282,8 +23283,8 @@ pub mod software { } impl AsRef - for ECDSA { - fn as_ref(&self) -> &Self { + for &ECDSA { + fn as_ref(&self) -> Self { self } } @@ -23367,8 +23368,8 @@ pub mod software { } impl AsRef - for EdkWrappingAlgorithm { - fn as_ref(&self) -> &Self { + for &EdkWrappingAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -23433,8 +23434,8 @@ pub mod software { } impl AsRef - for Encrypt { - fn as_ref(&self) -> &Self { + for &Encrypt { + fn as_ref(&self) -> Self { self } } @@ -23519,8 +23520,8 @@ pub mod software { } impl AsRef - for EncryptedDataKey { - fn as_ref(&self) -> &Self { + for &EncryptedDataKey { + fn as_ref(&self) -> Self { self } } @@ -23645,8 +23646,8 @@ pub mod software { } impl AsRef - for EncryptionMaterials { - fn as_ref(&self) -> &Self { + for &EncryptionMaterials { + fn as_ref(&self) -> Self { self } } @@ -23711,8 +23712,8 @@ pub mod software { } impl AsRef - for EphemeralPrivateKeyToStaticPublicKeyInput { - fn as_ref(&self) -> &Self { + for &EphemeralPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -23851,8 +23852,8 @@ pub mod software { } impl AsRef - for ESDKAlgorithmSuiteId { - fn as_ref(&self) -> &Self { + for &ESDKAlgorithmSuiteId { + fn as_ref(&self) -> Self { self } } @@ -23927,8 +23928,8 @@ pub mod software { } impl AsRef - for ESDKCommitmentPolicy { - fn as_ref(&self) -> &Self { + for &ESDKCommitmentPolicy { + fn as_ref(&self) -> Self { self } } @@ -23993,8 +23994,8 @@ pub mod software { } impl AsRef - for GetBranchKeyIdInput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyIdInput { + fn as_ref(&self) -> Self { self } } @@ -24059,8 +24060,8 @@ pub mod software { } impl AsRef - for GetBranchKeyIdOutput { - fn as_ref(&self) -> &Self { + for &GetBranchKeyIdOutput { + fn as_ref(&self) -> Self { self } } @@ -24135,8 +24136,8 @@ pub mod software { } impl AsRef - for GetCacheEntryInput { - fn as_ref(&self) -> &Self { + for &GetCacheEntryInput { + fn as_ref(&self) -> Self { self } } @@ -24241,8 +24242,8 @@ pub mod software { } impl AsRef - for GetCacheEntryOutput { - fn as_ref(&self) -> &Self { + for &GetCacheEntryOutput { + fn as_ref(&self) -> Self { self } } @@ -24307,8 +24308,8 @@ pub mod software { } impl AsRef - for GetClientInput { - fn as_ref(&self) -> &Self { + for &GetClientInput { + fn as_ref(&self) -> Self { self } } @@ -24413,8 +24414,8 @@ pub mod software { } impl AsRef - for GetEncryptionMaterialsInput { - fn as_ref(&self) -> &Self { + for &GetEncryptionMaterialsInput { + fn as_ref(&self) -> Self { self } } @@ -24479,8 +24480,8 @@ pub mod software { } impl AsRef - for GetEncryptionMaterialsOutput { - fn as_ref(&self) -> &Self { + for &GetEncryptionMaterialsOutput { + fn as_ref(&self) -> Self { self } } @@ -24575,8 +24576,8 @@ pub mod software { } impl AsRef - for HKDF { - fn as_ref(&self) -> &Self { + for &HKDF { + fn as_ref(&self) -> Self { self } } @@ -24635,8 +24636,8 @@ pub mod software { } impl AsRef - for IDENTITY { - fn as_ref(&self) -> &Self { + for &IDENTITY { + fn as_ref(&self) -> Self { self } } @@ -24721,8 +24722,8 @@ pub mod software { } impl AsRef - for InitializeDecryptionMaterialsInput { - fn as_ref(&self) -> &Self { + for &InitializeDecryptionMaterialsInput { + fn as_ref(&self) -> Self { self } } @@ -24827,8 +24828,8 @@ pub mod software { } impl AsRef - for InitializeEncryptionMaterialsInput { - fn as_ref(&self) -> &Self { + for &InitializeEncryptionMaterialsInput { + fn as_ref(&self) -> Self { self } } @@ -24913,8 +24914,8 @@ pub mod software { } impl AsRef - for IntermediateKeyWrapping { - fn as_ref(&self) -> &Self { + for &IntermediateKeyWrapping { + fn as_ref(&self) -> Self { self } } @@ -24979,8 +24980,8 @@ pub mod software { } impl AsRef - for KeyAgreementScheme { - fn as_ref(&self) -> &Self { + for &KeyAgreementScheme { + fn as_ref(&self) -> Self { self } } @@ -25002,7 +25003,7 @@ pub mod software { fn OnEncrypt(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring::r#_OnEncrypt_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring::r#_OnEncrypt_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -25010,7 +25011,7 @@ pub mod software { fn OnDecrypt(&self, input: &Rc) -> Rc, Rc>> { let mut output = MaybePlacebo::, Rc>>>::new(); let mut _out0 = MaybePlacebo::, Rc>>>::new(); - _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring::r#_OnDecrypt_k(rd!(Object::<_>::from_ref(self)), input)); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring::r#_OnDecrypt_k(md!(Object::<_>::from_ref(self)), input)); output = MaybePlacebo::from(_out0.read()); return output.read(); } @@ -25096,8 +25097,8 @@ pub mod software { } impl AsRef - for KmsEcdhStaticConfigurations { - fn as_ref(&self) -> &Self { + for &KmsEcdhStaticConfigurations { + fn as_ref(&self) -> Self { self } } @@ -25182,8 +25183,8 @@ pub mod software { } impl AsRef - for KmsPrivateKeyToStaticPublicKeyInput { - fn as_ref(&self) -> &Self { + for &KmsPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -25248,8 +25249,8 @@ pub mod software { } impl AsRef - for KmsPublicKeyDiscoveryInput { - fn as_ref(&self) -> &Self { + for &KmsPublicKeyDiscoveryInput { + fn as_ref(&self) -> Self { self } } @@ -25308,8 +25309,8 @@ pub mod software { } impl AsRef - for MaterialProvidersConfig { - fn as_ref(&self) -> &Self { + for &MaterialProvidersConfig { + fn as_ref(&self) -> Self { self } } @@ -25437,8 +25438,8 @@ pub mod software { } impl AsRef - for Materials { - fn as_ref(&self) -> &Self { + for &Materials { + fn as_ref(&self) -> Self { self } } @@ -25513,8 +25514,8 @@ pub mod software { } impl AsRef - for MultiThreadedCache { - fn as_ref(&self) -> &Self { + for &MultiThreadedCache { + fn as_ref(&self) -> Self { self } } @@ -25573,8 +25574,8 @@ pub mod software { } impl AsRef - for NoCache { - fn as_ref(&self) -> &Self { + for &NoCache { + fn as_ref(&self) -> Self { self } } @@ -25633,8 +25634,8 @@ pub mod software { } impl AsRef - for None { - fn as_ref(&self) -> &Self { + for &None { + fn as_ref(&self) -> Self { self } } @@ -25709,8 +25710,8 @@ pub mod software { } impl AsRef - for OnDecryptInput { - fn as_ref(&self) -> &Self { + for &OnDecryptInput { + fn as_ref(&self) -> Self { self } } @@ -25775,8 +25776,8 @@ pub mod software { } impl AsRef - for OnDecryptOutput { - fn as_ref(&self) -> &Self { + for &OnDecryptOutput { + fn as_ref(&self) -> Self { self } } @@ -25841,8 +25842,8 @@ pub mod software { } impl AsRef - for OnEncryptInput { - fn as_ref(&self) -> &Self { + for &OnEncryptInput { + fn as_ref(&self) -> Self { self } } @@ -25907,8 +25908,8 @@ pub mod software { } impl AsRef - for OnEncryptOutput { - fn as_ref(&self) -> &Self { + for &OnEncryptOutput { + fn as_ref(&self) -> Self { self } } @@ -25999,8 +26000,8 @@ pub mod software { } impl AsRef - for PaddingScheme { - fn as_ref(&self) -> &Self { + for &PaddingScheme { + fn as_ref(&self) -> Self { self } } @@ -26069,8 +26070,8 @@ pub mod software { } impl AsRef - for PublicKeyDiscoveryInput { - fn as_ref(&self) -> &Self { + for &PublicKeyDiscoveryInput { + fn as_ref(&self) -> Self { self } } @@ -26185,8 +26186,8 @@ pub mod software { } impl AsRef - for PutCacheEntryInput { - fn as_ref(&self) -> &Self { + for &PutCacheEntryInput { + fn as_ref(&self) -> Self { self } } @@ -26291,8 +26292,8 @@ pub mod software { } impl AsRef - for RawEcdhStaticConfigurations { - fn as_ref(&self) -> &Self { + for &RawEcdhStaticConfigurations { + fn as_ref(&self) -> Self { self } } @@ -26367,8 +26368,8 @@ pub mod software { } impl AsRef - for RawPrivateKeyToStaticPublicKeyInput { - fn as_ref(&self) -> &Self { + for &RawPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { self } } @@ -26452,8 +26453,8 @@ pub mod software { } impl AsRef - for SignatureAlgorithm { - fn as_ref(&self) -> &Self { + for &SignatureAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -26528,8 +26529,8 @@ pub mod software { } impl AsRef - for SingleThreadedCache { - fn as_ref(&self) -> &Self { + for &SingleThreadedCache { + fn as_ref(&self) -> Self { self } } @@ -26613,8 +26614,8 @@ pub mod software { } impl AsRef - for StaticConfigurations { - fn as_ref(&self) -> &Self { + for &StaticConfigurations { + fn as_ref(&self) -> Self { self } } @@ -26749,8 +26750,8 @@ pub mod software { } impl AsRef - for StormTrackingCache { - fn as_ref(&self) -> &Self { + for &StormTrackingCache { + fn as_ref(&self) -> Self { self } } @@ -26834,8 +26835,8 @@ pub mod software { } impl AsRef - for SymmetricSignatureAlgorithm { - fn as_ref(&self) -> &Self { + for &SymmetricSignatureAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -26902,8 +26903,8 @@ pub mod software { } impl AsRef - for TimeUnits { - fn as_ref(&self) -> &Self { + for &TimeUnits { + fn as_ref(&self) -> Self { self } } @@ -26978,8 +26979,8 @@ pub mod software { } impl AsRef - for UpdateUsageMetadataInput { - fn as_ref(&self) -> &Self { + for &UpdateUsageMetadataInput { + fn as_ref(&self) -> Self { self } } @@ -27054,8 +27055,8 @@ pub mod software { } impl AsRef - for ValidateCommitmentPolicyOnDecryptInput { - fn as_ref(&self) -> &Self { + for &ValidateCommitmentPolicyOnDecryptInput { + fn as_ref(&self) -> Self { self } } @@ -27130,8 +27131,8 @@ pub mod software { } impl AsRef - for ValidateCommitmentPolicyOnEncryptInput { - fn as_ref(&self) -> &Self { + for &ValidateCommitmentPolicyOnEncryptInput { + fn as_ref(&self) -> Self { self } } @@ -27206,8 +27207,8 @@ pub mod software { } impl AsRef - for ValidDecryptionMaterialsTransitionInput { - fn as_ref(&self) -> &Self { + for &ValidDecryptionMaterialsTransitionInput { + fn as_ref(&self) -> Self { self } } @@ -27282,8 +27283,8 @@ pub mod software { } impl AsRef - for ValidEncryptionMaterialsTransitionInput { - fn as_ref(&self) -> &Self { + for &ValidEncryptionMaterialsTransitionInput { + fn as_ref(&self) -> Self { self } } @@ -27731,8 +27732,8 @@ pub mod software { } impl AsRef - for Error { - fn as_ref(&self) -> &Self { + for &Error { + fn as_ref(&self) -> Self { self } } @@ -27838,8 +27839,8 @@ pub mod software { } impl AsRef - for DynamoDBClientConfigType { - fn as_ref(&self) -> &Self { + for &DynamoDBClientConfigType { + fn as_ref(&self) -> Self { self } } @@ -28155,8 +28156,8 @@ pub mod software { } impl AsRef> - for DafnyCallEvent { - fn as_ref(&self) -> &Self { + for &DafnyCallEvent { + fn as_ref(&self) -> Self { self } } @@ -28223,8 +28224,8 @@ pub mod software { } impl AsRef - for ApproximateCreationDateTimePrecision { - fn as_ref(&self) -> &Self { + for &ApproximateCreationDateTimePrecision { + fn as_ref(&self) -> Self { self } } @@ -28309,8 +28310,8 @@ pub mod software { } impl AsRef - for ArchivalSummary { - fn as_ref(&self) -> &Self { + for &ArchivalSummary { + fn as_ref(&self) -> Self { self } } @@ -28385,8 +28386,8 @@ pub mod software { } impl AsRef - for AttributeAction { - fn as_ref(&self) -> &Self { + for &AttributeAction { + fn as_ref(&self) -> Self { self } } @@ -28461,8 +28462,8 @@ pub mod software { } impl AsRef - for AttributeDefinition { - fn as_ref(&self) -> &Self { + for &AttributeDefinition { + fn as_ref(&self) -> Self { self } } @@ -28774,8 +28775,8 @@ pub mod software { } impl AsRef - for AttributeValue { - fn as_ref(&self) -> &Self { + for &AttributeValue { + fn as_ref(&self) -> Self { self } } @@ -28850,8 +28851,8 @@ pub mod software { } impl AsRef - for AttributeValueUpdate { - fn as_ref(&self) -> &Self { + for &AttributeValueUpdate { + fn as_ref(&self) -> Self { self } } @@ -28926,8 +28927,8 @@ pub mod software { } impl AsRef - for AutoScalingPolicyDescription { - fn as_ref(&self) -> &Self { + for &AutoScalingPolicyDescription { + fn as_ref(&self) -> Self { self } } @@ -29004,8 +29005,8 @@ pub mod software { } impl AsRef - for AutoScalingPolicyUpdate { - fn as_ref(&self) -> &Self { + for &AutoScalingPolicyUpdate { + fn as_ref(&self) -> Self { self } } @@ -29112,8 +29113,8 @@ pub mod software { } impl AsRef - for AutoScalingSettingsDescription { - fn as_ref(&self) -> &Self { + for &AutoScalingSettingsDescription { + fn as_ref(&self) -> Self { self } } @@ -29218,8 +29219,8 @@ pub mod software { } impl AsRef - for AutoScalingSettingsUpdate { - fn as_ref(&self) -> &Self { + for &AutoScalingSettingsUpdate { + fn as_ref(&self) -> Self { self } } @@ -29314,8 +29315,8 @@ pub mod software { } impl AsRef - for AutoScalingTargetTrackingScalingPolicyConfigurationDescription { - fn as_ref(&self) -> &Self { + for &AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn as_ref(&self) -> Self { self } } @@ -29410,8 +29411,8 @@ pub mod software { } impl AsRef - for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { - fn as_ref(&self) -> &Self { + for &AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn as_ref(&self) -> Self { self } } @@ -29498,8 +29499,8 @@ pub mod software { } impl AsRef - for BackupDescription { - fn as_ref(&self) -> &Self { + for &BackupDescription { + fn as_ref(&self) -> Self { self } } @@ -29624,8 +29625,8 @@ pub mod software { } impl AsRef - for BackupDetails { - fn as_ref(&self) -> &Self { + for &BackupDetails { + fn as_ref(&self) -> Self { self } } @@ -29706,8 +29707,8 @@ pub mod software { } impl AsRef - for BackupStatus { - fn as_ref(&self) -> &Self { + for &BackupStatus { + fn as_ref(&self) -> Self { self } } @@ -29862,8 +29863,8 @@ pub mod software { } impl AsRef - for BackupSummary { - fn as_ref(&self) -> &Self { + for &BackupSummary { + fn as_ref(&self) -> Self { self } } @@ -29938,8 +29939,8 @@ pub mod software { } impl AsRef - for BackupType { - fn as_ref(&self) -> &Self { + for &BackupType { + fn as_ref(&self) -> Self { self } } @@ -30022,8 +30023,8 @@ pub mod software { } impl AsRef - for BackupTypeFilter { - fn as_ref(&self) -> &Self { + for &BackupTypeFilter { + fn as_ref(&self) -> Self { self } } @@ -30098,8 +30099,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementInput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementInput { + fn as_ref(&self) -> Self { self } } @@ -30174,8 +30175,8 @@ pub mod software { } impl AsRef - for BatchExecuteStatementOutput { - fn as_ref(&self) -> &Self { + for &BatchExecuteStatementOutput { + fn as_ref(&self) -> Self { self } } @@ -30250,8 +30251,8 @@ pub mod software { } impl AsRef - for BatchGetItemInput { - fn as_ref(&self) -> &Self { + for &BatchGetItemInput { + fn as_ref(&self) -> Self { self } } @@ -30336,8 +30337,8 @@ pub mod software { } impl AsRef - for BatchGetItemOutput { - fn as_ref(&self) -> &Self { + for &BatchGetItemOutput { + fn as_ref(&self) -> Self { self } } @@ -30414,8 +30415,8 @@ pub mod software { } impl AsRef - for BatchStatementError { - fn as_ref(&self) -> &Self { + for &BatchStatementError { + fn as_ref(&self) -> Self { self } } @@ -30554,8 +30555,8 @@ pub mod software { } impl AsRef - for BatchStatementErrorCodeEnum { - fn as_ref(&self) -> &Self { + for &BatchStatementErrorCodeEnum { + fn as_ref(&self) -> Self { self } } @@ -30640,8 +30641,8 @@ pub mod software { } impl AsRef - for BatchStatementRequest { - fn as_ref(&self) -> &Self { + for &BatchStatementRequest { + fn as_ref(&self) -> Self { self } } @@ -30726,8 +30727,8 @@ pub mod software { } impl AsRef - for BatchStatementResponse { - fn as_ref(&self) -> &Self { + for &BatchStatementResponse { + fn as_ref(&self) -> Self { self } } @@ -30812,8 +30813,8 @@ pub mod software { } impl AsRef - for BatchWriteItemInput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemInput { + fn as_ref(&self) -> Self { self } } @@ -30898,8 +30899,8 @@ pub mod software { } impl AsRef - for BatchWriteItemOutput { - fn as_ref(&self) -> &Self { + for &BatchWriteItemOutput { + fn as_ref(&self) -> Self { self } } @@ -30970,8 +30971,8 @@ pub mod software { } impl AsRef - for BillingMode { - fn as_ref(&self) -> &Self { + for &BillingMode { + fn as_ref(&self) -> Self { self } } @@ -31046,8 +31047,8 @@ pub mod software { } impl AsRef - for BillingModeSummary { - fn as_ref(&self) -> &Self { + for &BillingModeSummary { + fn as_ref(&self) -> Self { self } } @@ -31132,8 +31133,8 @@ pub mod software { } impl AsRef - for CancellationReason { - fn as_ref(&self) -> &Self { + for &CancellationReason { + fn as_ref(&self) -> Self { self } } @@ -31220,8 +31221,8 @@ pub mod software { } impl AsRef - for Capacity { - fn as_ref(&self) -> &Self { + for &Capacity { + fn as_ref(&self) -> Self { self } } @@ -31380,8 +31381,8 @@ pub mod software { } impl AsRef - for ComparisonOperator { - fn as_ref(&self) -> &Self { + for &ComparisonOperator { + fn as_ref(&self) -> Self { self } } @@ -31456,8 +31457,8 @@ pub mod software { } impl AsRef - for Condition { - fn as_ref(&self) -> &Self { + for &Condition { + fn as_ref(&self) -> Self { self } } @@ -31524,8 +31525,8 @@ pub mod software { } impl AsRef - for ConditionalOperator { - fn as_ref(&self) -> &Self { + for &ConditionalOperator { + fn as_ref(&self) -> Self { self } } @@ -31640,8 +31641,8 @@ pub mod software { } impl AsRef - for ConditionCheck { - fn as_ref(&self) -> &Self { + for &ConditionCheck { + fn as_ref(&self) -> Self { self } } @@ -31766,8 +31767,8 @@ pub mod software { } impl AsRef - for ConsumedCapacity { - fn as_ref(&self) -> &Self { + for &ConsumedCapacity { + fn as_ref(&self) -> Self { self } } @@ -31844,8 +31845,8 @@ pub mod software { } impl AsRef - for ContinuousBackupsDescription { - fn as_ref(&self) -> &Self { + for &ContinuousBackupsDescription { + fn as_ref(&self) -> Self { self } } @@ -31912,8 +31913,8 @@ pub mod software { } impl AsRef - for ContinuousBackupsStatus { - fn as_ref(&self) -> &Self { + for &ContinuousBackupsStatus { + fn as_ref(&self) -> Self { self } } @@ -31980,8 +31981,8 @@ pub mod software { } impl AsRef - for ContributorInsightsAction { - fn as_ref(&self) -> &Self { + for &ContributorInsightsAction { + fn as_ref(&self) -> Self { self } } @@ -32072,8 +32073,8 @@ pub mod software { } impl AsRef - for ContributorInsightsStatus { - fn as_ref(&self) -> &Self { + for &ContributorInsightsStatus { + fn as_ref(&self) -> Self { self } } @@ -32158,8 +32159,8 @@ pub mod software { } impl AsRef - for ContributorInsightsSummary { - fn as_ref(&self) -> &Self { + for &ContributorInsightsSummary { + fn as_ref(&self) -> Self { self } } @@ -32234,8 +32235,8 @@ pub mod software { } impl AsRef - for CreateBackupInput { - fn as_ref(&self) -> &Self { + for &CreateBackupInput { + fn as_ref(&self) -> Self { self } } @@ -32300,8 +32301,8 @@ pub mod software { } impl AsRef - for CreateBackupOutput { - fn as_ref(&self) -> &Self { + for &CreateBackupOutput { + fn as_ref(&self) -> Self { self } } @@ -32406,8 +32407,8 @@ pub mod software { } impl AsRef - for CreateGlobalSecondaryIndexAction { - fn as_ref(&self) -> &Self { + for &CreateGlobalSecondaryIndexAction { + fn as_ref(&self) -> Self { self } } @@ -32482,8 +32483,8 @@ pub mod software { } impl AsRef - for CreateGlobalTableInput { - fn as_ref(&self) -> &Self { + for &CreateGlobalTableInput { + fn as_ref(&self) -> Self { self } } @@ -32548,8 +32549,8 @@ pub mod software { } impl AsRef - for CreateGlobalTableOutput { - fn as_ref(&self) -> &Self { + for &CreateGlobalTableOutput { + fn as_ref(&self) -> Self { self } } @@ -32614,8 +32615,8 @@ pub mod software { } impl AsRef - for CreateReplicaAction { - fn as_ref(&self) -> &Self { + for &CreateReplicaAction { + fn as_ref(&self) -> Self { self } } @@ -32730,8 +32731,8 @@ pub mod software { } impl AsRef - for CreateReplicationGroupMemberAction { - fn as_ref(&self) -> &Self { + for &CreateReplicationGroupMemberAction { + fn as_ref(&self) -> Self { self } } @@ -32926,8 +32927,8 @@ pub mod software { } impl AsRef - for CreateTableInput { - fn as_ref(&self) -> &Self { + for &CreateTableInput { + fn as_ref(&self) -> Self { self } } @@ -32992,8 +32993,8 @@ pub mod software { } impl AsRef - for CreateTableOutput { - fn as_ref(&self) -> &Self { + for &CreateTableOutput { + fn as_ref(&self) -> Self { self } } @@ -33074,8 +33075,8 @@ pub mod software { } impl AsRef - for CsvOptions { - fn as_ref(&self) -> &Self { + for &CsvOptions { + fn as_ref(&self) -> Self { self } } @@ -33190,8 +33191,8 @@ pub mod software { } impl AsRef - for Delete { - fn as_ref(&self) -> &Self { + for &Delete { + fn as_ref(&self) -> Self { self } } @@ -33256,8 +33257,8 @@ pub mod software { } impl AsRef - for DeleteBackupInput { - fn as_ref(&self) -> &Self { + for &DeleteBackupInput { + fn as_ref(&self) -> Self { self } } @@ -33322,8 +33323,8 @@ pub mod software { } impl AsRef - for DeleteBackupOutput { - fn as_ref(&self) -> &Self { + for &DeleteBackupOutput { + fn as_ref(&self) -> Self { self } } @@ -33388,8 +33389,8 @@ pub mod software { } impl AsRef - for DeleteGlobalSecondaryIndexAction { - fn as_ref(&self) -> &Self { + for &DeleteGlobalSecondaryIndexAction { + fn as_ref(&self) -> Self { self } } @@ -33544,8 +33545,8 @@ pub mod software { } impl AsRef - for DeleteItemInput { - fn as_ref(&self) -> &Self { + for &DeleteItemInput { + fn as_ref(&self) -> Self { self } } @@ -33630,8 +33631,8 @@ pub mod software { } impl AsRef - for DeleteItemOutput { - fn as_ref(&self) -> &Self { + for &DeleteItemOutput { + fn as_ref(&self) -> Self { self } } @@ -33696,8 +33697,8 @@ pub mod software { } impl AsRef - for DeleteReplicaAction { - fn as_ref(&self) -> &Self { + for &DeleteReplicaAction { + fn as_ref(&self) -> Self { self } } @@ -33762,8 +33763,8 @@ pub mod software { } impl AsRef - for DeleteReplicationGroupMemberAction { - fn as_ref(&self) -> &Self { + for &DeleteReplicationGroupMemberAction { + fn as_ref(&self) -> Self { self } } @@ -33828,8 +33829,8 @@ pub mod software { } impl AsRef - for DeleteRequest { - fn as_ref(&self) -> &Self { + for &DeleteRequest { + fn as_ref(&self) -> Self { self } } @@ -33904,8 +33905,8 @@ pub mod software { } impl AsRef - for DeleteResourcePolicyInput { - fn as_ref(&self) -> &Self { + for &DeleteResourcePolicyInput { + fn as_ref(&self) -> Self { self } } @@ -33970,8 +33971,8 @@ pub mod software { } impl AsRef - for DeleteResourcePolicyOutput { - fn as_ref(&self) -> &Self { + for &DeleteResourcePolicyOutput { + fn as_ref(&self) -> Self { self } } @@ -34036,8 +34037,8 @@ pub mod software { } impl AsRef - for DeleteTableInput { - fn as_ref(&self) -> &Self { + for &DeleteTableInput { + fn as_ref(&self) -> Self { self } } @@ -34102,8 +34103,8 @@ pub mod software { } impl AsRef - for DeleteTableOutput { - fn as_ref(&self) -> &Self { + for &DeleteTableOutput { + fn as_ref(&self) -> Self { self } } @@ -34168,8 +34169,8 @@ pub mod software { } impl AsRef - for DescribeBackupInput { - fn as_ref(&self) -> &Self { + for &DescribeBackupInput { + fn as_ref(&self) -> Self { self } } @@ -34234,8 +34235,8 @@ pub mod software { } impl AsRef - for DescribeBackupOutput { - fn as_ref(&self) -> &Self { + for &DescribeBackupOutput { + fn as_ref(&self) -> Self { self } } @@ -34300,8 +34301,8 @@ pub mod software { } impl AsRef - for DescribeContinuousBackupsInput { - fn as_ref(&self) -> &Self { + for &DescribeContinuousBackupsInput { + fn as_ref(&self) -> Self { self } } @@ -34366,8 +34367,8 @@ pub mod software { } impl AsRef - for DescribeContinuousBackupsOutput { - fn as_ref(&self) -> &Self { + for &DescribeContinuousBackupsOutput { + fn as_ref(&self) -> Self { self } } @@ -34442,8 +34443,8 @@ pub mod software { } impl AsRef - for DescribeContributorInsightsInput { - fn as_ref(&self) -> &Self { + for &DescribeContributorInsightsInput { + fn as_ref(&self) -> Self { self } } @@ -34558,8 +34559,8 @@ pub mod software { } impl AsRef - for DescribeContributorInsightsOutput { - fn as_ref(&self) -> &Self { + for &DescribeContributorInsightsOutput { + fn as_ref(&self) -> Self { self } } @@ -34618,8 +34619,8 @@ pub mod software { } impl AsRef - for DescribeEndpointsRequest { - fn as_ref(&self) -> &Self { + for &DescribeEndpointsRequest { + fn as_ref(&self) -> Self { self } } @@ -34684,8 +34685,8 @@ pub mod software { } impl AsRef - for DescribeEndpointsResponse { - fn as_ref(&self) -> &Self { + for &DescribeEndpointsResponse { + fn as_ref(&self) -> Self { self } } @@ -34750,8 +34751,8 @@ pub mod software { } impl AsRef - for DescribeExportInput { - fn as_ref(&self) -> &Self { + for &DescribeExportInput { + fn as_ref(&self) -> Self { self } } @@ -34816,8 +34817,8 @@ pub mod software { } impl AsRef - for DescribeExportOutput { - fn as_ref(&self) -> &Self { + for &DescribeExportOutput { + fn as_ref(&self) -> Self { self } } @@ -34882,8 +34883,8 @@ pub mod software { } impl AsRef - for DescribeGlobalTableInput { - fn as_ref(&self) -> &Self { + for &DescribeGlobalTableInput { + fn as_ref(&self) -> Self { self } } @@ -34948,8 +34949,8 @@ pub mod software { } impl AsRef - for DescribeGlobalTableOutput { - fn as_ref(&self) -> &Self { + for &DescribeGlobalTableOutput { + fn as_ref(&self) -> Self { self } } @@ -35014,8 +35015,8 @@ pub mod software { } impl AsRef - for DescribeGlobalTableSettingsInput { - fn as_ref(&self) -> &Self { + for &DescribeGlobalTableSettingsInput { + fn as_ref(&self) -> Self { self } } @@ -35090,8 +35091,8 @@ pub mod software { } impl AsRef - for DescribeGlobalTableSettingsOutput { - fn as_ref(&self) -> &Self { + for &DescribeGlobalTableSettingsOutput { + fn as_ref(&self) -> Self { self } } @@ -35156,8 +35157,8 @@ pub mod software { } impl AsRef - for DescribeImportInput { - fn as_ref(&self) -> &Self { + for &DescribeImportInput { + fn as_ref(&self) -> Self { self } } @@ -35222,8 +35223,8 @@ pub mod software { } impl AsRef - for DescribeImportOutput { - fn as_ref(&self) -> &Self { + for &DescribeImportOutput { + fn as_ref(&self) -> Self { self } } @@ -35288,8 +35289,8 @@ pub mod software { } impl AsRef - for DescribeKinesisStreamingDestinationInput { - fn as_ref(&self) -> &Self { + for &DescribeKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { self } } @@ -35364,8 +35365,8 @@ pub mod software { } impl AsRef - for DescribeKinesisStreamingDestinationOutput { - fn as_ref(&self) -> &Self { + for &DescribeKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { self } } @@ -35424,8 +35425,8 @@ pub mod software { } impl AsRef - for DescribeLimitsInput { - fn as_ref(&self) -> &Self { + for &DescribeLimitsInput { + fn as_ref(&self) -> Self { self } } @@ -35520,8 +35521,8 @@ pub mod software { } impl AsRef - for DescribeLimitsOutput { - fn as_ref(&self) -> &Self { + for &DescribeLimitsOutput { + fn as_ref(&self) -> Self { self } } @@ -35586,8 +35587,8 @@ pub mod software { } impl AsRef - for DescribeTableInput { - fn as_ref(&self) -> &Self { + for &DescribeTableInput { + fn as_ref(&self) -> Self { self } } @@ -35652,8 +35653,8 @@ pub mod software { } impl AsRef - for DescribeTableOutput { - fn as_ref(&self) -> &Self { + for &DescribeTableOutput { + fn as_ref(&self) -> Self { self } } @@ -35718,8 +35719,8 @@ pub mod software { } impl AsRef - for DescribeTableReplicaAutoScalingInput { - fn as_ref(&self) -> &Self { + for &DescribeTableReplicaAutoScalingInput { + fn as_ref(&self) -> Self { self } } @@ -35784,8 +35785,8 @@ pub mod software { } impl AsRef - for DescribeTableReplicaAutoScalingOutput { - fn as_ref(&self) -> &Self { + for &DescribeTableReplicaAutoScalingOutput { + fn as_ref(&self) -> Self { self } } @@ -35850,8 +35851,8 @@ pub mod software { } impl AsRef - for DescribeTimeToLiveInput { - fn as_ref(&self) -> &Self { + for &DescribeTimeToLiveInput { + fn as_ref(&self) -> Self { self } } @@ -35916,8 +35917,8 @@ pub mod software { } impl AsRef - for DescribeTimeToLiveOutput { - fn as_ref(&self) -> &Self { + for &DescribeTimeToLiveOutput { + fn as_ref(&self) -> Self { self } } @@ -36016,8 +36017,8 @@ pub mod software { } impl AsRef - for DestinationStatus { - fn as_ref(&self) -> &Self { + for &DestinationStatus { + fn as_ref(&self) -> Self { self } } @@ -36102,8 +36103,8 @@ pub mod software { } impl AsRef - for DisableKinesisStreamingDestinationInput { - fn as_ref(&self) -> &Self { + for &DisableKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { self } } @@ -36198,8 +36199,8 @@ pub mod software { } impl AsRef - for DisableKinesisStreamingDestinationOutput { - fn as_ref(&self) -> &Self { + for &DisableKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { self } } @@ -36339,8 +36340,8 @@ pub mod software { } impl AsRef - for EnableKinesisStreamingConfiguration { - fn as_ref(&self) -> &Self { + for &EnableKinesisStreamingConfiguration { + fn as_ref(&self) -> Self { self } } @@ -36425,8 +36426,8 @@ pub mod software { } impl AsRef - for EnableKinesisStreamingDestinationInput { - fn as_ref(&self) -> &Self { + for &EnableKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { self } } @@ -36521,8 +36522,8 @@ pub mod software { } impl AsRef - for EnableKinesisStreamingDestinationOutput { - fn as_ref(&self) -> &Self { + for &EnableKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { self } } @@ -36597,8 +36598,8 @@ pub mod software { } impl AsRef - for Endpoint { - fn as_ref(&self) -> &Self { + for &Endpoint { + fn as_ref(&self) -> Self { self } } @@ -36715,8 +36716,8 @@ pub mod software { } impl AsRef - for ExecuteStatementInput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementInput { + fn as_ref(&self) -> Self { self } } @@ -36811,8 +36812,8 @@ pub mod software { } impl AsRef - for ExecuteStatementOutput { - fn as_ref(&self) -> &Self { + for &ExecuteStatementOutput { + fn as_ref(&self) -> Self { self } } @@ -36897,8 +36898,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionInput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionInput { + fn as_ref(&self) -> Self { self } } @@ -36973,8 +36974,8 @@ pub mod software { } impl AsRef - for ExecuteTransactionOutput { - fn as_ref(&self) -> &Self { + for &ExecuteTransactionOutput { + fn as_ref(&self) -> Self { self } } @@ -37069,8 +37070,8 @@ pub mod software { } impl AsRef - for ExpectedAttributeValue { - fn as_ref(&self) -> &Self { + for &ExpectedAttributeValue { + fn as_ref(&self) -> Self { self } } @@ -37337,8 +37338,8 @@ pub mod software { } impl AsRef - for ExportDescription { - fn as_ref(&self) -> &Self { + for &ExportDescription { + fn as_ref(&self) -> Self { self } } @@ -37405,8 +37406,8 @@ pub mod software { } impl AsRef - for ExportFormat { - fn as_ref(&self) -> &Self { + for &ExportFormat { + fn as_ref(&self) -> Self { self } } @@ -37481,8 +37482,8 @@ pub mod software { } impl AsRef - for ExportStatus { - fn as_ref(&self) -> &Self { + for &ExportStatus { + fn as_ref(&self) -> Self { self } } @@ -37567,8 +37568,8 @@ pub mod software { } impl AsRef - for ExportSummary { - fn as_ref(&self) -> &Self { + for &ExportSummary { + fn as_ref(&self) -> Self { self } } @@ -37733,8 +37734,8 @@ pub mod software { } impl AsRef - for ExportTableToPointInTimeInput { - fn as_ref(&self) -> &Self { + for &ExportTableToPointInTimeInput { + fn as_ref(&self) -> Self { self } } @@ -37799,8 +37800,8 @@ pub mod software { } impl AsRef - for ExportTableToPointInTimeOutput { - fn as_ref(&self) -> &Self { + for &ExportTableToPointInTimeOutput { + fn as_ref(&self) -> Self { self } } @@ -37867,8 +37868,8 @@ pub mod software { } impl AsRef - for ExportType { - fn as_ref(&self) -> &Self { + for &ExportType { + fn as_ref(&self) -> Self { self } } @@ -37935,8 +37936,8 @@ pub mod software { } impl AsRef - for ExportViewType { - fn as_ref(&self) -> &Self { + for &ExportViewType { + fn as_ref(&self) -> Self { self } } @@ -38011,8 +38012,8 @@ pub mod software { } impl AsRef - for FailureException { - fn as_ref(&self) -> &Self { + for &FailureException { + fn as_ref(&self) -> Self { self } } @@ -38107,8 +38108,8 @@ pub mod software { } impl AsRef - for Get { - fn as_ref(&self) -> &Self { + for &Get { + fn as_ref(&self) -> Self { self } } @@ -38233,8 +38234,8 @@ pub mod software { } impl AsRef - for GetItemInput { - fn as_ref(&self) -> &Self { + for &GetItemInput { + fn as_ref(&self) -> Self { self } } @@ -38309,8 +38310,8 @@ pub mod software { } impl AsRef - for GetItemOutput { - fn as_ref(&self) -> &Self { + for &GetItemOutput { + fn as_ref(&self) -> Self { self } } @@ -38375,8 +38376,8 @@ pub mod software { } impl AsRef - for GetResourcePolicyInput { - fn as_ref(&self) -> &Self { + for &GetResourcePolicyInput { + fn as_ref(&self) -> Self { self } } @@ -38451,8 +38452,8 @@ pub mod software { } impl AsRef - for GetResourcePolicyOutput { - fn as_ref(&self) -> &Self { + for &GetResourcePolicyOutput { + fn as_ref(&self) -> Self { self } } @@ -38557,8 +38558,8 @@ pub mod software { } impl AsRef - for GlobalSecondaryIndex { - fn as_ref(&self) -> &Self { + for &GlobalSecondaryIndex { + fn as_ref(&self) -> Self { self } } @@ -38633,8 +38634,8 @@ pub mod software { } impl AsRef - for GlobalSecondaryIndexAutoScalingUpdate { - fn as_ref(&self) -> &Self { + for &GlobalSecondaryIndexAutoScalingUpdate { + fn as_ref(&self) -> Self { self } } @@ -38791,8 +38792,8 @@ pub mod software { } impl AsRef - for GlobalSecondaryIndexDescription { - fn as_ref(&self) -> &Self { + for &GlobalSecondaryIndexDescription { + fn as_ref(&self) -> Self { self } } @@ -38897,8 +38898,8 @@ pub mod software { } impl AsRef - for GlobalSecondaryIndexInfo { - fn as_ref(&self) -> &Self { + for &GlobalSecondaryIndexInfo { + fn as_ref(&self) -> Self { self } } @@ -38983,8 +38984,8 @@ pub mod software { } impl AsRef - for GlobalSecondaryIndexUpdate { - fn as_ref(&self) -> &Self { + for &GlobalSecondaryIndexUpdate { + fn as_ref(&self) -> Self { self } } @@ -39059,8 +39060,8 @@ pub mod software { } impl AsRef - for GlobalTable { - fn as_ref(&self) -> &Self { + for &GlobalTable { + fn as_ref(&self) -> Self { self } } @@ -39165,8 +39166,8 @@ pub mod software { } impl AsRef - for GlobalTableDescription { - fn as_ref(&self) -> &Self { + for &GlobalTableDescription { + fn as_ref(&self) -> Self { self } } @@ -39251,8 +39252,8 @@ pub mod software { } impl AsRef - for GlobalTableGlobalSecondaryIndexSettingsUpdate { - fn as_ref(&self) -> &Self { + for &GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn as_ref(&self) -> Self { self } } @@ -39337,8 +39338,8 @@ pub mod software { } impl AsRef - for GlobalTableStatus { - fn as_ref(&self) -> &Self { + for &GlobalTableStatus { + fn as_ref(&self) -> Self { self } } @@ -39435,8 +39436,8 @@ pub mod software { } impl AsRef - for ImportStatus { - fn as_ref(&self) -> &Self { + for &ImportStatus { + fn as_ref(&self) -> Self { self } } @@ -39571,8 +39572,8 @@ pub mod software { } impl AsRef - for ImportSummary { - fn as_ref(&self) -> &Self { + for &ImportSummary { + fn as_ref(&self) -> Self { self } } @@ -39817,8 +39818,8 @@ pub mod software { } impl AsRef - for ImportTableDescription { - fn as_ref(&self) -> &Self { + for &ImportTableDescription { + fn as_ref(&self) -> Self { self } } @@ -39933,8 +39934,8 @@ pub mod software { } impl AsRef - for ImportTableInput { - fn as_ref(&self) -> &Self { + for &ImportTableInput { + fn as_ref(&self) -> Self { self } } @@ -39999,8 +40000,8 @@ pub mod software { } impl AsRef - for ImportTableOutput { - fn as_ref(&self) -> &Self { + for &ImportTableOutput { + fn as_ref(&self) -> Self { self } } @@ -40085,8 +40086,8 @@ pub mod software { } impl AsRef - for IncrementalExportSpecification { - fn as_ref(&self) -> &Self { + for &IncrementalExportSpecification { + fn as_ref(&self) -> Self { self } } @@ -40171,8 +40172,8 @@ pub mod software { } impl AsRef - for IndexStatus { - fn as_ref(&self) -> &Self { + for &IndexStatus { + fn as_ref(&self) -> Self { self } } @@ -40247,8 +40248,8 @@ pub mod software { } impl AsRef - for InputCompressionType { - fn as_ref(&self) -> &Self { + for &InputCompressionType { + fn as_ref(&self) -> Self { self } } @@ -40323,8 +40324,8 @@ pub mod software { } impl AsRef - for InputFormat { - fn as_ref(&self) -> &Self { + for &InputFormat { + fn as_ref(&self) -> Self { self } } @@ -40389,8 +40390,8 @@ pub mod software { } impl AsRef - for InputFormatOptions { - fn as_ref(&self) -> &Self { + for &InputFormatOptions { + fn as_ref(&self) -> Self { self } } @@ -40465,8 +40466,8 @@ pub mod software { } impl AsRef - for ItemCollectionMetrics { - fn as_ref(&self) -> &Self { + for &ItemCollectionMetrics { + fn as_ref(&self) -> Self { self } } @@ -40535,8 +40536,8 @@ pub mod software { } impl AsRef - for ItemResponse { - fn as_ref(&self) -> &Self { + for &ItemResponse { + fn as_ref(&self) -> Self { self } } @@ -40645,8 +40646,8 @@ pub mod software { } impl AsRef - for KeysAndAttributes { - fn as_ref(&self) -> &Self { + for &KeysAndAttributes { + fn as_ref(&self) -> Self { self } } @@ -40725,8 +40726,8 @@ pub mod software { } impl AsRef - for KeySchemaElement { - fn as_ref(&self) -> &Self { + for &KeySchemaElement { + fn as_ref(&self) -> Self { self } } @@ -40793,8 +40794,8 @@ pub mod software { } impl AsRef - for KeyType { - fn as_ref(&self) -> &Self { + for &KeyType { + fn as_ref(&self) -> Self { self } } @@ -40889,8 +40890,8 @@ pub mod software { } impl AsRef - for KinesisDataStreamDestination { - fn as_ref(&self) -> &Self { + for &KinesisDataStreamDestination { + fn as_ref(&self) -> Self { self } } @@ -40975,8 +40976,8 @@ pub mod software { } impl AsRef - for KinesisStreamingDestinationInput { - fn as_ref(&self) -> &Self { + for &KinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { self } } @@ -41071,8 +41072,8 @@ pub mod software { } impl AsRef - for KinesisStreamingDestinationOutput { - fn as_ref(&self) -> &Self { + for &KinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { self } } @@ -41187,8 +41188,8 @@ pub mod software { } impl AsRef - for ListBackupsInput { - fn as_ref(&self) -> &Self { + for &ListBackupsInput { + fn as_ref(&self) -> Self { self } } @@ -41263,8 +41264,8 @@ pub mod software { } impl AsRef - for ListBackupsOutput { - fn as_ref(&self) -> &Self { + for &ListBackupsOutput { + fn as_ref(&self) -> Self { self } } @@ -41349,8 +41350,8 @@ pub mod software { } impl AsRef - for ListContributorInsightsInput { - fn as_ref(&self) -> &Self { + for &ListContributorInsightsInput { + fn as_ref(&self) -> Self { self } } @@ -41427,8 +41428,8 @@ pub mod software { } impl AsRef - for ListContributorInsightsOutput { - fn as_ref(&self) -> &Self { + for &ListContributorInsightsOutput { + fn as_ref(&self) -> Self { self } } @@ -41513,8 +41514,8 @@ pub mod software { } impl AsRef - for ListExportsInput { - fn as_ref(&self) -> &Self { + for &ListExportsInput { + fn as_ref(&self) -> Self { self } } @@ -41591,8 +41592,8 @@ pub mod software { } impl AsRef - for ListExportsOutput { - fn as_ref(&self) -> &Self { + for &ListExportsOutput { + fn as_ref(&self) -> Self { self } } @@ -41677,8 +41678,8 @@ pub mod software { } impl AsRef - for ListGlobalTablesInput { - fn as_ref(&self) -> &Self { + for &ListGlobalTablesInput { + fn as_ref(&self) -> Self { self } } @@ -41753,8 +41754,8 @@ pub mod software { } impl AsRef - for ListGlobalTablesOutput { - fn as_ref(&self) -> &Self { + for &ListGlobalTablesOutput { + fn as_ref(&self) -> Self { self } } @@ -41839,8 +41840,8 @@ pub mod software { } impl AsRef - for ListImportsInput { - fn as_ref(&self) -> &Self { + for &ListImportsInput { + fn as_ref(&self) -> Self { self } } @@ -41917,8 +41918,8 @@ pub mod software { } impl AsRef - for ListImportsOutput { - fn as_ref(&self) -> &Self { + for &ListImportsOutput { + fn as_ref(&self) -> Self { self } } @@ -41993,8 +41994,8 @@ pub mod software { } impl AsRef - for ListTablesInput { - fn as_ref(&self) -> &Self { + for &ListTablesInput { + fn as_ref(&self) -> Self { self } } @@ -42071,8 +42072,8 @@ pub mod software { } impl AsRef - for ListTablesOutput { - fn as_ref(&self) -> &Self { + for &ListTablesOutput { + fn as_ref(&self) -> Self { self } } @@ -42147,8 +42148,8 @@ pub mod software { } impl AsRef - for ListTagsOfResourceInput { - fn as_ref(&self) -> &Self { + for &ListTagsOfResourceInput { + fn as_ref(&self) -> Self { self } } @@ -42223,8 +42224,8 @@ pub mod software { } impl AsRef - for ListTagsOfResourceOutput { - fn as_ref(&self) -> &Self { + for &ListTagsOfResourceOutput { + fn as_ref(&self) -> Self { self } } @@ -42309,8 +42310,8 @@ pub mod software { } impl AsRef - for LocalSecondaryIndex { - fn as_ref(&self) -> &Self { + for &LocalSecondaryIndex { + fn as_ref(&self) -> Self { self } } @@ -42425,8 +42426,8 @@ pub mod software { } impl AsRef - for LocalSecondaryIndexDescription { - fn as_ref(&self) -> &Self { + for &LocalSecondaryIndexDescription { + fn as_ref(&self) -> Self { self } } @@ -42511,8 +42512,8 @@ pub mod software { } impl AsRef - for LocalSecondaryIndexInfo { - fn as_ref(&self) -> &Self { + for &LocalSecondaryIndexInfo { + fn as_ref(&self) -> Self { self } } @@ -42593,8 +42594,8 @@ pub mod software { } impl AsRef - for OnDemandThroughput { - fn as_ref(&self) -> &Self { + for &OnDemandThroughput { + fn as_ref(&self) -> Self { self } } @@ -42659,8 +42660,8 @@ pub mod software { } impl AsRef - for OnDemandThroughputOverride { - fn as_ref(&self) -> &Self { + for &OnDemandThroughputOverride { + fn as_ref(&self) -> Self { self } } @@ -42735,8 +42736,8 @@ pub mod software { } impl AsRef - for ParameterizedStatement { - fn as_ref(&self) -> &Self { + for &ParameterizedStatement { + fn as_ref(&self) -> Self { self } } @@ -42829,8 +42830,8 @@ pub mod software { } impl AsRef - for PointInTimeRecoveryDescription { - fn as_ref(&self) -> &Self { + for &PointInTimeRecoveryDescription { + fn as_ref(&self) -> Self { self } } @@ -42895,8 +42896,8 @@ pub mod software { } impl AsRef - for PointInTimeRecoverySpecification { - fn as_ref(&self) -> &Self { + for &PointInTimeRecoverySpecification { + fn as_ref(&self) -> Self { self } } @@ -42963,8 +42964,8 @@ pub mod software { } impl AsRef - for PointInTimeRecoveryStatus { - fn as_ref(&self) -> &Self { + for &PointInTimeRecoveryStatus { + fn as_ref(&self) -> Self { self } } @@ -43049,8 +43050,8 @@ pub mod software { } impl AsRef - for Projection { - fn as_ref(&self) -> &Self { + for &Projection { + fn as_ref(&self) -> Self { self } } @@ -43125,8 +43126,8 @@ pub mod software { } impl AsRef - for ProjectionType { - fn as_ref(&self) -> &Self { + for &ProjectionType { + fn as_ref(&self) -> Self { self } } @@ -43201,8 +43202,8 @@ pub mod software { } impl AsRef - for ProvisionedThroughput { - fn as_ref(&self) -> &Self { + for &ProvisionedThroughput { + fn as_ref(&self) -> Self { self } } @@ -43307,8 +43308,8 @@ pub mod software { } impl AsRef - for ProvisionedThroughputDescription { - fn as_ref(&self) -> &Self { + for &ProvisionedThroughputDescription { + fn as_ref(&self) -> Self { self } } @@ -43373,8 +43374,8 @@ pub mod software { } impl AsRef - for ProvisionedThroughputOverride { - fn as_ref(&self) -> &Self { + for &ProvisionedThroughputOverride { + fn as_ref(&self) -> Self { self } } @@ -43489,8 +43490,8 @@ pub mod software { } impl AsRef - for Put { - fn as_ref(&self) -> &Self { + for &Put { + fn as_ref(&self) -> Self { self } } @@ -43645,8 +43646,8 @@ pub mod software { } impl AsRef - for PutItemInput { - fn as_ref(&self) -> &Self { + for &PutItemInput { + fn as_ref(&self) -> Self { self } } @@ -43731,8 +43732,8 @@ pub mod software { } impl AsRef - for PutItemOutput { - fn as_ref(&self) -> &Self { + for &PutItemOutput { + fn as_ref(&self) -> Self { self } } @@ -43797,8 +43798,8 @@ pub mod software { } impl AsRef - for PutRequest { - fn as_ref(&self) -> &Self { + for &PutRequest { + fn as_ref(&self) -> Self { self } } @@ -43893,8 +43894,8 @@ pub mod software { } impl AsRef - for PutResourcePolicyInput { - fn as_ref(&self) -> &Self { + for &PutResourcePolicyInput { + fn as_ref(&self) -> Self { self } } @@ -43959,8 +43960,8 @@ pub mod software { } impl AsRef - for PutResourcePolicyOutput { - fn as_ref(&self) -> &Self { + for &PutResourcePolicyOutput { + fn as_ref(&self) -> Self { self } } @@ -44185,8 +44186,8 @@ pub mod software { } impl AsRef - for QueryInput { - fn as_ref(&self) -> &Self { + for &QueryInput { + fn as_ref(&self) -> Self { self } } @@ -44291,8 +44292,8 @@ pub mod software { } impl AsRef - for QueryOutput { - fn as_ref(&self) -> &Self { + for &QueryOutput { + fn as_ref(&self) -> Self { self } } @@ -44357,8 +44358,8 @@ pub mod software { } impl AsRef - for Replica { - fn as_ref(&self) -> &Self { + for &Replica { + fn as_ref(&self) -> Self { self } } @@ -44463,8 +44464,8 @@ pub mod software { } impl AsRef - for ReplicaAutoScalingDescription { - fn as_ref(&self) -> &Self { + for &ReplicaAutoScalingDescription { + fn as_ref(&self) -> Self { self } } @@ -44549,8 +44550,8 @@ pub mod software { } impl AsRef - for ReplicaAutoScalingUpdate { - fn as_ref(&self) -> &Self { + for &ReplicaAutoScalingUpdate { + fn as_ref(&self) -> Self { self } } @@ -44707,8 +44708,8 @@ pub mod software { } impl AsRef - for ReplicaDescription { - fn as_ref(&self) -> &Self { + for &ReplicaDescription { + fn as_ref(&self) -> Self { self } } @@ -44793,8 +44794,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndex { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndex { + fn as_ref(&self) -> Self { self } } @@ -44889,8 +44890,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndexAutoScalingDescription { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn as_ref(&self) -> Self { self } } @@ -44965,8 +44966,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndexAutoScalingUpdate { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn as_ref(&self) -> Self { self } } @@ -45051,8 +45052,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndexDescription { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndexDescription { + fn as_ref(&self) -> Self { self } } @@ -45169,8 +45170,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndexSettingsDescription { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndexSettingsDescription { + fn as_ref(&self) -> Self { self } } @@ -45255,8 +45256,8 @@ pub mod software { } impl AsRef - for ReplicaGlobalSecondaryIndexSettingsUpdate { - fn as_ref(&self) -> &Self { + for &ReplicaGlobalSecondaryIndexSettingsUpdate { + fn as_ref(&self) -> Self { self } } @@ -45403,8 +45404,8 @@ pub mod software { } impl AsRef - for ReplicaSettingsDescription { - fn as_ref(&self) -> &Self { + for &ReplicaSettingsDescription { + fn as_ref(&self) -> Self { self } } @@ -45509,8 +45510,8 @@ pub mod software { } impl AsRef - for ReplicaSettingsUpdate { - fn as_ref(&self) -> &Self { + for &ReplicaSettingsUpdate { + fn as_ref(&self) -> Self { self } } @@ -45619,8 +45620,8 @@ pub mod software { } impl AsRef - for ReplicaStatus { - fn as_ref(&self) -> &Self { + for &ReplicaStatus { + fn as_ref(&self) -> Self { self } } @@ -45705,8 +45706,8 @@ pub mod software { } impl AsRef - for ReplicationGroupUpdate { - fn as_ref(&self) -> &Self { + for &ReplicationGroupUpdate { + fn as_ref(&self) -> Self { self } } @@ -45783,8 +45784,8 @@ pub mod software { } impl AsRef - for ReplicaUpdate { - fn as_ref(&self) -> &Self { + for &ReplicaUpdate { + fn as_ref(&self) -> Self { self } } @@ -45881,8 +45882,8 @@ pub mod software { } impl AsRef - for RestoreSummary { - fn as_ref(&self) -> &Self { + for &RestoreSummary { + fn as_ref(&self) -> Self { self } } @@ -46017,8 +46018,8 @@ pub mod software { } impl AsRef - for RestoreTableFromBackupInput { - fn as_ref(&self) -> &Self { + for &RestoreTableFromBackupInput { + fn as_ref(&self) -> Self { self } } @@ -46083,8 +46084,8 @@ pub mod software { } impl AsRef - for RestoreTableFromBackupOutput { - fn as_ref(&self) -> &Self { + for &RestoreTableFromBackupOutput { + fn as_ref(&self) -> Self { self } } @@ -46249,8 +46250,8 @@ pub mod software { } impl AsRef - for RestoreTableToPointInTimeInput { - fn as_ref(&self) -> &Self { + for &RestoreTableToPointInTimeInput { + fn as_ref(&self) -> Self { self } } @@ -46315,8 +46316,8 @@ pub mod software { } impl AsRef - for RestoreTableToPointInTimeOutput { - fn as_ref(&self) -> &Self { + for &RestoreTableToPointInTimeOutput { + fn as_ref(&self) -> Self { self } } @@ -46391,8 +46392,8 @@ pub mod software { } impl AsRef - for ReturnConsumedCapacity { - fn as_ref(&self) -> &Self { + for &ReturnConsumedCapacity { + fn as_ref(&self) -> Self { self } } @@ -46459,8 +46460,8 @@ pub mod software { } impl AsRef - for ReturnItemCollectionMetrics { - fn as_ref(&self) -> &Self { + for &ReturnItemCollectionMetrics { + fn as_ref(&self) -> Self { self } } @@ -46551,8 +46552,8 @@ pub mod software { } impl AsRef - for ReturnValue { - fn as_ref(&self) -> &Self { + for &ReturnValue { + fn as_ref(&self) -> Self { self } } @@ -46619,8 +46620,8 @@ pub mod software { } impl AsRef - for ReturnValuesOnConditionCheckFailure { - fn as_ref(&self) -> &Self { + for &ReturnValuesOnConditionCheckFailure { + fn as_ref(&self) -> Self { self } } @@ -46707,8 +46708,8 @@ pub mod software { } impl AsRef - for S3BucketSource { - fn as_ref(&self) -> &Self { + for &S3BucketSource { + fn as_ref(&self) -> Self { self } } @@ -46777,8 +46778,8 @@ pub mod software { } impl AsRef - for S3SseAlgorithm { - fn as_ref(&self) -> &Self { + for &S3SseAlgorithm { + fn as_ref(&self) -> Self { self } } @@ -46855,8 +46856,8 @@ pub mod software { } impl AsRef - for ScalarAttributeType { - fn as_ref(&self) -> &Self { + for &ScalarAttributeType { + fn as_ref(&self) -> Self { self } } @@ -47071,8 +47072,8 @@ pub mod software { } impl AsRef - for ScanInput { - fn as_ref(&self) -> &Self { + for &ScanInput { + fn as_ref(&self) -> Self { self } } @@ -47177,8 +47178,8 @@ pub mod software { } impl AsRef - for ScanOutput { - fn as_ref(&self) -> &Self { + for &ScanOutput { + fn as_ref(&self) -> Self { self } } @@ -47265,8 +47266,8 @@ pub mod software { } impl AsRef