From c2cba5e498013e194ab2a0543e4ed08579ba93ea Mon Sep 17 00:00:00 2001 From: Ritvik Kapila Date: Fri, 6 Dec 2024 17:23:40 -0800 Subject: [PATCH 1/5] chore(rust-release): add Rust release directory --- AwsEncryptionSDK/runtimes/rust/RELEASE.md | 14 +++++ .../runtimes/rust/start_release.sh | 54 +++++++++++++++++++ .../runtimes/rust/test_examples/.gitignore | 3 ++ .../runtimes/rust/test_examples/Cargo.toml | 22 ++++++++ .../runtimes/rust/test_published.sh | 39 ++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 AwsEncryptionSDK/runtimes/rust/RELEASE.md create mode 100644 AwsEncryptionSDK/runtimes/rust/start_release.sh create mode 100644 AwsEncryptionSDK/runtimes/rust/test_examples/.gitignore create mode 100644 AwsEncryptionSDK/runtimes/rust/test_examples/Cargo.toml create mode 100755 AwsEncryptionSDK/runtimes/rust/test_published.sh diff --git a/AwsEncryptionSDK/runtimes/rust/RELEASE.md b/AwsEncryptionSDK/runtimes/rust/RELEASE.md new file mode 100644 index 000000000..0bf4bb615 --- /dev/null +++ b/AwsEncryptionSDK/runtimes/rust/RELEASE.md @@ -0,0 +1,14 @@ +To publish a new version of the aws-esdk for version N.N.N + +1. Acquire the appropriate permissions +1. Ensure git checkout of main is fresh and clean +1. ./start_release.sh N.N.N +1. cd ../../../releases/rust/esdk +1. Create a PR with all changed or added files +1. Within the PR, make sure you also: + 1. Update the `CHANGELOG.md` inside AwsEncryptionSDK/runtimes/rust/ with the changes + 1. If this is a major version bump, update the `SUPPORT_POLICY.rst` for Rust + 1. Get the PR reviewed by a teammate +1. Run `cargo publish` +1. cd ../../../AwsEncryptionSDK/runtimes/rust/ # i.e. return here +1. ./test_published.sh N.N.N diff --git a/AwsEncryptionSDK/runtimes/rust/start_release.sh b/AwsEncryptionSDK/runtimes/rust/start_release.sh new file mode 100644 index 000000000..91e80d65e --- /dev/null +++ b/AwsEncryptionSDK/runtimes/rust/start_release.sh @@ -0,0 +1,54 @@ +#!/bin/bash -eu + +# Check if exactly one argument is provided +if [ "$#" -ne 1 ]; then + echo 1>&2 "USAGE: start_release.sh N.N.N" + exit 1 +fi + +# Go to the directory of this script +cd $( dirname ${BASH_SOURCE[0]} ) + +# Check if the provided argument matches the version pattern +REGEX_VERSION='^\d+\.\d+\.\d+$' +MATCHES=$(echo "$1" | egrep $REGEX_VERSION | wc -l) +if [ $MATCHES -eq 0 ]; then + echo 1>&2 "Version \"$1\" must be N.N.N" + exit 1 +fi + +# Update the version in Cargo.toml +perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml +mv new_Cargo.toml Cargo.toml + +# Remove all files and directories in src except for specified files +find src -depth 1 | egrep -v '(lib.rs)' | xargs rm -rf + +# Change to the parent directory and run make polymorph and transpile commands +cd ../.. +make polymorph_rust transpile_rust test_rust + +# Remove target directory +cd runtimes/rust +rm -rf target + +# Remove existing release directory and copy current directory to releases +rm -rf ../../../releases/rust/esdk +cp -r . ../../../releases/rust/esdk + +# Go to the release directory +cd ../../../releases/rust/esdk + +# Remove unnecessary files and directories +rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md CHANGELOG.md + +# Create .gitignore file with specified entries +echo Cargo.lock > .gitignore +echo target >> .gitignore + +# Run cargo test and example tests +cargo test +cargo test --release --examples + +# Remove Cargo.lock and .pem files after testing the examples +rm -f Cargo.lock *.pem diff --git a/AwsEncryptionSDK/runtimes/rust/test_examples/.gitignore b/AwsEncryptionSDK/runtimes/rust/test_examples/.gitignore new file mode 100644 index 000000000..78ee6533f --- /dev/null +++ b/AwsEncryptionSDK/runtimes/rust/test_examples/.gitignore @@ -0,0 +1,3 @@ +*~ +*.pem +src diff --git a/AwsEncryptionSDK/runtimes/rust/test_examples/Cargo.toml b/AwsEncryptionSDK/runtimes/rust/test_examples/Cargo.toml new file mode 100644 index 000000000..aae3ec203 --- /dev/null +++ b/AwsEncryptionSDK/runtimes/rust/test_examples/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "aws-esdk-examples" +edition = "2021" +rust-version = "1.80.0" + +# 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.55.0" +aws-sdk-kms = "1.51.0" +aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } +aws-smithy-types = "1.2.9" +chrono = "0.4.38" +dafny-runtime = "0.1.1" +dashmap = "6.1.0" +pem = "3.0.4" +rand = "0.8.5" +tokio = {version = "1.42.0", features = ["full"] } +uuid = { version = "1.11.0", features = ["v4"] } diff --git a/AwsEncryptionSDK/runtimes/rust/test_published.sh b/AwsEncryptionSDK/runtimes/rust/test_published.sh new file mode 100755 index 000000000..1011f383a --- /dev/null +++ b/AwsEncryptionSDK/runtimes/rust/test_published.sh @@ -0,0 +1,39 @@ +#!/bin/bash -eu + +# Check if exactly one argument is provided +if [ "$#" -ne 1 ]; then + echo 1>&2 "USAGE: test_published.sh N.N.N" + exit 1 +fi + +# Go to the directory of this script +cd $( dirname ${BASH_SOURCE[0]} ) + +# Check if the provided argument matches the version pattern +REGEX_VERSION='^\d+\.\d+\.\d+$' +echo "$1" | egrep -q $REGEX_VERSION +if [ $? -ne 0 ]; then + echo 1>&2 "Version \"$1\" must be N.N.N" + exit 1 +fi + +VERSION=$1 + +# update examples in test_examples directory +rm -rf test_examples/src +cp -r examples test_examples/src/ +cd test_examples + +# Add aws-esdk +cargo add aws-esdk + +# Check if the added version matches the provided version +MATCH=$(fgrep "aws-esdk = \"$VERSION\"" Cargo.toml | wc -l) +if [ $MATCH -eq "0" ]; then + echo Version $VERSION of aws-esdk not the most recent + egrep '^aws-esdk' Cargo.toml + exit 1 +fi + +# Run the cargo project +cargo test --release --examples From 2fd9910e321cf8a12b6ba908b143ebdfb6633fef Mon Sep 17 00:00:00 2001 From: Ritvik Kapila Date: Fri, 6 Dec 2024 17:48:21 -0800 Subject: [PATCH 2/5] m --- AwsEncryptionSDK/runtimes/rust/start_release.sh | 0 AwsEncryptionSDK/runtimes/rust/test_published.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 AwsEncryptionSDK/runtimes/rust/start_release.sh diff --git a/AwsEncryptionSDK/runtimes/rust/start_release.sh b/AwsEncryptionSDK/runtimes/rust/start_release.sh old mode 100644 new mode 100755 diff --git a/AwsEncryptionSDK/runtimes/rust/test_published.sh b/AwsEncryptionSDK/runtimes/rust/test_published.sh index 1011f383a..abaad0620 100755 --- a/AwsEncryptionSDK/runtimes/rust/test_published.sh +++ b/AwsEncryptionSDK/runtimes/rust/test_published.sh @@ -19,7 +19,7 @@ fi VERSION=$1 -# update examples in test_examples directory +# Update examples in test_examples directory rm -rf test_examples/src cp -r examples test_examples/src/ cd test_examples From d4ef3d3b1ce172fb50641658b53c6384bde0c73f Mon Sep 17 00:00:00 2001 From: Ritvik Kapila Date: Fri, 6 Dec 2024 18:04:31 -0800 Subject: [PATCH 3/5] add all release files --- releases/rust/esdk/.gitignore | 2 + releases/rust/esdk/Cargo.toml | 35 + releases/rust/esdk/README.md | 64 + releases/rust/esdk/examples/README.md | 90 + .../client_supplier_example.rs | 186 + .../rust/esdk/examples/client_supplier/mod.rs | 6 + .../regional_role_client_supplier.rs | 60 + .../regional_role_client_supplier_config.rs | 23 + .../cryptographic_materials_manager/mod.rs | 5 + .../required_encryption_context/mod.rs | 4 + .../required_encryption_context_example.rs | 217 + .../restrict_algorithm_suite/mod.rs | 5 + .../signing_only_example.rs | 135 + .../signing_suite_only_cmm.rs | 122 + .../rust/esdk/examples/example_utils/mod.rs | 4 + .../rust/esdk/examples/example_utils/utils.rs | 273 + .../aws_kms_discovery_keyring_example.rs | 204 + ...aws_kms_discovery_multi_keyring_example.rs | 173 + .../aws_kms_hierarchical_keyring_example.rs | 286 + .../create_branch_key_id.rs | 37 + .../example_branch_key_id_supplier.rs | 74 + .../keyring/aws_kms_hierarchical/mod.rs | 7 + ...he_across_hierarchical_keyrings_example.rs | 313 + .../keyring/aws_kms_keyring_example.rs | 122 + .../aws_kms_mrk_discovery_keyring_example.rs | 181 + ...kms_mrk_discovery_multi_keyring_example.rs | 191 + .../keyring/aws_kms_mrk_keyring_example.rs | 156 + .../aws_kms_mrk_multi_keyring_example.rs | 182 + .../keyring/aws_kms_multi_keyring_example.rs | 228 + .../keyring/aws_kms_rsa_keyring_example.rs | 127 + .../ephemeral_raw_ecdh_keyring_example.rs | 174 + .../kms_ecdh_discovery_keyring_example.rs | 217 + .../keyring/ecdh/kms_ecdh_keyring_example.rs | 225 + .../rust/esdk/examples/keyring/ecdh/mod.rs | 8 + ..._key_discovery_raw_ecdh_keyring_example.rs | 272 + .../keyring/ecdh/raw_ecdh_keyring_example.rs | 227 + releases/rust/esdk/examples/keyring/mod.rs | 17 + .../examples/keyring/multi_keyring_example.rs | 238 + .../keyring/raw_aes_keyring_example.rs | 145 + .../keyring/raw_rsa_keyring_example.rs | 253 + .../limit_encrypted_data_keys_example.rs | 191 + releases/rust/esdk/examples/main.rs | 237 + .../examples/set_commitment_policy_example.rs | 141 + .../set_encryption_algorithm_suite_example.rs | 166 + releases/rust/esdk/src/aes_gcm.rs | 255 + releases/rust/esdk/src/aes_kdf_ctr.rs | 74 + releases/rust/esdk/src/client.rs | 36 + releases/rust/esdk/src/client/decrypt.rs | 20 + releases/rust/esdk/src/client/encrypt.rs | 22 + releases/rust/esdk/src/concurrent_call.rs | 61 + releases/rust/esdk/src/conversions.rs | 22 + .../conversions/aws_encryption_sdk_config.rs | 4 + .../_aws_encryption_sdk_config.rs | 68 + releases/rust/esdk/src/conversions/client.rs | 24 + releases/rust/esdk/src/conversions/decrypt.rs | 7 + .../src/conversions/decrypt/_decrypt_input.rs | 68 + .../conversions/decrypt/_decrypt_output.rs | 36 + .../esdk/src/conversions/decrypt_input.rs | 114 + .../esdk/src/conversions/decrypt_output.rs | 82 + releases/rust/esdk/src/conversions/encrypt.rs | 7 + .../src/conversions/encrypt/_encrypt_input.rs | 82 + .../conversions/encrypt/_encrypt_output.rs | 36 + .../esdk/src/conversions/encrypt_input.rs | 128 + .../esdk/src/conversions/encrypt_output.rs | 82 + releases/rust/esdk/src/conversions/error.rs | 141 + .../conversions/net_v4_0_0_retry_policy.rs | 23 + releases/rust/esdk/src/dafny_libraries.rs | 174 + releases/rust/esdk/src/ddb.rs | 75 + releases/rust/esdk/src/deps.rs | 12 + .../src/deps/aws_cryptography_keyStore.rs | 11 + .../deps/aws_cryptography_keyStore/client.rs | 46 + .../client/create_key.rs | 16 + .../client/create_key_store.rs | 15 + .../client/get_active_branch_key.rs | 15 + .../client/get_beacon_key.rs | 15 + .../client/get_branch_key_version.rs | 16 + .../client/get_key_store_info.rs | 19 + .../client/version_key.rs | 15 + .../aws_cryptography_keyStore/conversions.rs | 58 + .../conversions/beacon_key_materials.rs | 104 + .../conversions/branch_key_materials.rs | 87 + .../conversions/client.rs | 24 + .../conversions/create_key.rs | 7 + .../create_key/_create_key_input.rs | 46 + .../create_key/_create_key_output.rs | 24 + .../conversions/create_key_input.rs | 92 + .../conversions/create_key_output.rs | 70 + .../conversions/create_key_store.rs | 7 + .../_create_key_store_input.rs | 24 + .../_create_key_store_output.rs | 24 + .../conversions/create_key_store_input.rs | 70 + .../conversions/create_key_store_output.rs | 70 + .../conversions/discovery.rs | 70 + .../conversions/error.rs | 141 + .../conversions/get_active_branch_key.rs | 7 + .../_get_active_branch_key_input.rs | 24 + .../_get_active_branch_key_output.rs | 26 + .../get_active_branch_key_input.rs | 70 + .../get_active_branch_key_output.rs | 72 + .../conversions/get_beacon_key.rs | 7 + .../get_beacon_key/_get_beacon_key_input.rs | 24 + .../get_beacon_key/_get_beacon_key_output.rs | 26 + .../conversions/get_beacon_key_input.rs | 70 + .../conversions/get_beacon_key_output.rs | 72 + .../conversions/get_branch_key_version.rs | 7 + .../_get_branch_key_version_input.rs | 26 + .../_get_branch_key_version_output.rs | 26 + .../get_branch_key_version_input.rs | 72 + .../get_branch_key_version_output.rs | 72 + .../conversions/get_key_store_info.rs | 5 + .../_get_key_store_info_output.rs | 40 + .../conversions/get_key_store_info_output.rs | 86 + .../conversions/key_store_config.rs | 4 + .../key_store_config/_key_store_config.rs | 93 + .../conversions/kms_configuration.rs | 55 + .../conversions/mr_discovery.rs | 70 + .../conversions/version_key.rs | 7 + .../version_key/_version_key_input.rs | 24 + .../version_key/_version_key_output.rs | 24 + .../conversions/version_key_input.rs | 70 + .../conversions/version_key_output.rs | 70 + .../deps/aws_cryptography_keyStore/deps.rs | 3 + .../deps/aws_cryptography_keyStore/error.rs | 16 + .../error/sealed_unhandled.rs | 32 + .../aws_cryptography_keyStore/operation.rs | 23 + .../operation/create_key.rs | 49 + .../operation/create_key/_create_key_input.rs | 80 + .../create_key/_create_key_output.rs | 58 + .../operation/create_key/builders.rs | 93 + .../operation/create_key_store.rs | 49 + .../_create_key_store_input.rs | 41 + .../_create_key_store_output.rs | 58 + .../operation/create_key_store/builders.rs | 66 + .../operation/get_active_branch_key.rs | 54 + .../_get_active_branch_key_input.rs | 58 + .../_get_active_branch_key_output.rs | 58 + .../get_active_branch_key/builders.rs | 79 + .../operation/get_beacon_key.rs | 54 + .../get_beacon_key/_get_beacon_key_input.rs | 58 + .../get_beacon_key/_get_beacon_key_output.rs | 58 + .../operation/get_beacon_key/builders.rs | 79 + .../operation/get_branch_key_version.rs | 60 + .../_get_branch_key_version_input.rs | 80 + .../_get_branch_key_version_output.rs | 58 + .../get_branch_key_version/builders.rs | 93 + .../operation/get_key_store_info.rs | 49 + .../_get_key_store_info_output.rs | 146 + .../operation/get_key_store_info/_unit.rs | 41 + .../operation/get_key_store_info/builders.rs | 66 + .../operation/version_key.rs | 54 + .../version_key/_version_key_input.rs | 58 + .../version_key/_version_key_output.rs | 41 + .../operation/version_key/builders.rs | 79 + .../deps/aws_cryptography_keyStore/types.rs | 51 + .../types/_beacon_key_materials.rs | 124 + .../types/_branch_key_materials.rs | 124 + .../types/_create_key_input.rs | 80 + .../types/_create_key_output.rs | 58 + .../types/_create_key_store_input.rs | 41 + .../types/_create_key_store_output.rs | 58 + .../types/_discovery.rs | 41 + .../types/_get_active_branch_key_input.rs | 58 + .../types/_get_active_branch_key_output.rs | 58 + .../types/_get_beacon_key_input.rs | 58 + .../types/_get_beacon_key_output.rs | 58 + .../types/_get_branch_key_version_input.rs | 80 + .../types/_get_branch_key_version_output.rs | 58 + .../types/_get_key_store_info_output.rs | 146 + .../types/_kms_configuration.rs | 83 + .../types/_mr_discovery.rs | 58 + .../types/_version_key_input.rs | 58 + .../types/_version_key_output.rs | 41 + .../types/builders.rs | 36 + .../aws_cryptography_keyStore/types/error.rs | 80 + .../types/key_store_config.rs | 190 + .../aws_cryptography_materialProviders.rs | 11 + .../client.rs | 90 + .../create_aws_kms_discovery_keyring.rs | 17 + .../create_aws_kms_discovery_multi_keyring.rs | 18 + .../client/create_aws_kms_ecdh_keyring.rs | 18 + .../create_aws_kms_hierarchical_keyring.rs | 20 + .../client/create_aws_kms_keyring.rs | 17 + .../create_aws_kms_mrk_discovery_keyring.rs | 18 + ...ate_aws_kms_mrk_discovery_multi_keyring.rs | 18 + .../client/create_aws_kms_mrk_keyring.rs | 17 + .../create_aws_kms_mrk_multi_keyring.rs | 18 + .../client/create_aws_kms_multi_keyring.rs | 18 + .../client/create_aws_kms_rsa_keyring.rs | 19 + .../create_cryptographic_materials_cache.rs | 15 + .../client/create_default_client_supplier.rs | 15 + ...default_cryptographic_materials_manager.rs | 15 + .../client/create_multi_keyring.rs | 16 + .../client/create_raw_aes_keyring.rs | 18 + .../client/create_raw_ecdh_keyring.rs | 16 + .../client/create_raw_rsa_keyring.rs | 19 + .../create_required_encryption_context_cmm.rs | 17 + ...ption_materials_with_plaintext_data_key.rs | 20 + ...yption_materials_has_plaintext_data_key.rs | 21 + .../client/get_algorithm_suite_info.rs | 23 + .../client/initialize_decryption_materials.rs | 22 + .../client/initialize_encryption_materials.rs | 25 + .../client/valid_algorithm_suite_info.rs | 23 + .../valid_decryption_materials_transition.rs | 16 + .../valid_encryption_materials_transition.rs | 16 + .../validate_commitment_policy_on_decrypt.rs | 16 + .../validate_commitment_policy_on_encrypt.rs | 16 + .../conversions.rs | 260 + .../conversions/aes_wrapping_alg.rs | 25 + .../conversions/algorithm_suite_id.rs | 37 + .../conversions/algorithm_suite_info.rs | 100 + .../conversions/branch_key_id_supplier.rs | 97 + .../conversions/cache_type.rs | 77 + .../conversions/client.rs | 24 + .../conversions/client_supplier.rs | 99 + .../conversions/commitment_policy.rs | 37 + .../create_aws_kms_discovery_keyring.rs | 5 + ..._create_aws_kms_discovery_keyring_input.rs | 56 + .../create_aws_kms_discovery_keyring_input.rs | 102 + .../create_aws_kms_discovery_multi_keyring.rs | 5 + ...e_aws_kms_discovery_multi_keyring_input.rs | 71 + ...e_aws_kms_discovery_multi_keyring_input.rs | 117 + .../create_aws_kms_ecdh_keyring.rs | 5 + .../_create_aws_kms_ecdh_keyring_input.rs | 51 + .../create_aws_kms_ecdh_keyring_input.rs | 97 + .../create_aws_kms_hierarchical_keyring.rs | 5 + ...eate_aws_kms_hierarchical_keyring_input.rs | 54 + ...eate_aws_kms_hierarchical_keyring_input.rs | 100 + .../conversions/create_aws_kms_keyring.rs | 5 + .../_create_aws_kms_keyring_input.rs | 47 + .../create_aws_kms_keyring_input.rs | 93 + .../create_aws_kms_mrk_discovery_keyring.rs | 5 + ...ate_aws_kms_mrk_discovery_keyring_input.rs | 58 + ...ate_aws_kms_mrk_discovery_keyring_input.rs | 104 + ...ate_aws_kms_mrk_discovery_multi_keyring.rs | 5 + ...s_kms_mrk_discovery_multi_keyring_input.rs | 71 + ...s_kms_mrk_discovery_multi_keyring_input.rs | 117 + .../conversions/create_aws_kms_mrk_keyring.rs | 5 + .../_create_aws_kms_mrk_keyring_input.rs | 47 + .../create_aws_kms_mrk_keyring_input.rs | 93 + .../create_aws_kms_mrk_multi_keyring.rs | 5 + ..._create_aws_kms_mrk_multi_keyring_input.rs | 73 + .../create_aws_kms_mrk_multi_keyring_input.rs | 119 + .../create_aws_kms_multi_keyring.rs | 5 + .../_create_aws_kms_multi_keyring_input.rs | 73 + .../create_aws_kms_multi_keyring_input.rs | 119 + .../conversions/create_aws_kms_rsa_keyring.rs | 5 + .../_create_aws_kms_rsa_keyring_input.rs | 58 + .../create_aws_kms_rsa_keyring_input.rs | 104 + .../create_cryptographic_materials_cache.rs | 5 + ...ate_cryptographic_materials_cache_input.rs | 26 + ...ate_cryptographic_materials_cache_input.rs | 72 + .../create_default_client_supplier.rs | 5 + .../_create_default_client_supplier_input.rs | 24 + .../create_default_client_supplier_input.rs | 70 + ...default_cryptographic_materials_manager.rs | 5 + ...t_cryptographic_materials_manager_input.rs | 26 + ...t_cryptographic_materials_manager_input.rs | 72 + .../conversions/create_multi_keyring.rs | 5 + .../_create_multi_keyring_input.rs | 43 + .../conversions/create_multi_keyring_input.rs | 89 + .../conversions/create_raw_aes_keyring.rs | 5 + .../_create_raw_aes_keyring_input.rs | 30 + .../create_raw_aes_keyring_input.rs | 76 + .../conversions/create_raw_ecdh_keyring.rs | 5 + .../_create_raw_ecdh_keyring_input.rs | 28 + .../create_raw_ecdh_keyring_input.rs | 74 + .../conversions/create_raw_rsa_keyring.rs | 5 + .../_create_raw_rsa_keyring_input.rs | 32 + .../create_raw_rsa_keyring_input.rs | 78 + .../create_required_encryption_context_cmm.rs | 5 + ...e_required_encryption_context_cmm_input.rs | 52 + ...e_required_encryption_context_cmm_input.rs | 98 + .../cryptographic_materials_cache.rs | 235 + .../cryptographic_materials_manager.rs | 143 + .../conversions/dbe_algorithm_suite_id.rs | 23 + .../conversions/dbe_commitment_policy.rs | 21 + .../conversions/decrypt_materials.rs | 7 + .../_decrypt_materials_input.rs | 72 + .../_decrypt_materials_output.rs | 26 + .../conversions/decrypt_materials_input.rs | 118 + .../conversions/decrypt_materials_output.rs | 72 + .../conversions/decryption_materials.rs | 96 + ...ption_materials_with_plaintext_data_key.rs | 5 + ...materials_with_plaintext_data_key_input.rs | 50 + .../conversions/default_cache.rs | 70 + .../conversions/delete_cache_entry.rs | 5 + .../_delete_cache_entry_input.rs | 24 + .../conversions/delete_cache_entry_input.rs | 70 + .../conversions/derivation_algorithm.rs | 50 + .../conversions/direct_key_wrapping.rs | 70 + .../conversions/discovery_filter.rs | 78 + .../conversions/ecdsa.rs | 70 + .../conversions/edk_wrapping_algorithm.rs | 41 + .../conversions/encrypt.rs | 32 + .../conversions/encrypted_data_key.rs | 77 + .../conversions/encryption_materials.rs | 123 + ...yption_materials_has_plaintext_data_key.rs | 5 + ..._materials_has_plaintext_data_key_input.rs | 77 + ..._private_key_to_static_public_key_input.rs | 70 + .../conversions/error.rs | 237 + .../conversions/esdk_algorithm_suite_id.rs | 41 + .../conversions/esdk_commitment_policy.rs | 25 + .../conversions/get_algorithm_suite_info.rs | 5 + .../_get_algorithm_suite_info_output.rs | 54 + .../conversions/get_branch_key_id.rs | 7 + .../_get_branch_key_id_input.rs | 32 + .../_get_branch_key_id_output.rs | 24 + .../conversions/get_branch_key_id_input.rs | 78 + .../conversions/get_branch_key_id_output.rs | 70 + .../conversions/get_cache_entry.rs | 7 + .../get_cache_entry/_get_cache_entry_input.rs | 26 + .../_get_cache_entry_output.rs | 34 + .../conversions/get_cache_entry_input.rs | 72 + .../conversions/get_cache_entry_output.rs | 80 + .../conversions/get_client.rs | 5 + .../get_client/_get_client_input.rs | 24 + .../conversions/get_client_input.rs | 70 + .../conversions/get_encryption_materials.rs | 7 + .../_get_encryption_materials_input.rs | 68 + .../_get_encryption_materials_output.rs | 26 + .../get_encryption_materials_input.rs | 114 + .../get_encryption_materials_output.rs | 72 + .../conversions/hkdf.rs | 76 + .../conversions/identity.rs | 70 + .../initialize_decryption_materials.rs | 7 + .../_initialize_decryption_materials_input.rs | 44 + ..._initialize_decryption_materials_output.rs | 50 + .../initialize_decryption_materials_input.rs | 90 + .../initialize_encryption_materials.rs | 7 + .../_initialize_encryption_materials_input.rs | 48 + ..._initialize_encryption_materials_output.rs | 77 + .../initialize_encryption_materials_input.rs | 94 + .../conversions/intermediate_key_wrapping.rs | 80 + .../conversions/key_agreement_scheme.rs | 32 + .../conversions/keyring.rs | 143 + .../kms_ecdh_static_configurations.rs | 41 + ..._private_key_to_static_public_key_input.rs | 74 + .../kms_public_key_discovery_input.rs | 70 + .../conversions/material_providers_config.rs | 4 + .../_material_providers_config.rs | 44 + .../conversions/materials.rs | 59 + .../conversions/multi_threaded_cache.rs | 72 + .../conversions/no_cache.rs | 70 + .../conversions/none.rs | 70 + .../conversions/on_decrypt.rs | 7 + .../on_decrypt/_on_decrypt_input.rs | 36 + .../on_decrypt/_on_decrypt_output.rs | 26 + .../conversions/on_decrypt_input.rs | 82 + .../conversions/on_decrypt_output.rs | 72 + .../conversions/on_encrypt.rs | 7 + .../on_encrypt/_on_encrypt_input.rs | 26 + .../on_encrypt/_on_encrypt_output.rs | 26 + .../conversions/on_encrypt_input.rs | 72 + .../conversions/on_encrypt_output.rs | 72 + .../conversions/padding_scheme.rs | 29 + .../conversions/public_key_discovery_input.rs | 70 + .../conversions/put_cache_entry.rs | 5 + .../put_cache_entry/_put_cache_entry_input.rs | 36 + .../conversions/put_cache_entry_input.rs | 82 + .../raw_ecdh_static_configurations.rs | 50 + ..._private_key_to_static_public_key_input.rs | 72 + .../conversions/signature_algorithm.rs | 41 + .../conversions/single_threaded_cache.rs | 72 + .../conversions/static_configurations.rs | 41 + .../conversions/storm_tracking_cache.rs | 94 + .../symmetric_signature_algorithm.rs | 39 + .../conversions/time_units.rs | 23 + .../conversions/update_usage_metadata.rs | 5 + .../_update_usage_metadata_input.rs | 26 + .../update_usage_metadata_input.rs | 72 + .../conversions/valid_algorithm_suite_info.rs | 5 + .../_valid_algorithm_suite_info_input.rs | 54 + .../valid_decryption_materials_transition.rs | 5 + ...d_decryption_materials_transition_input.rs | 30 + ...d_decryption_materials_transition_input.rs | 76 + .../valid_encryption_materials_transition.rs | 5 + ...d_encryption_materials_transition_input.rs | 30 + ...d_encryption_materials_transition_input.rs | 76 + .../validate_commitment_policy_on_decrypt.rs | 5 + ...date_commitment_policy_on_decrypt_input.rs | 30 + ...date_commitment_policy_on_decrypt_input.rs | 76 + .../validate_commitment_policy_on_encrypt.rs | 5 + ...date_commitment_policy_on_encrypt_input.rs | 30 + ...date_commitment_policy_on_encrypt_input.rs | 76 + .../deps.rs | 3 + .../error.rs | 16 + .../error/sealed_unhandled.rs | 32 + .../operation.rs | 119 + .../create_aws_kms_discovery_keyring.rs | 55 + ..._create_aws_kms_discovery_keyring_input.rs | 102 + .../_create_keyring_output.rs | 58 + .../builders.rs | 107 + .../create_aws_kms_discovery_multi_keyring.rs | 55 + ...e_aws_kms_discovery_multi_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../builders.rs | 121 + .../operation/create_aws_kms_ecdh_keyring.rs | 67 + .../_create_aws_kms_ecdh_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../create_aws_kms_ecdh_keyring/builders.rs | 121 + .../create_aws_kms_hierarchical_keyring.rs | 67 + ...eate_aws_kms_hierarchical_keyring_input.rs | 168 + .../_create_keyring_output.rs | 58 + .../builders.rs | 149 + .../operation/create_aws_kms_keyring.rs | 61 + .../_create_aws_kms_keyring_input.rs | 102 + .../_create_keyring_output.rs | 58 + .../create_aws_kms_keyring/builders.rs | 107 + .../create_aws_kms_mrk_discovery_keyring.rs | 61 + ...ate_aws_kms_mrk_discovery_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../builders.rs | 121 + ...ate_aws_kms_mrk_discovery_multi_keyring.rs | 55 + ...s_kms_mrk_discovery_multi_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../builders.rs | 121 + .../operation/create_aws_kms_mrk_keyring.rs | 61 + .../_create_aws_kms_mrk_keyring_input.rs | 102 + .../_create_keyring_output.rs | 58 + .../create_aws_kms_mrk_keyring/builders.rs | 107 + .../create_aws_kms_mrk_multi_keyring.rs | 50 + ..._create_aws_kms_mrk_multi_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../builders.rs | 121 + .../operation/create_aws_kms_multi_keyring.rs | 50 + .../_create_aws_kms_multi_keyring_input.rs | 124 + .../_create_keyring_output.rs | 58 + .../create_aws_kms_multi_keyring/builders.rs | 121 + .../operation/create_aws_kms_rsa_keyring.rs | 61 + .../_create_aws_kms_rsa_keyring_input.rs | 146 + .../_create_keyring_output.rs | 58 + .../create_aws_kms_rsa_keyring/builders.rs | 135 + .../create_cryptographic_materials_cache.rs | 55 + ...ate_cryptographic_materials_cache_input.rs | 58 + ...te_cryptographic_materials_cache_output.rs | 58 + .../builders.rs | 78 + .../create_default_client_supplier.rs | 50 + .../_create_default_client_supplier_input.rs | 41 + .../_create_default_client_supplier_output.rs | 58 + .../builders.rs | 65 + ...default_cryptographic_materials_manager.rs | 55 + ..._cryptographic_materials_manager_output.rs | 58 + ...t_cryptographic_materials_manager_input.rs | 58 + .../builders.rs | 79 + .../operation/create_multi_keyring.rs | 55 + .../_create_keyring_output.rs | 58 + .../_create_multi_keyring_input.rs | 80 + .../create_multi_keyring/builders.rs | 93 + .../operation/create_raw_aes_keyring.rs | 73 + .../_create_keyring_output.rs | 58 + .../_create_raw_aes_keyring_input.rs | 124 + .../create_raw_aes_keyring/builders.rs | 121 + .../operation/create_raw_ecdh_keyring.rs | 61 + .../_create_keyring_output.rs | 58 + .../_create_raw_ecdh_keyring_input.rs | 80 + .../create_raw_ecdh_keyring/builders.rs | 93 + .../operation/create_raw_rsa_keyring.rs | 67 + .../_create_keyring_output.rs | 58 + .../_create_raw_rsa_keyring_input.rs | 146 + .../create_raw_rsa_keyring/builders.rs | 135 + .../create_required_encryption_context_cmm.rs | 55 + ...e_required_encryption_context_cmm_input.rs | 102 + ..._required_encryption_context_cmm_output.rs | 58 + .../builders.rs | 107 + .../operation/decrypt_materials.rs | 58 + .../_decrypt_materials_input.rs | 146 + .../_decrypt_materials_output.rs | 58 + .../operation/decrypt_materials/builders.rs | 134 + ...ption_materials_with_plaintext_data_key.rs | 66 + .../_decryption_materials.rs | 168 + .../_unit.rs | 41 + .../builders.rs | 148 + .../operation/delete_cache_entry.rs | 40 + .../_delete_cache_entry_input.rs | 58 + .../operation/delete_cache_entry/_unit.rs | 41 + .../operation/delete_cache_entry/builders.rs | 78 + ...yption_materials_has_plaintext_data_key.rs | 72 + .../_encryption_materials.rs | 190 + .../_unit.rs | 41 + .../builders.rs | 162 + .../operation/get_algorithm_suite_info.rs | 54 + .../_algorithm_suite_info.rs | 234 + .../_get_algorithm_suite_info_input.rs | 58 + .../get_algorithm_suite_info/builders.rs | 78 + .../operation/get_branch_key_id.rs | 40 + .../_get_branch_key_id_input.rs | 58 + .../_get_branch_key_id_output.rs | 58 + .../operation/get_branch_key_id/builders.rs | 79 + .../operation/get_cache_entry.rs | 40 + .../get_cache_entry/_get_cache_entry_input.rs | 80 + .../_get_cache_entry_output.rs | 146 + .../operation/get_cache_entry/builders.rs | 92 + .../operation/get_client.rs | 40 + .../operation/get_client/_get_client_input.rs | 58 + .../get_client/_get_client_output.rs | 58 + .../operation/get_client/builders.rs | 79 + .../operation/get_encryption_materials.rs | 46 + .../_get_encryption_materials_input.rs | 146 + .../_get_encryption_materials_output.rs | 58 + .../get_encryption_materials/builders.rs | 134 + .../initialize_decryption_materials.rs | 66 + .../_decryption_materials.rs | 168 + .../_initialize_decryption_materials_input.rs | 102 + .../builders.rs | 106 + .../initialize_encryption_materials.rs | 66 + .../_encryption_materials.rs | 190 + .../_initialize_encryption_materials_input.rs | 146 + .../builders.rs | 134 + .../operation/on_decrypt.rs | 46 + .../operation/on_decrypt/_on_decrypt_input.rs | 80 + .../on_decrypt/_on_decrypt_output.rs | 58 + .../operation/on_decrypt/builders.rs | 92 + .../operation/on_encrypt.rs | 40 + .../operation/on_encrypt/_on_encrypt_input.rs | 58 + .../on_encrypt/_on_encrypt_output.rs | 58 + .../operation/on_encrypt/builders.rs | 78 + .../operation/put_cache_entry.rs | 82 + .../put_cache_entry/_put_cache_entry_input.rs | 168 + .../operation/put_cache_entry/_unit.rs | 41 + .../operation/put_cache_entry/builders.rs | 148 + .../operation/update_usage_metadata.rs | 52 + .../operation/update_usage_metadata/_unit.rs | 41 + .../_update_usage_metadata_input.rs | 80 + .../update_usage_metadata/builders.rs | 92 + .../operation/valid_algorithm_suite_info.rs | 102 + .../_algorithm_suite_info.rs | 234 + .../valid_algorithm_suite_info/_unit.rs | 41 + .../valid_algorithm_suite_info/builders.rs | 190 + .../valid_decryption_materials_transition.rs | 60 + .../_unit.rs | 41 + ...d_decryption_materials_transition_input.rs | 80 + .../builders.rs | 92 + .../valid_encryption_materials_transition.rs | 60 + .../_unit.rs | 41 + ...d_encryption_materials_transition_input.rs | 80 + .../builders.rs | 92 + .../validate_commitment_policy_on_decrypt.rs | 60 + .../_unit.rs | 41 + ...date_commitment_policy_on_decrypt_input.rs | 80 + .../builders.rs | 92 + .../validate_commitment_policy_on_encrypt.rs | 60 + .../_unit.rs | 41 + ...date_commitment_policy_on_encrypt_input.rs | 80 + .../builders.rs | 92 + .../types.rs | 187 + .../types/_aes_wrapping_alg.rs | 20 + .../types/_algorithm_suite_id.rs | 53 + .../types/_algorithm_suite_info.rs | 234 + .../types/_cache_type.rs | 113 + .../types/_commitment_policy.rs | 53 + ..._create_aws_kms_discovery_keyring_input.rs | 102 + ...e_aws_kms_discovery_multi_keyring_input.rs | 124 + .../_create_aws_kms_ecdh_keyring_input.rs | 124 + ...eate_aws_kms_hierarchical_keyring_input.rs | 168 + .../types/_create_aws_kms_keyring_input.rs | 102 + ...ate_aws_kms_mrk_discovery_keyring_input.rs | 124 + ...s_kms_mrk_discovery_multi_keyring_input.rs | 124 + .../_create_aws_kms_mrk_keyring_input.rs | 102 + ..._create_aws_kms_mrk_multi_keyring_input.rs | 124 + .../_create_aws_kms_multi_keyring_input.rs | 124 + .../_create_aws_kms_rsa_keyring_input.rs | 146 + ...ate_cryptographic_materials_cache_input.rs | 58 + .../_create_default_client_supplier_input.rs | 41 + ...t_cryptographic_materials_manager_input.rs | 58 + .../types/_create_multi_keyring_input.rs | 80 + .../types/_create_raw_aes_keyring_input.rs | 124 + .../types/_create_raw_ecdh_keyring_input.rs | 80 + .../types/_create_raw_rsa_keyring_input.rs | 146 + ...e_required_encryption_context_cmm_input.rs | 102 + .../types/_dbe_algorithm_suite_id.rs | 18 + .../types/_dbe_commitment_policy.rs | 16 + .../types/_decrypt_materials_input.rs | 146 + .../types/_decrypt_materials_output.rs | 58 + .../types/_decryption_materials.rs | 168 + .../types/_default_cache.rs | 58 + .../types/_delete_cache_entry_input.rs | 58 + .../types/_derivation_algorithm.rs | 68 + .../types/_direct_key_wrapping.rs | 41 + .../types/_discovery_filter.rs | 80 + .../types/_ecdsa.rs | 58 + .../types/_edk_wrapping_algorithm.rs | 53 + .../types/_encrypt.rs | 38 + .../types/_encrypted_data_key.rs | 102 + .../types/_encryption_materials.rs | 190 + ..._private_key_to_static_public_key_input.rs | 58 + .../types/_esdk_algorithm_suite_id.rs | 36 + .../types/_esdk_commitment_policy.rs | 20 + .../types/_get_branch_key_id_input.rs | 58 + .../types/_get_branch_key_id_output.rs | 58 + .../types/_get_cache_entry_input.rs | 80 + .../types/_get_cache_entry_output.rs | 146 + .../types/_get_client_input.rs | 58 + .../types/_get_encryption_materials_input.rs | 146 + .../types/_get_encryption_materials_output.rs | 58 + .../types/_hkdf.rs | 124 + .../types/_identity.rs | 41 + .../_initialize_decryption_materials_input.rs | 102 + .../_initialize_encryption_materials_input.rs | 146 + .../types/_intermediate_key_wrapping.rs | 102 + .../types/_key_agreement_scheme.rs | 38 + .../types/_kms_ecdh_static_configurations.rs | 53 + ..._private_key_to_static_public_key_input.rs | 102 + .../types/_kms_public_key_discovery_input.rs | 58 + .../types/_materials.rs | 83 + .../types/_multi_threaded_cache.rs | 80 + .../types/_no_cache.rs | 41 + .../types/_none.rs | 41 + .../types/_on_decrypt_input.rs | 80 + .../types/_on_decrypt_output.rs | 58 + .../types/_on_encrypt_input.rs | 58 + .../types/_on_encrypt_output.rs | 58 + .../types/_padding_scheme.rs | 24 + .../types/_public_key_discovery_input.rs | 58 + .../types/_put_cache_entry_input.rs | 168 + .../types/_raw_ecdh_static_configurations.rs | 68 + ..._private_key_to_static_public_key_input.rs | 80 + .../types/_signature_algorithm.rs | 53 + .../types/_single_threaded_cache.rs | 80 + .../types/_static_configurations.rs | 53 + .../types/_storm_tracking_cache.rs | 228 + .../types/_symmetric_signature_algorithm.rs | 53 + .../types/_time_units.rs | 18 + .../types/_update_usage_metadata_input.rs | 80 + ...d_decryption_materials_transition_input.rs | 80 + ...d_encryption_materials_transition_input.rs | 80 + ...date_commitment_policy_on_decrypt_input.rs | 80 + ...date_commitment_policy_on_encrypt_input.rs | 80 + .../types/branch_key_id_supplier.rs | 40 + .../get_branch_key_id.rs | 15 + .../types/builders.rs | 126 + .../types/client_supplier.rs | 40 + .../types/client_supplier/get_client.rs | 15 + .../types/cryptographic_materials_cache.rs | 70 + .../delete_cache_entry.rs | 15 + .../get_cache_entry.rs | 20 + .../put_cache_entry.rs | 20 + .../update_usage_metadata.rs | 16 + .../types/cryptographic_materials_manager.rs | 50 + .../decrypt_materials.rs | 19 + .../get_encryption_materials.rs | 19 + .../types/error.rs | 138 + .../types/keyring.rs | 50 + .../types/keyring/on_decrypt.rs | 16 + .../types/keyring/on_encrypt.rs | 15 + .../types/material_providers_config.rs | 41 + .../src/deps/aws_cryptography_primitives.rs | 11 + .../aws_cryptography_primitives/client.rs | 80 + .../client/aes_decrypt.rs | 20 + .../client/aes_encrypt.rs | 20 + .../client/aes_kdf_counter_mode.rs | 17 + .../client/compress_public_key.rs | 16 + .../client/decompress_public_key.rs | 16 + .../client/derive_shared_secret.rs | 17 + .../client/digest.rs | 16 + .../client/ecdsa_sign.rs | 17 + .../client/ecdsa_verify.rs | 18 + .../client/generate_ecc_key_pair.rs | 17 + .../client/generate_ecdsa_signature_key.rs | 17 + .../client/generate_random_bytes.rs | 15 + .../client/generate_rsa_key_pair.rs | 16 + .../client/get_public_key_from_private_key.rs | 18 + .../client/get_rsa_key_modulus_length.rs | 15 + .../client/h_mac.rs | 17 + .../client/hkdf.rs | 19 + .../client/hkdf_expand.rs | 18 + .../client/hkdf_extract.rs | 17 + .../client/kdf_counter_mode.rs | 19 + .../client/parse_public_key.rs | 15 + .../client/rsa_decrypt.rs | 17 + .../client/rsa_encrypt.rs | 17 + .../client/validate_public_key.rs | 16 + .../conversions.rs | 146 + .../conversions/aes_ctr.rs | 72 + .../conversions/aes_decrypt.rs | 5 + .../aes_decrypt/_aes_decrypt_input.rs | 36 + .../conversions/aes_decrypt_input.rs | 82 + .../conversions/aes_encrypt.rs | 7 + .../aes_encrypt/_aes_encrypt_input.rs | 34 + .../aes_encrypt/_aes_encrypt_output.rs | 26 + .../conversions/aes_encrypt_input.rs | 80 + .../conversions/aes_encrypt_output.rs | 72 + .../conversions/aes_gcm.rs | 74 + .../conversions/aes_kdf_counter_mode.rs | 5 + .../_aes_kdf_counter_mode_input.rs | 28 + .../conversions/aes_kdf_ctr_input.rs | 74 + .../conversions/client.rs | 24 + .../conversions/compress_public_key.rs | 7 + .../_compress_public_key_input.rs | 28 + .../_compress_public_key_output.rs | 24 + .../conversions/compress_public_key_input.rs | 74 + .../conversions/compress_public_key_output.rs | 70 + .../conversions/crypto_config.rs | 4 + .../crypto_config/_crypto_config.rs | 44 + .../conversions/decompress_public_key.rs | 7 + .../_decompress_public_key_input.rs | 26 + .../_decompress_public_key_output.rs | 26 + .../decompress_public_key_input.rs | 72 + .../decompress_public_key_output.rs | 72 + .../conversions/derive_shared_secret.rs | 7 + .../_derive_shared_secret_input.rs | 32 + .../_derive_shared_secret_output.rs | 24 + .../conversions/derive_shared_secret_input.rs | 78 + .../derive_shared_secret_output.rs | 70 + .../conversions/digest.rs | 5 + .../conversions/digest/_digest_input.rs | 26 + .../conversions/digest_algorithm.rs | 25 + .../conversions/digest_input.rs | 72 + .../conversions/ecc_private_key.rs | 70 + .../conversions/ecc_public_key.rs | 70 + .../conversions/ecdh_curve_spec.rs | 27 + .../conversions/ecdsa_sign.rs | 5 + .../ecdsa_sign/_ecdsa_sign_input.rs | 28 + .../conversions/ecdsa_sign_input.rs | 74 + .../conversions/ecdsa_signature_algorithm.rs | 23 + .../conversions/ecdsa_verify.rs | 5 + .../ecdsa_verify/_ecdsa_verify_input.rs | 30 + .../conversions/ecdsa_verify_input.rs | 76 + .../conversions/error.rs | 125 + .../conversions/generate_ecc_key_pair.rs | 7 + .../_generate_ecc_key_pair_input.rs | 24 + .../_generate_ecc_key_pair_output.rs | 32 + .../generate_ecc_key_pair_input.rs | 70 + .../generate_ecc_key_pair_output.rs | 78 + .../generate_ecdsa_signature_key.rs | 7 + .../_generate_ecdsa_signature_key_input.rs | 24 + .../_generate_ecdsa_signature_key_output.rs | 28 + .../generate_ecdsa_signature_key_input.rs | 70 + .../generate_ecdsa_signature_key_output.rs | 74 + .../conversions/generate_random_bytes.rs | 5 + .../_generate_random_bytes_input.rs | 24 + .../generate_random_bytes_input.rs | 70 + .../conversions/generate_rsa_key_pair.rs | 7 + .../_generate_rsa_key_pair_input.rs | 24 + .../_generate_rsa_key_pair_output.rs | 30 + .../generate_rsa_key_pair_input.rs | 70 + .../generate_rsa_key_pair_output.rs | 76 + .../get_public_key_from_private_key.rs | 7 + .../_get_public_key_from_private_key_input.rs | 28 + ..._get_public_key_from_private_key_output.rs | 30 + .../get_public_key_from_private_key_input.rs | 74 + .../get_public_key_from_private_key_output.rs | 76 + .../conversions/get_rsa_key_modulus_length.rs | 7 + .../_get_rsa_key_modulus_length_input.rs | 24 + .../_get_rsa_key_modulus_length_output.rs | 24 + .../get_rsa_key_modulus_length_input.rs | 70 + .../get_rsa_key_modulus_length_output.rs | 70 + .../conversions/h_mac.rs | 5 + .../conversions/h_mac/_h_mac_input.rs | 28 + .../conversions/h_mac_input.rs | 74 + .../conversions/hkdf.rs | 5 + .../conversions/hkdf/_hkdf_input.rs | 32 + .../conversions/hkdf_expand.rs | 5 + .../hkdf_expand/_hkdf_expand_input.rs | 30 + .../conversions/hkdf_expand_input.rs | 76 + .../conversions/hkdf_extract.rs | 5 + .../hkdf_extract/_hkdf_extract_input.rs | 28 + .../conversions/hkdf_extract_input.rs | 74 + .../conversions/hkdf_input.rs | 78 + .../conversions/kdf_counter_mode.rs | 5 + .../_kdf_counter_mode_input.rs | 32 + .../conversions/kdf_ctr_input.rs | 78 + .../conversions/parse_public_key.rs | 7 + .../_parse_public_key_input.rs | 24 + .../_parse_public_key_output.rs | 26 + .../conversions/parse_public_key_input.rs | 70 + .../conversions/parse_public_key_output.rs | 72 + .../conversions/rsa_decrypt.rs | 5 + .../rsa_decrypt/_rsa_decrypt_input.rs | 28 + .../conversions/rsa_decrypt_input.rs | 74 + .../conversions/rsa_encrypt.rs | 5 + .../rsa_encrypt/_rsa_encrypt_input.rs | 28 + .../conversions/rsa_encrypt_input.rs | 74 + .../conversions/rsa_padding_mode.rs | 29 + .../conversions/rsa_private_key.rs | 72 + .../conversions/rsa_public_key.rs | 72 + .../conversions/validate_public_key.rs | 7 + .../_validate_public_key_input.rs | 26 + .../_validate_public_key_output.rs | 24 + .../conversions/validate_public_key_input.rs | 72 + .../conversions/validate_public_key_output.rs | 70 + .../deps/aws_cryptography_primitives/deps.rs | 3 + .../deps/aws_cryptography_primitives/error.rs | 16 + .../error/sealed_unhandled.rs | 32 + .../aws_cryptography_primitives/operation.rs | 74 + .../operation/aes_decrypt.rs | 84 + .../aes_decrypt/_aes_decrypt_input.rs | 168 + .../aes_decrypt/_aes_decrypt_output.rs | 58 + .../operation/aes_decrypt/builders.rs | 148 + .../operation/aes_encrypt.rs | 78 + .../aes_encrypt/_aes_encrypt_input.rs | 146 + .../aes_encrypt/_aes_encrypt_output.rs | 80 + .../operation/aes_encrypt/builders.rs | 134 + .../operation/aes_kdf_counter_mode.rs | 66 + .../_aes_kdf_ctr_input.rs | 102 + .../_aes_kdf_ctr_output.rs | 58 + .../aes_kdf_counter_mode/builders.rs | 106 + .../operation/compress_public_key.rs | 60 + .../_compress_public_key_input.rs | 80 + .../_compress_public_key_output.rs | 58 + .../operation/compress_public_key/builders.rs | 92 + .../operation/decompress_public_key.rs | 60 + .../_decompress_public_key_input.rs | 80 + .../_decompress_public_key_output.rs | 58 + .../decompress_public_key/builders.rs | 92 + .../operation/derive_shared_secret.rs | 66 + .../_derive_shared_secret_input.rs | 102 + .../_derive_shared_secret_output.rs | 58 + .../derive_shared_secret/builders.rs | 106 + .../operation/digest.rs | 60 + .../operation/digest/_digest_input.rs | 80 + .../operation/digest/_digest_output.rs | 58 + .../operation/digest/builders.rs | 92 + .../operation/ecdsa_sign.rs | 66 + .../operation/ecdsa_sign/_ecdsa_sign_input.rs | 102 + .../ecdsa_sign/_ecdsa_sign_output.rs | 58 + .../operation/ecdsa_sign/builders.rs | 106 + .../operation/ecdsa_verify.rs | 72 + .../ecdsa_verify/_ecdsa_verify_input.rs | 124 + .../ecdsa_verify/_ecdsa_verify_output.rs | 58 + .../operation/ecdsa_verify/builders.rs | 120 + .../operation/generate_ecc_key_pair.rs | 54 + .../_generate_ecc_key_pair_input.rs | 58 + .../_generate_ecc_key_pair_output.rs | 102 + .../generate_ecc_key_pair/builders.rs | 78 + .../operation/generate_ecdsa_signature_key.rs | 54 + .../_generate_ecdsa_signature_key_input.rs | 58 + .../_generate_ecdsa_signature_key_output.rs | 102 + .../generate_ecdsa_signature_key/builders.rs | 78 + .../operation/generate_random_bytes.rs | 60 + .../_generate_random_bytes_input.rs | 58 + .../_generate_random_bytes_output.rs | 58 + .../generate_random_bytes/builders.rs | 78 + .../operation/generate_rsa_key_pair.rs | 60 + .../_generate_rsa_key_pair_input.rs | 58 + .../_generate_rsa_key_pair_output.rs | 80 + .../generate_rsa_key_pair/builders.rs | 78 + .../get_public_key_from_private_key.rs | 60 + .../_get_public_key_from_private_key_input.rs | 80 + ..._get_public_key_from_private_key_output.rs | 102 + .../builders.rs | 92 + .../operation/get_rsa_key_modulus_length.rs | 54 + .../_get_rsa_key_modulus_length_input.rs | 58 + .../_get_rsa_key_modulus_length_output.rs | 58 + .../get_rsa_key_modulus_length/builders.rs | 78 + .../operation/h_mac.rs | 66 + .../operation/h_mac/_h_mac_input.rs | 102 + .../operation/h_mac/_h_mac_output.rs | 58 + .../operation/h_mac/builders.rs | 106 + .../operation/hkdf.rs | 78 + .../operation/hkdf/_hkdf_input.rs | 146 + .../operation/hkdf/_hkdf_output.rs | 58 + .../operation/hkdf/builders.rs | 134 + .../operation/hkdf_expand.rs | 78 + .../hkdf_expand/_hkdf_expand_input.rs | 124 + .../hkdf_expand/_hkdf_expand_output.rs | 58 + .../operation/hkdf_expand/builders.rs | 120 + .../operation/hkdf_extract.rs | 60 + .../hkdf_extract/_hkdf_extract_input.rs | 102 + .../hkdf_extract/_hkdf_extract_output.rs | 58 + .../operation/hkdf_extract/builders.rs | 106 + .../operation/kdf_counter_mode.rs | 72 + .../kdf_counter_mode/_kdf_ctr_input.rs | 146 + .../kdf_counter_mode/_kdf_ctr_output.rs | 58 + .../operation/kdf_counter_mode/builders.rs | 134 + .../operation/parse_public_key.rs | 54 + .../_parse_public_key_input.rs | 58 + .../_parse_public_key_output.rs | 58 + .../operation/parse_public_key/builders.rs | 78 + .../operation/rsa_decrypt.rs | 66 + .../rsa_decrypt/_rsa_decrypt_input.rs | 102 + .../rsa_decrypt/_rsa_decrypt_output.rs | 58 + .../operation/rsa_decrypt/builders.rs | 106 + .../operation/rsa_encrypt.rs | 66 + .../rsa_encrypt/_rsa_encrypt_input.rs | 102 + .../rsa_encrypt/_rsa_encrypt_output.rs | 58 + .../operation/rsa_encrypt/builders.rs | 106 + .../operation/validate_public_key.rs | 60 + .../_validate_public_key_input.rs | 80 + .../_validate_public_key_output.rs | 58 + .../operation/validate_public_key/builders.rs | 92 + .../deps/aws_cryptography_primitives/types.rs | 104 + .../types/_aes_ctr.rs | 80 + .../types/_aes_decrypt_input.rs | 168 + .../types/_aes_encrypt_input.rs | 146 + .../types/_aes_encrypt_output.rs | 80 + .../types/_aes_gcm.rs | 102 + .../types/_aes_kdf_ctr_input.rs | 102 + .../types/_compress_public_key_input.rs | 80 + .../types/_compress_public_key_output.rs | 58 + .../types/_decompress_public_key_input.rs | 80 + .../types/_decompress_public_key_output.rs | 58 + .../types/_derive_shared_secret_input.rs | 102 + .../types/_derive_shared_secret_output.rs | 58 + .../types/_digest_algorithm.rs | 20 + .../types/_digest_input.rs | 80 + .../types/_ecc_private_key.rs | 58 + .../types/_ecc_public_key.rs | 58 + .../types/_ecdh_curve_spec.rs | 22 + .../types/_ecdsa_sign_input.rs | 102 + .../types/_ecdsa_signature_algorithm.rs | 18 + .../types/_ecdsa_verify_input.rs | 124 + .../types/_generate_ecc_key_pair_input.rs | 58 + .../types/_generate_ecc_key_pair_output.rs | 102 + .../_generate_ecdsa_signature_key_input.rs | 58 + .../_generate_ecdsa_signature_key_output.rs | 102 + .../types/_generate_random_bytes_input.rs | 58 + .../types/_generate_rsa_key_pair_input.rs | 58 + .../types/_generate_rsa_key_pair_output.rs | 80 + .../_get_public_key_from_private_key_input.rs | 80 + ..._get_public_key_from_private_key_output.rs | 102 + .../_get_rsa_key_modulus_length_input.rs | 58 + .../_get_rsa_key_modulus_length_output.rs | 58 + .../types/_h_mac_input.rs | 102 + .../types/_hkdf_expand_input.rs | 124 + .../types/_hkdf_extract_input.rs | 102 + .../types/_hkdf_input.rs | 146 + .../types/_kdf_ctr_input.rs | 146 + .../types/_parse_public_key_input.rs | 58 + .../types/_parse_public_key_output.rs | 58 + .../types/_rsa_decrypt_input.rs | 102 + .../types/_rsa_encrypt_input.rs | 102 + .../types/_rsa_padding_mode.rs | 24 + .../types/_rsa_private_key.rs | 80 + .../types/_rsa_public_key.rs | 80 + .../types/_validate_public_key_input.rs | 80 + .../types/_validate_public_key_output.rs | 58 + .../types/builders.rs | 84 + .../types/crypto_config.rs | 41 + .../types/error.rs | 72 + .../esdk/src/deps/com_amazonaws_dynamodb.rs | 6 + .../src/deps/com_amazonaws_dynamodb/client.rs | 1305 + .../com_amazonaws_dynamodb/conversions.rs | 410 + ...pproximate_creation_date_time_precision.rs | 23 + .../conversions/archival_summary.rs | 27 + .../conversions/attribute_action.rs | 25 + .../conversions/attribute_definition.rs | 25 + .../conversions/attribute_value.rs | 129 + .../conversions/attribute_value_update.rs | 44 + .../auto_scaling_policy_description.rs | 34 + .../conversions/auto_scaling_policy_update.rs | 27 + .../auto_scaling_settings_description.rs | 50 + .../auto_scaling_settings_update.rs | 40 + ...caling_policy_configuration_description.rs | 29 + ...ing_scaling_policy_configuration_update.rs | 29 + .../conversions/backup_description.rs | 54 + .../conversions/backup_details.rs | 35 + .../conversions/backup_status.rs | 25 + .../conversions/backup_summary.rs | 61 + .../conversions/backup_type.rs | 25 + .../conversions/backup_type_filter.rs | 27 + .../conversions/batch_execute_statement.rs | 31 + .../_batch_execute_statement_request.rs | 44 + .../_batch_execute_statement_response.rs | 65 + .../conversions/batch_get_item.rs | 37 + .../batch_get_item/_batch_get_item_request.rs | 46 + .../_batch_get_item_response.rs | 106 + .../conversions/batch_statement_error.rs | 35 + .../batch_statement_error_code_enum.rs | 41 + .../conversions/batch_statement_request.rs | 46 + .../conversions/batch_statement_response.rs | 58 + .../conversions/batch_write_item.rs | 39 + .../_batch_write_item_request.rs | 64 + .../_batch_write_item_response.rs | 104 + .../conversions/billing_mode.rs | 23 + .../conversions/billing_mode_summary.rs | 35 + .../conversions/cancellation_reason.rs | 49 + .../conversions/capacity.rs | 27 + .../conversions/client.rs | 38 + .../conversions/comparison_operator.rs | 45 + .../conversions/condition.rs | 44 + .../conversions/condition_check.rs | 95 + .../conversions/conditional_operator.rs | 23 + .../conversions/consumed_capacity.rs | 88 + .../continuous_backups_description.rs | 34 + .../conversions/continuous_backups_status.rs | 23 + .../contributor_insights_action.rs | 23 + .../contributor_insights_status.rs | 29 + .../contributor_insights_summary.rs | 37 + .../conversions/create_backup.rs | 41 + .../create_backup/_create_backup_request.rs | 26 + .../create_backup/_create_backup_response.rs | 34 + .../create_global_secondary_index_action.rs | 59 + .../conversions/create_global_table.rs | 37 + .../_create_global_table_request.rs | 34 + .../_create_global_table_response.rs | 34 + .../conversions/create_replica_action.rs | 23 + .../create_replication_group_member_action.rs | 80 + .../conversions/create_table.rs | 35 + .../create_table/_create_table_request.rs | 179 + .../create_table/_create_table_response.rs | 34 + .../conversions/csv_options.rs | 42 + .../conversions/delete.rs | 95 + .../conversions/delete_backup.rs | 37 + .../delete_backup/_delete_backup_request.rs | 24 + .../delete_backup/_delete_backup_response.rs | 34 + .../delete_global_secondary_index_action.rs | 23 + .../conversions/delete_item.rs | 43 + .../delete_item/_delete_item_request.rs | 156 + .../delete_item/_delete_item_response.rs | 69 + .../conversions/delete_replica_action.rs | 23 + .../delete_replication_group_member_action.rs | 23 + .../conversions/delete_request.rs | 33 + .../conversions/delete_resource_policy.rs | 39 + .../_delete_resource_policy_request.rs | 26 + .../_delete_resource_policy_response.rs | 25 + .../conversions/delete_table.rs | 37 + .../delete_table/_delete_table_request.rs | 24 + .../delete_table/_delete_table_response.rs | 34 + .../conversions/describe_backup.rs | 33 + .../_describe_backup_request.rs | 24 + .../_describe_backup_response.rs | 34 + .../describe_continuous_backups.rs | 33 + .../_describe_continuous_backups_request.rs | 24 + .../_describe_continuous_backups_response.rs | 34 + .../describe_contributor_insights.rs | 31 + .../_describe_contributor_insights_request.rs | 26 + ..._describe_contributor_insights_response.rs | 71 + .../conversions/describe_endpoints.rs | 28 + .../_describe_endpoints_request.rs | 24 + .../_describe_endpoints_response.rs | 33 + .../conversions/describe_export.rs | 33 + .../_describe_export_request.rs | 24 + .../_describe_export_response.rs | 34 + .../conversions/describe_global_table.rs | 33 + .../_describe_global_table_request.rs | 24 + .../_describe_global_table_response.rs | 34 + .../describe_global_table_settings.rs | 33 + ..._describe_global_table_settings_request.rs | 24 + ...describe_global_table_settings_response.rs | 46 + .../conversions/describe_import.rs | 29 + .../_describe_import_request.rs | 24 + .../_describe_import_response.rs | 27 + .../describe_kinesis_streaming_destination.rs | 33 + ...e_kinesis_streaming_destination_request.rs | 24 + ..._kinesis_streaming_destination_response.rs | 46 + .../conversions/describe_limits.rs | 31 + .../_describe_limits_request.rs | 24 + .../_describe_limits_response.rs | 31 + .../conversions/describe_table.rs | 33 + .../describe_table/_describe_table_request.rs | 24 + .../_describe_table_response.rs | 34 + .../describe_table_replica_auto_scaling.rs | 31 + ...ribe_table_replica_auto_scaling_request.rs | 24 + ...ibe_table_replica_auto_scaling_response.rs | 34 + .../conversions/describe_time_to_live.rs | 33 + .../_describe_time_to_live_request.rs | 24 + .../_describe_time_to_live_response.rs | 34 + .../conversions/destination_status.rs | 31 + .../disable_kinesis_streaming_destination.rs | 37 + ...e_kinesis_streaming_destination_request.rs | 37 + ..._kinesis_streaming_destination_response.rs | 50 + .../enable_kinesis_streaming_configuration.rs | 33 + .../enable_kinesis_streaming_destination.rs | 37 + ...e_kinesis_streaming_destination_request.rs | 37 + ..._kinesis_streaming_destination_response.rs | 50 + .../conversions/endpoint.rs | 25 + .../conversions/error.rs | 396 + .../error/backup_in_use_exception.rs | 13 + .../error/backup_not_found_exception.rs | 13 + .../conditional_check_failed_exception.rs | 25 + ...ontinuous_backups_unavailable_exception.rs | 13 + .../error/duplicate_item_exception.rs | 13 + .../error/export_conflict_exception.rs | 13 + .../error/export_not_found_exception.rs | 13 + .../global_table_already_exists_exception.rs | 13 + .../error/global_table_not_found_exception.rs | 13 + ...idempotent_parameter_mismatch_exception.rs | 13 + .../error/import_conflict_exception.rs | 13 + .../error/import_not_found_exception.rs | 13 + .../error/index_not_found_exception.rs | 13 + .../error/internal_server_error.rs | 13 + .../error/invalid_endpoint_exception.rs | 13 + .../error/invalid_export_time_exception.rs | 13 + .../error/invalid_restore_time_exception.rs | 13 + ...ollection_size_limit_exceeded_exception.rs | 13 + .../error/limit_exceeded_exception.rs | 13 + ..._in_time_recovery_unavailable_exception.rs | 13 + .../error/policy_not_found_exception.rs | 13 + ...ovisioned_throughput_exceeded_exception.rs | 13 + .../error/replica_already_exists_exception.rs | 13 + .../error/replica_not_found_exception.rs | 13 + .../error/request_limit_exceeded.rs | 13 + .../error/resource_in_use_exception.rs | 13 + .../error/resource_not_found_exception.rs | 13 + .../error/table_already_exists_exception.rs | 13 + .../error/table_in_use_exception.rs | 13 + .../error/table_not_found_exception.rs | 13 + .../error/transaction_canceled_exception.rs | 23 + .../error/transaction_conflict_exception.rs | 13 + .../transaction_in_progress_exception.rs | 13 + .../conversions/execute_statement.rs | 43 + .../_execute_statement_request.rs | 63 + .../_execute_statement_response.rs | 89 + .../conversions/execute_transaction.rs | 41 + .../_execute_transaction_request.rs | 46 + .../_execute_transaction_response.rs | 65 + .../conversions/expected_attribute_value.rs | 67 + .../conversions/export_description.rs | 112 + .../conversions/export_format.rs | 23 + .../conversions/export_status.rs | 25 + .../conversions/export_summary.rs | 47 + .../export_table_to_point_in_time.rs | 39 + .../_export_table_to_point_in_time_request.rs | 83 + ..._export_table_to_point_in_time_response.rs | 34 + .../conversions/export_type.rs | 23 + .../conversions/export_view_type.rs | 23 + .../conversions/failure_exception.rs | 25 + .../com_amazonaws_dynamodb/conversions/get.rs | 59 + .../conversions/get_item.rs | 37 + .../conversions/get_item/_get_item_request.rs | 93 + .../get_item/_get_item_response.rs | 58 + .../conversions/get_resource_policy.rs | 35 + .../_get_resource_policy_request.rs | 24 + .../_get_resource_policy_response.rs | 27 + .../conversions/global_secondary_index.rs | 59 + ...bal_secondary_index_auto_scaling_update.rs | 34 + .../global_secondary_index_description.rs | 97 + .../global_secondary_index_info.rs | 77 + .../global_secondary_index_update.rs | 54 + .../conversions/global_table.rs | 44 + .../conversions/global_table_description.rs | 60 + ..._global_secondary_index_settings_update.rs | 36 + .../conversions/global_table_status.rs | 27 + .../conversions/import_status.rs | 29 + .../conversions/import_summary.rs | 66 + .../conversions/import_table.rs | 33 + .../import_table/_import_table_request.rs | 57 + .../import_table/_import_table_response.rs | 27 + .../conversions/import_table_description.rs | 116 + .../incremental_export_specification.rs | 37 + .../conversions/index_status.rs | 27 + .../conversions/input_compression_type.rs | 25 + .../conversions/input_format.rs | 25 + .../conversions/input_format_options.rs | 32 + .../conversions/item_collection_metrics.rs | 64 + .../conversions/item_response.rs | 45 + .../conversions/key_schema_element.rs | 25 + .../conversions/key_type.rs | 23 + .../conversions/keys_and_attributes.rs | 84 + .../kinesis_data_stream_destination.rs | 49 + .../conversions/list_backups.rs | 31 + .../list_backups/_list_backups_request.rs | 44 + .../list_backups/_list_backups_response.rs | 46 + .../conversions/list_contributor_insights.rs | 31 + .../_list_contributor_insights_request.rs | 28 + .../_list_contributor_insights_response.rs | 46 + .../conversions/list_exports.rs | 31 + .../list_exports/_list_exports_request.rs | 28 + .../list_exports/_list_exports_response.rs | 46 + .../conversions/list_global_tables.rs | 31 + .../_list_global_tables_request.rs | 28 + .../_list_global_tables_response.rs | 46 + .../conversions/list_imports.rs | 29 + .../list_imports/_list_imports_request.rs | 28 + .../list_imports/_list_imports_response.rs | 46 + .../conversions/list_tables.rs | 31 + .../list_tables/_list_tables_request.rs | 26 + .../list_tables/_list_tables_response.rs | 44 + .../conversions/list_tags_of_resource.rs | 33 + .../_list_tags_of_resource_request.rs | 26 + .../_list_tags_of_resource_response.rs | 46 + .../conversions/local_secondary_index.rs | 37 + .../local_secondary_index_description.rs | 61 + .../conversions/local_secondary_index_info.rs | 55 + .../conversions/on_demand_throughput.rs | 25 + .../on_demand_throughput_override.rs | 23 + .../conversions/parameterized_statement.rs | 44 + .../point_in_time_recovery_description.rs | 37 + .../point_in_time_recovery_specification.rs | 23 + .../point_in_time_recovery_status.rs | 23 + .../conversions/projection.rs | 52 + .../conversions/projection_type.rs | 25 + .../conversions/provisioned_throughput.rs | 25 + .../provisioned_throughput_description.rs | 31 + .../provisioned_throughput_override.rs | 23 + .../com_amazonaws_dynamodb/conversions/put.rs | 95 + .../conversions/put_item.rs | 43 + .../conversions/put_item/_put_item_request.rs | 156 + .../put_item/_put_item_response.rs | 69 + .../conversions/put_request.rs | 33 + .../conversions/put_resource_policy.rs | 39 + .../_put_resource_policy_request.rs | 30 + .../_put_resource_policy_response.rs | 25 + .../conversions/query.rs | 37 + .../conversions/query/_query_request.rs | 211 + .../conversions/query/_query_response.rs | 91 + .../conversions/replica.rs | 23 + .../replica_auto_scaling_description.rs | 78 + .../replica_auto_scaling_update.rs | 55 + .../conversions/replica_description.rs | 97 + .../replica_global_secondary_index.rs | 45 + ...econdary_index_auto_scaling_description.rs | 57 + ...bal_secondary_index_auto_scaling_update.rs | 34 + ...lica_global_secondary_index_description.rs | 45 + ...al_secondary_index_settings_description.rs | 61 + ..._global_secondary_index_settings_update.rs | 36 + .../replica_settings_description.rs | 104 + .../conversions/replica_settings_update.rs | 69 + .../conversions/replica_status.rs | 33 + .../conversions/replica_update.rs | 43 + .../conversions/replication_group_update.rs | 54 + .../conversions/restore_summary.rs | 29 + .../conversions/restore_table_from_backup.rs | 41 + .../_restore_table_from_backup_request.rs | 113 + .../_restore_table_from_backup_response.rs | 34 + .../restore_table_to_point_in_time.rs | 43 + ..._restore_table_to_point_in_time_request.rs | 119 + ...restore_table_to_point_in_time_response.rs | 34 + .../conversions/return_consumed_capacity.rs | 25 + .../return_item_collection_metrics.rs | 23 + .../conversions/return_value.rs | 29 + ...eturn_values_on_condition_check_failure.rs | 23 + .../conversions/s3_bucket_source.rs | 27 + .../conversions/s3_sse_algorithm.rs | 23 + .../conversions/scalar_attribute_type.rs | 25 + .../conversions/scan.rs | 37 + .../conversions/scan/_scan_request.rs | 187 + .../conversions/scan/_scan_response.rs | 91 + .../conversions/select.rs | 27 + .../conversions/source_table_details.rs | 70 + .../source_table_feature_details.rs | 96 + .../conversions/sse_description.rs | 49 + .../conversions/sse_specification.rs | 37 + .../conversions/sse_status.rs | 29 + .../conversions/sse_type.rs | 23 + .../conversions/stream_specification.rs | 35 + .../conversions/stream_view_type.rs | 27 + .../table_auto_scaling_description.rs | 56 + .../conversions/table_class.rs | 23 + .../conversions/table_class_summary.rs | 35 + .../conversions/table_creation_parameters.rs | 109 + .../conversions/table_description.rs | 246 + .../conversions/table_status.rs | 33 + .../com_amazonaws_dynamodb/conversions/tag.rs | 25 + .../conversions/tag_resource.rs | 35 + .../tag_resource/_tag_resource_request.rs | 34 + .../conversions/time_to_live_description.rs | 35 + .../conversions/time_to_live_specification.rs | 25 + .../conversions/time_to_live_status.rs | 27 + .../conversions/transact_get_item.rs | 25 + .../conversions/transact_get_items.rs | 39 + .../_transact_get_items_request.rs | 44 + .../_transact_get_items_response.rs | 65 + .../conversions/transact_write_item.rs | 65 + .../conversions/transact_write_items.rs | 43 + .../_transact_write_items_request.rs | 58 + .../_transact_write_items_response.rs | 74 + .../conversions/untag_resource.rs | 35 + .../untag_resource/_untag_resource_request.rs | 32 + .../conversions/update.rs | 97 + .../conversions/update_continuous_backups.rs | 35 + .../_update_continuous_backups_request.rs | 28 + .../_update_continuous_backups_response.rs | 34 + .../update_contributor_insights.rs | 31 + .../_update_contributor_insights_request.rs | 28 + .../_update_contributor_insights_response.rs | 39 + .../update_global_secondary_index_action.rs | 45 + .../conversions/update_global_table.rs | 39 + .../_update_global_table_request.rs | 34 + .../_update_global_table_response.rs | 34 + .../update_global_table_settings.rs | 41 + .../_update_global_table_settings_request.rs | 91 + .../_update_global_table_settings_response.rs | 46 + .../conversions/update_item.rs | 43 + .../update_item/_update_item_request.rs | 182 + .../update_item/_update_item_response.rs | 69 + .../update_kinesis_streaming_configuration.rs | 33 + .../update_kinesis_streaming_destination.rs | 37 + ...e_kinesis_streaming_destination_request.rs | 37 + ..._kinesis_streaming_destination_response.rs | 50 + .../update_replication_group_member_action.rs | 80 + .../conversions/update_table.rs | 37 + .../update_table/_update_table_request.rs | 157 + .../update_table/_update_table_response.rs | 34 + .../update_table_replica_auto_scaling.rs | 35 + ...date_table_replica_auto_scaling_request.rs | 77 + ...ate_table_replica_auto_scaling_response.rs | 34 + .../conversions/update_time_to_live.rs | 37 + .../_update_time_to_live_request.rs | 28 + .../_update_time_to_live_response.rs | 34 + .../conversions/write_request.rs | 43 + .../src/deps/com_amazonaws_dynamodb/types.rs | 4 + .../com_amazonaws_dynamodb/types/error.rs | 154 + .../rust/esdk/src/deps/com_amazonaws_kms.rs | 6 + .../esdk/src/deps/com_amazonaws_kms/client.rs | 1177 + .../src/deps/com_amazonaws_kms/conversions.rs | 186 + .../conversions/algorithm_spec.rs | 31 + .../conversions/alias_list_entry.rs | 31 + .../conversions/cancel_key_deletion.rs | 37 + .../_cancel_key_deletion_request.rs | 24 + .../_cancel_key_deletion_response.rs | 25 + .../com_amazonaws_kms/conversions/client.rs | 38 + .../conversions/connect_custom_key_store.rs | 37 + .../_connect_custom_key_store_request.rs | 24 + .../_connect_custom_key_store_response.rs | 25 + .../conversions/connection_error_code_type.rs | 55 + .../conversions/connection_state_type.rs | 29 + .../conversions/create_alias.rs | 39 + .../create_alias/_create_alias_request.rs | 26 + .../conversions/create_custom_key_store.rs | 61 + .../_create_custom_key_store_request.rs | 71 + .../_create_custom_key_store_response.rs | 25 + .../conversions/create_grant.rs | 45 + .../create_grant/_create_grant_request.rs | 70 + .../create_grant/_create_grant_response.rs | 27 + .../conversions/create_key.rs | 53 + .../create_key/_create_key_request.rs | 103 + .../create_key/_create_key_response.rs | 34 + .../conversions/custom_key_store_type.rs | 23 + .../custom_key_stores_list_entry.rs | 78 + .../conversions/customer_master_key_spec.rs | 45 + .../conversions/data_key_pair_spec.rs | 35 + .../conversions/data_key_spec.rs | 23 + .../com_amazonaws_kms/conversions/decrypt.rs | 49 + .../conversions/decrypt/_decrypt_request.rs | 92 + .../conversions/decrypt/_decrypt_response.rs | 41 + .../conversions/delete_alias.rs | 33 + .../delete_alias/_delete_alias_request.rs | 24 + .../conversions/delete_custom_key_store.rs | 35 + .../_delete_custom_key_store_request.rs | 24 + .../_delete_custom_key_store_response.rs | 25 + .../delete_imported_key_material.rs | 37 + .../_delete_imported_key_material_request.rs | 24 + .../conversions/derive_shared_secret.rs | 45 + .../_derive_shared_secret_request.rs | 60 + .../_derive_shared_secret_response.rs | 53 + .../conversions/describe_custom_key_stores.rs | 33 + .../_describe_custom_key_stores_request.rs | 30 + .../_describe_custom_key_stores_response.rs | 48 + .../conversions/describe_key.rs | 35 + .../describe_key/_describe_key_request.rs | 43 + .../describe_key/_describe_key_response.rs | 34 + .../conversions/disable_key.rs | 35 + .../disable_key/_disable_key_request.rs | 24 + .../conversions/disable_key_rotation.rs | 39 + .../_disable_key_rotation_request.rs | 24 + .../disconnect_custom_key_store.rs | 33 + .../_disconnect_custom_key_store_request.rs | 24 + .../_disconnect_custom_key_store_response.rs | 25 + .../conversions/enable_key.rs | 37 + .../enable_key/_enable_key_request.rs | 24 + .../conversions/enable_key_rotation.rs | 39 + .../_enable_key_rotation_request.rs | 26 + .../com_amazonaws_kms/conversions/encrypt.rs | 45 + .../conversions/encrypt/_encrypt_request.rs | 81 + .../conversions/encrypt/_encrypt_response.rs | 39 + .../conversions/encryption_algorithm_spec.rs | 25 + .../com_amazonaws_kms/conversions/error.rs | 546 + .../error/already_exists_exception.rs | 13 + .../cloud_hsm_cluster_in_use_exception.rs | 13 + ...cluster_invalid_configuration_exception.rs | 13 + .../cloud_hsm_cluster_not_active_exception.rs | 13 + .../cloud_hsm_cluster_not_found_exception.rs | 13 + ...cloud_hsm_cluster_not_related_exception.rs | 13 + .../conversions/error/conflict_exception.rs | 13 + .../custom_key_store_has_cmks_exception.rs | 13 + ...ustom_key_store_invalid_state_exception.rs | 13 + .../custom_key_store_name_in_use_exception.rs | 13 + .../custom_key_store_not_found_exception.rs | 13 + .../error/dependency_timeout_exception.rs | 13 + .../conversions/error/disabled_exception.rs | 13 + .../error/dry_run_operation_exception.rs | 13 + .../error/expired_import_token_exception.rs | 13 + .../error/incorrect_key_exception.rs | 13 + .../error/incorrect_key_material_exception.rs | 13 + .../error/incorrect_trust_anchor_exception.rs | 13 + .../error/invalid_alias_name_exception.rs | 13 + .../error/invalid_arn_exception.rs | 13 + .../error/invalid_ciphertext_exception.rs | 13 + .../error/invalid_grant_id_exception.rs | 13 + .../error/invalid_grant_token_exception.rs | 13 + .../error/invalid_import_token_exception.rs | 13 + .../error/invalid_key_usage_exception.rs | 13 + .../error/invalid_marker_exception.rs | 13 + .../error/key_unavailable_exception.rs | 13 + .../error/kms_internal_exception.rs | 13 + .../error/kms_invalid_mac_exception.rs | 13 + .../error/kms_invalid_signature_exception.rs | 13 + .../error/kms_invalid_state_exception.rs | 13 + .../error/limit_exceeded_exception.rs | 13 + .../malformed_policy_document_exception.rs | 13 + .../conversions/error/not_found_exception.rs | 13 + .../conversions/error/tag_exception.rs | 13 + .../error/unsupported_operation_exception.rs | 13 + .../error/xks_key_already_in_use_exception.rs | 13 + ...xks_key_invalid_configuration_exception.rs | 13 + .../error/xks_key_not_found_exception.rs | 13 + ...ect_authentication_credential_exception.rs | 13 + ...s_proxy_invalid_configuration_exception.rs | 13 + .../xks_proxy_invalid_response_exception.rs | 13 + ...xks_proxy_uri_endpoint_in_use_exception.rs | 13 + .../error/xks_proxy_uri_in_use_exception.rs | 13 + .../xks_proxy_uri_unreachable_exception.rs | 13 + ...y_vpc_endpoint_service_in_use_exception.rs | 13 + ...service_invalid_configuration_exception.rs | 13 + ...pc_endpoint_service_not_found_exception.rs | 13 + .../conversions/expiration_model_type.rs | 23 + .../conversions/generate_data_key.rs | 45 + .../_generate_data_key_request.rs | 92 + .../_generate_data_key_response.rs | 31 + .../conversions/generate_data_key_pair.rs | 47 + .../_generate_data_key_pair_request.rs | 80 + .../_generate_data_key_pair_response.rs | 45 + ...enerate_data_key_pair_without_plaintext.rs | 47 + ...data_key_pair_without_plaintext_request.rs | 69 + ...ata_key_pair_without_plaintext_response.rs | 41 + .../generate_data_key_without_plaintext.rs | 45 + ...rate_data_key_without_plaintext_request.rs | 81 + ...ate_data_key_without_plaintext_response.rs | 27 + .../conversions/generate_mac.rs | 43 + .../generate_mac/_generate_mac_request.rs | 49 + .../generate_mac/_generate_mac_response.rs | 39 + .../conversions/generate_random.rs | 37 + .../_generate_random_request.rs | 37 + .../_generate_random_response.rs | 27 + .../conversions/get_key_policy.rs | 37 + .../get_key_policy/_get_key_policy_request.rs | 26 + .../_get_key_policy_response.rs | 27 + .../conversions/get_key_rotation_status.rs | 39 + .../_get_key_rotation_status_request.rs | 24 + .../_get_key_rotation_status_response.rs | 33 + .../conversions/get_parameters_for_import.rs | 39 + .../_get_parameters_for_import_request.rs | 28 + .../_get_parameters_for_import_response.rs | 31 + .../conversions/get_public_key.rs | 47 + .../get_public_key/_get_public_key_request.rs | 43 + .../_get_public_key_response.rs | 120 + .../conversions/grant_constraints.rs | 65 + .../conversions/grant_list_entry.rs | 65 + .../conversions/grant_operation.rs | 53 + .../conversions/import_key_material.rs | 47 + .../_import_key_material_request.rs | 42 + .../_import_key_material_response.rs | 25 + .../key_agreement_algorithm_spec.rs | 21 + .../conversions/key_encryption_mechanism.rs | 21 + .../conversions/key_list_entry.rs | 25 + .../conversions/key_manager_type.rs | 23 + .../conversions/key_metadata.rs | 227 + .../com_amazonaws_kms/conversions/key_spec.rs | 45 + .../conversions/key_state.rs | 35 + .../conversions/key_usage_type.rs | 27 + .../conversions/list_aliases.rs | 37 + .../list_aliases/_list_aliases_request.rs | 28 + .../list_aliases/_list_aliases_response.rs | 48 + .../conversions/list_grants.rs | 41 + .../list_grants/_list_grants_request.rs | 32 + .../list_grants/_list_grants_response.rs | 48 + .../conversions/list_key_policies.rs | 37 + .../_list_key_policies_request.rs | 28 + .../_list_key_policies_response.rs | 46 + .../conversions/list_key_rotations.rs | 39 + .../_list_key_rotations_request.rs | 28 + .../_list_key_rotations_response.rs | 48 + .../conversions/list_keys.rs | 33 + .../list_keys/_list_keys_request.rs | 26 + .../list_keys/_list_keys_response.rs | 48 + .../conversions/list_resource_tags.rs | 35 + .../_list_resource_tags_request.rs | 28 + .../_list_resource_tags_response.rs | 48 + .../conversions/mac_algorithm_spec.rs | 27 + .../conversions/message_type.rs | 23 + .../conversions/multi_region_configuration.rs | 65 + .../conversions/multi_region_key.rs | 25 + .../conversions/multi_region_key_type.rs | 23 + .../conversions/origin_type.rs | 27 + .../conversions/put_key_policy.rs | 41 + .../put_key_policy/_put_key_policy_request.rs | 30 + .../conversions/re_encrypt.rs | 49 + .../re_encrypt/_re_encrypt_request.rs | 117 + .../re_encrypt/_re_encrypt_response.rs | 53 + .../conversions/recipient_info.rs | 35 + .../conversions/replicate_key.rs | 47 + .../replicate_key/_replicate_key_request.rs | 53 + .../replicate_key/_replicate_key_response.rs | 57 + .../conversions/retire_grant.rs | 41 + .../retire_grant/_retire_grant_request.rs | 30 + .../conversions/revoke_grant.rs | 39 + .../revoke_grant/_revoke_grant_request.rs | 28 + .../conversions/rotate_key_on_demand.rs | 45 + .../_rotate_key_on_demand_request.rs | 24 + .../_rotate_key_on_demand_response.rs | 25 + .../conversions/rotation_type.rs | 23 + .../conversions/rotations_list_entry.rs | 37 + .../conversions/schedule_key_deletion.rs | 37 + .../_schedule_key_deletion_request.rs | 26 + .../_schedule_key_deletion_response.rs | 41 + .../com_amazonaws_kms/conversions/sign.rs | 45 + .../conversions/sign/_sign_request.rs | 61 + .../conversions/sign/_sign_response.rs | 39 + .../conversions/signing_algorithm_spec.rs | 39 + .../deps/com_amazonaws_kms/conversions/tag.rs | 25 + .../conversions/tag_resource.rs | 37 + .../tag_resource/_tag_resource_request.rs | 34 + .../conversions/untag_resource.rs | 35 + .../untag_resource/_untag_resource_request.rs | 32 + .../conversions/update_alias.rs | 35 + .../update_alias/_update_alias_request.rs | 26 + .../conversions/update_custom_key_store.rs | 61 + .../_update_custom_key_store_request.rs | 59 + .../_update_custom_key_store_response.rs | 25 + .../conversions/update_key_description.rs | 35 + .../_update_key_description_request.rs | 26 + .../conversions/update_primary_region.rs | 37 + .../_update_primary_region_request.rs | 26 + .../com_amazonaws_kms/conversions/verify.rs | 47 + .../conversions/verify/_verify_request.rs | 63 + .../conversions/verify/_verify_response.rs | 39 + .../conversions/verify_mac.rs | 45 + .../verify_mac/_verify_mac_request.rs | 51 + .../verify_mac/_verify_mac_response.rs | 39 + .../conversions/wrapping_key_spec.rs | 27 + .../conversions/xks_key_configuration_type.rs | 23 + ...ks_proxy_authentication_credential_type.rs | 25 + .../xks_proxy_configuration_type.rs | 41 + .../xks_proxy_connectivity_type.rs | 23 + .../esdk/src/deps/com_amazonaws_kms/types.rs | 4 + .../src/deps/com_amazonaws_kms/types/error.rs | 214 + releases/rust/esdk/src/digest.rs | 34 + releases/rust/esdk/src/ecdh.rs | 513 + releases/rust/esdk/src/ecdsa.rs | 282 + releases/rust/esdk/src/error.rs | 16 + .../rust/esdk/src/error/sealed_unhandled.rs | 32 + releases/rust/esdk/src/hmac.rs | 123 + .../esdk/src/implementation_from_dafny.rs | 96730 ++++++++++++++++ releases/rust/esdk/src/kms.rs | 88 + releases/rust/esdk/src/lib.rs | 66 + releases/rust/esdk/src/local_cmc.rs | 53 + releases/rust/esdk/src/operation.rs | 8 + releases/rust/esdk/src/operation/decrypt.rs | 54 + .../src/operation/decrypt/_decrypt_input.rs | 124 + .../src/operation/decrypt/_decrypt_output.rs | 102 + .../esdk/src/operation/decrypt/builders.rs | 120 + releases/rust/esdk/src/operation/encrypt.rs | 60 + .../src/operation/encrypt/_encrypt_input.rs | 168 + .../src/operation/encrypt/_encrypt_output.rs | 102 + .../esdk/src/operation/encrypt/builders.rs | 148 + releases/rust/esdk/src/random.rs | 38 + releases/rust/esdk/src/rsa.rs | 256 + releases/rust/esdk/src/sets.rs | 63 + releases/rust/esdk/src/software_externs.rs | 22 + .../esdk/src/standard_library_conversions.rs | 269 + .../rust/esdk/src/standard_library_externs.rs | 83 + releases/rust/esdk/src/storm_tracker.rs | 95 + releases/rust/esdk/src/time.rs | 44 + releases/rust/esdk/src/types.rs | 24 + .../rust/esdk/src/types/_decrypt_input.rs | 124 + .../rust/esdk/src/types/_decrypt_output.rs | 102 + .../rust/esdk/src/types/_encrypt_input.rs | 168 + .../rust/esdk/src/types/_encrypt_output.rs | 102 + .../src/types/_net_v4_0_0_retry_policy.rs | 18 + .../src/types/aws_encryption_sdk_config.rs | 102 + releases/rust/esdk/src/types/builders.rs | 10 + releases/rust/esdk/src/types/error.rs | 80 + releases/rust/esdk/src/uuid.rs | 76 + 1554 files changed, 189791 insertions(+) create mode 100644 releases/rust/esdk/.gitignore create mode 100644 releases/rust/esdk/Cargo.toml create mode 100644 releases/rust/esdk/README.md create mode 100644 releases/rust/esdk/examples/README.md create mode 100644 releases/rust/esdk/examples/client_supplier/client_supplier_example.rs create mode 100644 releases/rust/esdk/examples/client_supplier/mod.rs create mode 100644 releases/rust/esdk/examples/client_supplier/regional_role_client_supplier.rs create mode 100644 releases/rust/esdk/examples/client_supplier/regional_role_client_supplier_config.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/mod.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/mod.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/required_encryption_context_example.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/mod.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_only_example.rs create mode 100644 releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs create mode 100644 releases/rust/esdk/examples/example_utils/mod.rs create mode 100644 releases/rust/esdk/examples/example_utils/utils.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_discovery_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_discovery_multi_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_hierarchical/aws_kms_hierarchical_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_hierarchical/create_branch_key_id.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_hierarchical/example_branch_key_id_supplier.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_hierarchical/mod.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_hierarchical/shared_cache_across_hierarchical_keyrings_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_multi_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_mrk_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_mrk_multi_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_multi_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/aws_kms_rsa_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/ephemeral_raw_ecdh_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_discovery_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/mod.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/public_key_discovery_raw_ecdh_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/ecdh/raw_ecdh_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/mod.rs create mode 100644 releases/rust/esdk/examples/keyring/multi_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/raw_aes_keyring_example.rs create mode 100644 releases/rust/esdk/examples/keyring/raw_rsa_keyring_example.rs create mode 100644 releases/rust/esdk/examples/limit_encrypted_data_keys_example.rs create mode 100644 releases/rust/esdk/examples/main.rs create mode 100644 releases/rust/esdk/examples/set_commitment_policy_example.rs create mode 100644 releases/rust/esdk/examples/set_encryption_algorithm_suite_example.rs create mode 100644 releases/rust/esdk/src/aes_gcm.rs create mode 100644 releases/rust/esdk/src/aes_kdf_ctr.rs create mode 100644 releases/rust/esdk/src/client.rs create mode 100644 releases/rust/esdk/src/client/decrypt.rs create mode 100644 releases/rust/esdk/src/client/encrypt.rs create mode 100644 releases/rust/esdk/src/concurrent_call.rs create mode 100644 releases/rust/esdk/src/conversions.rs create mode 100644 releases/rust/esdk/src/conversions/aws_encryption_sdk_config.rs create mode 100644 releases/rust/esdk/src/conversions/aws_encryption_sdk_config/_aws_encryption_sdk_config.rs create mode 100644 releases/rust/esdk/src/conversions/client.rs create mode 100644 releases/rust/esdk/src/conversions/decrypt.rs create mode 100644 releases/rust/esdk/src/conversions/decrypt/_decrypt_input.rs create mode 100644 releases/rust/esdk/src/conversions/decrypt/_decrypt_output.rs create mode 100644 releases/rust/esdk/src/conversions/decrypt_input.rs create mode 100644 releases/rust/esdk/src/conversions/decrypt_output.rs create mode 100644 releases/rust/esdk/src/conversions/encrypt.rs create mode 100644 releases/rust/esdk/src/conversions/encrypt/_encrypt_input.rs create mode 100644 releases/rust/esdk/src/conversions/encrypt/_encrypt_output.rs create mode 100644 releases/rust/esdk/src/conversions/encrypt_input.rs create mode 100644 releases/rust/esdk/src/conversions/encrypt_output.rs create mode 100644 releases/rust/esdk/src/conversions/error.rs create mode 100644 releases/rust/esdk/src/conversions/net_v4_0_0_retry_policy.rs create mode 100644 releases/rust/esdk/src/dafny_libraries.rs create mode 100644 releases/rust/esdk/src/ddb.rs create mode 100644 releases/rust/esdk/src/deps.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info/_get_key_store_info_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config/_key_store_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/deps.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_get_key_store_info_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_key_store_info_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_hierarchical_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_cryptographic_materials_manager.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_required_encryption_context_cmm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/decryption_materials_with_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/encryption_materials_has_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier/_create_default_client_supplier_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring/_create_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key/_decryption_materials_with_plaintext_data_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry/_delete_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key/_encryption_materials_has_plaintext_data_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ephemeral_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info/_get_algorithm_suite_info_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client/_get_client_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_public_key_discovery_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config/_material_providers_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry/_put_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata/_update_usage_metadata_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info/_valid_algorithm_suite_info_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/deps.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_cryptographic_materials_manager_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_keyring_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_delete_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_get_algorithm_suite_info_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_initialize_decryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_initialize_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_put_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_update_usage_metadata_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_unit.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_hierarchical_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_cryptographic_materials_cache_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_client_supplier_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_cryptographic_materials_manager_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_aes_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_ecdh_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_rsa_keyring_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_required_encryption_context_cmm_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ephemeral_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_public_key_discovery_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_private_key_to_static_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_decryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_encryption_materials_transition_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier/get_branch_key_id.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/delete_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/get_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/put_cache_entry.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/update_usage_metadata.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/decrypt_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/get_encryption_materials.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/digest.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_public_key_from_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_rsa_key_modulus_length.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt/_aes_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode/_aes_kdf_counter_mode_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/client.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign/_ecdsa_sign_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify/_ecdsa_verify_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes/_generate_random_bytes_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac/_h_mac_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand/_hkdf_expand_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract/_hkdf_extract_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode/_kdf_counter_mode_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt/_rsa_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt/_rsa_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/deps.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/error.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/builders.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs create mode 100644 releases/rust/esdk/src/deps/aws_cryptography_primitives/types/error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/client.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/approximate_creation_date_time_precision.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error_code_enum.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_secondary_index_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replication_group_member_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_global_secondary_index_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replication_group_member_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/conditional_check_failed_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/continuous_backups_unavailable_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_already_exists_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/idempotent_parameter_mismatch_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/index_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_export_time_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_restore_time_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/item_collection_size_limit_exceeded_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/point_in_time_recovery_unavailable_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/policy_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/provisioned_throughput_exceeded_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_already_exists_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_already_exists_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_in_progress_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_auto_scaling_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_global_secondary_index_settings_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_specification.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_values_on_condition_check_failure.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource/_tag_resource_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource/_untag_resource_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_secondary_index_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_replication_group_member_action.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types/error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/client.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/client.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias/_create_alias_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_stores_list_entry.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias/_delete_alias_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material/_delete_imported_key_material_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key/_disable_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation/_disable_key_rotation_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key/_enable_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation/_enable_key_rotation_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_invalid_configuration_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_active_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_related_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_has_cmks_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_invalid_state_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_name_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dry_run_operation_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/expired_import_token_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_material_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_trust_anchor_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_alias_name_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_id_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_token_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_import_token_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_key_usage_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_mac_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_signature_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_state_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/malformed_policy_document_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_already_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_invalid_configuration_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_incorrect_authentication_credential_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_configuration_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_response_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_endpoint_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_unreachable_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_in_use_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_invalid_configuration_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_not_found_exception.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy/_put_key_policy_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant/_retire_grant_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant/_revoke_grant_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource/_tag_resource_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource/_untag_resource_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias/_update_alias_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description/_update_key_description_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region/_update_primary_region_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_request.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_response.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_authentication_credential_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/types.rs create mode 100644 releases/rust/esdk/src/deps/com_amazonaws_kms/types/error.rs create mode 100644 releases/rust/esdk/src/digest.rs create mode 100644 releases/rust/esdk/src/ecdh.rs create mode 100644 releases/rust/esdk/src/ecdsa.rs create mode 100644 releases/rust/esdk/src/error.rs create mode 100644 releases/rust/esdk/src/error/sealed_unhandled.rs create mode 100644 releases/rust/esdk/src/hmac.rs create mode 100644 releases/rust/esdk/src/implementation_from_dafny.rs create mode 100644 releases/rust/esdk/src/kms.rs create mode 100644 releases/rust/esdk/src/lib.rs create mode 100644 releases/rust/esdk/src/local_cmc.rs create mode 100644 releases/rust/esdk/src/operation.rs create mode 100644 releases/rust/esdk/src/operation/decrypt.rs create mode 100644 releases/rust/esdk/src/operation/decrypt/_decrypt_input.rs create mode 100644 releases/rust/esdk/src/operation/decrypt/_decrypt_output.rs create mode 100644 releases/rust/esdk/src/operation/decrypt/builders.rs create mode 100644 releases/rust/esdk/src/operation/encrypt.rs create mode 100644 releases/rust/esdk/src/operation/encrypt/_encrypt_input.rs create mode 100644 releases/rust/esdk/src/operation/encrypt/_encrypt_output.rs create mode 100644 releases/rust/esdk/src/operation/encrypt/builders.rs create mode 100644 releases/rust/esdk/src/random.rs create mode 100644 releases/rust/esdk/src/rsa.rs create mode 100644 releases/rust/esdk/src/sets.rs create mode 100644 releases/rust/esdk/src/software_externs.rs create mode 100644 releases/rust/esdk/src/standard_library_conversions.rs create mode 100644 releases/rust/esdk/src/standard_library_externs.rs create mode 100644 releases/rust/esdk/src/storm_tracker.rs create mode 100644 releases/rust/esdk/src/time.rs create mode 100644 releases/rust/esdk/src/types.rs create mode 100644 releases/rust/esdk/src/types/_decrypt_input.rs create mode 100644 releases/rust/esdk/src/types/_decrypt_output.rs create mode 100644 releases/rust/esdk/src/types/_encrypt_input.rs create mode 100644 releases/rust/esdk/src/types/_encrypt_output.rs create mode 100644 releases/rust/esdk/src/types/_net_v4_0_0_retry_policy.rs create mode 100644 releases/rust/esdk/src/types/aws_encryption_sdk_config.rs create mode 100644 releases/rust/esdk/src/types/builders.rs create mode 100644 releases/rust/esdk/src/types/error.rs create mode 100644 releases/rust/esdk/src/uuid.rs diff --git a/releases/rust/esdk/.gitignore b/releases/rust/esdk/.gitignore new file mode 100644 index 000000000..fa8d85ac5 --- /dev/null +++ b/releases/rust/esdk/.gitignore @@ -0,0 +1,2 @@ +Cargo.lock +target diff --git a/releases/rust/esdk/Cargo.toml b/releases/rust/esdk/Cargo.toml new file mode 100644 index 000000000..7581e0849 --- /dev/null +++ b/releases/rust/esdk/Cargo.toml @@ -0,0 +1,35 @@ +[package] +name = "aws-esdk" +version = "0.1.0" +edition = "2021" +rust-version = "1.80.0" +keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] +license = "ISC AND (Apache-2.0 OR ISC)" +description = "aws-esdk is a library for implementing client side encryption." +homepage = "https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html" +repository = "https://github.com/aws/aws-encryption-sdk-dafny/releases/rust/esdk/" +authors = ["AWS-CryptoTools"] +documentation = "https://docs.rs/crate/aws-esdk" +autoexamples = false +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.55.0" +aws-sdk-kms = "1.51.0" +aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } +aws-smithy-types = "1.2.9" +chrono = "0.4.38" +dafny-runtime = "0.1.1" +dashmap = "6.1.0" +pem = "3.0.4" +rand = "0.8.5" +tokio = {version = "1.42.0", features = ["full"] } +uuid = { version = "1.11.0", features = ["v4"] } + +[[example]] +name = "main" diff --git a/releases/rust/esdk/README.md b/releases/rust/esdk/README.md new file mode 100644 index 000000000..c48ae96c6 --- /dev/null +++ b/releases/rust/esdk/README.md @@ -0,0 +1,64 @@ +# AWS Encryption SDK for Rust + +AWS Encryption SDK for Rust + +## Using the AWS Encryption SDK for Rust + +The AWS Encryption SDK is available on [Crates.io](https://www.crates.io/). + +For more details about the design and architecture of the AWS Encryption SDK, see the [AWS Encryption SDK Developer Guide](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html). + +## Building the AWS Encryption SDK for Rust + +To build, the AWS Encryption SDK 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 Encryption SDK in Rust, run: + +``` +cd AwsEncryptionSDK +# Polymorph smithy to Rust +make polymorph_rust +# Transpile Dafny to Rust +make transpile_rust +``` + +### (Optional) Set up the AWS Encryption SDK to work with AWS KMS + +If you set up the AWS Encryption SDK to use the AWS KMS Keyring, +the AWS Encryption SDK 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 Encryption SDK 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. + +## License + +This library is licensed under the Apache 2.0 License. diff --git a/releases/rust/esdk/examples/README.md b/releases/rust/esdk/examples/README.md new file mode 100644 index 000000000..5f75e54b2 --- /dev/null +++ b/releases/rust/esdk/examples/README.md @@ -0,0 +1,90 @@ +# AWS Encryption SDK for Rust Examples + +This section features examples that show you +how to use the AWS Encryption SDK. +We demonstrate how to use the encryption and decryption APIs +and how to set up some common configuration patterns. + +## APIs + +The AWS Encryption SDK provides two high-level APIs: +one-step APIs that process the entire operation in memory +and streaming APIs. + +You can find examples that demonstrate these APIs +in the [`examples/`](./) directory. + +* [How to encrypt and decrypt](./keyring/aws_kms_keyring_example.rs) +* [How to change the algorithm suite](./set_encryption_algorithm_suite_example.rs) +* [How to set the commitment policy](./set_commitment_policy_example.rs) +* [How to limit the number of encrypted data keys (EDKs)](./limit_encrypted_data_keys_example.rs) + +## Configuration + +To use the encryption and decryption APIs, +you need to describe how you want the library to protect your data keys. +You can do this by configuring +[keyrings](#keyrings) or [cryptographic materials managers](#cryptographic-materials-managers). +These examples will show you how to use the configuration tools that we include for you +and how to create some of your own. +We start with AWS KMS examples, then show how to use other wrapping keys. + +* Using AWS Key Management Service (AWS KMS) + * [How to use one AWS KMS key](./keyring/aws_kms_keyring_example.rs) + * [How to use multiple AWS KMS keys in different regions](./keyring/aws_kms_mrk_discovery_multi_keyring_example.rs) + * [How to decrypt when you don't know the AWS KMS key](./keyring/aws_kms_discovery_keyring_example.rs) + * [How to limit decryption to a single region](./keyring/aws_kms_mrk_discovery_keyring_example.rs) + * [How to decrypt with a preferred region but failover to others](./keyring/aws_kms_mrk_discovery_multi_keyring_example.rs) + * [How to reproduce the behavior of an AWS KMS master key provider](./keyring/aws_kms_multi_keyring_example.rs) +* Using raw wrapping keys + * [How to use a raw AES wrapping key](./keyring/raw_aes_keyring_example.rs) + * [How to use a raw RSA wrapping key](./keyring/raw_rsa_keyring_example.rs) +* Combining wrapping keys + * [How to combine AWS KMS with an offline escrow key](./keyring/multi_keyring_example.rs) +* How to restrict algorithm suites + * [with a custom cryptographic materials manager](./cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs) + +### Keyrings + +Keyrings are the most common way for you to configure the AWS Encryption SDK. +They determine how the AWS Encryption SDK protects your data. +You can find these examples in [`examples/keyring`](./keyring). + +### Cryptographic Materials Managers + +Keyrings define how your data keys are protected, +but there is more going on here than just protecting data keys. + +Cryptographic materials managers give you higher-level controls +over how the AWS Encryption SDK protects your data. +This can include things like +enforcing the use of certain algorithm suites or encryption context settings, +reusing data keys across messages, +or changing how you interact with keyrings. +You can find these examples in +[`examples/cryptographic_materials_manager`](./cryptographic_materials_manager). + +### Client Supplier + +The AWS Encryption SDK creates AWS KMS clients when interacting with AWS KMS. +In case the default AWS KMS client configuration doesn't suit your needs, +you can configure clients by defining a custom Client Supplier. +For example, your Client Supplier could tune +the retry and timeout settings on the client, or use different credentials +based on which region is being called. In our +[regional_role_client_supplier](./client_supplier/regional_role_client_supplier.rs) +example, we show how you can build a custom Client Supplier which +creates clients by assuming different IAM roles for different regions. + +# Writing Examples + +If you want to contribute a new example, that's awesome! +To make sure that your example is tested in our CI, +please make sure that it meets the following requirements: + +1. The example MUST be a distinct subdirectory or file in the [`examples/`](./) directory. +1. The example MAY be nested arbitrarily deeply. However, each example file MUST be added to the `mod.rs` files appropriately according to the directory structure. If the example is in the root directory [`examples/`](./), you MUST also add the module to the [`main.rs`](./main.rs) file. For instance, `pub mod set_commitment_policy_example;`. +1. Each example file MUST contain exactly one example. +1. Each example filename MUST be descriptive. +1. Each example file MUST contain a testing function with the attribute `#[tokio::test(flavor = "multi_thread")]` just like the one at the end of the [KMS Keyring](./keyring/aws_kms_keyring_example.rs). +1. Each example MUST also be called inside the `main` function of [main.rs](./main.rs). diff --git a/releases/rust/esdk/examples/client_supplier/client_supplier_example.rs b/releases/rust/esdk/examples/client_supplier/client_supplier_example.rs new file mode 100644 index 000000000..79a4a1177 --- /dev/null +++ b/releases/rust/esdk/examples/client_supplier/client_supplier_example.rs @@ -0,0 +1,186 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* + This example sets up an MRK multi-keyring and an MRK discovery + multi-keyring using a custom client supplier. + A custom client supplier grants users access to more granular + configuration aspects of their authentication details and KMS + client. In this example, we create a simple custom client supplier + that authenticates with a different IAM role based on the + region of the KMS key. + + This example creates a MRK multi-keyring configured with a custom + client supplier using a single MRK and encrypts the example_data with it. + Then, it creates a MRK discovery multi-keyring to decrypt the ciphertext. +*/ + +use super::regional_role_client_supplier::RegionalRoleClientSupplier; +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicMaterialProvidersException; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + mrk_key_id_encrypt: &str, + aws_account_id: &str, + aws_regions: Vec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create a single MRK multi-keyring. + // This can be either a single-region KMS key or an MRK. + // For this example to succeed, the key's region must either + // 1) be in the regions list, or + // 2) the key must be an MRK with a replica defined + // in a region in the regions list, and the client + // must have the correct permissions to access the replica. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create the multi-keyring using our custom client supplier + // defined in the RegionalRoleClientSupplier class in this directory. + // Note: RegionalRoleClientSupplier will internally use the key_arn's region + // to retrieve the correct IAM role. + let mrk_keyring_with_client_supplier = mpl + .create_aws_kms_mrk_multi_keyring() + .client_supplier(RegionalRoleClientSupplier {}) + .generator(mrk_key_id_encrypt) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context using the encrypt_keyring. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(mrk_keyring_with_client_supplier) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6. Create a MRK discovery multi-keyring with a custom client supplier. + // A discovery MRK multi-keyring will be composed of + // multiple discovery MRK keyrings, one for each region. + // Each component keyring has its own KMS client in a particular region. + // When we provide a client supplier to the multi-keyring, all component + // keyrings will use that client supplier configuration. + // In our tests, we make `mrk_key_id_encrypt` an MRK with a replica, and + // provide only the replica region in our discovery filter. + let discovery_filter = DiscoveryFilter::builder() + .account_ids(vec![aws_account_id.to_string()]) + .partition("aws".to_string()) + .build()?; + + let mrk_discovery_client_supplier_keyring = mpl + .create_aws_kms_mrk_discovery_multi_keyring() + .client_supplier(RegionalRoleClientSupplier {}) + .discovery_filter(discovery_filter.clone()) + .regions(aws_regions) + .send() + .await?; + + // 7. Decrypt your encrypted data using the discovery multi keyring. + // On Decrypt, the header of the encrypted message (ciphertext) will be parsed. + // The header contains the Encrypted Data Keys (EDKs), which, if the EDK + // was encrypted by a KMS Keyring, includes the KMS Key ARN. + // For each member of the Multi Keyring, every EDK will try to be decrypted until a decryption + // is successful. + // Since every member of the Multi Keyring is a Discovery Keyring: + // Each Keyring will filter the EDKs by the Discovery Filter and the Keyring's region. + // For each filtered EDK, the keyring will attempt decryption with the keyring's client. + // All of this is done serially, until a success occurs or all keyrings have failed + // all (filtered) EDKs. KMS MRK Discovery Keyrings will attempt to decrypt + // Multi Region Keys (MRKs) and regular KMS Keys. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(mrk_discovery_client_supplier_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 9. Test the Missing Region Exception + // (This is an example for demonstration; you do not need to do this in your own code.) + let mrk_discovery_client_supplier_keyring_missing_region = mpl + .create_aws_kms_mrk_discovery_multi_keyring() + .client_supplier(RegionalRoleClientSupplier {}) + .discovery_filter(discovery_filter) + .regions(vec!["fake-region".to_string()]) + .send() + .await; + + // Swallow the exception + // (This is an example for demonstration; you do not need to do this in your own code.) + match mrk_discovery_client_supplier_keyring_missing_region { + Ok(_) => panic!("Decryption using discovery keyring with missing region MUST \ + raise AwsCryptographicMaterialProvidersException"), + Err(AwsCryptographicMaterialProvidersException { message: _e }) => (), + _ => panic!("Unexpected error type"), + } + + println!("Client Supplier Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Client Supplier example + use crate::example_utils::utils; + + // Note that we pass in an MRK in us-east-1. The RegionalRoleClientSupplier + // will internally use the key_arn's region (us-east-1) + // to retrieve the correct IAM role. + // and access its replica in eu-west-1 + let aws_regions: Vec = vec!["eu-west-1".to_string()]; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/client_supplier/mod.rs b/releases/rust/esdk/examples/client_supplier/mod.rs new file mode 100644 index 000000000..7b31bc5e5 --- /dev/null +++ b/releases/rust/esdk/examples/client_supplier/mod.rs @@ -0,0 +1,6 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod client_supplier_example; +pub mod regional_role_client_supplier; +pub mod regional_role_client_supplier_config; diff --git a/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier.rs b/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier.rs new file mode 100644 index 000000000..0a6b31a1a --- /dev/null +++ b/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier.rs @@ -0,0 +1,60 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_config::Region; +use aws_esdk::aws_cryptography_materialProviders::types::ClientSupplier; +use aws_esdk::aws_cryptography_materialProviders::operation::get_client::GetClientInput; +use aws_esdk::aws_cryptography_materialProviders::types::error::Error; +use aws_esdk::com_amazonaws_kms::client::Client as kms_client; +use super::regional_role_client_supplier_config; + +/* + Example class demonstrating an implementation of a custom client supplier. + This particular implementation will create KMS clients with different IAM roles, + depending on the region passed. +*/ + +pub struct RegionalRoleClientSupplier {} + +impl ClientSupplier for RegionalRoleClientSupplier { + fn get_client(&self, input: GetClientInput) -> Result { + let region = input.region.unwrap(); + + let region_iam_role_map = regional_role_client_supplier_config::region_iam_role_map(); + + if !region_iam_role_map.contains_key(®ion) { + return Err(Error::AwsCryptographicMaterialProvidersException { + message: format!("Region {} is not supported by this client supplier", region).to_string(), + }); + } + + let arn = region_iam_role_map[®ion].clone(); + + use aws_config::sts::AssumeRoleProvider; + + let provider = tokio::task::block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + AssumeRoleProvider::builder(arn) + .region(Region::new(region.clone())) + .session_name("Rust-ESDK-Client-Supplier-Example-Session") + .build() + .await + }) + }); + + let sdk_config = tokio::task::block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + aws_config::load_defaults(aws_config::BehaviorVersion::v2024_03_28()).await + }) + }); + let kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .credentials_provider(provider) + .region(Region::new(region)) + .build(); + + let inner_client = aws_sdk_kms::Client::from_conf(kms_config); + Ok(kms_client { + inner: inner_client, + }) + } +} diff --git a/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier_config.rs b/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier_config.rs new file mode 100644 index 000000000..063858975 --- /dev/null +++ b/releases/rust/esdk/examples/client_supplier/regional_role_client_supplier_config.rs @@ -0,0 +1,23 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use std::collections::HashMap; + +/* + Class containing config for the RegionalRoleClientSupplier. + In your own code, this might be hardcoded, or reference + an external source, e.g. environment variables or AWS AppConfig. +*/ + +const US_EAST_1_IAM_ROLE: &str = + "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-only-us-east-1-KMS-keys"; + +const EU_WEST_1_IAM_ROLE: &str = + "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-only-eu-west-1-KMS-keys"; + +pub fn region_iam_role_map() -> HashMap { + HashMap::from([ + ("us-east-1".to_string(), US_EAST_1_IAM_ROLE.to_string()), + ("eu-west-1".to_string(), EU_WEST_1_IAM_ROLE.to_string()), + ]) +} diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/mod.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/mod.rs new file mode 100644 index 000000000..92bdd4bb7 --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/mod.rs @@ -0,0 +1,5 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod required_encryption_context; +pub mod restrict_algorithm_suite; diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/mod.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/mod.rs new file mode 100644 index 000000000..5680f476f --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/mod.rs @@ -0,0 +1,4 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod required_encryption_context_example; diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/required_encryption_context_example.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/required_encryption_context_example.rs new file mode 100644 index 000000000..55e38e76c --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/required_encryption_context_example.rs @@ -0,0 +1,217 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +Demonstrate an encrypt/decrypt cycle using a Required Encryption Context CMM. +A required encryption context CMM asks for required keys in the encryption context field +on encrypt such that they will not be stored on the message, but WILL be included in the header signature. +On decrypt, the client MUST supply the key/value pair(s) that were not stored to successfully decrypt the message. +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError; +use std::collections::HashMap; +use std::vec::Vec; + +pub async fn encrypt_and_decrypt_with_cmm( + example_data: &str, + kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ("requiredKey1".to_string(), "requiredValue1".to_string()), + ("requiredKey2".to_string(), "requiredValue2".to_string()), + ]); + + // 4. Create your required encryption context keys. + // These keys MUST be in your encryption context. + // These keys and their corresponding values WILL NOT be stored on the message but will be used + // for authentication. + let required_encryption_context_keys: Vec = vec![ + "requiredKey1".to_string(), + "requiredKey2".to_string(), + ]; + + // 5. Create a KMS keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client) + .send() + .await?; + + // 6. Create the required encryption context CMM. + let underlying_cmm = mpl + .create_default_cryptographic_materials_manager() + .keyring(kms_keyring) + .send() + .await?; + + let required_ec_cmm = mpl + .create_required_encryption_context_cmm() + .underlying_cmm(underlying_cmm.clone()) + .required_encryption_context_keys(required_encryption_context_keys) + .send() + .await?; + + // 7. Encrypt the data with the encryption_context + // NOTE: the keys "requiredKey1", and "requiredKey2" + // WILL NOT be stored in the message header, but "encryption", "is not", + // "but adds", "that can help you", and "the data you are handling" WILL be stored. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .materials_manager(required_ec_cmm.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 9. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .materials_manager(required_ec_cmm.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 11. Attempt to decrypt your encrypted data using the same cryptographic material manager + // you used on encrypt, but we won't pass the encryption context we DID NOT store on the message. + // This will fail + let decryption_response_without_ec = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .materials_manager(required_ec_cmm.clone()) + .send() + .await; + + match decryption_response_without_ec { + Ok(_) => panic!("Decrypt without encryption context MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + // 12. Decrypt your encrypted data using the same cryptographic material manager + // you used to encrypt, but supply encryption context that contains ONLY the encryption context that + // was NOT stored. This will pass. + let reproduced_encryption_context = HashMap::from([ + ("requiredKey1".to_string(), "requiredValue1".to_string()), + ("requiredKey2".to_string(), "requiredValue2".to_string()), + ]); + + let decryption_response_with_reproduced_ec = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .materials_manager(required_ec_cmm) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(reproduced_encryption_context) + .send() + .await?; + + let decrypted_plaintext_with_reproduced_ec = + decryption_response_with_reproduced_ec + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_with_reproduced_ec, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 13. You can decrypt the ciphertext using the underlying cmm, but not providing the + // encryption context with the request will result in an AwsCryptographicMaterialProvidersError + + // This will pass + let decryption_response_with_ec_underlying_cmm = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .materials_manager(underlying_cmm.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext_with_ec_underlying_cmm = + decryption_response_with_ec_underlying_cmm + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_with_ec_underlying_cmm, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // This will fail + let decryption_response_without_ec_underlying_cmm = esdk_client.decrypt() + .ciphertext(ciphertext) + .materials_manager(underlying_cmm) + .send() + .await; + + match decryption_response_without_ec_underlying_cmm { + Ok(_) => panic!("Decrypt without encryption context MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + println!("Required Encryption Context CMM Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_cmm() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Required Encryption Context CMM example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_cmm( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/mod.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/mod.rs new file mode 100644 index 000000000..e96c8808b --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/mod.rs @@ -0,0 +1,5 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod signing_only_example; +pub mod signing_suite_only_cmm; diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_only_example.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_only_example.rs new file mode 100644 index 000000000..ea883137a --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_only_example.rs @@ -0,0 +1,135 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* + Demonstrate an encrypt/decrypt cycle using a Custom Cryptographic Materials Manager (CMM). + `SigningSuiteOnlyCMM.cs` demonstrates creating a custom CMM to reject Non-Signing Algorithms. +*/ + +use super::signing_suite_only_cmm::SigningSuiteOnlyCMM; +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef; +use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_cmm( + example_data: &str, + kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create a custom SigningSuiteOnlyCMM + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client) + .send() + .await?; + + let signing_suite_only_cmm = SigningSuiteOnlyCMM::new(kms_keyring); + + let signing_suite_only_cmm_ref: CryptographicMaterialsManagerRef = CryptographicMaterialsManagerRef { + inner: ::std::rc::Rc::new(std::cell::RefCell::new(signing_suite_only_cmm)), + }; + + // 5. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .materials_manager(signing_suite_only_cmm_ref.clone()) + .encryption_context(encryption_context.clone()) + .algorithm_suite_id(EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .materials_manager(signing_suite_only_cmm_ref.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 9. Demonstrate that a Non Signing Algorithm Suite will be rejected + // by the CMM. + let encryption_response_non_signing = esdk_client.encrypt() + .plaintext(plaintext) + .materials_manager(signing_suite_only_cmm_ref) + .encryption_context(encryption_context.clone()) + .algorithm_suite_id(EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey) + .send() + .await; + + match encryption_response_non_signing { + Ok(_) => panic!("Encrypt using non signing algorithm suite MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + println!("SigningSuiteOnlyCMM Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_cmm() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the SigningSuiteOnlyCMM example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_cmm( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs new file mode 100644 index 000000000..0e1ba8354 --- /dev/null +++ b/releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs @@ -0,0 +1,122 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_esdk::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput; +use aws_esdk::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput; +use aws_esdk::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput; +use aws_esdk::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput; +use aws_esdk::aws_cryptography_materialProviders::types::error::Error; +use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManager; +use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef; +use aws_esdk::aws_cryptography_materialProviders::types::keyring::KeyringRef; +use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId; +use aws_esdk::aws_cryptography_materialProviders::types::AlgorithmSuiteId; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::vec::Vec; + +/* + Demonstrates creating a custom Cryptographic Materials Manager (CMM). + The SigningSuiteOnlyCMM ensures that callers use an Algorithm Suite with + signing. This is a best practice. Read more about Digital Signing: + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#digital-sigs + Read more about Cryptographic Materials Managers (CMMs): + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#crypt-materials-manager +*/ + +pub struct SigningSuiteOnlyCMM { + approved_algos: Vec, + cmm: CryptographicMaterialsManagerRef, +} + +impl SigningSuiteOnlyCMM { + pub fn new(keyring: KeyringRef) -> Self { + let mpl_config = MaterialProvidersConfig::builder().build().unwrap(); + let mpl = mpl_client::Client::from_conf(mpl_config).unwrap(); + + Self { + approved_algos: vec![ + EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256EcdsaP256, + EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha384EcdsaP384, + EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384, + EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384, + ], + // Create a DefaultCryptographicMaterialsManager to facilitate + // GetEncryptionMaterials and DecryptionMaterials + // after this CMM approves the Algorithm Suite. + cmm: tokio::task::block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + mpl.create_default_cryptographic_materials_manager() + .keyring(keyring) + .send() + .await + }) + }).unwrap(), + } + } +} + +impl CryptographicMaterialsManager for SigningSuiteOnlyCMM { + fn get_encryption_materials( + &self, + input: GetEncryptionMaterialsInput, + ) -> Result { + let algorithm_suite_id: AlgorithmSuiteId = input.algorithm_suite_id.clone().unwrap(); + let esdk_algorithm_suite_id: EsdkAlgorithmSuiteId = if let AlgorithmSuiteId::Esdk(esdk_id) = algorithm_suite_id { + esdk_id + } + else { + panic!("Algorithm Suite ID is not an EsdkAlgorithmSuiteId"); + }; + + if !self.approved_algos.contains(&esdk_algorithm_suite_id) { + return Err(Error::AwsCryptographicMaterialProvidersException { + message: "Algorithm Suite must use Signing".to_string(), + }); + } + + tokio::task::block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + self.cmm.get_encryption_materials() + .algorithm_suite_id(input.algorithm_suite_id.unwrap()) + .commitment_policy(input.commitment_policy.unwrap()) + .encryption_context(input.encryption_context.unwrap()) + .max_plaintext_length(input.max_plaintext_length.unwrap()) + .send() + .await + }) + }) + + } + + fn decrypt_materials( + &self, + input: DecryptMaterialsInput, + ) -> Result { + let algorithm_suite_id: AlgorithmSuiteId = input.algorithm_suite_id.clone().unwrap(); + let esdk_algorithm_suite_id: EsdkAlgorithmSuiteId = if let AlgorithmSuiteId::Esdk(esdk_id) = algorithm_suite_id { + esdk_id + } + else { + panic!("Algorithm Suite ID is not an EsdkAlgorithmSuiteId"); + }; + + if !self.approved_algos.contains(&esdk_algorithm_suite_id) { + return Err(Error::AwsCryptographicMaterialProvidersException { + message: "Algorithm Suite must use Signing".to_string(), + }); + } + + tokio::task::block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + self.cmm.decrypt_materials() + .algorithm_suite_id(input.algorithm_suite_id.unwrap()) + .commitment_policy(input.commitment_policy.unwrap()) + .encryption_context(input.encryption_context.unwrap()) + .encrypted_data_keys(input.encrypted_data_keys.unwrap()) + .send() + .await + }) + }) + } +} diff --git a/releases/rust/esdk/examples/example_utils/mod.rs b/releases/rust/esdk/examples/example_utils/mod.rs new file mode 100644 index 000000000..14a38ea07 --- /dev/null +++ b/releases/rust/esdk/examples/example_utils/mod.rs @@ -0,0 +1,4 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod utils; diff --git a/releases/rust/esdk/examples/example_utils/utils.rs b/releases/rust/esdk/examples/example_utils/utils.rs new file mode 100644 index 000000000..ab663a60a --- /dev/null +++ b/releases/rust/esdk/examples/example_utils/utils.rs @@ -0,0 +1,273 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub const TEST_EXAMPLE_DATA: &str = "Hello World!"; + +pub const TEST_DEFAULT_KMS_KEY_ID: &str = + "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f"; + +pub const TEST_DEFAULT_KMS_KEY_ACCOUNT_ID: &str = "658956600833"; + +pub const TEST_SECOND_REGION_KMS_KEY_ID: &str = + "arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2"; + +pub const TEST_KMS_RSA_KEY_ID: &str = + "arn:aws:kms:us-west-2:370957321024:key/mrk-63d386cb70614ea59b32ad65c9315297"; + +pub const TEST_KMS_RSA_PUBLIC_KEY: &str = "-----BEGIN PUBLIC KEY-----\n\ + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA27Uc/fBaMVhxCE/SpCMQ\ + oSBRSzQJw+o2hBaA+FiPGtiJ/aPy7sn18aCkelaSj4kwoC79b/arNHlkjc7OJFsN\ + /GoFKgNvaiY4lOeJqEiWQGSSgHtsJLdbO2u4OOSxh8qIRAMKbMgQDVX4FR/PLKeK\ + fc2aCDvcNSpAM++8NlNmv7+xQBJydr5ce91eISbHkFRkK3/bAM+1iddupoRw4Wo2\ + r3avzrg5xBHmzR7u1FTab22Op3Hgb2dBLZH43wNKAceVwKqKA8UNAxashFON7xK9\ + yy4kfOL0Z/nhxRKe4jRZ/5v508qIzgzCksYy7Y3QbMejAtiYnr7s5/d5KWw0swou\ + twIDAQAB\n\ + -----END PUBLIC KEY-----"; + +pub const TEST_MRK_KEY_ID_US_EAST_1: &str = + "arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7"; + +pub const TEST_MRK_KEY_ID_EU_WEST_1: &str = + "arn:aws:kms:eu-west-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7"; + +pub const TEST_KEY_STORE_NAME: &str = "KeyStoreDdbTable"; + +pub const TEST_LOGICAL_KEY_STORE_NAME: &str = "KeyStoreDdbTable"; + +pub const TEST_KEY_STORE_KMS_KEY_ID: &str = + "arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126"; + +// ECDH Utils +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use std::path::Path; +use std::io::Write; + +pub const TEST_KMS_ECDH_KEY_ID_P256_SENDER: &str = + "arn:aws:kms:us-west-2:370957321024:key/eabdf483-6be2-4d2d-8ee4-8c2583d416e9"; +pub const TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT: &str = + "arn:aws:kms:us-west-2:370957321024:key/0265c8e9-5b6a-4055-8f70-63719e09fda5"; + +pub const EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER: &str = "RawEcdhKeyringExamplePrivateKeySender.pem"; +pub const EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT: &str = "RawEcdhKeyringExamplePrivateKeyRecipient.pem"; +pub const EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT: &str = "RawEcdhKeyringExamplePublicKeyRecipient.pem"; +pub const EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER: &str = "KmsEccKeyringExamplePublicKeySender.pem"; +pub const EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT: &str = "KmsEccKeyringExamplePublicKeyRecipient.pem"; + +// Following are the helper functions for running ECDH examples + +pub(crate) fn x962_to_x509( + public_key: &[u8], + nid: i32 +) -> Result, String> { + use aws_lc_sys::EC_POINT_new; + use aws_lc_sys::EC_GROUP_new_by_curve_name; + use aws_lc_sys::EC_POINT_oct2point; + use aws_lc_sys::EC_KEY_new_by_curve_name; + use aws_lc_sys::EC_KEY_set_public_key; + use aws_lc_sys::EVP_PKEY_new; + use aws_lc_sys::EVP_PKEY_assign_EC_KEY; + use aws_lc_sys::EVP_PKEY_size; + use aws_lc_sys::EVP_marshal_public_key; + use aws_lc_sys::CBB_finish; + use aws_lc_sys::CBB_init; + use aws_lc_sys::CBB; + use aws_lc_sys::OPENSSL_free; + use aws_lc_sys::EVP_PKEY_free; + use aws_lc_sys::EC_POINT_free; + use std::ptr::null_mut; + + let ec_group = unsafe { EC_GROUP_new_by_curve_name(nid) }; + let ec_point = unsafe { EC_POINT_new(ec_group) }; + + if 1 != unsafe { + EC_POINT_oct2point( + ec_group, + ec_point, + public_key.as_ptr(), + public_key.len(), + null_mut(), + ) + } { + return Err("Error in EC_POINT_oct2point.".to_string()); + } + + let ec_key = unsafe { EC_KEY_new_by_curve_name(nid) }; + if 1 != unsafe { EC_KEY_set_public_key(ec_key, ec_point) } { + return Err("Error in EC_KEY_set_public_key.".to_string()); + } + + let evp_pkey = unsafe { EVP_PKEY_new() }; + if 1 != unsafe { EVP_PKEY_assign_EC_KEY(evp_pkey, ec_key) } { + return Err("Error in EVP_PKEY_assign_EC_KEY.".to_string()); + } + + let key_size_bytes: usize = unsafe { EVP_PKEY_size(evp_pkey) }.try_into().unwrap(); + let mut cbb: CBB = Default::default(); + unsafe { CBB_init(&mut cbb as *mut CBB, key_size_bytes * 5) }; + + if 1 != unsafe { EVP_marshal_public_key(&mut cbb, evp_pkey) } { + return Err("Error in EVP_marshal_public_key in GetPublicKey.".to_string()); + }; + + let mut out_data = null_mut::(); + let mut out_len: usize = 0; + + if 1 != unsafe { CBB_finish(&mut cbb, &mut out_data, &mut out_len) } { + return Err("Error in CBB_finish in GetPublicKey.".to_string()); + }; + let slice = unsafe { std::slice::from_raw_parts(out_data, out_len) }; + let slice = slice.to_vec(); + + unsafe { OPENSSL_free(out_data as *mut ::std::os::raw::c_void) }; + unsafe { EVP_PKEY_free(evp_pkey) }; + unsafe { EC_POINT_free(ec_point) }; + Ok(slice) +} + +fn get_nid(x: EcdhCurveSpec) -> i32 { + match x { + EcdhCurveSpec::EccNistP256 {} => aws_lc_sys::NID_X9_62_prime256v1, + EcdhCurveSpec::EccNistP384 {} => aws_lc_sys::NID_secp384r1, + EcdhCurveSpec::EccNistP521 {} => aws_lc_sys::NID_secp521r1, + EcdhCurveSpec::Sm2 {} => panic!("No SM2 in Rust"), + } +} + +fn get_alg(x: EcdhCurveSpec) -> &'static aws_lc_rs::agreement::Algorithm { + match x { + EcdhCurveSpec::EccNistP256 {} => &aws_lc_rs::agreement::ECDH_P256, + EcdhCurveSpec::EccNistP384 {} => &aws_lc_rs::agreement::ECDH_P384, + EcdhCurveSpec::EccNistP521 {} => &aws_lc_rs::agreement::ECDH_P521, + EcdhCurveSpec::Sm2 {} => panic!("No SM2 in Rust"), + } +} + +pub(crate) fn exists(f: &str) -> bool { + Path::new(f).exists() +} + +pub(crate) fn write_raw_ecdh_ecc_keys( + ecdh_curve_spec: EcdhCurveSpec +) -> Result<(), crate::BoxError> { + // Safety check: Validate neither file is present + if exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER) + || exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT) + || exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + return Err(crate::BoxError( + "write_raw_ecdh_ecc_keys will not overwrite existing PEM files".to_string(), + )); + } + + let (_public_key_sender, private_key_sender) = generate_raw_ecc_key_pair(ecdh_curve_spec)?; + let (public_key_recipient, private_key_recipient) = generate_raw_ecc_key_pair(ecdh_curve_spec)?; + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER))? + .write_all(private_key_sender.as_bytes())?; + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT))? + .write_all(private_key_recipient.as_bytes())?; + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT))? + .write_all(public_key_recipient.as_bytes())?; + + Ok(()) +} + +fn generate_raw_ecc_key_pair( + ecdh_curve_spec: EcdhCurveSpec +) -> Result<(String, String), crate::BoxError> { + use aws_lc_rs::encoding::AsDer; + use aws_lc_rs::encoding::EcPrivateKeyRfc5915Der; + + // This code will generate new ECC keys for example use. + // The public and private keys will be written to the files: + // - public: EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + // - private: EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + // This example uses aws-lc-rs's KeyPairGenerator to generate the key pair. + // In practice, you should not generate this in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM) + // These examples only demonstrate using the P256 curve while the keyring accepts + // P256, P384, or P521. + // This key is created here for example purposes only. + let private_key = + aws_lc_rs::agreement::PrivateKey::generate(get_alg(ecdh_curve_spec)) + .map_err(|e| format!("{:?}", e))?; + + let public_key = private_key + .compute_public_key() + .map_err(|e| format!("{:?}", e))?; + + let public_key: Vec = x962_to_x509(public_key.as_ref(), get_nid(ecdh_curve_spec))?; + let public_key = pem::Pem::new("PUBLIC KEY", public_key); + let public_key = pem::encode(&public_key); + + let private_key_der = AsDer::::as_der(&private_key) + .map_err(|e| format!("{:?}", e))?; + let private_key = pem::Pem::new("PRIVATE KEY", private_key_der.as_ref()); + let private_key = pem::encode(&private_key); + + Ok((public_key, private_key)) +} + +pub(crate) async fn write_kms_ecdh_ecc_public_key ( + ecc_key_arn: &str, + public_key_file_path: &str +) -> Result<(), crate::BoxError> { + if exists(public_key_file_path) + { + return Err(crate::BoxError( + "write_kms_ecdh_ecc_public_key will not overwrite existing PEM files".to_string(), + )); + } + + let public_key = generate_kms_ecc_public_key(ecc_key_arn).await?; + + let public_key = pem::Pem::new("PUBLIC KEY", public_key); + let public_key = pem::encode(&public_key); + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(public_key_file_path))? + .write_all(public_key.as_bytes())?; + + Ok(()) +} + +pub(crate) async fn generate_kms_ecc_public_key( + ecc_key_arn: &str, +) -> Result { + // Create KMS client to get public key + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // This code will call KMS to get the public key for the KMS ECC key. + // You must have kms:GetPublicKey permissions on the key for this to succeed. + // The public key generated here will be written to the file EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER + // or EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT. + let kms_response = kms_client + .get_public_key() + .key_id(ecc_key_arn) + .send() + .await?; + + let public_key = kms_response + .public_key + .expect("Error unwrapping public key from KMS response."); + + Ok(public_key) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_discovery_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_discovery_keyring_example.rs new file mode 100644 index 000000000..7bc096e0b --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_discovery_keyring_example.rs @@ -0,0 +1,204 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS Discovery Keyring + +AWS KMS discovery keyring is an AWS KMS keyring that doesn't specify any wrapping keys. + +The AWS Encryption SDK provides a standard AWS KMS discovery keyring and a discovery keyring +for AWS KMS multi-Region keys. For information about using multi-Region keys with the +AWS Encryption SDK, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/configure.html#config-mrks + +Because it doesn't specify any wrapping keys, a discovery keyring can't encrypt data. +If you use a discovery keyring to encrypt data, alone or in a multi-keyring, the encrypt +operation fails. + +When decrypting, a discovery keyring allows the AWS Encryption SDK to ask AWS KMS to decrypt +any encrypted data key by using the AWS KMS key that encrypted it, regardless of who owns or +has access to that AWS KMS key. The call succeeds only when the caller has kms:Decrypt +permission on the AWS KMS key. + +This example creates a KMS Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This encrypted ciphertext is then decrypted using the Discovery keyring. +This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +3. Decryption is only possible if the Discovery Keyring contains the correct AWS Account ID's to + which the KMS key used for encryption belongs +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on how to use KMS Discovery keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_key_id: &str, + aws_account_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create the keyring that determines how your data keys are protected. + // Although this example highlights Discovery keyrings, Discovery keyrings cannot + // be used to encrypt, so for encryption we create a KMS keyring without discovery mode. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let encrypt_kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client.clone()) + .send() + .await?; + + // 5. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(encrypt_kms_keyring) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Now create a Discovery keyring to use for decryption. We'll add a discovery filter + // so that we limit the set of ciphertexts we are willing to decrypt to only ones + // created by KMS keys in our account and partition. + let discovery_filter = DiscoveryFilter::builder() + .account_ids(vec![aws_account_id.to_string()]) + .partition("aws".to_string()) + .build()?; + + let discovery_keyring = mpl + .create_aws_kms_discovery_keyring() + .kms_client(kms_client.clone()) + .discovery_filter(discovery_filter) + .send() + .await?; + + // 8. Decrypt your encrypted data using the discovery keyring. + // On Decrypt, the header of the encrypted message (ciphertext) will be parsed. + // The header contains the Encrypted Data Keys (EDKs), which, if the EDK + // was encrypted by a KMS Keyring, includes the KMS Key ARN. + // The Discovery Keyring filters these EDKs for + // EDKs encrypted by Single Region OR Multi Region KMS Keys. + // If a Discovery Filter is present, these KMS Keys must belong + // to an AWS Account ID in the discovery filter's AccountIds and + // must be from the discovery filter's partition. + // Finally, KMS is called to decrypt each filtered EDK until an EDK is + // successfully decrypted. The resulting data key is used to decrypt the + // ciphertext's message. + // If all calls to KMS fail, the decryption fails. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(discovery_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 10. Demonstrate that if a different discovery keyring (Bob's) doesn't have the correct + // AWS Account ID's, the decrypt will fail with an error message + // Note that this assumes Account ID used here ('888888888888') is different than the one used + // during encryption + let discovery_filter_bob = DiscoveryFilter::builder() + .account_ids(vec!["888888888888".to_string()]) + .partition("aws".to_string()) + .build()?; + + let discovery_keyring_bob = mpl + .create_aws_kms_discovery_keyring() + .kms_client(kms_client) + .discovery_filter(discovery_filter_bob) + .send() + .await?; + + // Decrypt the ciphertext using Bob's discovery keyring which doesn't contain the required + // Account ID's for the KMS keyring used for encryption. + // This should throw an AwsCryptographicMaterialProvidersError exception + let decryption_response_bob = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(discovery_keyring_bob) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await; + + match decryption_response_bob { + Ok(_) => panic!("Decrypt using discovery keyring with wrong AWS Account ID MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + println!("KMS Discovery Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS Discovery Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_discovery_multi_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_discovery_multi_keyring_example.rs new file mode 100644 index 000000000..0773503b1 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_discovery_multi_keyring_example.rs @@ -0,0 +1,173 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS Discovery Multi Keyring and demonstrates decryption +using a Multi-Keyring containing multiple AWS KMS Discovery Keyrings. + +The AWS Encryption SDK provides a standard AWS KMS discovery keyring and a discovery keyring +for AWS KMS multi-Region keys. For information about using multi-Region keys with the +AWS Encryption SDK, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/configure.html#config-mrks + +Because it doesn't specify any wrapping keys, a discovery keyring can't encrypt data. +If you use a discovery keyring to encrypt data, alone or in a multi-keyring, the encrypt +operation fails. + +When decrypting, a discovery keyring allows the AWS Encryption SDK to ask AWS KMS to decrypt +any encrypted data key by using the AWS KMS key that encrypted it, regardless of who owns or +has access to that AWS KMS key. The call succeeds only when the caller has kms:Decrypt +permission on the AWS KMS key. + +This example creates a KMS Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This encrypted ciphertext is then decrypted using the Discovery Multi +keyring. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on how to use KMS Discovery keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use std::collections::HashMap; +use std::vec::Vec; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_key_id: &str, + aws_account_id: &str, + aws_regions: Vec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create the keyring that determines how your data keys are protected. + // Although this example highlights Discovery keyrings, Discovery keyrings cannot + // be used to encrypt, so for encryption we create a KMS keyring without discovery mode. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let encrypt_kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client.clone()) + .send() + .await?; + + // 5. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(encrypt_kms_keyring) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Now create a Discovery Multi keyring to use for decryption. We'll add a discovery filter + // so that we limit the set of ciphertexts we are willing to decrypt to only ones + // created by KMS keys in our account and partition. + let discovery_filter = DiscoveryFilter::builder() + .account_ids(vec![aws_account_id.to_string()]) + .partition("aws".to_string()) + .build()?; + + // This is a Multi Keyring composed of Discovery Keyrings. + // There is a keyring for every region in `regions`. + // All the keyrings have the same Discovery Filter. + // Each keyring has its own KMS Client, which is created for the keyring's region. + let discovery_multi_keyring = mpl + .create_aws_kms_discovery_multi_keyring() + .regions(aws_regions) + .discovery_filter(discovery_filter) + .send() + .await?; + + // 8. On Decrypt, the header of the encrypted message (ciphertext) will be parsed. + // The header contains the Encrypted Data Keys (EDKs), which, if the EDK + // was encrypted by a KMS Keyring, includes the KMS Key ARN. + // For each member of the Multi Keyring, every EDK will try to be decrypted until a decryption + // is successful. + // Since every member of the Multi Keyring is a Discovery Keyring: + // Each Keyring will filter the EDKs by the Discovery Filter + // For the filtered EDKs, the keyring will try to decrypt it with the keyring's client. + // All of this is done serially, until a success occurs or all keyrings have + // failed all (filtered) EDKs. + // KMS Discovery Keyrings will attempt to decrypt Multi Region Keys (MRKs) and regular KMS Keys. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(discovery_multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS Discovery Multi Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS Discovery Multi Keyring example + use crate::example_utils::utils; + + let aws_regions: Vec = vec!["us-east-1".to_string(), "us-west-2".to_string()]; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/aws_kms_hierarchical_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/aws_kms_hierarchical_keyring_example.rs new file mode 100644 index 000000000..9aee84897 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/aws_kms_hierarchical_keyring_example.rs @@ -0,0 +1,286 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* + This example sets up the Hierarchical Keyring, which establishes a key hierarchy where "branch" + keys are persisted in DynamoDb. These branch keys are used to protect your data keys, and these + branch keys are themselves protected by a KMS Key. + + Establishing a key hierarchy like this has two benefits: + First, by caching the branch key material, and only calling KMS to re-establish authentication + regularly according to your configured TTL, you limit how often you need to call KMS to protect + your data. This is a performance security tradeoff, where your authentication, audit, and logging + from KMS is no longer one-to-one with every encrypt or decrypt call. Additionally, KMS Cloudtrail + cannot be used to distinguish Encrypt and Decrypt calls, and you cannot restrict who has + Encryption rights from who has Decryption rights since they both ONLY need KMS:Decrypt. However, + the benefit is that you no longer have to make a network call to KMS for every encrypt or + decrypt. + + Second, this key hierarchy facilitates cryptographic isolation of a tenant's data in a + multi-tenant data store. Each tenant can have a unique Branch Key, that is only used to protect + the tenant's data. You can either statically configure a single branch key to ensure you are + restricting access to a single tenant, or you can implement an interface that selects the Branch + Key based on the Encryption Context. + + This example demonstrates configuring a Hierarchical Keyring with a Branch Key ID Supplier to + encrypt and decrypt data for two separate tenants. + + This example requires access to the DDB Table where you are storing the Branch Keys. This + table must be configured with the following primary key configuration: - Partition key is named + "partition_key" with type (S) - Sort key is named "sort_key" with type (S). + + This example also requires using a KMS Key. You need the following access on this key: + - GenerateDataKeyWithoutPlaintext + - Decrypt + + For more information on how to use Hierarchical Keyrings, see + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-hierarchical-keyring.html +*/ + +use super::create_branch_key_id::create_branch_key_id; +use super::example_branch_key_id_supplier::ExampleBranchKeyIdSupplier; +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError; +use aws_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + key_store_table_name: &str, + logical_key_store_name: &str, + key_store_kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client and DynamoDB client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + let ddb_client = aws_sdk_dynamodb::Client::new(&sdk_config); + + // 3. Configure your KeyStore resource. + // This SHOULD be the same configuration that you used + // to initially create and populate your KeyStore. + let key_store_config = KeyStoreConfig::builder() + .kms_client(kms_client) + .ddb_client(ddb_client) + .ddb_table_name(key_store_table_name) + .logical_key_store_name(logical_key_store_name) + .kms_configuration(KmsConfiguration::KmsKeyArn(key_store_kms_key_id.to_string())) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 4. Call CreateKey to create two new active branch keys + let branch_key_id_a: String = create_branch_key_id( + key_store_table_name, + logical_key_store_name, + key_store_kms_key_id + ).await?; + let branch_key_id_b: String = create_branch_key_id( + key_store_table_name, + logical_key_store_name, + key_store_kms_key_id + ).await?; + + // 5. Create a branch key supplier that maps the branch key id to a more readable format + let branch_key_id_supplier = ExampleBranchKeyIdSupplier::new( + &branch_key_id_a, + &branch_key_id_b + ); + + // 6. Create the Hierarchical Keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let hierarchical_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .key_store(key_store.clone()) + .branch_key_id_supplier(branch_key_id_supplier) + .ttl_seconds(600) + .send() + .await?; + + // 7. Create encryption context for both tenants. + // The Branch Key Id supplier uses the encryption context to determine which branch key id will + // be used to encrypt data. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + + // Create encryption context for TenantA + let encryption_context_a = HashMap::from([ + ("tenant".to_string(), "TenantA".to_string()), + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // Create encryption context for TenantB + let encryption_context_b = HashMap::from([ + ("tenant".to_string(), "TenantB".to_string()), + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 8. Encrypt the data with encryption_contextA & encryption_contextB + let plaintext = example_data.as_bytes(); + + let encryption_response_a = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(hierarchical_keyring.clone()) + .encryption_context(encryption_context_a.clone()) + .send() + .await?; + + let ciphertext_a = encryption_response_a + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + let encryption_response_b = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(hierarchical_keyring.clone()) + .encryption_context(encryption_context_b.clone()) + .send() + .await?; + + let ciphertext_b = encryption_response_b + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 9. Demonstrate that the ciphertexts and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext_a, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + assert_ne!(ciphertext_b, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 10. To attest that TenantKeyB cannot decrypt a message written by TenantKeyA, + // and vice versa, let's construct more restrictive hierarchical keyrings. + let hierarchical_keyring_a = mpl + .create_aws_kms_hierarchical_keyring() + .key_store(key_store.clone()) + .branch_key_id(branch_key_id_a) + .ttl_seconds(600) + .send() + .await?; + + let hierarchical_keyring_b = mpl + .create_aws_kms_hierarchical_keyring() + .key_store(key_store) + .branch_key_id(branch_key_id_b) + .ttl_seconds(600) + .send() + .await?; + + // 11. Demonstrate that data encrypted by one tenant's key + // cannot be decrypted with by a keyring specific to another tenant. + + // Keyring with tenant B's branch key cannot decrypt data encrypted with tenant A's branch key + // This will fail and raise a AwsCryptographicMaterialProvidersError, + // which we swallow ONLY for demonstration purposes. + let decryption_response_mismatch_1 = esdk_client.decrypt() + .ciphertext(ciphertext_a.clone()) + .keyring(hierarchical_keyring_b.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context_a.clone()) + .send() + .await; + + match decryption_response_mismatch_1 { + Ok(_) => panic!("Decrypt with wrong tenant's hierarchical keyring MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + // Keyring with tenant A's branch key cannot decrypt data encrypted with tenant B's branch key. + // This will fail and raise a AwsCryptographicMaterialProvidersError, + // which we swallow ONLY for demonstration purposes. + let decryption_response_mismatch_2 = esdk_client.decrypt() + .ciphertext(ciphertext_b.clone()) + .keyring(hierarchical_keyring_a.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context_b.clone()) + .send() + .await; + + match decryption_response_mismatch_2 { + Ok(_) => panic!("Decrypt with wrong tenant's hierarchical keyring MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsCryptographicMaterialProvidersError { error: _e }) => (), + _ => panic!("Unexpected error type"), + } + + // 12. Demonstrate that data encrypted by one tenant's branch key can be decrypted by that tenant, + // and that the decrypted data matches the input data. + let decryption_response_a = esdk_client.decrypt() + .ciphertext(ciphertext_a) + .keyring(hierarchical_keyring_a) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context_a) + .send() + .await?; + + let decrypted_plaintext_a = decryption_response_a + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_a, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // Similarly for TenantB + let decryption_response_b = esdk_client.decrypt() + .ciphertext(ciphertext_b) + .keyring(hierarchical_keyring_b) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context_b) + .send() + .await?; + + let decrypted_plaintext_b = decryption_response_b + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_b, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Hierarchical Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Hierarchical Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KEY_STORE_NAME, + utils::TEST_LOGICAL_KEY_STORE_NAME, + utils::TEST_KEY_STORE_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/create_branch_key_id.rs b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/create_branch_key_id.rs new file mode 100644 index 000000000..b4fb6a525 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/create_branch_key_id.rs @@ -0,0 +1,37 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_esdk::aws_cryptography_keyStore::types::KmsConfiguration; + +/* + The Hierarchical Keyring Example relies on the existence + of a DDB-backed key store with pre-existing + branch key material. + + This example demonstrates configuring a KeyStore and then + using a helper method to create a branch key. +*/ +pub async fn create_branch_key_id( + key_store_table_name: &str, + logical_key_store_name: &str, + kms_key_arn: &str +) -> Result { + // Create a Key Store + // The KMS Configuration you use in the KeyStore MUST have the right access to the resources in the KeyStore. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let key_store_config = KeyStoreConfig::builder() + .kms_client(aws_sdk_kms::Client::new(&sdk_config)) + .ddb_client(aws_sdk_dynamodb::Client::new(&sdk_config)) + .ddb_table_name(key_store_table_name) + .logical_key_store_name(logical_key_store_name) + .kms_configuration(KmsConfiguration::KmsKeyArn(kms_key_arn.to_string())) + .build()?; + + let keystore = keystore_client::Client::from_conf(key_store_config)?; + + // Create a branch key identifier with the AWS KMS Key configured in the KeyStore Configuration. + let new_key = keystore.create_key().send().await?; + Ok(new_key.branch_key_identifier.unwrap()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/example_branch_key_id_supplier.rs b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/example_branch_key_id_supplier.rs new file mode 100644 index 000000000..00255941d --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/example_branch_key_id_supplier.rs @@ -0,0 +1,74 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_esdk::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput; +use aws_esdk::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput; +use aws_esdk::aws_cryptography_materialProviders::types::error::Error; +use aws_esdk::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplier; +use std::collections::HashMap; + +/* + Demonstrates how to create a BranchKeyIdSupplier. + + The BranchKeyIdSupplier determines which Branch Key is used + to protect or access data. + It is an important component in a Multi-tenant solution, + where each tenant is cryptographically isolated. + The Branch Key ID Supplier uses the Encryption Context + provided at Encrypt or Decrypt + to determine what "shared secret" (Branch Key) + is used. +*/ + +pub struct ExampleBranchKeyIdSupplier { + branch_key_id_for_tenant_a: String, + branch_key_id_for_tenant_b: String, +} + +impl ExampleBranchKeyIdSupplier { + pub fn new(tenant_a_id: &str, tenant_b_id: &str) -> Self { + Self { + branch_key_id_for_tenant_a: tenant_a_id.to_string(), + branch_key_id_for_tenant_b: tenant_b_id.to_string(), + } + } +} + +// We MUST use the encryption context to determine +// the Branch Key ID. +impl BranchKeyIdSupplier for ExampleBranchKeyIdSupplier { + fn get_branch_key_id( + &self, + input: GetBranchKeyIdInput, + ) -> Result { + let encryption_context: HashMap = input.encryption_context.unwrap(); + + if !encryption_context.contains_key("tenant") { + return Err( Error::AwsCryptographicMaterialProvidersException { + message: + "EncryptionContext invalid, does not contain expected tenant key value pair." + .to_string() + } + ); + } + let tenant_key_id: &str = encryption_context["tenant"].as_str(); + + if tenant_key_id == "TenantA" { + Ok(GetBranchKeyIdOutput::builder() + .branch_key_id(self.branch_key_id_for_tenant_a.clone()) + .build() + .unwrap()) + } else if tenant_key_id == "TenantB" { + Ok(GetBranchKeyIdOutput::builder() + .branch_key_id(self.branch_key_id_for_tenant_b.clone()) + .build() + .unwrap()) + } else { + Err( Error::AwsCryptographicMaterialProvidersException { + message: + "Item does not contain valid tenant ID.".to_string() + } + ) + } + } +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/mod.rs b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/mod.rs new file mode 100644 index 000000000..77beff84b --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/mod.rs @@ -0,0 +1,7 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod aws_kms_hierarchical_keyring_example; +pub mod create_branch_key_id; +pub mod example_branch_key_id_supplier; +pub mod shared_cache_across_hierarchical_keyrings_example; diff --git a/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/shared_cache_across_hierarchical_keyrings_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/shared_cache_across_hierarchical_keyrings_example.rs new file mode 100644 index 000000000..caf21b3c7 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_hierarchical/shared_cache_across_hierarchical_keyrings_example.rs @@ -0,0 +1,313 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* + This example demonstrates how to use a shared cache across multiple Hierarchical Keyrings. + With this functionality, users only need to maintain one common shared cache across multiple + Hierarchical Keyrings with different Key Stores instances/KMS Clients/KMS Keys. + + If you want to use a Shared Cache, you need to initialize it only once, and + pass the same cache `shared_cache` to different hierarchical keyrings. + + There are three important parameters that users need to carefully set while providing the shared cache: + + 1. Partition ID - Partition ID is an optional parameter provided to the Hierarchical Keyring input, + which distinguishes Cryptographic Material Providers (i.e: Keyrings) writing to a cache. + - If the Partition ID is set and is the same for two Hierarchical Keyrings (or another Material Provider), + they CAN share the same cache entries in the cache. + - If the Partition ID is set and is different for two Hierarchical Keyrings (or another Material Provider), + they CANNOT share the same cache entries in the cache. + - If the Partition ID is not set by the user, it is initialized as a random 16-byte UUID which makes + it unique for every Hierarchical Keyring, and two Hierarchical Keyrings (or another Material Provider) + CANNOT share the same cache entries in the cache. + + 2. Logical Key Store Name - This parameter is set by the user when configuring the Key Store for + the Hierarchical Keyring. This is a logical name for the branch key store. + Suppose you have a physical Key Store (K). You create two instances of K (K1 and K2). Now, you create + two Hierarchical Keyrings (HK1 and HK2) with these Key Store instances (K1 and K2 respectively). + - If you want to share cache entries across these two keyrings, you should set the Logical Key Store Names + for both the Key Store instances (K1 and K2) to be the same. + - If you set the Logical Key Store Names for K1 and K2 to be different, HK1 (which uses Key Store instance K1) + and HK2 (which uses Key Store instance K2) will NOT be able to share cache entries. + + 3. Branch Key ID - Choose an effective Branch Key ID Schema + + This is demonstrated in the example below. + Notice that both K1 and K2 are instances of the same physical Key Store (K). + You MUST NEVER have two different physical Key Stores with the same Logical Key Store Name. + + Important Note: If you have two or more Hierarchy Keyrings with: + - Same Partition ID + - Same Logical Key Store Name of the Key Store for the Hierarchical Keyring + - Same Branch Key ID + then they WILL share the cache entries in the Shared Cache. + Please make sure that you set all of Partition ID, Logical Key Store Name and Branch Key ID + to be the same for two Hierarchical Keyrings if and only if you want them to share cache entries. + + This example first creates a shared cache that you can use across multiple Hierarchical Keyrings. + The example then configures a Hierarchical Keyring (HK1 and HK2) with the shared cache, + a Branch Key ID and two instances (K1 and K2) of the same physical Key Store (K) respectively, + i.e. HK1 with K1 and HK2 with K2. The example demonstrates that if you set the same Partition ID + for HK1 and HK2, the two keyrings can share cache entries. + If you set different Partition ID of the Hierarchical Keyrings, or different + Logical Key Store Names of the Key Store instances, then the keyrings will NOT + be able to share cache entries. + + This example requires access to the DDB Table (K) where you are storing the Branch Keys. This + table must be configured with the following primary key configuration: - Partition key is named + "partition_key" with type (S) - Sort key is named "sort_key" with type (S) + + This example also requires using a KMS Key. You need the following access on this key: + - GenerateDataKeyWithoutPlaintext + - Decrypt +*/ + +use super::create_branch_key_id::create_branch_key_id; +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::types::CacheType; +use aws_esdk::aws_cryptography_materialProviders::types::DefaultCache; +use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef; +use aws_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + key_store_table_name: &str, + logical_key_store_name: &str, + key_store_kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1a. Create the CryptographicMaterialsCache (CMC) to share across multiple Hierarchical Keyrings + // using the Material Providers Library + // This CMC takes in: + // - CacheType + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let cache: CacheType = CacheType::Default( + DefaultCache::builder() + .entry_capacity(100) + .build()?, + ); + + let shared_cryptographic_materials_cache: CryptographicMaterialsCacheRef = mpl. + create_cryptographic_materials_cache() + .cache(cache) + .send() + .await?; + + // 1b. Create a CacheType object for the shared_cryptographic_materials_cache + // Note that the `cache` parameter in the Hierarchical Keyring Input takes a `CacheType` as input + // Here, we pass a `Shared` CacheType that passes an already initialized shared cache. + + // If you want to use a Shared Cache, you need to initialize it only once, and + // pass the same cache `shared_cache` to different hierarchical keyrings. + + // CryptographicMaterialsCacheRef is an Rc (Reference Counted), so if you clone it to + // pass it to different Hierarchical Keyrings, it will still point to the same + // underlying cache, and increment the reference count accordingly. + let shared_cache: CacheType = CacheType::Shared(shared_cryptographic_materials_cache); + + // 2. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 3. Configure your Key Store resource key_store1. + // This SHOULD be the same configuration that you used + // to initially create and populate your physical Key Store. + // Note that key_store_table_name is the physical Key Store, + // and key_store1 is instances of this physical Key Store. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let key_store_config = KeyStoreConfig::builder() + .kms_client(aws_sdk_kms::Client::new(&sdk_config)) + .ddb_client(aws_sdk_dynamodb::Client::new(&sdk_config)) + .ddb_table_name(key_store_table_name) + .logical_key_store_name(logical_key_store_name) + .kms_configuration(KmsConfiguration::KmsKeyArn(key_store_kms_key_id.to_string())) + .build()?; + + let key_store1 = keystore_client::Client::from_conf(key_store_config.clone())?; + + // 4. Call create_branch_key_id to create one new active branch key + let branch_key_id: String = create_branch_key_id( + key_store_table_name, + logical_key_store_name, + key_store_kms_key_id + ).await?; + + // 5. Create the Hierarchical Keyring HK1 with Key Store instance K1, partition_id, + // the shared_cache and the branch_key_id. + // Note that we are now providing an already initialized shared cache instead of just mentioning + // the cache type and the Hierarchical Keyring initializing a cache at initialization. + + // partition_id for this example is a random UUID + let partition_id = "91c1b6a2-6fc3-4539-ad5e-938d597ed730".to_string(); + + // Please make sure that you read the guidance on how to set Partition ID, Logical Key Store Name and + // Branch Key ID at the top of this example before creating Hierarchical Keyrings with a Shared Cache + let keyring1 = mpl + .create_aws_kms_hierarchical_keyring() + .key_store(key_store1) + .branch_key_id(branch_key_id.clone()) + // CryptographicMaterialsCacheRef is an Rc (Reference Counted), so if you clone it to + // pass it to different Hierarchical Keyrings, it will still point to the same + // underlying cache, and increment the reference count accordingly. + .cache(shared_cache.clone()) + .ttl_seconds(600) + .partition_id(partition_id.clone()) + .send() + .await?; + + // 6. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 7. Encrypt the data for encryption_context using keyring1 + let plaintext = example_data.as_bytes(); + + let encryption_response1 = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(keyring1.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext1 = encryption_response1 + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertexts and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext1, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 9. Decrypt your encrypted data using the same keyring HK1 you used on encrypt. + let decryption_response1 = esdk_client.decrypt() + .ciphertext(ciphertext1) + .keyring(keyring1) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext1 = decryption_response1 + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext1, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 11. Through the above encrypt and decrypt roundtrip, the cache will be populated and + // the cache entries can be used by another Hierarchical Keyring with the + // - Same Partition ID + // - Same Logical Key Store Name of the Key Store for the Hierarchical Keyring + // - Same Branch Key ID + + // Configure your Key Store resource key_store2. + // This SHOULD be the same configuration that you used + // to initially create and populate your physical Key Store. + // Note that key_store_table_name is the physical Key Store, + // and key_store2 is instances of this physical Key Store. + + // Note that for this example, key_store2 is identical to key_store1. + // You can optionally change configurations like KMS Client or KMS Key ID based + // on your use-case. + // Make sure you have the required permissions to use different configurations. + + // - If you want to share cache entries across two keyrings HK1 and HK2, + // you should set the Logical Key Store Names for both + // Key Store instances (K1 and K2) to be the same. + // - If you set the Logical Key Store Names for K1 and K2 to be different, + // HK1 (which uses Key Store instance K1) and HK2 (which uses Key Store + // instance K2) will NOT be able to share cache entries. + let key_store2 = keystore_client::Client::from_conf(key_store_config.clone())?; + + // 12. Create the Hierarchical Keyring HK2 with Key Store instance K2, the shared_cache + // and the same partition_id and branch_key_id used in HK1 because we want to share cache entries + // (and experience cache HITS). + + // Please make sure that you read the guidance on how to set Partition ID, Logical Key Store Name and + // Branch Key ID at the top of this example before creating Hierarchical Keyrings with a Shared Cache + let keyring2 = mpl + .create_aws_kms_hierarchical_keyring() + .key_store(key_store2) + .branch_key_id(branch_key_id) + .cache(shared_cache) + .ttl_seconds(600) + .partition_id(partition_id) + .send() + .await?; + + // 13. This encrypt-decrypt roundtrip with HK2 will experience Cache HITS from previous HK1 roundtrip + // Encrypt the data for encryption_context using keyring2 + let encryption_response2 = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(keyring2.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext2 = encryption_response2 + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 14. Demonstrate that the ciphertexts and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext2, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 15. Decrypt your encrypted data using the same keyring HK2 you used on encrypt. + let decryption_response2 = esdk_client.decrypt() + .ciphertext(ciphertext2) + .keyring(keyring2) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext2 = decryption_response2 + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext2, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Shared Cache Across Hierarchical Keyrings Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Shared Cache Across Hierarchical Keyrings example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KEY_STORE_NAME, + utils::TEST_LOGICAL_KEY_STORE_NAME, + utils::TEST_KEY_STORE_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_keyring_example.rs new file mode 100644 index 000000000..c4977af17 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_keyring_example.rs @@ -0,0 +1,122 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS Keyring + +The AWS KMS keyring uses symmetric encryption KMS keys to generate, encrypt and +decrypt data keys. This example creates a KMS Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +AWS KMS keyrings can be used independently or in a multi-keyring with other keyrings +of the same or a different type. + +For more information on how to use KMS keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create a KMS keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client) + .send() + .await?; + + // 5. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_keyring_example.rs new file mode 100644 index 000000000..8686e2e4f --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_keyring_example.rs @@ -0,0 +1,181 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS MRK (multi-region key) Discovery Keyring + +The AWS KMS discovery keyring is an AWS KMS keyring that doesn't specify any wrapping keys. + +When decrypting, an MRK discovery keyring allows the AWS Encryption SDK to ask AWS KMS to decrypt +any encrypted data key by using the AWS KMS MRK that encrypted it, regardless of who owns or +has access to that AWS KMS key. The call succeeds only when the caller has kms:Decrypt +permission on the AWS KMS MRK. + +The AWS Encryption SDK provides a standard AWS KMS discovery keyring and a discovery keyring +for AWS KMS multi-Region keys. Because it doesn't specify any wrapping keys, a discovery keyring +can't encrypt data. If you use a discovery keyring to encrypt data, alone or in a multi-keyring, +the encrypt operation fails. + +The AWS Key Management Service (AWS KMS) MRK keyring interacts with AWS KMS to +create, encrypt, and decrypt data keys with multi-region AWS KMS keys (MRKs). +This example creates a KMS MRK Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This encrypted ciphertext is then decrypted using an +MRK Discovery keyring. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For information about using multi-Region keys with the AWS Encryption SDK, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/configure.html#config-mrks + +For more info on KMS MRKs (multi-region keys), see the KMS documentation: +https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html + +For more information on how to use KMS Discovery keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use std::collections::HashMap; +use aws_config::Region; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + mrk_key_id_encrypt: &str, + aws_account_id: &str, + mrk_encrypt_region: String, + mrk_replica_decrypt_region: String, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create the keyring that determines how your data keys are protected. + // Although this example highlights Discovery keyrings, Discovery keyrings cannot + // be used to encrypt, so for encryption we create an MRK keyring without discovery mode. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create a KMS client in the first region + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let encrypt_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_encrypt_region)) + .build(); + let encrypt_kms_client = aws_sdk_kms::Client::from_conf(encrypt_kms_config); + + // Create a keyring that will encrypt your data, using a KMS MRK in the first region. + let encrypt_kms_keyring = mpl + .create_aws_kms_mrk_keyring() + .kms_key_id(mrk_key_id_encrypt) + .kms_client(encrypt_kms_client) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context using the encrypt_keyring. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(encrypt_kms_keyring) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6. Now create a Discovery keyring to use for decryption. + // In order to illustrate the MRK behavior of this keyring, we configure + // the keyring to use the second KMS region where the MRK (mrk_key_id_encrypt) is replicated to. + // This example assumes you have already replicated your key, but since we + // are using a discovery keyring, we don't need to provide the mrk replica key id + + // Create a KMS Client in the second region. + let decrypt_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_replica_decrypt_region.clone())) + .build(); + let decrypt_kms_client = aws_sdk_kms::Client::from_conf(decrypt_kms_config); + + let discovery_filter = DiscoveryFilter::builder() + .account_ids(vec![aws_account_id.to_string()]) + .partition("aws".to_string()) + .build()?; + + let discovery_keyring = mpl + .create_aws_kms_mrk_discovery_keyring() + .kms_client(decrypt_kms_client) + .region(mrk_replica_decrypt_region) + .discovery_filter(discovery_filter) + .send() + .await?; + + // 7. Decrypt your encrypted data using the discovery keyring. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(discovery_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS MRK Discovery Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS MRK Discovery Keyring example + use crate::example_utils::utils; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + mrk_encrypt_region, + mrk_replica_decrypt_region, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_multi_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_multi_keyring_example.rs new file mode 100644 index 000000000..3dad49de4 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_mrk_discovery_multi_keyring_example.rs @@ -0,0 +1,191 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS MRK (multi-region key) Discovery Multi Keyring + +AWS KMS MRK Discovery Multi Keyring is composed of multiple MRK discovery keyrings. + +The AWS KMS discovery keyring is an AWS KMS keyring that doesn't specify any wrapping keys. + +When decrypting, an MRK discovery keyring allows the AWS Encryption SDK to ask AWS KMS to decrypt +any encrypted data key by using the AWS KMS MRK that encrypted it, regardless of who owns or +has access to that AWS KMS key. The call succeeds only when the caller has kms:Decrypt +permission on the AWS KMS MRK. + +The AWS Encryption SDK provides a standard AWS KMS discovery keyring and a discovery keyring +for AWS KMS multi-Region keys. Because it doesn't specify any wrapping keys, a discovery keyring +can't encrypt data. If you use a discovery keyring to encrypt data, alone or in a multi-keyring, +the encrypt operation fails. + +The AWS Key Management Service (AWS KMS) MRK keyring interacts with AWS KMS to +create, encrypt, and decrypt data keys with multi-region AWS KMS keys (MRKs). +This example creates a KMS MRK Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This encrypted ciphertext is then decrypted using an +MRK Discovery Multi keyring. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For information about using multi-Region keys with the AWS Encryption SDK, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/configure.html#config-mrks + +For more info on KMS MRKs (multi-region keys), see the KMS documentation: +https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html + +For more information on how to use KMS Discovery keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use std::collections::HashMap; +use aws_config::Region; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + mrk_key_id_encrypt: &str, + mrk_encrypt_region: String, + aws_account_id: &str, + aws_regions: Vec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create the keyring that determines how your data keys are protected. + // Although this example highlights Discovery keyrings, Discovery keyrings cannot + // be used to encrypt, so for encryption we create an MRK keyring without discovery mode. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create a KMS client in the first region + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let encrypt_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_encrypt_region)) + .build(); + let encrypt_kms_client = aws_sdk_kms::Client::from_conf(encrypt_kms_config); + + // Create a keyring that will encrypt your data, using a KMS MRK in the first region. + let encrypt_kms_keyring = mpl + .create_aws_kms_mrk_keyring() + .kms_key_id(mrk_key_id_encrypt) + .kms_client(encrypt_kms_client) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context using the encrypt_keyring. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(encrypt_kms_keyring) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6. Now create a MRK Discovery Multi Keyring to use for decryption. + // We'll add a discovery filter to limit the set of encrypted data keys + // we are willing to decrypt to only ones created by KMS keys in select + // accounts and the partition `aws`. + // MRK Discovery keyrings also filter encrypted data keys by the region + // the keyring is created with. + let discovery_filter = DiscoveryFilter::builder() + .account_ids(vec![aws_account_id.to_string()]) + .partition("aws".to_string()) + .build()?; + + // This is a Multi Keyring composed of Discovery Keyrings. + // There is a keyring for every region in `regions`. + // All the keyrings have the same Discovery Filter. + // Each keyring has its own KMS Client, which is created for the keyring's region. + let discovery_multi_keyring = mpl + .create_aws_kms_mrk_discovery_multi_keyring() + .regions(aws_regions) + .discovery_filter(discovery_filter) + .send() + .await?; + + // 7. Decrypt your encrypted data using the discovery multi keyring. + // On Decrypt, the header of the encrypted message (ciphertext) will be parsed. + // The header contains the Encrypted Data Keys (EDKs), which, if the EDK + // was encrypted by a KMS Keyring, includes the KMS Key ARN. + // For each member of the Multi Keyring, every EDK will try to be decrypted until a decryption + // is successful. + // Since every member of the Multi Keyring is a Discovery Keyring: + // Each Keyring will filter the EDKs by the Discovery Filter and the Keyring's region. + // For each filtered EDK, the keyring will attempt decryption with the keyring's client. + // All of this is done serially, until a success occurs or all keyrings have failed + // all (filtered) EDKs. KMS MRK Discovery Keyrings will attempt to decrypt + // Multi Region Keys (MRKs) and regular KMS Keys. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(discovery_multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS MRK Discovery Multi Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS MRK Discovery Multi Keyring example + use crate::example_utils::utils; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let aws_regions: Vec = vec!["us-east-1".to_string(), "us-west-2".to_string()]; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + mrk_encrypt_region, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_mrk_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_mrk_keyring_example.rs new file mode 100644 index 000000000..ba0898f4e --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_mrk_keyring_example.rs @@ -0,0 +1,156 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS MRK (multi-region key) Keyring + +The AWS Key Management Service (AWS KMS) MRK keyring interacts with AWS KMS to +create, encrypt, and decrypt data keys with multi-region AWS KMS keys (MRKs). +This example creates a KMS MRK Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +AWS KMS MRK keyrings can be used independently or in a multi-keyring with other keyrings +of the same or a different type. + +For more information on how to use KMS keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html + +For more info on KMS MRK (multi-region keys), see the KMS documentation: +https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; +use aws_config::Region; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + mrk_key_id_encrypt: &str, + mrk_replica_key_id_decrypt: &str, + mrk_encrypt_region: String, + mrk_replica_decrypt_region: String, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create a keyring that will encrypt your data, using a KMS MRK in the first region. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create a KMS client in the first region + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let encrypt_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_encrypt_region)) + .build(); + let encrypt_kms_client = aws_sdk_kms::Client::from_conf(encrypt_kms_config); + + // Create the keyring that determines how your data keys are protected. + let encrypt_kms_keyring = mpl + .create_aws_kms_mrk_keyring() + .kms_key_id(mrk_key_id_encrypt) + .kms_client(encrypt_kms_client) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context using the encrypt_keyring. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(encrypt_kms_keyring) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6. Create a keyring that will decrypt your data, using the same KMS MRK replicated + // to the second region. This example assumes you have already replicated your key + + // Create a KMS Client in the second region. + let decrypt_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_replica_decrypt_region)) + .build(); + let decrypt_kms_client = aws_sdk_kms::Client::from_conf(decrypt_kms_config); + + let decrypt_kms_keyring = mpl + .create_aws_kms_mrk_keyring() + .kms_key_id(mrk_replica_key_id_decrypt) + .kms_client(decrypt_kms_client) + .send() + .await?; + + // 7. Decrypt your encrypted data using the decrypt keyring. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(decrypt_kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS MRK Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS MRK Keyring example + use crate::example_utils::utils; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_MRK_KEY_ID_EU_WEST_1, + mrk_encrypt_region, + mrk_replica_decrypt_region, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_mrk_multi_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_mrk_multi_keyring_example.rs new file mode 100644 index 000000000..4ed152199 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_mrk_multi_keyring_example.rs @@ -0,0 +1,182 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS MRK Multi Keyring + +The AWS Key Management Service (AWS KMS) MRK keyring interacts with AWS KMS to +create, encrypt, and decrypt data keys with AWS KMS MRK keys. +The KMS MRK multi-keyring consists of one or more individual keyrings of the +same or different type. The keys can either be regular KMS keys or MRKs. +The effect is like using several keyrings in a series. + +This example creates a AwsKmsMrkMultiKeyring using an mrk_key_id (generator) and a kms_key_id +as a child key, and then encrypts a custom input EXAMPLE_DATA with an encryption context. +Either KMS Key individually is capable of decrypting data encrypted under this keyring. +This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +3. Ciphertext can be decrypted using an AwsKmsMrkKeyring containing a replica of the + MRK (from the multi-keyring used for encryption) copied from the first region into + the second region +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on how to use KMS keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html + +For more info on KMS MRK (multi-region keys), see the KMS documentation: +https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; +use aws_config::Region; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + mrk_key_id: &str, + kms_key_id: &str, + mrk_replica_key_id: &str, + mrk_replica_decrypt_region: String, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create an AwsKmsMrkMultiKeyring that protects your data under two different KMS Keys. + // The Keys can either be regular KMS keys or MRKs. + // Either KMS Key individually is capable of decrypting data encrypted under this keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_mrk_multi_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .generator(mrk_key_id) + .kms_key_ids(vec![kms_key_id.to_string()]) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context using the kms_mrk_multi_keyring. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_mrk_multi_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6. Decrypt your encrypted data using the same AwsKmsMrkMultiKeyring you used on encrypt. + // It will decrypt the data using the generator key (in this case, the MRK), since that is + // the first available KMS key on the keyring that is capable of decrypting the data. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(kms_mrk_multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 7. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // Demonstrate that a single AwsKmsMrkKeyring configured with a replica of the MRK from the + // multi-keyring used to encrypt the data is also capable of decrypting the data. + // (This is an example for demonstration; you do not need to do this in your own code.) + + // 8. Create a single AwsKmsMrkKeyring with the replica KMS MRK from the second region. + + // Create a client for KMS in the second region which is the region for mrk_replica_key_id. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let second_region_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(mrk_replica_decrypt_region)) + .build(); + let second_region_kms_client = aws_sdk_kms::Client::from_conf(second_region_kms_config); + + let second_region_mrk_keyring = mpl + .create_aws_kms_mrk_keyring() + .kms_key_id(mrk_replica_key_id) + .kms_client(second_region_kms_client) + .send() + .await?; + + // 9. Decrypt your encrypted data using the second region AwsKmsMrkKeyring + let second_region_decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(second_region_mrk_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let second_region_decrypted_plaintext = second_region_decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(second_region_decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // Not shown in this example: A KMS Keyring created with `kms_key_id` could also + // decrypt this message. + + println!("KMS MRK Multi Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS MRK Multi Keyring example + use crate::example_utils::utils; + + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_MRK_KEY_ID_EU_WEST_1, + mrk_replica_decrypt_region, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_multi_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_multi_keyring_example.rs new file mode 100644 index 000000000..edc9ffa05 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_multi_keyring_example.rs @@ -0,0 +1,228 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS Multi Keyring made up of multiple AWS KMS Keyrings. + +A multi-keyring is a keyring that consists of one or more individual keyrings of the +same or a different type. The effect is like using several keyrings in a series. +When you use a multi-keyring to encrypt data, any of the wrapping keys in any of its +keyrings can decrypt that data. + +When you create a multi-keyring to encrypt data, you designate one of the keyrings as +the generator keyring. All other keyrings are known as child keyrings. The generator keyring +generates and encrypts the plaintext data key. Then, all of the wrapping keys in all of the +child keyrings encrypt the same plaintext data key. The multi-keyring returns the plaintext +key and one encrypted data key for each wrapping key in the multi-keyring. If you create a +multi-keyring with no generator keyring, you can use it to decrypt data, but not to encrypt. +If the generator keyring is a KMS keyring, the generator key in the AWS KMS keyring generates +and encrypts the plaintext key. Then, all additional AWS KMS keys in the AWS KMS keyring, +and all wrapping keys in all child keyrings in the multi-keyring, encrypt the same plaintext key. + +When decrypting, the AWS Encryption SDK uses the keyrings to try to decrypt one of the encrypted +data keys. The keyrings are called in the order that they are specified in the multi-keyring. +Processing stops as soon as any key in any keyring can decrypt an encrypted data key. + +This example creates a Multi Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decryption of ciphertext is possible using the multi_keyring, + and every one of the keyrings from the multi_keyring separately +3. All decrypted plaintext value match EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +This example creates a multi_keyring using a KMS keyring as generator keyring and +another KMS keyring as a child keyring. + +For more information on how to use Multi keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-multi-keyring.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; +use aws_config::Region; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + default_region_kms_key_id: &str, + second_region_kms_key_id: &str, + default_region: String, + second_region: String, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. Create an AwsKmsMultiKeyring that protects your data under two different KMS Keys. + // Either KMS Key individually is capable of decrypting data encrypted under this Multi Keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_multi_keyring = mpl + .create_aws_kms_multi_keyring() + .generator(default_region_kms_key_id) + .kms_key_ids(vec![second_region_kms_key_id.to_string()]) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_multi_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 6a. Decrypt your encrypted data using the same multi_keyring you used on encrypt. + let decryption_response_multi_keyring = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(kms_multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext_multi_keyring = + decryption_response_multi_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 6b. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_multi_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // Because you used a multi_keyring on Encrypt, you can use either of the two + // kms keyrings individually to decrypt the data. + + // 7. Demonstrate that you can successfully decrypt data using a KMS keyring with just the + // `default_region_kms_key_id` directly. + // (This is an example for demonstration; you do not need to do this in your own code.) + + // 7a. Create a client for KMS for the default region. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let default_region_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(default_region)) + .build(); + let default_region_kms_client = aws_sdk_kms::Client::from_conf(default_region_kms_config); + + // 7b. Create KMS keyring + let default_region_kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(default_region_kms_key_id) + .kms_client(default_region_kms_client) + .send() + .await?; + + // 7c. Decrypt your encrypted data using the default_region_kms_keyring. + let decryption_response_default_region_kms_keyring = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(default_region_kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext_default_region_kms_keyring = + decryption_response_default_region_kms_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 7d. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_default_region_kms_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 8. Demonstrate that you can also successfully decrypt data using a KMS keyring with just the + // `second_region_kms_key_id` directly. + // (This is an example for demonstration; you do not need to do this in your own code.) + + // 8a. Create a client for KMS for the second region. + let second_region_kms_config = aws_sdk_kms::config::Builder::from(&sdk_config) + .region(Region::new(second_region)) + .build(); + let second_region_kms_client = aws_sdk_kms::Client::from_conf(second_region_kms_config); + + // 8b. Create KMS keyring + let second_region_kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(second_region_kms_key_id) + .kms_client(second_region_kms_client) + .send() + .await?; + + // 8c. Decrypt your encrypted data using the second_region_kms_keyring. + let decryption_response_second_region_kms_keyring = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(second_region_kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext_second_region_kms_keyring = + decryption_response_second_region_kms_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8d. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_second_region_kms_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS Multi Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS Multi Keyring example + use crate::example_utils::utils; + + let default_region: String = "us-west-2".to_string(); + let second_region: String = "eu-central-1".to_string(); + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_SECOND_REGION_KMS_KEY_ID, + default_region, + second_region, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/aws_kms_rsa_keyring_example.rs b/releases/rust/esdk/examples/keyring/aws_kms_rsa_keyring_example.rs new file mode 100644 index 000000000..71324d367 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/aws_kms_rsa_keyring_example.rs @@ -0,0 +1,127 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the AWS KMS RSA Keyring + +This example creates a KMS RSA Keyring and then encrypts a custom input +example_data with an encryption context. This example also includes some sanity checks for +demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +# For more information on how to use KMS keyrings, see +# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_rsa_key_id: &str, + kms_rsa_public_key: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create a KMS RSA keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // For more information on the allowed encryption algorithms, please see + // https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-rsa + let kms_rsa_keyring = mpl + .create_aws_kms_rsa_keyring() + .kms_key_id(kms_rsa_key_id) + .public_key(aws_smithy_types::Blob::new(kms_rsa_public_key)) + .encryption_algorithm(aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha256) + .kms_client(kms_client) + .send() + .await?; + + // 5. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_rsa_keyring.clone()) + .encryption_context(encryption_context.clone()) + .algorithm_suite_id(EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(kms_rsa_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS RSA Keyring Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the AWS KMS RSA Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KMS_RSA_KEY_ID, + utils::TEST_KMS_RSA_PUBLIC_KEY + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/ecdh/ephemeral_raw_ecdh_keyring_example.rs b/releases/rust/esdk/examples/keyring/ecdh/ephemeral_raw_ecdh_keyring_example.rs new file mode 100644 index 000000000..925dcc367 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/ephemeral_raw_ecdh_keyring_example.rs @@ -0,0 +1,174 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Ephemeral Raw ECDH Keyring. + +This example takes in the recipient's public key located at +EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT as a +UTF8 PEM-encoded X.509 public key, +and the Curve Specification where the key lies. + +This example loads ECC keys from PEM files with paths defined in + - EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + +If you do not provide these files, running this example through this +class' main method will generate three files required for all raw ECDH examples +EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT +and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. +In practice, users of this library should not generate new key pairs +like this, and should instead retrieve an existing key from a secure +key management system (e.g. an HSM). +You may also provide your own key pair by placing PEM files in the +directory where the example is run or modifying the paths in the code +below. These files must be valid PEM encodings of the key pair as UTF-8 +encoded bytes. If you do provide your own key pair, or if a key pair +already exists, this class' main method will not generate a new key pair. + +This examples creates a RawECDH keyring with the EphemeralPrivateKeyToStaticPublicKey key agreement scheme. +This configuration will always create a new key pair as the sender key pair for the key agreement operation. +The ephemeral configuration can only encrypt data and CANNOT decrypt messages. + +This example creates an Ephemeral Raw ECDH Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on this configuration see: +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-ecdh-keyring.html#raw-ecdh-EphemeralPrivateKeyToStaticPublicKey +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations; +use aws_esdk::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput; +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use std::collections::HashMap; +use std::path::Path; +use pem::parse; +use crate::example_utils::utils::exists; +use crate::example_utils::utils::EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT; +use crate::example_utils::utils::write_raw_ecdh_ecc_keys; + +pub async fn encrypt_with_keyring( + example_data: &str, + ecdh_curve_spec: EcdhCurveSpec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. You may provide your own ECC keys in the files located at + // - EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + + // If you do not provide these files, running this example through this + // class' main method will generate three files required for all raw ECDH examples + // EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + // and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. + + // Do not use these files for any other purpose. + if should_generate_new_ecc_key_pair_ephemeral_raw_ecdh()? { + write_raw_ecdh_ecc_keys(ecdh_curve_spec)?; + } + + // 4. Load keys from UTF-8 encoded PEM files. + + // Load public key from UTF-8 encoded PEM files into a DER encoded public key. + let public_key_file_content = std::fs::read_to_string(Path::new(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT))?; + let parsed_public_key_file_content = parse(public_key_file_content)?; + let public_key_recipient_utf8_bytes = parsed_public_key_file_content.contents(); + + // 5. Create the EphemeralPrivateKeyToStaticPublicKeyInput + let ephemeral_raw_ecdh_static_configuration_input = + EphemeralPrivateKeyToStaticPublicKeyInput::builder() + // Must be a UTF8 DER-encoded X.509 public key + .recipient_public_key(public_key_recipient_utf8_bytes) + .build()?; + + let ephemeral_raw_ecdh_static_configuration = + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(ephemeral_raw_ecdh_static_configuration_input); + + // 6. Create the Ephemeral Raw ECDH keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create the keyring. + // This keyring uses an ephemeral configuration. This configuration will always create a new + // key pair as the sender key pair for the key agreement operation. The ephemeral configuration can only + // encrypt data and CANNOT decrypt messages. + let ephemeral_raw_ecdh_keyring = mpl + .create_raw_ecdh_keyring() + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(ephemeral_raw_ecdh_static_configuration) + .send() + .await?; + + // 7. Encrypt the data with the encryption_context + + // A raw ecdh keyring with Ephemeral configuration cannot decrypt data since the key pair + // used as the sender is ephemeral. This means that at decrypt time it does not have + // the private key that corresponds to the public key that is stored on the message. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(ephemeral_raw_ecdh_keyring) + .encryption_context(encryption_context) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + println!("Ephemeral Raw ECDH Keyring Example Completed Successfully"); + + Ok(()) +} + +fn should_generate_new_ecc_key_pair_ephemeral_raw_ecdh() -> Result { + // If key already exists: do not overwrite existing key + if exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) { + Ok(false) + } + // If file is not present, generate a new key pair + else { + Ok(true) + } +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt using the Ephemeral Raw ECDH Keyring example + use crate::example_utils::utils; + + encrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_discovery_keyring_example.rs b/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_discovery_keyring_example.rs new file mode 100644 index 000000000..4b0ecb436 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_discovery_keyring_example.rs @@ -0,0 +1,217 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the KMS ECDH Discovery Keyring. + +This example takes in the recipient's KMS ECC key ARN. +This example attempts to decrypt a ciphertext using the provided ecc_recipient_key_arn, +it does so by checking if the message header contains the recipient's public key. + +This example also requires access to a KMS ECC key. +Our tests provide a KMS ECC Key ARN that anyone can use, but you +can also provide your own KMS ECC key. +To use your own KMS ECC key, you must have: + - kms:GetPublicKey permissions on that key. +This example will call kms:GetPublicKey on keyring creation. +You must also have kms:DeriveSharedSecret permissions on the KMS ECC key. + +This example creates a KMS ECDH Discovery Keyring and then decrypts a ciphertext. +For getting the ciphertext, we create a KMS ECDH keyring without discovery +because kms_ecdh_discovery_keyring cannot encrypt data. +This example also includes some sanity checks for demonstration: +1. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on this configuration see: +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-ecdh-keyring.html#kms-ecdh-discovery +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations; +use aws_esdk::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput; +use aws_esdk::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput; +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use aws_smithy_types::Blob; +use std::collections::HashMap; +use crate::example_utils::utils::TEST_KMS_ECDH_KEY_ID_P256_SENDER; +use crate::example_utils::utils::generate_kms_ecc_public_key; + +pub async fn decrypt_with_keyring( + example_data: &str, + ecdh_curve_spec: EcdhCurveSpec, + ecc_recipient_key_arn: &str +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create the KmsPublicKeyDiscoveryInput + let kms_ecdh_discovery_static_configuration_input = + KmsPublicKeyDiscoveryInput::builder() + .recipient_kms_identifier(ecc_recipient_key_arn) + .build()?; + + let kms_ecdh_discovery_static_configuration = KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery(kms_ecdh_discovery_static_configuration_input); + + // 5. Create the KMS ECDH keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create a KMS ECDH Discovery keyring. + // This keyring uses the KmsPublicKeyDiscovery configuration. + // On encrypt, the keyring will fail as it is not allowed to encrypt data under this configuration. + // On decrypt, the keyring will check if its corresponding public key is stored in the message header. It + // will AWS KMS to derive the shared from the recipient's KMS ECC Key ARN and the sender's public key; + // For more information on this configuration see: + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-ecdh-keyring.html#kms-ecdh-discovery + // This keyring takes in: + // - kmsClient + // - recipientKmsIdentifier: Must be an ARN representing a KMS ECC key meant for KeyAgreement + // - curveSpec: The curve name where the public keys lie + let kms_ecdh_discovery_keyring = mpl + .create_aws_kms_ecdh_keyring() + .kms_client(kms_client.clone()) + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(kms_ecdh_discovery_static_configuration) + .send() + .await?; + + // 6. Get ciphertext by creating a KMS ECDH keyring WITHOUT discovery + // because the KMS ECDH keyring WITH discovery CANNOT encrypt data. + let plaintext = example_data.as_bytes(); + + // Get ciphertext by creating a KMS ECDH keyring WITHOUT discovery. + // The recipient's public key used in the encrypting KMS ECDH keyring WITHOUT discovery + // is a public key generated from ecc_recipient_key_arn, the same ecc key used + // when creating the KMS ECDH keyring WITH discovery used for decryption in this example. + // We then decrypt this ciphertext using a KMS ECDH keyring WITH discovery + let ciphertext = get_ciphertext( + example_data, + encryption_context.clone(), + ecc_recipient_key_arn, + ecdh_curve_spec, + kms_client, + esdk_client.clone() + ) + .await?; + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(kms_ecdh_discovery_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS ECDH Discovery Keyring Example Completed Successfully"); + + Ok(()) +} + +async fn get_ciphertext( + example_data: &str, + encryption_context: HashMap, + ecc_recipient_key_arn: &str, + ecdh_curve_spec: EcdhCurveSpec, + kms_client: aws_sdk_kms::Client, + esdk_client: esdk_client::Client +) -> Result { + // 1. Create the public keys for sender and recipient + // Recipient keys are taken as input for this example + // Sender ECC key used in this example is TEST_KMS_ECDH_KEY_ID_P256_SENDER + let public_key_sender_utf8_bytes = generate_kms_ecc_public_key(TEST_KMS_ECDH_KEY_ID_P256_SENDER).await?; + let public_key_recipient_utf8_bytes = generate_kms_ecc_public_key(ecc_recipient_key_arn).await?; + + // 2. Create the KmsPrivateKeyToStaticPublicKeyInput + let kms_ecdh_static_configuration_input = + KmsPrivateKeyToStaticPublicKeyInput::builder() + .sender_kms_identifier(TEST_KMS_ECDH_KEY_ID_P256_SENDER) + // Must be a UTF8 DER-encoded X.509 public key + .sender_public_key(public_key_sender_utf8_bytes) + // Must be a UTF8 DER-encoded X.509 public key + .recipient_public_key(public_key_recipient_utf8_bytes) + .build()?; + + let kms_ecdh_static_configuration = KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(kms_ecdh_static_configuration_input); + + // 3. Create the KMS ECDH keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_ecdh_keyring = mpl + .create_aws_kms_ecdh_keyring() + .kms_client(kms_client) + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(kms_ecdh_static_configuration) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_ecdh_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + Ok(ciphertext) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for decrypt using the KMS ECDH Discovery Keyring example + use crate::example_utils::utils; + + decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256, + utils::TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_keyring_example.rs b/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_keyring_example.rs new file mode 100644 index 000000000..c5dd7f48a --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/kms_ecdh_keyring_example.rs @@ -0,0 +1,225 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the KMS ECDH Keyring. + +This example takes in the sender's KMS ECC key ARN, the sender's public key, +the recipient's public key, and the algorithm definition where the ECC keys lie. + +Both public keys MUST be UTF8 PEM-encoded X.509 public key, +also known as SubjectPublicKeyInfo (SPKI), + +This keyring, depending on its KeyAgreement scheme, +takes in the sender's KMS ECC Key ARN, and the recipient's ECC Public Key +to derive a shared secret. +The keyring uses the shared secret to derive a data key to protect the +data keys that encrypt and decrypt example_data. + +This example also requires access to a KMS ECC key. +Our tests provide a KMS ECC Key ARN that anyone can use, but you +can also provide your own KMS ECC key. +To use your own KMS ECC key, you must have either: +- Its public key downloaded in a UTF-8 encoded PEM file +- kms:GetPublicKey permissions on that key. +If you do not have the public key downloaded, running this example +through its main method will download the public key for you +by calling kms:GetPublicKey. +You must also have kms:DeriveSharedSecret permissions on the KMS ECC key. +This example also requires a recipient ECC Public Key that lies on the same +curve as the sender public key. This examples uses another distinct +KMS ECC Public Key, it does not have to be a KMS key; it can be a +valid SubjectPublicKeyInfo (SPKI) Public Key. + +This example creates a KMS ECDH Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on this configuration see: +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-ecdh-keyring.html#kms-ecdh-create +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations; +use aws_esdk::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput; +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use std::collections::HashMap; +use std::path::Path; +use pem::parse; +use crate::example_utils::utils::exists; +use crate::example_utils::utils::EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER; +use crate::example_utils::utils::EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT; +use crate::example_utils::utils::write_kms_ecdh_ecc_public_key; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + ecc_key_arn: &str, + ecdh_curve_spec: EcdhCurveSpec, + ecc_recipient_key_arn: Option<&str> +) -> Result<(), crate::BoxError> { + // 1. If ecc_recipient_key_arn is not provided, set the private key for the recipient to TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT + let ecc_recipient_key_arn = ecc_recipient_key_arn.unwrap_or(crate::example_utils::utils::TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT); + + // 2. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 3. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 4. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 5. You may provide your own ECC keys in the files located at + // - EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER + // - EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + + // If not, the main method in this class will call + // the KMS ECC key, retrieve its public key, and store it + // in a PEM file for example use. + if should_generate_new_kms_ecc_public_key(EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER)? { + write_kms_ecdh_ecc_public_key(ecc_key_arn, EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER).await?; + } + + if should_generate_new_kms_ecc_public_key(EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT)? { + write_kms_ecdh_ecc_public_key(ecc_recipient_key_arn, EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT).await?; + } + + // 6. Load public key from UTF-8 encoded PEM files into a DER encoded public key. + let public_key_file_content_sender = std::fs::read_to_string(Path::new(EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_SENDER))?; + let parsed_public_key_file_content_sender = parse(public_key_file_content_sender)?; + let public_key_sender_utf8_bytes = parsed_public_key_file_content_sender.contents(); + + let public_key_file_content_recipient = std::fs::read_to_string(Path::new(EXAMPLE_KMS_ECC_PUBLIC_KEY_FILENAME_RECIPIENT))?; + let parsed_public_key_file_content_recipient = parse(public_key_file_content_recipient)?; + let public_key_recipient_utf8_bytes = parsed_public_key_file_content_recipient.contents(); + + // 7. Create the KmsPrivateKeyToStaticPublicKeyInput + let kms_ecdh_static_configuration_input = + KmsPrivateKeyToStaticPublicKeyInput::builder() + .sender_kms_identifier(ecc_key_arn) + // Must be a UTF8 DER-encoded X.509 public key + .sender_public_key(public_key_sender_utf8_bytes) + // Must be a UTF8 DER-encoded X.509 public key + .recipient_public_key(public_key_recipient_utf8_bytes) + .build()?; + + let kms_ecdh_static_configuration = KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(kms_ecdh_static_configuration_input); + + // 8. Create the KMS ECDH keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create a KMS ECDH keyring. + // This keyring uses the KmsPrivateKeyToStaticPublicKey configuration. This configuration calls for both of + // the keys to be on the same curve (P256, P384, P521). + // On encrypt, the keyring calls AWS KMS to derive the shared secret from the sender's KMS ECC Key ARN and the recipient's public key. + // For this example, on decrypt, the keyring calls AWS KMS to derive the shared secret from the sender's KMS ECC Key ARN and the recipient's public key; + // however, on decrypt, the recipient can construct a keyring such that the shared secret is calculated with + // the recipient's private key and the sender's public key. In both scenarios the shared secret will be the same. + // For more information on this configuration see: + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-ecdh-keyring.html#kms-ecdh-create + // This keyring takes in: + // - kmsClient + // - kmsKeyId: Must be an ARN representing a KMS ECC key meant for KeyAgreement + // - curveSpec: The curve name where the public keys lie + // - senderPublicKey: A ByteBuffer of a UTF-8 encoded public + // key for the key passed into kmsKeyId in DER format + // - recipientPublicKey: A ByteBuffer of a UTF-8 encoded public + // key for the key passed into kmsKeyId in DER format + let kms_ecdh_keyring = mpl + .create_aws_kms_ecdh_keyring() + .kms_client(kms_client) + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(kms_ecdh_static_configuration) + .send() + .await?; + + // 9. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_ecdh_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 10. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 11. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(kms_ecdh_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 12. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("KMS ECDH Keyring Example Completed Successfully"); + + Ok(()) +} + +fn should_generate_new_kms_ecc_public_key( + ecc_public_key_filename: &str +) -> Result { + // If key already exists: do not overwrite existing key + if exists(ecc_public_key_filename) { + Ok(false) + } + // If file is not present, generate a new key pair + else { + Ok(true) + } +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the KMS ECDH Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KMS_ECDH_KEY_ID_P256_SENDER, + EcdhCurveSpec::EccNistP256, + Some(utils::TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT) + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/ecdh/mod.rs b/releases/rust/esdk/examples/keyring/ecdh/mod.rs new file mode 100644 index 000000000..f1d25cf89 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/mod.rs @@ -0,0 +1,8 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod raw_ecdh_keyring_example; +pub mod ephemeral_raw_ecdh_keyring_example; +pub mod public_key_discovery_raw_ecdh_keyring_example; +pub mod kms_ecdh_keyring_example; +pub mod kms_ecdh_discovery_keyring_example; diff --git a/releases/rust/esdk/examples/keyring/ecdh/public_key_discovery_raw_ecdh_keyring_example.rs b/releases/rust/esdk/examples/keyring/ecdh/public_key_discovery_raw_ecdh_keyring_example.rs new file mode 100644 index 000000000..8de9b2194 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/public_key_discovery_raw_ecdh_keyring_example.rs @@ -0,0 +1,272 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Public Key Discovery Raw ECDH Keyring. + +A public key discovery Raw ECDH Keyring takes in the recipient's private key located +at EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT +as a UTF8 PEM-encoded (PKCS #8 PrivateKeyInfo structures) private key, +and the Curve Specification where the key lies. + +If you provide the EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT, make sure to also +provide the recipient's public key located at EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT +in the directory that you run this example. Even though the Public Key Discovery Raw ECDH keyring +uses the EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT to decrypt the data, +the EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT is needed to generate the ciphertext to decrypt. + +This example loads ECC keys from PEM files and the ciphertext with paths defined in + - EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + - EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + +If you do not provide these files, running this example through this +class' main method will generate three files required for all raw ECDH examples +EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT +and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. +In practice, users of this library should not generate new key pairs +like this, and should instead retrieve an existing key from a secure +key management system (e.g. an HSM). +You may also provide your own key pair by placing PEM files in the +directory where the example is run or modifying the paths in the code +below. These files must be valid PEM encodings of the key pair as UTF-8 +encoded bytes. If you do provide your own key pair, or if a key pair +already exists, this class' main method will not generate a new key pair. + +This examples creates a RawECDH keyring with the PublicKeyDiscovery key agreement scheme. +This scheme is only available on decrypt. + +This example creates a Public Key Discovery Raw ECDH Keyring and takes in a ciphertext to decrypt it. +This example also includes some sanity checks for demonstration: +1. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on this configuration see: +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-ecdh-keyring.html#raw-ecdh-PublicKeyDiscovery +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations; +use aws_esdk::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput; +use aws_esdk::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput; +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use aws_smithy_types::Blob; +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::path::Path; +use pem::parse; +use crate::example_utils::utils::exists; +use crate::example_utils::utils::EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT; +use crate::example_utils::utils::EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT; +use crate::example_utils::utils::write_raw_ecdh_ecc_keys; + +pub async fn decrypt_with_keyring( + example_data: &str, + ecdh_curve_spec: EcdhCurveSpec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. You may provide your own ECC keys in the files located at + // - EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + + // If you do not provide these files, running this example through this + // class' main method will generate three files required for all raw ECDH examples + // EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + // and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. + + // Do not use these files for any other purpose. + if should_generate_new_ecc_key_pair_discovery_raw_ecdh()? { + write_raw_ecdh_ecc_keys(ecdh_curve_spec)?; + } + + // 4. Load keys from UTF-8 encoded PEM files. + let mut file = File::open(Path::new(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT))?; + let mut private_key_recipient_utf8_bytes = Vec::new(); + file.read_to_end(&mut private_key_recipient_utf8_bytes)?; + + // Generate the ciphertext + let ciphertext = get_ciphertext( + example_data, + ecdh_curve_spec, + encryption_context.clone(), + esdk_client.clone(), + mpl.clone() + ).await?; + + // 5. Create the PublicKeyDiscoveryInput + let discovery_raw_ecdh_static_configuration_input = + PublicKeyDiscoveryInput::builder() + // Must be a UTF8 PEM-encoded private key + .recipient_static_private_key(private_key_recipient_utf8_bytes) + .build()?; + + let discovery_raw_ecdh_static_configuration = + RawEcdhStaticConfigurations::PublicKeyDiscovery(discovery_raw_ecdh_static_configuration_input); + + // 6. Create the Public Key Discovery Raw ECDH keyring. + + // Create the keyring. + // This keyring uses a discovery configuration. This configuration will check on decrypt + // if it is meant to decrypt the message by checking if the configured public key is stored on the message. + // The discovery configuration can only decrypt messages and CANNOT encrypt messages. + let discovery_raw_ecdh_keyring = mpl + .create_raw_ecdh_keyring() + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(discovery_raw_ecdh_static_configuration) + .send() + .await?; + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(discovery_raw_ecdh_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + let plaintext = example_data.as_bytes(); + + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Public Key Discovery Raw ECDH Keyring Example Completed Successfully"); + + Ok(()) +} + +fn should_generate_new_ecc_key_pair_discovery_raw_ecdh() -> Result { + // If keys already exist: do not overwrite existing keys + if exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT) + && exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Ok(false) + } + // If only one file is present: throw exception + else if !exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT) + && exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Err( + "Missing key file at ".to_string() + + EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + ) + } + else if exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT) + && !exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Err( + "Missing key file at ".to_string() + + EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + ) + } + // If neither file is present, generate a new key pair + else { + Ok(true) + } +} + +async fn get_ciphertext( + example_data: &str, + ecdh_curve_spec: EcdhCurveSpec, + encryption_context: HashMap, + esdk_client: esdk_client::Client, + mpl: mpl_client::Client +) -> Result { + // 1. Load keys from UTF-8 encoded PEM files. + + // Load public key from UTF-8 encoded PEM files into a DER encoded public key. + let public_key_file_content = std::fs::read_to_string(Path::new(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT))?; + let parsed_public_key_file_content = parse(public_key_file_content)?; + let public_key_recipient_utf8_bytes = parsed_public_key_file_content.contents(); + + // 2. Create the EphemeralPrivateKeyToStaticPublicKeyInput to generate the ciphertext + let ephemeral_raw_ecdh_static_configuration_input = + EphemeralPrivateKeyToStaticPublicKeyInput::builder() + // Must be a UTF8 DER-encoded X.509 public key + .recipient_public_key(public_key_recipient_utf8_bytes) + .build()?; + + let ephemeral_raw_ecdh_static_configuration = + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(ephemeral_raw_ecdh_static_configuration_input); + + // 3. Create the Ephemeral Raw ECDH keyring. + + // Create the keyring. + // This keyring uses an ephemeral configuration. This configuration will always create a new + // key pair as the sender key pair for the key agreement operation. The ephemeral configuration can only + // encrypt data and CANNOT decrypt messages. + let ephemeral_raw_ecdh_keyring = mpl + .create_raw_ecdh_keyring() + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(ephemeral_raw_ecdh_static_configuration) + .send() + .await?; + + // 4. Encrypt the data with the encryption_context + + // A raw ecdh keyring with Ephemeral configuration cannot decrypt data since the key pair + // used as the sender is ephemeral. This means that at decrypt time it does not have + // the private key that corresponds to the public key that is stored on the message. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(ephemeral_raw_ecdh_keyring) + .encryption_context(encryption_context) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 5. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + Ok(ciphertext) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for decrypt using the Public Key Discovery Raw ECDH Keyring example + use crate::example_utils::utils; + + decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/ecdh/raw_ecdh_keyring_example.rs b/releases/rust/esdk/examples/keyring/ecdh/raw_ecdh_keyring_example.rs new file mode 100644 index 000000000..3f7796ec0 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/ecdh/raw_ecdh_keyring_example.rs @@ -0,0 +1,227 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Raw ECDH Keyring. + +This example takes in the sender's private key located at +EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER as a UTF8 PEM-encoded +(PKCS #8 PrivateKeyInfo structures) private key, +and the recipient's public key located at +EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT as a +UTF8 PEM-encoded X.509 public key, +also known as SubjectPublicKeyInfo (SPKI), +and the Curve Specification where the keys lie. + +This example loads ECC keys from PEM files with paths defined in + - EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER + - EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + +If you do not provide these files, running this example through this +class' main method will generate three files required for all raw ECDH examples +EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT +and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. +These files will be generated in the directory where the example is run. +In practice, users of this library should not generate new key pairs +like this, and should instead retrieve an existing key from a secure +key management system (e.g. an HSM). +You may also provide your own key pair by placing PEM files in the +directory where the example is run or modifying the paths in the code +below. These files must be valid PEM encodings of the key pair as UTF-8 +encoded bytes. If you do provide your own key pair, or if a key pair +already exists, this class' main method will not generate a new key pair. + +This example creates a RawECDH keyring with the RawPrivateKeyToStaticPublicKey key agreement scheme. +On encrypt, the shared secret is derived from the sender's private key and the recipient's public key. +On decrypt, the shared secret is derived from the sender's private key and the recipient's public key; +however, on decrypt the recipient can construct a keyring such that the shared secret is calculated with +the recipient's private key and the sender's public key. In both scenarios the shared secret will be the same. + +This example creates a Raw ECDH Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on this configuration see: +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-ecdh-keyring.html#raw-ecdh-RawPrivateKeyToStaticPublicKey +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations; +use aws_esdk::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput; +use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::path::Path; +use pem::parse; +use crate::example_utils::utils::exists; +use crate::example_utils::utils::EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER; +use crate::example_utils::utils::EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT; +use crate::example_utils::utils::write_raw_ecdh_ecc_keys; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + ecdh_curve_spec: EcdhCurveSpec, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. You may provide your own ECC keys in the files located at + // - EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER + // - EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + + // If you do not provide these files, running this example through this + // class' main method will generate three files required for all raw ECDH examples + // EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER, EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT + // and EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT for you. + + // Do not use these files for any other purpose. + if should_generate_new_ecc_key_pair_raw_ecdh()? { + write_raw_ecdh_ecc_keys(ecdh_curve_spec)?; + } + + // 4. Load keys from UTF-8 encoded PEM files. + let mut file = File::open(Path::new(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER))?; + let mut private_key_sender_utf8_bytes = Vec::new(); + file.read_to_end(&mut private_key_sender_utf8_bytes)?; + + // Load public key from UTF-8 encoded PEM files into a DER encoded public key. + let public_key_file_content = std::fs::read_to_string(Path::new(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT))?; + let parsed_public_key_file_content = parse(public_key_file_content)?; + let public_key_recipient_utf8_bytes = parsed_public_key_file_content.contents(); + + // 5. Create the RawPrivateKeyToStaticPublicKeyInput + let raw_ecdh_static_configuration_input = + RawPrivateKeyToStaticPublicKeyInput::builder() + // Must be a UTF8 PEM-encoded private key + .sender_static_private_key(private_key_sender_utf8_bytes) + // Must be a UTF8 DER-encoded X.509 public key + .recipient_public_key(public_key_recipient_utf8_bytes) + .build()?; + + let raw_ecdh_static_configuration = RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey(raw_ecdh_static_configuration_input); + + // 6. Create the Raw ECDH keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // Create the keyring. + // This keyring uses static sender and recipient keys. This configuration calls for both of + // the keys to be on the same curve (P256 / P384 / P521). + // On encrypt, the shared secret is derived from the sender's private key and the recipient's public key. + // For this example, on decrypt, the shared secret is derived from the sender's private key and the recipient's public key; + // However, on decrypt, the recipient can construct a keyring such that the shared secret is calculated with + // the recipient's private key and the sender's public key. In both scenarios the shared secret will be the same. + let raw_ecdh_keyring = mpl + .create_raw_ecdh_keyring() + .curve_spec(ecdh_curve_spec) + .key_agreement_scheme(raw_ecdh_static_configuration) + .send() + .await?; + + // 7. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(raw_ecdh_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 9. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(raw_ecdh_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Raw ECDH Keyring Example Completed Successfully"); + + Ok(()) +} + +fn should_generate_new_ecc_key_pair_raw_ecdh() -> Result { + // If keys already exist: do not overwrite existing keys + if exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER) + && exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Ok(false) + } + // If only one file is present: throw exception + else if !exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER) + && exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Err( + "Missing key file at ".to_string() + + EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER + ) + } + else if exists(EXAMPLE_ECC_PRIVATE_KEY_FILENAME_SENDER) + && !exists(EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT) + { + Err( + "Missing key file at ".to_string() + + EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT + ) + } + // If neither file is present, generate a new key pair + else { + Ok(true) + } +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Raw ECDH Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/mod.rs b/releases/rust/esdk/examples/keyring/mod.rs new file mode 100644 index 000000000..a19028815 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/mod.rs @@ -0,0 +1,17 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod aws_kms_discovery_keyring_example; +pub mod aws_kms_discovery_multi_keyring_example; +pub mod aws_kms_keyring_example; +pub mod aws_kms_mrk_discovery_keyring_example; +pub mod aws_kms_mrk_discovery_multi_keyring_example; +pub mod aws_kms_mrk_keyring_example; +pub mod aws_kms_mrk_multi_keyring_example; +pub mod aws_kms_multi_keyring_example; +pub mod aws_kms_rsa_keyring_example; +pub mod multi_keyring_example; +pub mod raw_aes_keyring_example; +pub mod raw_rsa_keyring_example; +pub mod aws_kms_hierarchical; +pub mod ecdh; diff --git a/releases/rust/esdk/examples/keyring/multi_keyring_example.rs b/releases/rust/esdk/examples/keyring/multi_keyring_example.rs new file mode 100644 index 000000000..8f70f994f --- /dev/null +++ b/releases/rust/esdk/examples/keyring/multi_keyring_example.rs @@ -0,0 +1,238 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Multi Keyring + +A multi-keyring is a keyring that consists of one or more individual keyrings of the +same or a different type. The effect is like using several keyrings in a series. +When you use a multi-keyring to encrypt data, any of the wrapping keys in any of its +keyrings can decrypt that data. + +When you create a multi-keyring to encrypt data, you designate one of the keyrings as +the generator keyring. All other keyrings are known as child keyrings. The generator keyring +generates and encrypts the plaintext data key. Then, all of the wrapping keys in all of the +child keyrings encrypt the same plaintext data key. The multi-keyring returns the plaintext +key and one encrypted data key for each wrapping key in the multi-keyring. If you create a +multi-keyring with no generator keyring, you can use it to decrypt data, but not to encrypt. +If the generator keyring is a KMS keyring, the generator key in the AWS KMS keyring generates +and encrypts the plaintext key. Then, all additional AWS KMS keys in the AWS KMS keyring, +and all wrapping keys in all child keyrings in the multi-keyring, encrypt the same plaintext key. + +When decrypting, the AWS Encryption SDK uses the keyrings to try to decrypt one of the encrypted +data keys. The keyrings are called in the order that they are specified in the multi-keyring. +Processing stops as soon as any key in any keyring can decrypt an encrypted data key. + +This example creates a Multi Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decryption of ciphertext is possible using the multi_keyring, +and every one of the keyrings from the multi_keyring separately +3. All decrypted plaintext value match EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +This example creates a multi_keyring using a KMS keyring as generator keyring and a raw AES keyring +as a child keyring. You can use different combinations of keyrings in the multi_keyring. + +For more information on how to use Multi keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-multi-keyring.html + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use std::collections::HashMap; +use rand::RngCore; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create a KMS keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client) + .send() + .await?; + + // 5. Create a raw AES keyring to additionally encrypt under as child_keyring + + // The key namespace and key name are defined by you. + // and are used by the Raw AES keyring to determine + // whether it should attempt to decrypt an encrypted data key. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html + let key_namespace: &str = "my-key-namespace"; + let key_name: &str = "my-aes-key-name"; + + // Generate a 256-bit AES key to use with your raw AES keyring. + // In practice, you should get this key from a secure key management system such as an HSM. + let aes_key_bytes = generate_aes_key_bytes(); + + let raw_aes_keyring = mpl + .create_raw_aes_keyring() + .key_name(key_name) + .key_namespace(key_namespace) + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + // 6. Create a multi_keyring that consists of the previously created keyrings. + // When using this multi_keyring to encrypt data, either `kms_keyring` or + // `raw_aes_keyring` (or a multi_keyring containing either) may be used to decrypt the data. + let multi_keyring = mpl + .create_multi_keyring() + .generator(kms_keyring.clone()) + .child_keyrings(vec![raw_aes_keyring.clone()]) + .send() + .await?; + + // 7. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(multi_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 9a. Decrypt your encrypted data using the same multi_keyring you used on encrypt. + let decryption_response_multi_keyring = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext_multi_keyring = + decryption_response_multi_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9b. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_multi_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // Because you used a multi_keyring on Encrypt, you can use either the + // `kms_keyring` or `raw_aes_keyring` individually to decrypt the data. + + // 10. Demonstrate that you can successfully decrypt data using just the `kms_keyring` + // directly. + // (This is an example for demonstration; you do not need to do this in your own code.) + + // 10a. Decrypt your encrypted data using the kms_keyring. + let decryption_response_kms_keyring = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext_kms_keyring = + decryption_response_kms_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10b. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_kms_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 11. Demonstrate that you can also successfully decrypt data using the `raw_aes_keyring` + // directly. + // (This is an example for demonstration; you do not need to do this in your own code.) + + // 11a. Decrypt your encrypted data using the raw_aes_keyring. + let decryption_response_raw_aes_keyring = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(raw_aes_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext_raw_aes_keyring = + decryption_response_raw_aes_keyring + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 11b. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext_raw_aes_keyring, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Multi Keyring Example Completed Successfully"); + + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a random AES key. + // In practice, you should not generate this key in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM). + // This key is created here for example purposes only and should not be used for any other purpose. + let mut random_bytes = [0u8; 32]; + rand::rngs::OsRng.fill_bytes(&mut random_bytes); + + random_bytes.to_vec() +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Multi Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/raw_aes_keyring_example.rs b/releases/rust/esdk/examples/keyring/raw_aes_keyring_example.rs new file mode 100644 index 000000000..c6d500fbb --- /dev/null +++ b/releases/rust/esdk/examples/keyring/raw_aes_keyring_example.rs @@ -0,0 +1,145 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Raw AES Keyring + +The Raw AES keyring lets you use an AES symmetric key that you provide as a wrapping key that +protects your data key. You need to generate, store, and protect the key material, +preferably in a hardware security module (HSM) or key management system. Use a Raw AES keyring +when you need to provide the wrapping key and encrypt the data keys locally or offline. + +This example creates a Raw AES Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +The Raw AES keyring encrypts data by using the AES-GCM algorithm and a wrapping key that +you specify as a byte array. You can specify only one wrapping key in each Raw AES keyring, +but you can include multiple Raw AES keyrings, alone or with other keyrings, in a multi-keyring. + +For more information on how to use Raw AES keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use std::collections::HashMap; +use rand::RngCore; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. The key namespace and key name are defined by you. + // and are used by the Raw AES keyring to determine + // whether it should attempt to decrypt an encrypted data key. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html + let key_namespace: &str = "my-key-namespace"; + let key_name: &str = "my-aes-key-name"; + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Generate a 256-bit AES key to use with your keyring. + // In practice, you should get this key from a secure key management system such as an HSM. + let aes_key_bytes = generate_aes_key_bytes(); + + // 5. Create a Raw AES Keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let raw_aes_keyring = mpl + .create_raw_aes_keyring() + .key_name(key_name) + .key_namespace(key_namespace) + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + // 6. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(raw_aes_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 7. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 8. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(raw_aes_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Raw AES Keyring Example Completed Successfully"); + + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a random AES key. + // In practice, you should not generate this key in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM). + // This key is created here for example purposes only and should not be used for any other purpose. + let mut random_bytes = [0u8; 32]; + rand::rngs::OsRng.fill_bytes(&mut random_bytes); + + random_bytes.to_vec() +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Raw AES Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/keyring/raw_rsa_keyring_example.rs b/releases/rust/esdk/examples/keyring/raw_rsa_keyring_example.rs new file mode 100644 index 000000000..04a2e5548 --- /dev/null +++ b/releases/rust/esdk/examples/keyring/raw_rsa_keyring_example.rs @@ -0,0 +1,253 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example sets up the Raw RSA Keyring + +The Raw RSA keyring performs asymmetric encryption and decryption of data keys in local memory +with RSA public and private keys that you provide. + +This keyring accepts PEM encodings of the key pair as UTF-8 interpreted bytes. +The encryption function encrypts the data key under the RSA public key. The decryption function +decrypts the data key using the private key. + +This example loads a key pair from PEM files with paths defined in + - EXAMPLE_RSA_PRIVATE_KEY_FILENAME + - EXAMPLE_RSA_PUBLIC_KEY_FILENAME +If you do not provide these files, running this example through this +class' main method will generate these files for you. These files will +be generated in the directory where the example is run. +In practice, users of this library should not generate new key pairs +like this, and should instead retrieve an existing key from a secure +key management system (e.g. an HSM). +You may also provide your own key pair by placing PEM files in the +directory where the example is run or modifying the paths in the code +below. These files must be valid PEM encodings of the key pair as UTF-8 +encoded bytes. If you do provide your own key pair, or if a key pair +already exists, this class' main method will not generate a new key pair. + +This example creates a Raw RSA Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context. This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +3. The original ciphertext is not decryptable using a keyring with a different RSA key pair +These sanity checks are for demonstration in the example only. You do not need these in your code. + +A Raw RSA keyring that encrypts and decrypts must include an asymmetric public key and private +key pair. However, you can encrypt data with a Raw RSA keyring that has only a public key, +and you can decrypt data with a Raw RSA keyring that has only a private key. This example requires +the user to either provide both private and public keys, or not provide any keys and the example +generates both to test encryption and decryption. If you configure a Raw RSA keyring with a +public and private key, be sure that they are part of the same key pair. Some language +implementations of the AWS Encryption SDK will not construct a Raw RSA keyring with keys +from different pairs. Others rely on you to verify that your keys are from the same key pair. +You can include any Raw RSA keyring in a multi-keyring. + +For more information on how to use Raw RSA keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-rsa-keyring.html +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::PaddingScheme; +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::io::Write; +use std::path::Path; + +const EXAMPLE_RSA_PRIVATE_KEY_FILENAME: &str = "RawRsaKeyringExamplePrivateKey.pem"; +const EXAMPLE_RSA_PUBLIC_KEY_FILENAME: &str = "RawRsaKeyringExamplePublicKey.pem"; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 3. You may provide your own RSA key pair in the files located at + // - EXAMPLE_RSA_PRIVATE_KEY_FILENAME + // - EXAMPLE_RSA_PUBLIC_KEY_FILENAME + // If these files are not present, this will generate a pair for you + if should_generate_new_rsa_key_pair()? { + generate_rsa_key_pair()?; + } + + // 4. Load key pair from UTF-8 encoded PEM files. + // You may provide your own PEM files to use here. + // If you do not, the main method in this class will generate PEM + // files for example use. Do not use these files for any other purpose. + let mut file = File::open(Path::new(EXAMPLE_RSA_PUBLIC_KEY_FILENAME))?; + let mut public_key_utf8_bytes = Vec::new(); + file.read_to_end(&mut public_key_utf8_bytes)?; + + let mut file = File::open(Path::new(EXAMPLE_RSA_PRIVATE_KEY_FILENAME))?; + let mut private_key_utf8_bytes = Vec::new(); + file.read_to_end(&mut private_key_utf8_bytes)?; + + // 5. The key namespace and key name are defined by you. + // and are used by the Raw RSA keyring + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-rsa-keyring.html + let key_namespace: &str = "my-key-namespace"; + let key_name: &str = "my-rsa-key-name"; + + // 6. Create the Raw RSA keyring. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let raw_rsa_keyring = mpl + .create_raw_rsa_keyring() + .key_name(key_name) + .key_namespace(key_namespace) + .padding_scheme(PaddingScheme::OaepSha256Mgf1) + .public_key(public_key_utf8_bytes) + .private_key(private_key_utf8_bytes) + .send() + .await?; + + // 7. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(raw_rsa_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 8. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 9. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(raw_rsa_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 10. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Raw RSA Keyring Example Completed Successfully"); + + Ok(()) +} + +fn exists(f: &str) -> bool { + Path::new(f).exists() +} + +fn should_generate_new_rsa_key_pair() -> Result { + // If a key pair already exists: do not overwrite existing key pair + if exists(EXAMPLE_RSA_PRIVATE_KEY_FILENAME) && exists(EXAMPLE_RSA_PUBLIC_KEY_FILENAME) { + Ok(false) + } + // If only one file is present: throw exception + else if exists(EXAMPLE_RSA_PRIVATE_KEY_FILENAME) && !exists(EXAMPLE_RSA_PUBLIC_KEY_FILENAME) { + Err("Missing public key file at ".to_string() + EXAMPLE_RSA_PUBLIC_KEY_FILENAME) + } + else if exists(EXAMPLE_RSA_PRIVATE_KEY_FILENAME) && !exists(EXAMPLE_RSA_PUBLIC_KEY_FILENAME) { + Err("Missing private key file at ".to_string() + EXAMPLE_RSA_PRIVATE_KEY_FILENAME) + } + // If neither file is present, generate a new key pair + else { + Ok(true) + } +} + +fn generate_rsa_key_pair() -> Result<(), crate::BoxError> { + use aws_lc_rs::encoding::AsDer; + use aws_lc_rs::encoding::Pkcs8V1Der; + use aws_lc_rs::encoding::PublicKeyX509Der; + use aws_lc_rs::rsa::KeySize; + use aws_lc_rs::rsa::PrivateDecryptingKey; + + // Safety check: Validate neither file is present + if exists(EXAMPLE_RSA_PRIVATE_KEY_FILENAME) || exists(EXAMPLE_RSA_PUBLIC_KEY_FILENAME) { + return Err(crate::BoxError( + "generate_rsa_key_pair will not overwrite existing PEM files".to_string(), + )); + } + + // This code will generate a new RSA key pair for example use. + // The public and private key will be written to the files: + // - public: EXAMPLE_RSA_PUBLIC_KEY_FILENAME + // - private: EXAMPLE_RSA_PRIVATE_KEY_FILENAME + // This example uses aws-lc-rs's KeyPairGenerator to generate the key pair. + // In practice, you should not generate this in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM) + // This key is created here for example purposes only. + + let private_key = PrivateDecryptingKey::generate(KeySize::Rsa2048)?; + let public_key = private_key.public_key(); + + let public_key = AsDer::::as_der(&public_key)?; + let public_key = pem::Pem::new("RSA PUBLIC KEY", public_key.as_ref()); + let public_key = pem::encode(&public_key); + + let private_key = AsDer::::as_der(&private_key)?; + let private_key = pem::Pem::new("RSA PRIVATE KEY", private_key.as_ref()); + let private_key = pem::encode(&private_key); + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(EXAMPLE_RSA_PRIVATE_KEY_FILENAME))? + .write_all(private_key.as_bytes())?; + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(EXAMPLE_RSA_PUBLIC_KEY_FILENAME))? + .write_all(public_key.as_bytes())?; + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Raw RSA Keyring example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/limit_encrypted_data_keys_example.rs b/releases/rust/esdk/examples/limit_encrypted_data_keys_example.rs new file mode 100644 index 000000000..3ccda194a --- /dev/null +++ b/releases/rust/esdk/examples/limit_encrypted_data_keys_example.rs @@ -0,0 +1,191 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +Demonstrate limiting the number of Encrypted Data Keys [EDKs] allowed +when encrypting or decrypting a message. +Limiting encrypted data keys is most valuable when you are decrypting +messages from an untrusted source. +By default, the ESDK will allow up to 65,535 encrypted data keys. +A malicious actor might construct an encrypted message with thousands of +encrypted data keys, none of which can be decrypted. +As a result, the AWS Encryption SDK would attempt to decrypt each +encrypted data key until it exhausted the encrypted data keys in the message. + +For more information on how to use Raw AES keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::keyring::KeyringRef; +use aws_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use aws_esdk::types::error::Error::AwsEncryptionSdkException; +use std::collections::HashMap; +use rand::RngCore; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + max_encrypted_data_keys: u16 +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + // Also, set the EncryptionSDK's max_encrypted_data_keys parameter here + let esdk_config = AwsEncryptionSdkConfig::builder() + .max_encrypted_data_keys(max_encrypted_data_keys) + .build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. The key namespace and key name are defined by you. + // and are used by the Raw AES keyring to determine + // whether it should attempt to decrypt an encrypted data key. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html + let key_namespace: &str = "my-key-namespace"; + let key_name: &str = "my-aes-key-name"; + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Generate `max_encrypted_data_keys` AES keyrings to use with your keyring. + // In practice, you should get this key from a secure key management system such as an HSM. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let mut raw_aes_keyrings: Vec = vec![]; + + assert!(max_encrypted_data_keys > 0, "max_encrypted_data_keys MUST be greater than 0"); + + let mut i = 0; + while i < max_encrypted_data_keys { + let aes_key_bytes = generate_aes_key_bytes(); + + let raw_aes_keyring = mpl + .create_raw_aes_keyring() + .key_name(key_name) + .key_namespace(key_namespace) + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + raw_aes_keyrings.push(raw_aes_keyring); + i += 1; + } + + // 5. Create a Multi Keyring with `max_encrypted_data_keys` AES Keyrings + let generator_keyring = raw_aes_keyrings.remove(0); + + let multi_keyring = mpl + .create_multi_keyring() + .generator(generator_keyring) + .child_keyrings(raw_aes_keyrings) + .send() + .await?; + + // 6. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(multi_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 7. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 8. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext.clone()) + .keyring(multi_keyring.clone()) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + // 10. Demonstrate that an EncryptionSDK with a lower MaxEncryptedDataKeys + // will fail to decrypt the encrypted message. + let esdk_config = AwsEncryptionSdkConfig::builder() + .max_encrypted_data_keys(max_encrypted_data_keys-1) + .build()?; + let esdk_client_incorrect_max_encrypted_keys = esdk_client::Client::from_conf(esdk_config)?; + + let decryption_response_incorrect_max_encrypted_keys = + esdk_client_incorrect_max_encrypted_keys.decrypt() + .ciphertext(ciphertext) + .keyring(multi_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await; + + match decryption_response_incorrect_max_encrypted_keys { + Ok(_) => panic!("Decrypt using discovery keyring with wrong AWS Account ID MUST \ + raise AwsCryptographicMaterialProvidersError"), + Err(AwsEncryptionSdkException { message: m }) => + assert_eq!(m, "Ciphertext encrypted data keys exceed maxEncryptedDataKeys"), + _ => panic!("Unexpected error type"), + } + + println!("Limit Encrypted Data Keys Example Completed Successfully"); + + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a random AES key. + // In practice, you should not generate this key in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM). + // This key is created here for example purposes only and should not be used for any other purpose. + let mut random_bytes = [0u8; 32]; + rand::rngs::OsRng.fill_bytes(&mut random_bytes); + + random_bytes.to_vec() +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Limit Encrypted Data Keys example + use crate::example_utils::utils; + + // max_encrypted_data_keys MUST be greater than 0 + let max_encrypted_data_keys: u16 = 3; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + max_encrypted_data_keys + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/main.rs b/releases/rust/esdk/examples/main.rs new file mode 100644 index 000000000..feb80c5f4 --- /dev/null +++ b/releases/rust/esdk/examples/main.rs @@ -0,0 +1,237 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +pub mod client_supplier; +pub mod cryptographic_materials_manager; +pub mod keyring; +pub mod example_utils; +pub mod set_encryption_algorithm_suite_example; +pub mod set_commitment_policy_example; +pub mod limit_encrypted_data_keys_example; +use std::convert::From; + +// Why two types? +// return type from main must impl Debug +// but if impl Debug for BoxError +// then I can't impl From for BoxError +// because there's already a impl From for T; + +pub struct BoxError(String); +pub struct BoxError2(String); + +impl std::fmt::Debug for BoxError2 { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} + +impl From for BoxError2 { + fn from(error: BoxError) -> Self { + BoxError2(error.0) + } +} + +impl From for BoxError { + fn from(error: T) -> Self { + let my_str = format!("{:?}", error); + BoxError(my_str) + } +} + +#[tokio::main] +pub async fn main() -> Result<(), BoxError2> { + use example_utils::utils; + + keyring::aws_kms_discovery_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID + ).await?; + + let aws_regions: Vec = vec!["us-east-1".to_string(), "us-west-2".to_string()]; + + keyring::aws_kms_discovery_multi_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions + ).await?; + + keyring::aws_kms_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + keyring::aws_kms_mrk_discovery_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + mrk_encrypt_region, + mrk_replica_decrypt_region, + ).await?; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let aws_regions: Vec = vec!["us-east-1".to_string(), "us-west-2".to_string()]; + + keyring::aws_kms_mrk_discovery_multi_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + mrk_encrypt_region, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions, + ).await?; + + let mrk_encrypt_region: String = "us-east-1".to_string(); + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + keyring::aws_kms_mrk_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_MRK_KEY_ID_EU_WEST_1, + mrk_encrypt_region, + mrk_replica_decrypt_region, + ).await?; + + let mrk_replica_decrypt_region: String = "eu-west-1".to_string(); + + keyring::aws_kms_mrk_multi_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_MRK_KEY_ID_EU_WEST_1, + mrk_replica_decrypt_region, + ).await?; + + let default_region: String = "us-west-2".to_string(); + let second_region: String = "eu-central-1".to_string(); + + keyring::aws_kms_multi_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID, + utils::TEST_SECOND_REGION_KMS_KEY_ID, + default_region, + second_region, + ).await?; + + keyring::aws_kms_rsa_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KMS_RSA_KEY_ID, + utils::TEST_KMS_RSA_PUBLIC_KEY + ).await?; + + keyring::multi_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + keyring::raw_aes_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + keyring::raw_rsa_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + use aws_esdk::aws_cryptography_primitives::types::EcdhCurveSpec; + + // If you provide the key for Raw ECDH Keyring, it MUST + // be a key on curve P256 to run the example as is. If you want to provide a key on a + // different curve, update the input to encrypt_and_decrypt_with_keyring + keyring::ecdh::raw_ecdh_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + // If you provide the key for Ephemeral Raw ECDH Keyring, it MUST + // be a key on curve P256 to run the example as is. If you want to provide a key on a + // different curve, update the input to encrypt_with_keyring + keyring::ecdh::ephemeral_raw_ecdh_keyring_example::encrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + // If you provide the key for Public Key Discovery Raw ECDH Keyring, it MUST + // be a key on curve P256 to run the example as is. If you want to provide a key on a + // different curve, update the input to decrypt_with_keyring + keyring::ecdh::public_key_discovery_raw_ecdh_keyring_example::decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256 + ).await?; + + // If you provide the public keys for KMS ECDH Keyring, it MUST + // be a key on curve P256 to run the example as is. If you want to provide a key on a + // different curve, update the input to encrypt_and_decrypt_with_keyring + keyring::ecdh::kms_ecdh_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KMS_ECDH_KEY_ID_P256_SENDER, + EcdhCurveSpec::EccNistP256, + Some(utils::TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT) + ).await?; + + keyring::ecdh::kms_ecdh_discovery_keyring_example::decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + EcdhCurveSpec::EccNistP256, + utils::TEST_KMS_ECDH_KEY_ID_P256_RECIPIENT + ).await?; + + keyring::aws_kms_hierarchical::aws_kms_hierarchical_keyring_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KEY_STORE_NAME, + utils::TEST_LOGICAL_KEY_STORE_NAME, + utils::TEST_KEY_STORE_KMS_KEY_ID + ).await?; + + keyring::aws_kms_hierarchical::shared_cache_across_hierarchical_keyrings_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_KEY_STORE_NAME, + utils::TEST_LOGICAL_KEY_STORE_NAME, + utils::TEST_KEY_STORE_KMS_KEY_ID + ).await?; + + cryptographic_materials_manager::required_encryption_context::required_encryption_context_example::encrypt_and_decrypt_with_cmm( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + cryptographic_materials_manager::restrict_algorithm_suite::signing_only_example::encrypt_and_decrypt_with_cmm( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + let aws_regions: Vec = vec!["eu-west-1".to_string()]; + + client_supplier::client_supplier_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_MRK_KEY_ID_US_EAST_1, + utils::TEST_DEFAULT_KMS_KEY_ACCOUNT_ID, + aws_regions, + ).await?; + + set_encryption_algorithm_suite_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + set_commitment_policy_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + // max_encrypted_data_keys MUST be greater than 0 + let max_encrypted_data_keys: u16 = 3; + + limit_encrypted_data_keys_example::encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + max_encrypted_data_keys + ).await?; + + println!("All examples completed successfully."); + + Ok(()) +} \ No newline at end of file diff --git a/releases/rust/esdk/examples/set_commitment_policy_example.rs b/releases/rust/esdk/examples/set_commitment_policy_example.rs new file mode 100644 index 000000000..d0cc05524 --- /dev/null +++ b/releases/rust/esdk/examples/set_commitment_policy_example.rs @@ -0,0 +1,141 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example configures a client with a specific commitment policy for the +AWS Encryption SDK client, then encrypts and decrypts data using an AWS KMS Keyring. + +The commitment policy in this example (ForbidEncryptAllowDecrypt) should only be +used as part of a migration from version 1.x to 2.x, or for advanced users with +specialized requirements. Most AWS Encryption SDK users should use the default +commitment policy (RequireEncryptRequireDecrypt). + +This example creates a KMS Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context for the commitment policy ForbidEncryptAllowDecrypt. +This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on setting your commitment policy, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#commitment-policy + +For more information on KMS Key identifiers, see +https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::ForbidEncryptAllowDecrypt; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use std::collections::HashMap; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, + kms_key_id: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This example builds the client with the ForbidEncryptAllowDecrypt commitment policy, + // which enforces that this client cannot encrypt with key commitment + // and it can decrypt ciphertexts encrypted with or without key commitment. + // The default commitment policy if you were to build the client like in + // the `keyring/aws_kms_keyring_example.rs` is RequireEncryptRequireDecrypt. + // We recommend that AWS Encryption SDK users use the default commitment policy + // (RequireEncryptRequireDecrypt) whenever possible. + let esdk_config = AwsEncryptionSdkConfig::builder() + .commitment_policy(ForbidEncryptAllowDecrypt) + .build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. Create a KMS client. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_client = aws_sdk_kms::Client::new(&sdk_config); + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Create a KMS keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let kms_keyring = mpl + .create_aws_kms_keyring() + .kms_key_id(kms_key_id) + .kms_client(kms_client) + .send() + .await?; + + // 5. Encrypt the data with the encryption_context. Make sure you use a non-committing algorithm + // with the commitment policy ForbidEncryptAllowDecrypt. Otherwise esdk_client.encrypt() will throw + // Error: AwsCryptographicMaterialProvidersError + // { + // error: InvalidAlgorithmSuiteInfoOnEncrypt + // { + // message: "Configuration conflict. Commitment policy requires only non-committing algorithm suites" + // } + // } + // By default for ForbidEncryptAllowDecrypt, the algorithm used is + // AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384 which is a non-committing algorithm. + let plaintext = example_data.as_bytes(); + + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(kms_keyring.clone()) + .encryption_context(encryption_context.clone()) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 6. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 7. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(kms_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 8. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Set Commitment Policy Example Completed Successfully"); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Set Commitment Policy example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + utils::TEST_DEFAULT_KMS_KEY_ID + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/examples/set_encryption_algorithm_suite_example.rs b/releases/rust/esdk/examples/set_encryption_algorithm_suite_example.rs new file mode 100644 index 000000000..c62cfb464 --- /dev/null +++ b/releases/rust/esdk/examples/set_encryption_algorithm_suite_example.rs @@ -0,0 +1,166 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* +This example demonstrates how to set an algorithm suite while using the Raw AES Keyring +in the AWS Encryption SDK. + +The algorithm suite used in the encrypt() method is the algorithm used to protect your +data using the data key. By setting this algorithm, you can configure the algorithm used +to encrypt and decrypt your data. + +Algorithm suites can be set in a similar manner in other keyrings as well. However, +please make sure that you're using a logical algorithm suite that is compatible with your +keyring. For more information on algorithm suites supported by the AWS Encryption SDK, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/supported-algorithms.html + +The AES wrapping algorithm (AesWrappingAlg::AlgAes256GcmIv12Tag16) protects your data key using +the user-provided wrapping key. In contrast, the algorithm suite used in the encrypt() method +is the algorithm used to protect your data using the data key. This example demonstrates setting the +latter, which is the algorithm suite for protecting your data. When the commitment policy is +RequireEncryptRequireDecrypt, the default algorithm used in the encrypt method is +AlgAes256GcmHkdfSha512CommitKeyEcdsaP384, which is a committing and signing algorithm. +Signature verification ensures the integrity of a digital message as it goes across trust +boundaries. However, signature verification adds a significant performance cost to encryption +and decryption. If encryptors and decryptors are equally trusted, we can consider using an algorithm +suite that does not include signing. This example sets the algorithm suite as +AlgAes256GcmHkdfSha512CommitKey, which is a committing but non-signing algorithm. +For more information on digital signatures, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#digital-sigs + +This example creates a Raw AES Keyring and then encrypts a custom input EXAMPLE_DATA +with an encryption context and the algorithm suite AlgAes256GcmHkdfSha512CommitKey. +This example also includes some sanity checks for demonstration: +1. Ciphertext and plaintext data are not the same +2. Decrypted plaintext value matches EXAMPLE_DATA +These sanity checks are for demonstration in the example only. You do not need these in your code. + +For more information on how to use Raw AES keyrings, see +https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html +*/ + +use aws_esdk::client as esdk_client; +use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig; +use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey; +use aws_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use std::collections::HashMap; +use rand::RngCore; + +pub async fn encrypt_and_decrypt_with_keyring( + example_data: &str, +) -> Result<(), crate::BoxError> { + // 1. Instantiate the encryption SDK client. + // This builds the default client with the RequireEncryptRequireDecrypt commitment policy, + // which enforces that this client only encrypts using committing algorithm suites and enforces + // that this client will only decrypt encrypted messages that were created with a committing + // algorithm suite. + let esdk_config = AwsEncryptionSdkConfig::builder().build()?; + let esdk_client = esdk_client::Client::from_conf(esdk_config)?; + + // 2. The key namespace and key name are defined by you. + // and are used by the Raw AES keyring to determine + // whether it should attempt to decrypt an encrypted data key. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-aes-keyring.html + let key_namespace: &str = "my-key-namespace"; + let key_name: &str = "my-aes-key-name"; + + // 3. Create encryption context. + // Remember that your encryption context is NOT SECRET. + // For more information, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context + let encryption_context = HashMap::from([ + ("encryption".to_string(), "context".to_string()), + ("is not".to_string(), "secret".to_string()), + ("but adds".to_string(), "useful metadata".to_string()), + ("that can help you".to_string(), "be confident that".to_string()), + ("the data you are handling".to_string(), "is what you think it is".to_string()), + ]); + + // 4. Generate a 256-bit AES key to use with your keyring. + // In practice, you should get this key from a secure key management system such as an HSM. + let aes_key_bytes = generate_aes_key_bytes(); + + // 5. Create a Raw AES Keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + // The wrapping algorithm here is NOT the algorithm suite we set in this example. + let raw_aes_keyring = mpl + .create_raw_aes_keyring() + .key_name(key_name) + .key_namespace(key_namespace) + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + // 6. Encrypt the data with the encryption_context + let plaintext = example_data.as_bytes(); + + // This is the important step in this example where we specify the algorithm suite + // you want to use for encrypting your data + let encryption_response = esdk_client.encrypt() + .plaintext(plaintext) + .keyring(raw_aes_keyring.clone()) + .encryption_context(encryption_context.clone()) + .algorithm_suite_id(AlgAes256GcmHkdfSha512CommitKey) + .send() + .await?; + + let ciphertext = encryption_response + .ciphertext + .expect("Unable to unwrap ciphertext from encryption response"); + + // 7. Demonstrate that the ciphertext and plaintext are different. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_ne!(ciphertext, aws_smithy_types::Blob::new(plaintext), + "Ciphertext and plaintext data are the same. Invalid encryption"); + + // 8. Decrypt your encrypted data using the same keyring you used on encrypt. + let decryption_response = esdk_client.decrypt() + .ciphertext(ciphertext) + .keyring(raw_aes_keyring) + // Provide the encryption context that was supplied to the encrypt method + .encryption_context(encryption_context) + .send() + .await?; + + let decrypted_plaintext = decryption_response + .plaintext + .expect("Unable to unwrap plaintext from decryption response"); + + // 9. Demonstrate that the decrypted plaintext is identical to the original plaintext. + // (This is an example for demonstration; you do not need to do this in your own code.) + assert_eq!(decrypted_plaintext, aws_smithy_types::Blob::new(plaintext), + "Decrypted plaintext should be identical to the original plaintext. Invalid decryption"); + + println!("Set Encryption Algorithm Suite Example Completed Successfully"); + + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a random AES key. + // In practice, you should not generate this key in your code, and should instead + // retrieve this key from a secure key management system (e.g. HSM). + // This key is created here for example purposes only and should not be used for any other purpose. + let mut random_bytes = [0u8; 32]; + rand::rngs::OsRng.fill_bytes(&mut random_bytes); + + random_bytes.to_vec() +} + +#[tokio::test(flavor = "multi_thread")] +pub async fn test_encrypt_and_decrypt_with_keyring() -> Result<(), crate::BoxError2> { + // Test function for encrypt and decrypt using the Set Encryption Algorithm Suite example + use crate::example_utils::utils; + + encrypt_and_decrypt_with_keyring( + utils::TEST_EXAMPLE_DATA, + ).await?; + + Ok(()) +} diff --git a/releases/rust/esdk/src/aes_gcm.rs b/releases/rust/esdk/src/aes_gcm.rs new file mode 100644 index 000000000..21bf9230f --- /dev/null +++ b/releases/rust/esdk/src/aes_gcm.rs @@ -0,0 +1,255 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +use crate::software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput; +use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; +use crate::software::amazon::cryptography::primitives::internaldafny::types::AES_GCM; +use crate::*; +use aws_lc_rs::aead::{Aad, LessSafeKey, Nonce, UnboundKey}; +use std::rc::Rc; + +struct DoAESEncryptOutput { + cipher_text: Vec, + auth_tag: Vec, +} + +fn error(s: &str) -> Rc { + Rc::new(DafnyError::AwsCryptographicPrimitivesError { + message: + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(s), + }) +} + +fn enc_result(s: &str) -> Rc<_Wrappers_Compile::Result, Rc>> { + Rc::new(_Wrappers_Compile::Result::Failure { error: error(s) }) +} + +fn dec_result( + s: &str, +) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + Rc::new(_Wrappers_Compile::Result::Failure { error: error(s) }) +} + +#[allow(non_snake_case)] +pub mod AESEncryption { + pub use crate::software::amazon::cryptography::primitives::internaldafny::types::*; +} +impl AES_GCM { + fn get_alg(&self) -> Result<&'static aws_lc_rs::aead::Algorithm, String> { + if *self.tagLength() != 16i32 { + Err(format!( + "Tag length of {} not supported in Rust. Tag length must be 16.", + self.tagLength() + )) + } else if *self.ivLength() != 12i32 { + Err(format!( + "IV length of {} not supported in Rust. IV length must be 12.", + self.ivLength() + )) + } else if *self.keyLength() == 32i32 { + Ok(&aws_lc_rs::aead::AES_256_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.", + self.keyLength() + )) + } + } + + fn do_aes_encrypt( + &self, + iv: &[u8], + key: &[u8], + msg: &[u8], + aad: &[u8], + ) -> Result { + let alg = self.get_alg()?; + let mut in_out_buffer = Vec::from(msg); + let key = UnboundKey::new(alg, key).map_err(|e| format!("new {:?}", e))?; + let nonce = Nonce::assume_unique_for_key(iv.try_into().unwrap()); + let key = LessSafeKey::new(key); + let aad = Aad::from(aad); + let tag = key + .seal_in_place_separate_tag(nonce, aad, &mut in_out_buffer) + .map_err(|e| format!("Seal {:?}", e))?; + Ok(DoAESEncryptOutput { + cipher_text: in_out_buffer, + auth_tag: Vec::from(tag.as_ref()), + }) + } + + fn do_aes_decrypt( + &self, + key: &[u8], + cipher_text: &[u8], + auth_tag: &[u8], + iv: &[u8], + aad: &[u8], + ) -> Result, String> { + let alg = self.get_alg()?; + let mut out_buffer = Vec::from(cipher_text); + let key = UnboundKey::new(alg, key).map_err(|e| format!("new {:?}", e))?; + let nonce = Nonce::assume_unique_for_key(iv.try_into().unwrap()); + let key = LessSafeKey::new(key); + let aad = Aad::from(aad); + key.open_separate_gather(nonce, aad, cipher_text, auth_tag, &mut out_buffer) + .map_err(|e| format!("gather {:?}", e))?; + Ok(out_buffer) + } + + #[allow(non_snake_case)] + pub fn AESEncryptExtern( + &self, + iv: &::dafny_runtime::Sequence, + key: &::dafny_runtime::Sequence, + msg: &::dafny_runtime::Sequence, + aad: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result, Rc>> { + let iv: Vec = iv.iter().collect(); + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + let aad: Vec = aad.iter().collect(); + + if *self.keyLength() as usize != key.len() { + let msg = format!( + "AESEncrypt : algorithm key length was {} but actual key length was {}.", + self.keyLength(), + key.len() + ); + return enc_result(&msg); + } + if *self.ivLength() as usize != iv.len() { + let msg = format!( + "AESEncrypt : algorithm nonce length was {} but actual nonce length was {}.", + self.ivLength(), + iv.len() + ); + return enc_result(&msg); + } + + match self.do_aes_encrypt(&iv, &key, &msg, &aad) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: Rc::new(AESEncryptOutput::AESEncryptOutput { + cipherText: x.cipher_text.iter().cloned().collect(), + authTag: x.auth_tag.iter().cloned().collect(), + }), + }), + Err(e) => { + let msg = format!("AES Encrypt : {}", e); + enc_result(&msg) + } + } + } + + #[allow(non_snake_case)] + pub fn AESDecryptExtern( + &self, + key: &::dafny_runtime::Sequence, + cipher_text: &::dafny_runtime::Sequence, + auth_tag: &::dafny_runtime::Sequence, + iv: &::dafny_runtime::Sequence, + aad: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let key: Vec = key.iter().collect(); + let cipher_text: Vec = cipher_text.iter().collect(); + let auth_tag: Vec = auth_tag.iter().collect(); + let iv: Vec = iv.iter().collect(); + let aad: Vec = aad.iter().collect(); + + if *self.keyLength() as usize != key.len() { + let msg = format!( + "AESEncrypt : algorithm key length was {} but actual key length was {}.", + self.keyLength(), + key.len() + ); + return dec_result(&msg); + } + + if *self.ivLength() as usize != iv.len() { + let msg = format!( + "AESEncrypt : algorithm nonce length was {} but actual nonce length was {}.", + self.ivLength(), + iv.len() + ); + return dec_result(&msg); + } + + if *self.tagLength() as usize != auth_tag.len() { + let msg = format!( + "AESEncrypt : algorithm auth tag length was {} but actual auth tag length was {}.", + self.tagLength(), + auth_tag.len() + ); + return dec_result(&msg); + } + + match self.do_aes_decrypt(&key, &cipher_text, &auth_tag, &iv, &aad) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: x.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("AES Decrypt : {}", e); + dec_result(&msg) + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn test_generate() { + let iv: ::dafny_runtime::Sequence = [1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + .iter() + .cloned() + .collect(); + let key: ::dafny_runtime::Sequence = [ + 2u8, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, + ] + .iter() + .cloned() + .collect(); + let msg: ::dafny_runtime::Sequence = [2u8, 4, 6, 8, 10, 12].iter().cloned().collect(); + let aad: ::dafny_runtime::Sequence = + [3u8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] + .iter() + .cloned() + .collect(); + + let alg = AES_GCM::AES_GCM { + keyLength: 32, + tagLength: 16, + ivLength: 12, + }; + let cipher = match &*alg.AESEncryptExtern(&iv, &key, &msg, &aad) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("AESEncryptExtern Failed : {:?}", error); + } + }; + + let (cipher_text, auth_tag) = match &*cipher { + AESEncryptOutput::AESEncryptOutput { + cipherText, + authTag, + } => (cipherText, authTag), + }; + + let output = match &*alg.AESDecryptExtern(&key, &cipher_text, &auth_tag, &iv, &aad) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("AESEncryptExtern Failed : {:?}", error); + } + }; + + assert_eq!(output, msg); + } +} diff --git a/releases/rust/esdk/src/aes_kdf_ctr.rs b/releases/rust/esdk/src/aes_kdf_ctr.rs new file mode 100644 index 000000000..36f17bbea --- /dev/null +++ b/releases/rust/esdk/src/aes_kdf_ctr.rs @@ -0,0 +1,74 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] +#![allow(dead_code)] + +#[allow(non_snake_case)] +pub mod AesKdfCtr { + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use crate::*; + use aws_lc_rs::cipher::{EncryptingKey, EncryptionContext, UnboundCipherKey, AES_256}; + use dafny_runtime::Sequence; + use std::rc::Rc; + + fn error(s: &str) -> Rc { + Rc::new(DafnyError::AwsCryptographicPrimitivesError { + message: + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(s), + }) + } + + fn as_array(nonce: &[u8]) -> &[u8; aws_lc_rs::iv::IV_LEN_128_BIT] { + nonce.try_into().unwrap() + } + + fn ctr_stream(nonce: &[u8], key: &[u8], length: u32) -> Result, String> { + if nonce.len() != aws_lc_rs::iv::IV_LEN_128_BIT { + return Err(format!( + "Nonce length of {} not supported in AesKdfCtrStream. Nonce length must be {}.", + nonce.len(), + aws_lc_rs::iv::IV_LEN_128_BIT + )); + } + + let mut in_out_buffer = vec![0; length as usize]; + + let key = UnboundCipherKey::new(&AES_256, key).map_err(|e| format!("new {:?}", e))?; + let encrypting_key = EncryptingKey::ctr(key).map_err(|e| format!("new {:?}", e))?; + let nonce = aws_lc_rs::iv::FixedLength::<16>::from(as_array(nonce)); + let context = EncryptionContext::Iv128(nonce); + encrypting_key + .less_safe_encrypt(&mut in_out_buffer, context) + .map_err(|e| format!("new {:?}", e))?; + Ok(in_out_buffer) + } + + impl crate::AesKdfCtr::_default { + #[allow(non_snake_case)] + pub fn AesKdfCtrStream( + nonce: &Sequence, + key: &Sequence, + length: u32, + ) -> Rc< + _Wrappers_Compile::Result< + Sequence, + Rc, + >, + > { + let nonce: Vec = nonce.iter().collect(); + let key: Vec = key.iter().collect(); + match ctr_stream(&nonce, &key, length) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: x.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("Aes Kdf Ctr : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { error: error(&msg) }) + } + } + } + } +} diff --git a/releases/rust/esdk/src/client.rs b/releases/rust/esdk/src/client.rs new file mode 100644 index 000000000..c7b90345b --- /dev/null +++ b/releases/rust/esdk/src/client.rs @@ -0,0 +1,36 @@ +// 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. +use aws_smithy_types::error::operation::BuildError; + +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +#[allow(missing_docs)] +pub struct Client { + pub(crate) dafny_client: ::dafny_runtime::Object +} + +impl Client { + /// Creates a new client from the service [`Config`](crate::Config). + #[track_caller] + pub fn from_conf( + conf: crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig, + ) -> Result { + let inner = + crate::software::amazon::cryptography::encryptionsdk::internaldafny::_default::ESDK( + &crate::conversions::aws_encryption_sdk_config::_aws_encryption_sdk_config::to_dafny(conf), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod encrypt; + +mod decrypt; diff --git a/releases/rust/esdk/src/client/decrypt.rs b/releases/rust/esdk/src/client/decrypt.rs new file mode 100644 index 000000000..ad4145e70 --- /dev/null +++ b/releases/rust/esdk/src/client/decrypt.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::client::Client { + /// Constructs a fluent builder for the [`Decrypt`](crate::operation::decrypt::builders::DecryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ciphertext(impl Into>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::ciphertext) / [`set_ciphertext(Option<::aws_smithy_types::Blob>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::set_ciphertext): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`keyring(impl Into>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::keyring) / [`set_keyring(Option)`](crate::operation::decrypt::builders::DecryptFluentBuilder::set_keyring): (undocumented)
+ /// - [`materials_manager(impl Into>)`](crate::operation::decrypt::builders::DecryptFluentBuilder::materials_manager) / [`set_materials_manager(Option)`](crate::operation::decrypt::builders::DecryptFluentBuilder::set_materials_manager): (undocumented)
+ /// - On success, responds with [`DecryptOutput`](crate::operation::decrypt::DecryptOutput) with field(s): + /// - [`algorithm_suite_id(Option)`](crate::operation::decrypt::DecryptOutput::algorithm_suite_id): (undocumented) + /// - [`encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt::DecryptOutput::encryption_context): (undocumented) + /// - [`plaintext(Option<::aws_smithy_types::Blob>)`](crate::operation::decrypt::DecryptOutput::plaintext): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decrypt::DecryptError) + pub fn decrypt(&self) -> crate::operation::decrypt::builders::DecryptFluentBuilder { + crate::operation::decrypt::builders::DecryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/client/encrypt.rs b/releases/rust/esdk/src/client/encrypt.rs new file mode 100644 index 000000000..fe0e66146 --- /dev/null +++ b/releases/rust/esdk/src/client/encrypt.rs @@ -0,0 +1,22 @@ +// 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. +impl crate::client::Client { + /// Constructs a fluent builder for the [`Encrypt`](crate::operation::encrypt::builders::EncryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`frame_length(impl Into>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::frame_length) / [`set_frame_length(Option<::std::primitive::i64>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_frame_length): (undocumented)
+ /// - [`keyring(impl Into>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::keyring) / [`set_keyring(Option)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_keyring): (undocumented)
+ /// - [`materials_manager(impl Into>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::materials_manager) / [`set_materials_manager(Option)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_materials_manager): (undocumented)
+ /// - [`plaintext(impl Into>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::plaintext) / [`set_plaintext(Option<::aws_smithy_types::Blob>)`](crate::operation::encrypt::builders::EncryptFluentBuilder::set_plaintext): (undocumented)
+ /// - On success, responds with [`EncryptOutput`](crate::operation::encrypt::EncryptOutput) with field(s): + /// - [`algorithm_suite_id(Option)`](crate::operation::encrypt::EncryptOutput::algorithm_suite_id): (undocumented) + /// - [`ciphertext(Option<::aws_smithy_types::Blob>)`](crate::operation::encrypt::EncryptOutput::ciphertext): (undocumented) + /// - [`encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::encrypt::EncryptOutput::encryption_context): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::encrypt::EncryptError) + pub fn encrypt(&self) -> crate::operation::encrypt::builders::EncryptFluentBuilder { + crate::operation::encrypt::builders::EncryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/concurrent_call.rs b/releases/rust/esdk/src/concurrent_call.rs new file mode 100644 index 000000000..6bafd0c6a --- /dev/null +++ b/releases/rust/esdk/src/concurrent_call.rs @@ -0,0 +1,61 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] +#![allow(dead_code)] + +#[allow(non_snake_case)] +pub mod ConcurrentCall { + + fn de_const( + p: *const dafny_runtime::Object<(dyn Callee + 'static)>, + ) -> *mut dafny_runtime::Object<(dyn Callee + 'static)> { + p as _ + } + + pub struct FakeCallee { + callee: *const dafny_runtime::Object<(dyn Callee + 'static)>, + } + impl FakeCallee { + fn new(callee: &dafny_runtime::Object<(dyn Callee + 'static)>) -> Self { + Self { + callee: std::ptr::from_ref(callee), + } + } + fn call(&self, x: u32, y: u32) { + let mptr = de_const(self.callee); + let value: &mut dafny_runtime::Object<(dyn Callee + 'static)> = unsafe { &mut *mptr }; + value.as_mut().call(x, y); + } + } + unsafe impl Send for FakeCallee {} + + #[allow(nonstandard_style)] + pub struct _default {} + use crate::ConcurrentCall::Callee; + impl _default { + pub fn ConcurrentCall( + callee: &dafny_runtime::Object<(dyn Callee + 'static)>, + serial_iters: u32, + concurrent_iters: u32, + ) { + let mut children = vec![]; + + for i in 0..concurrent_iters { + // Spin up another thread + let fake = FakeCallee::new(callee); + children.push(std::thread::spawn(move || { + for j in 0..serial_iters { + fake.call(j, i); + } + })); + } + + for child in children { + let _ = child.join(); + } + } + } +} diff --git a/releases/rust/esdk/src/conversions.rs b/releases/rust/esdk/src/conversions.rs new file mode 100644 index 000000000..0ffc951b1 --- /dev/null +++ b/releases/rust/esdk/src/conversions.rs @@ -0,0 +1,22 @@ +// 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 mod client; + + pub mod decrypt; + + pub mod decrypt_input; + + pub mod decrypt_output; + + pub mod encrypt; + + pub mod encrypt_input; + + pub mod encrypt_output; + + pub mod error; + + pub mod net_v4_0_0_retry_policy; + +pub mod aws_encryption_sdk_config; diff --git a/releases/rust/esdk/src/conversions/aws_encryption_sdk_config.rs b/releases/rust/esdk/src/conversions/aws_encryption_sdk_config.rs new file mode 100644 index 000000000..3192de164 --- /dev/null +++ b/releases/rust/esdk/src/conversions/aws_encryption_sdk_config.rs @@ -0,0 +1,4 @@ +// 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 mod _aws_encryption_sdk_config; diff --git a/releases/rust/esdk/src/conversions/aws_encryption_sdk_config/_aws_encryption_sdk_config.rs b/releases/rust/esdk/src/conversions/aws_encryption_sdk_config/_aws_encryption_sdk_config.rs new file mode 100644 index 000000000..48b03d7ec --- /dev/null +++ b/releases/rust/esdk/src/conversions/aws_encryption_sdk_config/_aws_encryption_sdk_config.rs @@ -0,0 +1,68 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value)) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig, + >, +) -> crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig, +) -> crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig::AwsEncryptionSdkConfig { + commitmentPolicy: ::std::rc::Rc::new(match &value.commitment_policy { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::esdk_commitment_policy::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + maxEncryptedDataKeys: crate::standard_library_conversions::olong_to_dafny(&value.max_encrypted_data_keys), + netV4_0_0_RetryPolicy: ::std::rc::Rc::new(match &value.net_v4_0_0_retry_policy { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::conversions::net_v4_0_0_retry_policy::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig, +) -> crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig::AwsEncryptionSdkConfig {..} => + crate::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig::builder() + .set_commitment_policy(match &**dafny_value.commitmentPolicy() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::esdk_commitment_policy::from_dafny(value) + ), + _ => None, +} +) + .set_max_encrypted_data_keys(crate::standard_library_conversions::olong_from_dafny(dafny_value.maxEncryptedDataKeys().clone())) + .set_net_v4_0_0_retry_policy(match &**dafny_value.netV4_0_0_RetryPolicy() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::conversions::net_v4_0_0_retry_policy::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() + } +} diff --git a/releases/rust/esdk/src/conversions/client.rs b/releases/rust/esdk/src/conversions/client.rs new file mode 100644 index 000000000..be0784786 --- /dev/null +++ b/releases/rust/esdk/src/conversions/client.rs @@ -0,0 +1,24 @@ +// 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. +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: &crate::client::Client, +) -> + ::dafny_runtime::Object +{ + value.dafny_client.clone() +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::IAwsEncryptionSdkClient + >, +) -> crate::client::Client { + crate::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/esdk/src/conversions/decrypt.rs b/releases/rust/esdk/src/conversions/decrypt.rs new file mode 100644 index 000000000..59292b747 --- /dev/null +++ b/releases/rust/esdk/src/conversions/decrypt.rs @@ -0,0 +1,7 @@ +// 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 mod _decrypt_input; + + pub mod _decrypt_output; diff --git a/releases/rust/esdk/src/conversions/decrypt/_decrypt_input.rs b/releases/rust/esdk/src/conversions/decrypt/_decrypt_input.rs new file mode 100644 index 000000000..3d3fe57c7 --- /dev/null +++ b/releases/rust/esdk/src/conversions/decrypt/_decrypt_input.rs @@ -0,0 +1,68 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::operation::decrypt::DecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput::DecryptInput { + ciphertext: crate::standard_library_conversions::blob_to_dafny(&value.ciphertext.unwrap()), + materialsManager: ::std::rc::Rc::new(match &value.materials_manager { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput, + >, +) -> crate::operation::decrypt::DecryptInput { + crate::operation::decrypt::DecryptInput::builder() + .set_ciphertext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ciphertext().clone()))) + .set_materials_manager(match (*dafny_value.materialsManager()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/conversions/decrypt/_decrypt_output.rs b/releases/rust/esdk/src/conversions/decrypt/_decrypt_output.rs new file mode 100644 index 000000000..b3cfe43e0 --- /dev/null +++ b/releases/rust/esdk/src/conversions/decrypt/_decrypt_output.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::operation::decrypt::DecryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput::DecryptOutput { + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(value.algorithm_suite_id.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput, + >, +) -> crate::operation::decrypt::DecryptOutput { + crate::operation::decrypt::DecryptOutput::builder() + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/conversions/decrypt_input.rs b/releases/rust/esdk/src/conversions/decrypt_input.rs new file mode 100644 index 000000000..191750818 --- /dev/null +++ b/releases/rust/esdk/src/conversions/decrypt_input.rs @@ -0,0 +1,114 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::types::DecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DecryptInput, +) -> crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput::DecryptInput { + ciphertext: crate::standard_library_conversions::blob_to_dafny(&value.ciphertext.unwrap()), + materialsManager: ::std::rc::Rc::new(match &value.materials_manager { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput, + >, +) -> crate::types::DecryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput, +) -> crate::types::DecryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput::DecryptInput {..} => + crate::types::DecryptInput::builder() + .set_ciphertext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ciphertext().clone()))) + .set_materials_manager(match (*dafny_value.materialsManager()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/conversions/decrypt_output.rs b/releases/rust/esdk/src/conversions/decrypt_output.rs new file mode 100644 index 000000000..b2b624bc4 --- /dev/null +++ b/releases/rust/esdk/src/conversions/decrypt_output.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::types::DecryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DecryptOutput, +) -> crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput::DecryptOutput { + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(value.algorithm_suite_id.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput, + >, +) -> crate::types::DecryptOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput, +) -> crate::types::DecryptOutput { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput::DecryptOutput {..} => + crate::types::DecryptOutput::builder() + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/conversions/encrypt.rs b/releases/rust/esdk/src/conversions/encrypt.rs new file mode 100644 index 000000000..69088de0d --- /dev/null +++ b/releases/rust/esdk/src/conversions/encrypt.rs @@ -0,0 +1,7 @@ +// 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 mod _encrypt_input; + + pub mod _encrypt_output; diff --git a/releases/rust/esdk/src/conversions/encrypt/_encrypt_input.rs b/releases/rust/esdk/src/conversions/encrypt/_encrypt_input.rs new file mode 100644 index 000000000..bc70f9de0 --- /dev/null +++ b/releases/rust/esdk/src/conversions/encrypt/_encrypt_input.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::operation::encrypt::EncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput::EncryptInput { + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + materialsManager: ::std::rc::Rc::new(match &value.materials_manager { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + frameLength: crate::standard_library_conversions::olong_to_dafny(&value.frame_length), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput, + >, +) -> crate::operation::encrypt::EncryptInput { + crate::operation::encrypt::EncryptInput::builder() + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .set_materials_manager(match (*dafny_value.materialsManager()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(value) + ), + _ => None, +} +) + .set_frame_length(crate::standard_library_conversions::olong_from_dafny(dafny_value.frameLength().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/conversions/encrypt/_encrypt_output.rs b/releases/rust/esdk/src/conversions/encrypt/_encrypt_output.rs new file mode 100644 index 000000000..75582e1d7 --- /dev/null +++ b/releases/rust/esdk/src/conversions/encrypt/_encrypt_output.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::operation::encrypt::EncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput::EncryptOutput { + ciphertext: crate::standard_library_conversions::blob_to_dafny(&value.ciphertext.unwrap()), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(value.algorithm_suite_id.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput, + >, +) -> crate::operation::encrypt::EncryptOutput { + crate::operation::encrypt::EncryptOutput::builder() + .set_ciphertext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ciphertext().clone()))) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/conversions/encrypt_input.rs b/releases/rust/esdk/src/conversions/encrypt_input.rs new file mode 100644 index 000000000..bb320c7a3 --- /dev/null +++ b/releases/rust/esdk/src/conversions/encrypt_input.rs @@ -0,0 +1,128 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::types::EncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::EncryptInput, +) -> crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput::EncryptInput { + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + materialsManager: ::std::rc::Rc::new(match &value.materials_manager { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + frameLength: crate::standard_library_conversions::olong_to_dafny(&value.frame_length), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput, + >, +) -> crate::types::EncryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput, +) -> crate::types::EncryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput::EncryptInput {..} => + crate::types::EncryptInput::builder() + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .set_materials_manager(match (*dafny_value.materialsManager()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(value) + ), + _ => None, +} +) + .set_frame_length(crate::standard_library_conversions::olong_from_dafny(dafny_value.frameLength().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/conversions/encrypt_output.rs b/releases/rust/esdk/src/conversions/encrypt_output.rs new file mode 100644 index 000000000..67fa283c1 --- /dev/null +++ b/releases/rust/esdk/src/conversions/encrypt_output.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::types::EncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::EncryptOutput, +) -> crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput::EncryptOutput { + ciphertext: crate::standard_library_conversions::blob_to_dafny(&value.ciphertext.unwrap()), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(value.algorithm_suite_id.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput, + >, +) -> crate::types::EncryptOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput, +) -> crate::types::EncryptOutput { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput::EncryptOutput {..} => + crate::types::EncryptOutput::builder() + .set_ciphertext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ciphertext().clone()))) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/conversions/error.rs b/releases/rust/esdk/src/conversions/error.rs new file mode 100644 index 000000000..c8b3c56b7 --- /dev/null +++ b/releases/rust/esdk/src/conversions/error.rs @@ -0,0 +1,141 @@ +// 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. +/// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::types::error::Error::AwsEncryptionSdkException { message } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsEncryptionSdkException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::types::error::Error::AwsCryptographicPrimitivesError { error } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: crate::deps::aws_cryptography_primitives::conversions::error::to_dafny(error), + }, +crate::types::error::Error::AwsCryptographicMaterialProvidersError { error } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(error), + }, + crate::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&list, |e| to_dafny(e.clone())) + }, + crate::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::Opaque { + obj: { + let rc = ::std::rc::Rc::new(inner) as ::std::rc::Rc; + // safety: `rc` is new, ensuring it has refcount 1 and is uniquely owned. + // we should use `dafny_runtime_conversions::rc_struct_to_dafny_class` once it + // accepts unsized types (https://github.com/dafny-lang/dafny/pull/5769) + unsafe { ::dafny_runtime::Object::from_rc(rc) } + }, + }, + crate::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error, + >, +) -> crate::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsEncryptionSdkException { message } => + crate::types::error::Error::AwsEncryptionSdkException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyPrimitives { AwsCryptographyPrimitives } => + crate::types::error::Error::AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(AwsCryptographyPrimitives.clone()), + }, +crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyMaterialProviders { AwsCryptographyMaterialProviders } => + crate::types::error::Error::AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(AwsCryptographyMaterialProviders.clone()), + }, + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::types::error::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&list, |e| from_dafny(e.clone())) + }, + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::Opaque { obj } => + crate::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::types::error::ValidationError); + crate::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::types::error::ValidationError); + crate::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + } + } + }, + } +} diff --git a/releases/rust/esdk/src/conversions/net_v4_0_0_retry_policy.rs b/releases/rust/esdk/src/conversions/net_v4_0_0_retry_policy.rs new file mode 100644 index 000000000..26d0a36bd --- /dev/null +++ b/releases/rust/esdk/src/conversions/net_v4_0_0_retry_policy.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::types::NetV400RetryPolicy, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::types::NetV400RetryPolicy::ForbidRetry => crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy::FORBID_RETRY {}, +crate::types::NetV400RetryPolicy::AllowRetry => crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy::ALLOW_RETRY {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy, +) -> crate::types::NetV400RetryPolicy { + match dafny_value { + crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy::FORBID_RETRY {} => crate::types::NetV400RetryPolicy::ForbidRetry, +crate::r#software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy::ALLOW_RETRY {} => crate::types::NetV400RetryPolicy::AllowRetry, + } +} diff --git a/releases/rust/esdk/src/dafny_libraries.rs b/releases/rust/esdk/src/dafny_libraries.rs new file mode 100644 index 000000000..a5e7f437f --- /dev/null +++ b/releases/rust/esdk/src/dafny_libraries.rs @@ -0,0 +1,174 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +#[allow(non_snake_case)] +pub mod DafnyLibraries { + use dashmap::DashMap; + use std::collections::HashMap; + use std::collections::HashSet; + + pub struct MutableMap { + map: DashMap, + } + + impl MutableMap { + pub fn _allocate_object() -> ::dafny_runtime::Object { + ::dafny_runtime::Object::new(MutableMap { + map: DashMap::new(), + }) + } + } + + impl + crate::DafnyLibraries::MutableMapTrait for MutableMap + { + fn content(&self) -> ::dafny_runtime::Map { + let mut new_map = HashMap::new(); + for entry in self.map.iter() { + new_map.insert(entry.key().clone(), entry.value().clone()); + } + dafny_runtime::Map::from_hashmap_owned(new_map) + } + fn Put(&self, k: &K, v: &V) { + self.map.insert(k.clone(), v.clone()); + } + fn Keys(&self) -> ::dafny_runtime::Set { + let mut new_set = HashSet::new(); + for entry in self.map.iter() { + new_set.insert(entry.key().clone()); + } + dafny_runtime::Set::from_hashset_owned(new_set) + } + fn HasKey(&self, k: &K) -> bool { + self.map.contains_key(k) + } + fn Values(&self) -> ::dafny_runtime::Set { + let mut new_set = HashSet::new(); + for entry in self.map.iter() { + new_set.insert(entry.value().clone()); + } + dafny_runtime::Set::from_hashset_owned(new_set) + } + fn Items(&self) -> ::dafny_runtime::Set<(K, V)> { + let mut new_set = HashSet::new(); + for entry in self.map.iter() { + new_set.insert((entry.key().clone(), entry.value().clone())); + } + dafny_runtime::Set::from_hashset_owned(new_set) + } + fn Select(&self, k: &K) -> V { + self.map.get(k).unwrap().clone() + } + fn Remove(&self, k: &K) { + self.map.remove(k); + } + fn Size(&self) -> ::dafny_runtime::DafnyInt { + self.map.len().into() + } + } + + impl + ::dafny_runtime::UpcastObject for MutableMap + { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); + } + + pub mod FileIO { + use std::fs::File; + use std::io::Read; + use std::io::Write; + use std::path::Path; + + pub fn INTERNAL_ReadBytesFromFile( + file: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + ) -> ( + bool, + ::dafny_runtime::Sequence, + ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + ) { + let file_name = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(file); + let path = Path::new(&file_name); + + let mut file = match File::open(path) { + Err(why) => { + let err_msg = format!( + "couldn't open {} for reading from {}: {}", + path.display(), + curr_dir(), + why + ); + let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); + return (true, dafny_runtime::Sequence::default(), err_msg); + } + Ok(file) => file, + }; + + let mut result = Vec::new(); + match file.read_to_end(&mut result) { + Err(why) => { + let err_msg = format!("couldn't read from {}: {}", path.display(), why); + let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); + (true, dafny_runtime::Sequence::default(), err_msg) + } + Ok(_) => ( + false, + dafny_runtime::Sequence::from_array_owned(result), + dafny_runtime::Sequence::default(), + ), + } + } + + fn curr_dir() -> String { + let path = std::env::current_dir(); + match path { + Ok(path) => format!("{}", path.display()), + Err(_) => "unknown".to_string(), + } + } + + pub fn INTERNAL_WriteBytesToFile( + path: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, + bytes: &::dafny_runtime::Sequence, + ) -> ( + 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() + .write(true) + .create(true) + .truncate(true) + .open(path); + let mut file = match maybe_file { + Err(why) => { + let err_msg = format!( + "couldn't open {} for writing from {}: {}", + path.display(), + curr_dir(), + why + ); + let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); + return (true, err_msg); + } + Ok(file) => file, + }; + + let bytes = bytes.to_array(); + match file.write_all(&bytes) { + Err(why) => { + let err_msg = + format!("couldn't write all bytes to {}: {}", path.display(), why); + let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); + (true, err_msg) + } + Ok(_) => (false, dafny_runtime::Sequence::default()), + } + } + } +} diff --git a/releases/rust/esdk/src/ddb.rs b/releases/rust/esdk/src/ddb.rs new file mode 100644 index 000000000..2032916b5 --- /dev/null +++ b/releases/rust/esdk/src/ddb.rs @@ -0,0 +1,75 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +use aws_config::Region; +use std::sync::LazyLock; + +static DAFNY_TOKIO_RUNTIME: LazyLock = LazyLock::new(|| { + tokio::runtime::Builder::new_multi_thread() + .enable_all() + .build() + .unwrap() +}); + +#[allow(non_snake_case)] +impl crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::_default { + pub fn DDBClientForRegion(region: &::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::dafny_runtime::Object, + ::std::rc::Rc + > + >{ + let region = + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string( + region, + ); + let shared_config = match tokio::runtime::Handle::try_current() { + Ok(curr) => tokio::task::block_in_place(|| { + curr.block_on(async { + aws_config::load_defaults(aws_config::BehaviorVersion::v2024_03_28()).await + }) + }), + Err(_) => DAFNY_TOKIO_RUNTIME.block_on(aws_config::load_defaults( + aws_config::BehaviorVersion::v2024_03_28(), + )), + }; + let shared_config = shared_config + .to_builder() + .region(Region::new(region)) + .build(); + let inner = aws_sdk_dynamodb::Client::new(&shared_config); + let client = crate::deps::com_amazonaws_dynamodb::client::Client { inner }; + let dafny_client = ::dafny_runtime::upcast_object()(::dafny_runtime::object::new(client)); + std::rc::Rc::new(crate::r#_Wrappers_Compile::Result::Success { + value: dafny_client, + }) + } + + pub fn DynamoDBClient() -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::dafny_runtime::Object, + ::std::rc::Rc + > + >{ + let shared_config = match tokio::runtime::Handle::try_current() { + Ok(curr) => tokio::task::block_in_place(|| { + curr.block_on(async { + aws_config::load_defaults(aws_config::BehaviorVersion::v2024_03_28()).await + }) + }), + Err(_) => DAFNY_TOKIO_RUNTIME.block_on(aws_config::load_defaults( + aws_config::BehaviorVersion::v2024_03_28(), + )), + }; + let inner = aws_sdk_dynamodb::Client::new(&shared_config); + let client = crate::deps::com_amazonaws_dynamodb::client::Client { inner }; + let dafny_client = ::dafny_runtime::upcast_object()(::dafny_runtime::object::new(client)); + std::rc::Rc::new(crate::r#_Wrappers_Compile::Result::Success { + value: dafny_client, + }) + } +} diff --git a/releases/rust/esdk/src/deps.rs b/releases/rust/esdk/src/deps.rs new file mode 100644 index 000000000..12e9c9a6b --- /dev/null +++ b/releases/rust/esdk/src/deps.rs @@ -0,0 +1,12 @@ +// 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 mod aws_cryptography_keyStore; + + pub mod aws_cryptography_materialProviders; + + pub mod aws_cryptography_primitives; + + pub mod com_amazonaws_dynamodb; + + pub mod com_amazonaws_kms; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore.rs @@ -0,0 +1,11 @@ +// 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 mod client; +pub mod types; +/// Common errors and error handling utilities. +pub mod error; +/// All operations that this crate can perform. +pub mod operation; +pub mod conversions; +pub mod deps; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client.rs new file mode 100644 index 000000000..5dfefe95f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client.rs @@ -0,0 +1,46 @@ +// 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. +use aws_smithy_types::error::operation::BuildError; + +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +#[allow(missing_docs)] +pub struct Client { + pub(crate) dafny_client: ::dafny_runtime::Object +} + +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, + ) -> Result { + 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), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod get_key_store_info; + +mod create_key_store; + +mod create_key; + +mod version_key; + +mod get_active_branch_key; + +mod get_branch_key_version; + +mod get_beacon_key; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs new file mode 100644 index 000000000..9f1a13e58 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`CreateKey`](crate::operation::create_key::builders::CreateKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_identifier(impl Into>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::branch_key_identifier) / [`set_branch_key_identifier(Option<::std::string::String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_branch_key_identifier): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_encryption_context): (undocumented)
+ /// - On success, responds with [`CreateKeyOutput`](crate::operation::create_key::CreateKeyOutput) with field(s): + /// - [`branch_key_identifier(Option<::std::string::String>)`](crate::operation::create_key::CreateKeyOutput::branch_key_identifier): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_key::CreateKeyError) + pub fn create_key(&self) -> crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs new file mode 100644 index 000000000..25b8da064 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`CreateKeyStore`](crate::operation::create_key_store::builders::CreateKeyStoreFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + + /// - On success, responds with [`CreateKeyStoreOutput`](crate::operation::create_key_store::CreateKeyStoreOutput) with field(s): + /// - [`table_arn(Option<::std::string::String>)`](crate::operation::create_key_store::CreateKeyStoreOutput::table_arn): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_key_store::CreateKeyStoreError) + pub fn create_key_store(&self) -> crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs new file mode 100644 index 000000000..359a8f92b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`GetActiveBranchKey`](crate::operation::get_active_branch_key::builders::GetActiveBranchKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_identifier(impl Into>)`](crate::operation::get_active_branch_key::builders::GetActiveBranchKeyFluentBuilder::branch_key_identifier) / [`set_branch_key_identifier(Option<::std::string::String>)`](crate::operation::get_active_branch_key::builders::GetActiveBranchKeyFluentBuilder::set_branch_key_identifier): (undocumented)
+ /// - On success, responds with [`GetActiveBranchKeyOutput`](crate::operation::get_active_branch_key::GetActiveBranchKeyOutput) with field(s): + /// - [`branch_key_materials(Option)`](crate::operation::get_active_branch_key::GetActiveBranchKeyOutput::branch_key_materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_active_branch_key::GetActiveBranchKeyError) + pub fn get_active_branch_key(&self) -> crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs new file mode 100644 index 000000000..a9145fb62 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`GetBeaconKey`](crate::operation::get_beacon_key::builders::GetBeaconKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_identifier(impl Into>)`](crate::operation::get_beacon_key::builders::GetBeaconKeyFluentBuilder::branch_key_identifier) / [`set_branch_key_identifier(Option<::std::string::String>)`](crate::operation::get_beacon_key::builders::GetBeaconKeyFluentBuilder::set_branch_key_identifier): (undocumented)
+ /// - On success, responds with [`GetBeaconKeyOutput`](crate::operation::get_beacon_key::GetBeaconKeyOutput) with field(s): + /// - [`beacon_key_materials(Option)`](crate::operation::get_beacon_key::GetBeaconKeyOutput::beacon_key_materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_beacon_key::GetBeaconKeyError) + pub fn get_beacon_key(&self) -> crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs new file mode 100644 index 000000000..4c3cfc4c5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`GetBranchKeyVersion`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_identifier(impl Into>)`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder::branch_key_identifier) / [`set_branch_key_identifier(Option<::std::string::String>)`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder::set_branch_key_identifier): (undocumented)
+ /// - [`branch_key_version(impl Into>)`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder::branch_key_version) / [`set_branch_key_version(Option<::std::string::String>)`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder::set_branch_key_version): (undocumented)
+ /// - On success, responds with [`GetBranchKeyVersionOutput`](crate::operation::get_branch_key_version::GetBranchKeyVersionOutput) with field(s): + /// - [`branch_key_materials(Option)`](crate::operation::get_branch_key_version::GetBranchKeyVersionOutput::branch_key_materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_branch_key_version::GetBranchKeyVersionError) + pub fn get_branch_key_version(&self) -> crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs new file mode 100644 index 000000000..9129b90c8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`GetKeyStoreInfo`](crate::operation::get_key_store_info::builders::GetKeyStoreInfoFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + + /// - On success, responds with [`GetKeyStoreInfoOutput`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput) with field(s): + /// - [`grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput::grant_tokens): (undocumented) + /// - [`key_store_id(Option<::std::string::String>)`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput::key_store_id): (undocumented) + /// - [`key_store_name(Option<::std::string::String>)`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput::key_store_name): (undocumented) + /// - [`kms_configuration(Option)`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput::kms_configuration): (undocumented) + /// - [`logical_key_store_name(Option<::std::string::String>)`](crate::operation::get_key_store_info::GetKeyStoreInfoOutput::logical_key_store_name): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_key_store_info::GetKeyStoreInfoError) + pub fn get_key_store_info(&self) -> crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::GetKeyStoreInfoFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::GetKeyStoreInfoFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs new file mode 100644 index 000000000..bec7b50d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_keyStore::client::Client { + /// Constructs a fluent builder for the [`VersionKey`](crate::operation::version_key::builders::VersionKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_identifier(impl Into>)`](crate::operation::version_key::builders::VersionKeyFluentBuilder::branch_key_identifier) / [`set_branch_key_identifier(Option<::std::string::String>)`](crate::operation::version_key::builders::VersionKeyFluentBuilder::set_branch_key_identifier): (undocumented)
+ /// - On success, responds with [`VersionKeyOutput`](crate::operation::version_key::VersionKeyOutput) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::version_key::VersionKeyError) + pub fn version_key(&self) -> crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyFluentBuilder { + crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions.rs new file mode 100644 index 000000000..7d77243e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions.rs @@ -0,0 +1,58 @@ +// 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 mod beacon_key_materials; + + pub mod branch_key_materials; + + pub mod client; + + pub mod create_key; + + pub mod create_key_input; + + pub mod create_key_output; + + pub mod create_key_store; + + pub mod create_key_store_input; + + pub mod create_key_store_output; + + pub mod discovery; + + pub mod error; + + pub mod get_active_branch_key; + + pub mod get_active_branch_key_input; + + pub mod get_active_branch_key_output; + + pub mod get_beacon_key; + + pub mod get_beacon_key_input; + + pub mod get_beacon_key_output; + + pub mod get_branch_key_version; + + pub mod get_branch_key_version_input; + + pub mod get_branch_key_version_output; + + pub mod get_key_store_info; + + pub mod get_key_store_info_output; + + pub mod kms_configuration; + + pub mod mr_discovery; + + pub mod version_key; + + pub mod version_key_input; + + pub mod version_key_output; + +pub mod key_store_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs new file mode 100644 index 000000000..f6bb6ffc0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs @@ -0,0 +1,104 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials::BeaconKeyMaterials { + beaconKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.beacon_key_identifier) .Extract(), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + beaconKey: crate::standard_library_conversions::oblob_to_dafny(&value.beacon_key), + hmacKeys: +::std::rc::Rc::new(match &value.hmac_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::standard_library_conversions::blob_to_dafny(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials, + >, +) -> crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials, +) -> crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials::BeaconKeyMaterials {..} => + crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials::builder() + .set_beacon_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.beaconKeyIdentifier()) )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_beacon_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.beaconKey().clone())) + .set_hmac_keys(match (*dafny_value.hmacKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| crate::standard_library_conversions::blob_from_dafny(v.clone()), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs new file mode 100644 index 000000000..ad6db44e0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs @@ -0,0 +1,87 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials::BranchKeyMaterials { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + branchKeyVersion: std::rc::Rc::new(match value.branch_key_version { + Some(s) => crate::_Wrappers_Compile::Option::Some { value: dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&s.as_bytes().to_vec(), |b| *b) }, + None => crate::_Wrappers_Compile::Option::None {}, +}).Extract(), + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + branchKey: crate::standard_library_conversions::blob_to_dafny(&value.branch_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials, + >, +) -> crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials, +) -> crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials::BranchKeyMaterials {..} => + crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .set_branch_key_version(Some(::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(dafny_value.branchKeyVersion()), |b| *b)).unwrap())) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_branch_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.branchKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs new file mode 100644 index 000000000..73cbbd4bc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs @@ -0,0 +1,24 @@ +// 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. +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::client::Client, +) -> + ::dafny_runtime::Object +{ + value.dafny_client.clone() +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::keystore::internaldafny::types::IKeyStoreClient + >, +) -> crate::deps::aws_cryptography_keyStore::client::Client { + crate::deps::aws_cryptography_keyStore::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs new file mode 100644 index 000000000..2f6e427c4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs @@ -0,0 +1,7 @@ +// 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 mod _create_key_input; + + pub mod _create_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_input.rs new file mode 100644 index 000000000..722892c14 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_input.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput::CreateKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier), + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput { + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput::builder() + .set_branch_key_identifier(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyIdentifier().clone())) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_output.rs new file mode 100644 index 000000000..36affe8b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput::CreateKeyOutput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput { + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs new file mode 100644 index 000000000..4f8de1890 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs @@ -0,0 +1,92 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::CreateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::CreateKeyInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput::CreateKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier), + encryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput::CreateKeyInput {..} => + crate::deps::aws_cryptography_keyStore::types::CreateKeyInput::builder() + .set_branch_key_identifier(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyIdentifier().clone())) + .set_encryption_context(match (*dafny_value.encryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs new file mode 100644 index 000000000..73ec9b854 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput::CreateKeyOutput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput::CreateKeyOutput {..} => + crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs new file mode 100644 index 000000000..4ecd3d73d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs @@ -0,0 +1,7 @@ +// 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 mod _create_key_store_input; + + pub mod _create_key_store_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_input.rs new file mode 100644 index 000000000..07f657e8a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput::CreateKeyStoreInput { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput { + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput::builder() + + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_output.rs new file mode 100644 index 000000000..4dea43410 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput::CreateKeyStoreOutput { + tableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput { + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput::builder() + .set_table_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs new file mode 100644 index 000000000..5df471ed3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput::CreateKeyStoreInput { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput::CreateKeyStoreInput {..} => + crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs new file mode 100644 index 000000000..7d333e0e7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput::CreateKeyStoreOutput { + tableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput, +) -> crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput::CreateKeyStoreOutput {..} => + crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput::builder() + .set_table_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableArn()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs new file mode 100644 index 000000000..28969982b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::Discovery, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::Discovery, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery::Discovery { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery, + >, +) -> crate::deps::aws_cryptography_keyStore::types::Discovery { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery, +) -> crate::deps::aws_cryptography_keyStore::types::Discovery { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Discovery::Discovery {..} => + crate::deps::aws_cryptography_keyStore::types::Discovery::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs new file mode 100644 index 000000000..5d1615cb3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs @@ -0,0 +1,141 @@ +// 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. +/// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_keyStore::types::error::Error::KeyStoreException { message } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::KeyStoreException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_keyStore::types::error::Error::DynamoDB_20120810Error { error } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: crate::deps::com_amazonaws_dynamodb::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_keyStore::types::error::Error::TrentServiceError { error } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsKms { + ComAmazonawsKms: crate::deps::com_amazonaws_kms::conversions::error::to_dafny(error), + }, + crate::deps::aws_cryptography_keyStore::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&list, |e| to_dafny(e.clone())) + }, + crate::deps::aws_cryptography_keyStore::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::Opaque { + obj: { + let rc = ::std::rc::Rc::new(inner) as ::std::rc::Rc; + // safety: `rc` is new, ensuring it has refcount 1 and is uniquely owned. + // we should use `dafny_runtime_conversions::rc_struct_to_dafny_class` once it + // accepts unsized types (https://github.com/dafny-lang/dafny/pull/5769) + unsafe { ::dafny_runtime::Object::from_rc(rc) } + }, + }, + crate::deps::aws_cryptography_keyStore::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_keyStore::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::KeyStoreException { message } => + crate::deps::aws_cryptography_keyStore::types::error::Error::KeyStoreException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsDynamodb { ComAmazonawsDynamodb } => + crate::deps::aws_cryptography_keyStore::types::error::Error::DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::conversions::error::from_dafny(ComAmazonawsDynamodb.clone()), + }, +crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsKms { ComAmazonawsKms } => + crate::deps::aws_cryptography_keyStore::types::error::Error::TrentServiceError { + error: crate::deps::com_amazonaws_kms::conversions::error::from_dafny(ComAmazonawsKms.clone()), + }, + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_keyStore::types::error::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&list, |e| from_dafny(e.clone())) + }, + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_keyStore::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_keyStore::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_keyStore::types::error::ValidationError); + crate::deps::aws_cryptography_keyStore::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_keyStore::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::keystore::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_keyStore::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_keyStore::types::error::ValidationError); + crate::deps::aws_cryptography_keyStore::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + } + } + }, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs new file mode 100644 index 000000000..b2ba42651 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs @@ -0,0 +1,7 @@ +// 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 mod _get_active_branch_key_input; + + pub mod _get_active_branch_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_input.rs new file mode 100644 index 000000000..c50ca1abd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput::GetActiveBranchKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput { + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_output.rs new file mode 100644 index 000000000..f6db8f77c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput::GetActiveBranchKeyOutput { + branchKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::to_dafny(&value.branch_key_materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput { + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput::builder() + .set_branch_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::from_dafny(dafny_value.branchKeyMaterials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_input.rs new file mode 100644 index 000000000..4f2da4ba1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput::GetActiveBranchKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput, +) -> crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput::GetActiveBranchKeyInput {..} => + crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_output.rs new file mode 100644 index 000000000..e952df0af --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput::GetActiveBranchKeyOutput { + branchKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::to_dafny(&value.branch_key_materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput, +) -> crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput::GetActiveBranchKeyOutput {..} => + crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput::builder() + .set_branch_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::from_dafny(dafny_value.branchKeyMaterials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs new file mode 100644 index 000000000..606fcb270 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs @@ -0,0 +1,7 @@ +// 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 mod _get_beacon_key_input; + + pub mod _get_beacon_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_input.rs new file mode 100644 index 000000000..d463891f3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput::GetBeaconKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput { + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_output.rs new file mode 100644 index 000000000..186c958ad --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput::GetBeaconKeyOutput { + beaconKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::to_dafny(&value.beacon_key_materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput { + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput::builder() + .set_beacon_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::from_dafny(dafny_value.beaconKeyMaterials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs new file mode 100644 index 000000000..400d886a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput::GetBeaconKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput, +) -> crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput::GetBeaconKeyInput {..} => + crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs new file mode 100644 index 000000000..30aceeffe --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput::GetBeaconKeyOutput { + beaconKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::to_dafny(&value.beacon_key_materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput, +) -> crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput::GetBeaconKeyOutput {..} => + crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput::builder() + .set_beacon_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::from_dafny(dafny_value.beaconKeyMaterials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs new file mode 100644 index 000000000..57007fdb0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs @@ -0,0 +1,7 @@ +// 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 mod _get_branch_key_version_input; + + pub mod _get_branch_key_version_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_input.rs new file mode 100644 index 000000000..61136b836 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput::GetBranchKeyVersionInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + branchKeyVersion: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_version) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput { + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .set_branch_key_version(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyVersion()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_output.rs new file mode 100644 index 000000000..4908e1a0a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput::GetBranchKeyVersionOutput { + branchKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::to_dafny(&value.branch_key_materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput { + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput::builder() + .set_branch_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::from_dafny(dafny_value.branchKeyMaterials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_input.rs new file mode 100644 index 000000000..5d318470d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput::GetBranchKeyVersionInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + branchKeyVersion: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_version) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput, +) -> crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput::GetBranchKeyVersionInput {..} => + crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .set_branch_key_version(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyVersion()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_output.rs new file mode 100644 index 000000000..f43f2863c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput::GetBranchKeyVersionOutput { + branchKeyMaterials: crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::to_dafny(&value.branch_key_materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput, +) -> crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput::GetBranchKeyVersionOutput {..} => + crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput::builder() + .set_branch_key_materials(Some( crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::from_dafny(dafny_value.branchKeyMaterials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs new file mode 100644 index 000000000..8f9769903 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs @@ -0,0 +1,5 @@ +// 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 mod _get_key_store_info_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info/_get_key_store_info_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info/_get_key_store_info_output.rs new file mode 100644 index 000000000..12fba0dcc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info/_get_key_store_info_output.rs @@ -0,0 +1,40 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput::GetKeyStoreInfoOutput { + keyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_id) .Extract(), + keyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_name) .Extract(), + logicalKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.logical_key_store_name) .Extract(), + grantTokens: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.grant_tokens.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + kmsConfiguration: crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::to_dafny(&value.kms_configuration.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput { + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput::builder() + .set_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyStoreId()) )) + .set_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyStoreName()) )) + .set_logical_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.logicalKeyStoreName()) )) + .set_grant_tokens(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.grantTokens(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_kms_configuration(Some( crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::from_dafny(dafny_value.kmsConfiguration().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info_output.rs new file mode 100644 index 000000000..4a280c09c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info_output.rs @@ -0,0 +1,86 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput::GetKeyStoreInfoOutput { + keyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_id) .Extract(), + keyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_name) .Extract(), + logicalKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.logical_key_store_name) .Extract(), + grantTokens: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.grant_tokens.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + kmsConfiguration: crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::to_dafny(&value.kms_configuration.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput, +) -> crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput::GetKeyStoreInfoOutput {..} => + crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput::builder() + .set_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyStoreId()) )) + .set_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyStoreName()) )) + .set_logical_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.logicalKeyStoreName()) )) + .set_grant_tokens(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.grantTokens(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_kms_configuration(Some( crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::from_dafny(dafny_value.kmsConfiguration().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs new file mode 100644 index 000000000..dd3a3b4ce --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs @@ -0,0 +1,4 @@ +// 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 mod _key_store_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config/_key_store_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config/_key_store_config.rs new file mode 100644 index 000000000..b34d90b55 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config/_key_store_config.rs @@ -0,0 +1,93 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value)) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig, + >, +) -> crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig::KeyStoreConfig { + ddbTableName: crate::standard_library_conversions::ostring_to_dafny(&value.ddb_table_name) .Extract(), + kmsConfiguration: crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::to_dafny(&value.kms_configuration.clone().unwrap()) +, + logicalKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.logical_key_store_name) .Extract(), + id: crate::standard_library_conversions::ostring_to_dafny(&value.id), + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ddbClient: ::std::rc::Rc::new(match &value.ddb_client { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::client::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + kmsClient: ::std::rc::Rc::new(match &value.kms_client { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig, +) -> crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig::KeyStoreConfig {..} => + crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig::builder() + .set_ddb_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ddbTableName()) )) + .set_kms_configuration(Some( crate::deps::aws_cryptography_keyStore::conversions::kms_configuration::from_dafny(dafny_value.kmsConfiguration().clone()) + )) + .set_logical_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.logicalKeyStoreName()) )) + .set_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.id().clone())) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_ddb_client(match (*dafny_value.ddbClient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::client::from_dafny(value.clone())), + _ => None, +} +) + .set_kms_client(match (*dafny_value.kmsClient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::client::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs new file mode 100644 index 000000000..b7f30c699 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs @@ -0,0 +1,55 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::KmsConfiguration, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(x) => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsKeyArn { + kmsKeyArn: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x), + }, +crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(x) => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsMRKeyArn { + kmsMRKeyArn: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x), + }, +crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(x) => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::discovery { + discovery: crate::deps::aws_cryptography_keyStore::conversions::discovery::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(x) => + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::mrDiscovery { + mrDiscovery: crate::deps::aws_cryptography_keyStore::conversions::mr_discovery::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration, + >, +) -> crate::deps::aws_cryptography_keyStore::types::KmsConfiguration { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsKeyArn { + kmsKeyArn: x @ _, +} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)), +crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsMRKeyArn { + kmsMRKeyArn: x @ _, +} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)), +crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::discovery { + discovery: x @ _, +} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(crate::deps::aws_cryptography_keyStore::conversions::discovery::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::mrDiscovery { + mrDiscovery: x @ _, +} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(crate::deps::aws_cryptography_keyStore::conversions::mr_discovery::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs new file mode 100644 index 000000000..b10d3e6fb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::MrDiscovery, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::MrDiscovery, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery::MRDiscovery { + region: crate::standard_library_conversions::ostring_to_dafny(&value.region) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery, + >, +) -> crate::deps::aws_cryptography_keyStore::types::MrDiscovery { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery, +) -> crate::deps::aws_cryptography_keyStore::types::MrDiscovery { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::MRDiscovery::MRDiscovery {..} => + crate::deps::aws_cryptography_keyStore::types::MrDiscovery::builder() + .set_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.region()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs new file mode 100644 index 000000000..409d38974 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs @@ -0,0 +1,7 @@ +// 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 mod _version_key_input; + + pub mod _version_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_input.rs new file mode 100644 index 000000000..b00fe6769 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput::VersionKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput { + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_output.rs new file mode 100644 index 000000000..005b7c7db --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput::VersionKeyOutput { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput { + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput::builder() + + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs new file mode 100644 index 000000000..ba653b0ea --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::VersionKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::VersionKeyInput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput::VersionKeyInput { + branchKeyIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_identifier) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::VersionKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput, +) -> crate::deps::aws_cryptography_keyStore::types::VersionKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput::VersionKeyInput {..} => + crate::deps::aws_cryptography_keyStore::types::VersionKeyInput::builder() + .set_branch_key_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyIdentifier()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs new file mode 100644 index 000000000..4595d75e7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput, +) -> crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput::VersionKeyOutput { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput, + >, +) -> crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput, +) -> crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput::VersionKeyOutput {..} => + crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/deps.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/deps.rs @@ -0,0 +1,3 @@ +// 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. diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error.rs @@ -0,0 +1,16 @@ +// 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 use ::aws_smithy_runtime_api::box_error::BoxError; + +/// Error type returned by the client. +pub type SdkError = + ::aws_smithy_runtime_api::client::result::SdkError; +pub use ::aws_smithy_runtime_api::client::result::ConnectorError; +pub use ::aws_smithy_types::error::operation::BuildError; + +pub use ::aws_smithy_types::error::display::DisplayErrorContext; +pub use ::aws_smithy_types::error::metadata::ErrorMetadata; +pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + +pub(crate) mod sealed_unhandled; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs @@ -0,0 +1,32 @@ +// 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. +use std::any::Any; + +use dafny_runtime::UpcastObject; + +/// This struct is not intended to be used. +/// +/// This struct holds information about an unhandled error, +/// but that information should be obtained by using the +/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait +/// on the error type. +/// +/// This struct intentionally doesn't yield any useful information itself. +#[deprecated( + note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ +variable wildcard pattern and check `.code()`: + \ +   `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ +See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." +)] +#[derive(Debug)] +pub struct Unhandled { + pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, + pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, +} + +impl UpcastObject for Unhandled { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation.rs new file mode 100644 index 000000000..47f0766b8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation.rs @@ -0,0 +1,23 @@ +// 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. +/// Types for the `CreateKeyStore` operation. +pub mod create_key_store; + +/// Types for the `CreateKey` operation. +pub mod create_key; + +/// Types for the `GetActiveBranchKey` operation. +pub mod get_active_branch_key; + +/// Types for the `GetBeaconKey` operation. +pub mod get_beacon_key; + +/// Types for the `GetBranchKeyVersion` operation. +pub mod get_branch_key_version; + +/// Types for the `GetKeyStoreInfo` operation. +pub mod get_key_store_info; + +/// Types for the `VersionKey` operation. +pub mod version_key; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs new file mode 100644 index 000000000..7534e597c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs @@ -0,0 +1,49 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateKey; +impl CreateKey { + /// Creates a new `CreateKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::create_key::_create_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key::_create_key_output::CreateKeyOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key::_create_key_input::CreateKeyInput; + +pub(crate) mod _create_key_output; + +pub(crate) mod _create_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_input.rs new file mode 100644 index 000000000..12e4eadc7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateKeyInput { + /// The identifier for the created Branch Key. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl CreateKeyInput { + /// The identifier for the created Branch Key. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +} +impl CreateKeyInput { + /// Creates a new builder-style object to manufacture [`CreateKeyInput`](crate::operation::create_key::builders::CreateKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyInputBuilder::default() + } +} + +/// A builder for [`CreateKeyInput`](crate::operation::operation::CreateKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl CreateKeyInputBuilder { + /// The identifier for the created Branch Key. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the created Branch Key. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the created Branch Key. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} + /// Consumes the builder and constructs a [`CreateKeyInput`](crate::operation::operation::CreateKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyInput { + branch_key_identifier: self.branch_key_identifier, +encryption_context: self.encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_output.rs new file mode 100644 index 000000000..97077f30d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for Branch Key creation. +pub struct CreateKeyOutput { + /// A identifier for the created Branch Key. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl CreateKeyOutput { + /// A identifier for the created Branch Key. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl CreateKeyOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyOutput`](crate::operation::create_key::builders::CreateKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyOutput`](crate::operation::operation::CreateKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyOutputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl CreateKeyOutputBuilder { + /// A identifier for the created Branch Key. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// A identifier for the created Branch Key. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// A identifier for the created Branch Key. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`CreateKeyOutput`](crate::operation::operation::CreateKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs new file mode 100644 index 000000000..d20f83f93 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs @@ -0,0 +1,93 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::create_key::_create_key_output::CreateKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key::_create_key_input::CreateKeyInputBuilder; + +impl CreateKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.create_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateKey`. +/// +/// Create a new Branch Key in the Key Store. Additionally create a Beacon Key that is tied to this Branch Key. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateKeyFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyInputBuilder, +} +impl CreateKeyFluentBuilder { + /// Creates a new `CreateKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::create_key::builders::CreateKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::create_key::CreateKey::send(&self.client, input).await + } + + /// The identifier for the created Branch Key. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_identifier(input.into()); + self +} +/// The identifier for the created Branch Key. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_identifier(input); + self +} +/// The identifier for the created Branch Key. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_identifier() +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs new file mode 100644 index 000000000..53149e557 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs @@ -0,0 +1,49 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateKeyStore`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateKeyStore; +impl CreateKeyStore { + /// Creates a new `CreateKeyStore` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::create_key_store::_create_key_store_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key_store::_create_key_store_output::CreateKeyStoreOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key_store::_create_key_store_input::CreateKeyStoreInput; + +pub(crate) mod _create_key_store_output; + +pub(crate) mod _create_key_store_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_input.rs new file mode 100644 index 000000000..312b9020e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_input.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateKeyStoreInput { + +} +impl CreateKeyStoreInput { + +} +impl CreateKeyStoreInput { + /// Creates a new builder-style object to manufacture [`CreateKeyStoreInput`](crate::operation::create_key_store::builders::CreateKeyStoreInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreInputBuilder::default() + } +} + +/// A builder for [`CreateKeyStoreInput`](crate::operation::operation::CreateKeyStoreInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyStoreInputBuilder { + +} +impl CreateKeyStoreInputBuilder { + + /// Consumes the builder and constructs a [`CreateKeyStoreInput`](crate::operation::operation::CreateKeyStoreInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreInput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_output.rs new file mode 100644 index 000000000..c5df84240 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for Key Store DynamoDB table creation. +pub struct CreateKeyStoreOutput { + /// The ARN of the DynamoDB table that backs this Key Store. +pub table_arn: ::std::option::Option<::std::string::String>, +} +impl CreateKeyStoreOutput { + /// The ARN of the DynamoDB table that backs this Key Store. +pub fn table_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.table_arn +} +} +impl CreateKeyStoreOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyStoreOutput`](crate::operation::create_key_store::builders::CreateKeyStoreOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyStoreOutput`](crate::operation::operation::CreateKeyStoreOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyStoreOutputBuilder { + pub(crate) table_arn: ::std::option::Option<::std::string::String>, +} +impl CreateKeyStoreOutputBuilder { + /// The ARN of the DynamoDB table that backs this Key Store. +pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_arn = ::std::option::Option::Some(input.into()); + self +} +/// The ARN of the DynamoDB table that backs this Key Store. +pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_arn = input; + self +} +/// The ARN of the DynamoDB table that backs this Key Store. +pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.table_arn +} + /// Consumes the builder and constructs a [`CreateKeyStoreOutput`](crate::operation::operation::CreateKeyStoreOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput { + table_arn: self.table_arn, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs new file mode 100644 index 000000000..413090db2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs @@ -0,0 +1,66 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::create_key_store::_create_key_store_output::CreateKeyStoreOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::create_key_store::_create_key_store_input::CreateKeyStoreInputBuilder; + +impl CreateKeyStoreInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.create_key_store(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateKeyStore`. +/// +/// Create the DynamoDB table that backs this Key Store based on the Key Store configuration. If a table already exists, validate it is configured as expected. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateKeyStoreFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreInputBuilder, +} +impl CreateKeyStoreFluentBuilder { + /// Creates a new `CreateKeyStore`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateKeyStore as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::create_key_store::builders::CreateKeyStoreInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStoreOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::create_key_store::CreateKeyStore::send(&self.client, input).await + } + + +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs new file mode 100644 index 000000000..6eef1ad6d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GetActiveBranchKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetActiveBranchKey; +impl GetActiveBranchKey { + /// Creates a new `GetActiveBranchKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::get_active_branch_key::_get_active_branch_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::_get_active_branch_key_output::GetActiveBranchKeyOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::_get_active_branch_key_input::GetActiveBranchKeyInput; + +pub(crate) mod _get_active_branch_key_output; + +pub(crate) mod _get_active_branch_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_input.rs new file mode 100644 index 000000000..c0e9a041c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a Branch Key's ACTIVE version. +pub struct GetActiveBranchKeyInput { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetActiveBranchKeyInput { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl GetActiveBranchKeyInput { + /// Creates a new builder-style object to manufacture [`GetActiveBranchKeyInput`](crate::operation::get_active_branch_key::builders::GetActiveBranchKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyInputBuilder::default() + } +} + +/// A builder for [`GetActiveBranchKeyInput`](crate::operation::operation::GetActiveBranchKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetActiveBranchKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetActiveBranchKeyInputBuilder { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`GetActiveBranchKeyInput`](crate::operation::operation::GetActiveBranchKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_output.rs new file mode 100644 index 000000000..099cb8ca6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a Branch Key's ACTIVE version. +pub struct GetActiveBranchKeyOutput { + /// The materials for the Branch Key. +pub branch_key_materials: ::std::option::Option, +} +impl GetActiveBranchKeyOutput { + /// The materials for the Branch Key. +pub fn branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} +} +impl GetActiveBranchKeyOutput { + /// Creates a new builder-style object to manufacture [`GetActiveBranchKeyOutput`](crate::operation::get_active_branch_key::builders::GetActiveBranchKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyOutputBuilder::default() + } +} + +/// A builder for [`GetActiveBranchKeyOutput`](crate::operation::operation::GetActiveBranchKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetActiveBranchKeyOutputBuilder { + pub(crate) branch_key_materials: ::std::option::Option, +} +impl GetActiveBranchKeyOutputBuilder { + /// The materials for the Branch Key. +pub fn branch_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Branch Key. +pub fn set_branch_key_materials(mut self, input: ::std::option::Option) -> Self { + self.branch_key_materials = input; + self +} +/// The materials for the Branch Key. +pub fn get_branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} + /// Consumes the builder and constructs a [`GetActiveBranchKeyOutput`](crate::operation::operation::GetActiveBranchKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput { + branch_key_materials: self.branch_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/builders.rs new file mode 100644 index 000000000..ce8d6f507 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::_get_active_branch_key_output::GetActiveBranchKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::_get_active_branch_key_input::GetActiveBranchKeyInputBuilder; + +impl GetActiveBranchKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.get_active_branch_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetActiveBranchKey`. +/// +/// Get the ACTIVE version for a particular Branch Key from the Key Store. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetActiveBranchKeyFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyInputBuilder, +} +impl GetActiveBranchKeyFluentBuilder { + /// Creates a new `GetActiveBranchKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetActiveBranchKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::builders::GetActiveBranchKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::get_active_branch_key::GetActiveBranchKey::send(&self.client, input).await + } + + /// The identifier for the Branch Key to get the ACTIVE version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_identifier(input.into()); + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_identifier(input); + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs new file mode 100644 index 000000000..9ff33667a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GetBeaconKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetBeaconKey; +impl GetBeaconKey { + /// Creates a new `GetBeaconKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::get_beacon_key::_get_beacon_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::_get_beacon_key_output::GetBeaconKeyOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::_get_beacon_key_input::GetBeaconKeyInput; + +pub(crate) mod _get_beacon_key_output; + +pub(crate) mod _get_beacon_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_input.rs new file mode 100644 index 000000000..39f9a41f1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a Beacon Key +pub struct GetBeaconKeyInput { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetBeaconKeyInput { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl GetBeaconKeyInput { + /// Creates a new builder-style object to manufacture [`GetBeaconKeyInput`](crate::operation::get_beacon_key::builders::GetBeaconKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyInputBuilder::default() + } +} + +/// A builder for [`GetBeaconKeyInput`](crate::operation::operation::GetBeaconKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBeaconKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetBeaconKeyInputBuilder { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`GetBeaconKeyInput`](crate::operation::operation::GetBeaconKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_output.rs new file mode 100644 index 000000000..24648e27e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a Beacon Key +pub struct GetBeaconKeyOutput { + /// The materials for the Beacon Key. +pub beacon_key_materials: ::std::option::Option, +} +impl GetBeaconKeyOutput { + /// The materials for the Beacon Key. +pub fn beacon_key_materials(&self) -> &::std::option::Option { + &self.beacon_key_materials +} +} +impl GetBeaconKeyOutput { + /// Creates a new builder-style object to manufacture [`GetBeaconKeyOutput`](crate::operation::get_beacon_key::builders::GetBeaconKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyOutputBuilder::default() + } +} + +/// A builder for [`GetBeaconKeyOutput`](crate::operation::operation::GetBeaconKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBeaconKeyOutputBuilder { + pub(crate) beacon_key_materials: ::std::option::Option, +} +impl GetBeaconKeyOutputBuilder { + /// The materials for the Beacon Key. +pub fn beacon_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.beacon_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Beacon Key. +pub fn set_beacon_key_materials(mut self, input: ::std::option::Option) -> Self { + self.beacon_key_materials = input; + self +} +/// The materials for the Beacon Key. +pub fn get_beacon_key_materials(&self) -> &::std::option::Option { + &self.beacon_key_materials +} + /// Consumes the builder and constructs a [`GetBeaconKeyOutput`](crate::operation::operation::GetBeaconKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput { + beacon_key_materials: self.beacon_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs new file mode 100644 index 000000000..5d49bcb77 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::_get_beacon_key_output::GetBeaconKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::_get_beacon_key_input::GetBeaconKeyInputBuilder; + +impl GetBeaconKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.get_beacon_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetBeaconKey`. +/// +/// Get a Beacon Key from the Key Store. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetBeaconKeyFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyInputBuilder, +} +impl GetBeaconKeyFluentBuilder { + /// Creates a new `GetBeaconKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetBeaconKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::builders::GetBeaconKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::get_beacon_key::GetBeaconKey::send(&self.client, input).await + } + + /// The identifier of the Branch Key the Beacon Key is associated with. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_identifier(input.into()); + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_identifier(input); + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs new file mode 100644 index 000000000..580394eb1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `GetBranchKeyVersion`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetBranchKeyVersion; +impl GetBranchKeyVersion { + /// Creates a new `GetBranchKeyVersion` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::get_branch_key_version::_get_branch_key_version_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::_get_branch_key_version_output::GetBranchKeyVersionOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::_get_branch_key_version_input::GetBranchKeyVersionInput; + +pub(crate) mod _get_branch_key_version_output; + +pub(crate) mod _get_branch_key_version_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_input.rs new file mode 100644 index 000000000..4f7f88728 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a version of a Branch Key. +pub struct GetBranchKeyVersionInput { + /// The identifier for the Branch Key to get a particular version for. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +/// The version to get. +pub branch_key_version: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyVersionInput { + /// The identifier for the Branch Key to get a particular version for. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// The version to get. +pub fn branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +} +impl GetBranchKeyVersionInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyVersionInput`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyVersionInput`](crate::operation::operation::GetBranchKeyVersionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyVersionInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_version: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyVersionInputBuilder { + /// The identifier for the Branch Key to get a particular version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// The version to get. +pub fn branch_key_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_version = ::std::option::Option::Some(input.into()); + self +} +/// The version to get. +pub fn set_branch_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_version = input; + self +} +/// The version to get. +pub fn get_branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} + /// Consumes the builder and constructs a [`GetBranchKeyVersionInput`](crate::operation::operation::GetBranchKeyVersionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionInput { + branch_key_identifier: self.branch_key_identifier, +branch_key_version: self.branch_key_version, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_output.rs new file mode 100644 index 000000000..f59a85092 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a version of a Branch Key. +pub struct GetBranchKeyVersionOutput { + /// The materials for the Branch Key. +pub branch_key_materials: ::std::option::Option, +} +impl GetBranchKeyVersionOutput { + /// The materials for the Branch Key. +pub fn branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} +} +impl GetBranchKeyVersionOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyVersionOutput`](crate::operation::get_branch_key_version::builders::GetBranchKeyVersionOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyVersionOutput`](crate::operation::operation::GetBranchKeyVersionOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyVersionOutputBuilder { + pub(crate) branch_key_materials: ::std::option::Option, +} +impl GetBranchKeyVersionOutputBuilder { + /// The materials for the Branch Key. +pub fn branch_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Branch Key. +pub fn set_branch_key_materials(mut self, input: ::std::option::Option) -> Self { + self.branch_key_materials = input; + self +} +/// The materials for the Branch Key. +pub fn get_branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} + /// Consumes the builder and constructs a [`GetBranchKeyVersionOutput`](crate::operation::operation::GetBranchKeyVersionOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput { + branch_key_materials: self.branch_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/builders.rs new file mode 100644 index 000000000..2106362ce --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/builders.rs @@ -0,0 +1,93 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::_get_branch_key_version_output::GetBranchKeyVersionOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::_get_branch_key_version_input::GetBranchKeyVersionInputBuilder; + +impl GetBranchKeyVersionInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.get_branch_key_version(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetBranchKeyVersion`. +/// +/// Get a particular version of a Branch Key from the Key Store. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetBranchKeyVersionFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionInputBuilder, +} +impl GetBranchKeyVersionFluentBuilder { + /// Creates a new `GetBranchKeyVersion`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetBranchKeyVersion as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::builders::GetBranchKeyVersionInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersionOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::get_branch_key_version::GetBranchKeyVersion::send(&self.client, input).await + } + + /// The identifier for the Branch Key to get a particular version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_identifier(input.into()); + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_identifier(input); + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_identifier() +} +/// The version to get. +pub fn branch_key_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_version(input.into()); + self +} +/// The version to get. +pub fn set_branch_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_version(input); + self +} +/// The version to get. +pub fn get_branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_version() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs new file mode 100644 index 000000000..1dcb871ca --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs @@ -0,0 +1,49 @@ +// 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. +/// Orchestration and serialization glue logic for `GetKeyStoreInfo`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetKeyStoreInfo; +impl GetKeyStoreInfo { + /// Creates a new `GetKeyStoreInfo` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::Unit, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + + let inner_input = (); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).GetKeyStoreInfo(); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::get_key_store_info::_get_key_store_info_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::_get_key_store_info_output::GetKeyStoreInfoOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::_unit::Unit; + +pub(crate) mod _get_key_store_info_output; + +pub(crate) mod _unit; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_get_key_store_info_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_get_key_store_info_output.rs new file mode 100644 index 000000000..224a79d9d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_get_key_store_info_output.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// The configuration information for a Key Store. +pub struct GetKeyStoreInfoOutput { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// An identifier for this Key Store. +pub key_store_id: ::std::option::Option<::std::string::String>, +/// The DynamoDB table name that backs this Key Store. +pub key_store_name: ::std::option::Option<::std::string::String>, +/// Configures Key Store's KMS Key ARN restrictions. +pub kms_configuration: ::std::option::Option, +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl GetKeyStoreInfoOutput { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn key_store_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_id +} +/// The DynamoDB table name that backs this Key Store. +pub fn key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_name +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} +} +impl GetKeyStoreInfoOutput { + /// Creates a new builder-style object to manufacture [`GetKeyStoreInfoOutput`](crate::operation::get_key_store_info::builders::GetKeyStoreInfoOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::GetKeyStoreInfoOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::GetKeyStoreInfoOutputBuilder::default() + } +} + +/// A builder for [`GetKeyStoreInfoOutput`](crate::operation::operation::GetKeyStoreInfoOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetKeyStoreInfoOutputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) key_store_id: ::std::option::Option<::std::string::String>, +pub(crate) key_store_name: ::std::option::Option<::std::string::String>, +pub(crate) kms_configuration: ::std::option::Option, +pub(crate) logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl GetKeyStoreInfoOutputBuilder { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn key_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_store_id = ::std::option::Option::Some(input.into()); + self +} +/// An identifier for this Key Store. +pub fn set_key_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_store_id = input; + self +} +/// An identifier for this Key Store. +pub fn get_key_store_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_id +} +/// The DynamoDB table name that backs this Key Store. +pub fn key_store_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_store_name = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn set_key_store_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_store_name = input; + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn get_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_name +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_configuration = ::std::option::Option::Some(input.into()); + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn set_kms_configuration(mut self, input: ::std::option::Option) -> Self { + self.kms_configuration = input; + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn get_kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn logical_key_store_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.logical_key_store_name = ::std::option::Option::Some(input.into()); + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn set_logical_key_store_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.logical_key_store_name = input; + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn get_logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} + /// Consumes the builder and constructs a [`GetKeyStoreInfoOutput`](crate::operation::operation::GetKeyStoreInfoOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput { + grant_tokens: self.grant_tokens, +key_store_id: self.key_store_id, +key_store_name: self.key_store_name, +kms_configuration: self.kms_configuration, +logical_key_store_name: self.logical_key_store_name, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_unit.rs new file mode 100644 index 000000000..fed8d2a2b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::get_key_store_info::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::UnitBuilder { + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/builders.rs new file mode 100644 index 000000000..867d8cc6c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/builders.rs @@ -0,0 +1,66 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::_get_key_store_info_output::GetKeyStoreInfoOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::_unit::UnitBuilder; + +impl UnitBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.get_key_store_info(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetKeyStoreInfo`. +/// +/// Returns the configuration information for a Key Store. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetKeyStoreInfoFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::UnitBuilder, +} +impl GetKeyStoreInfoFluentBuilder { + /// Creates a new `GetKeyStoreInfo`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetKeyStoreInfo as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::builders::UnitBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfoOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::get_key_store_info::GetKeyStoreInfo::send(&self.client, input).await + } + + +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs new file mode 100644 index 000000000..3673ebd82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `VersionKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct VersionKey; +impl VersionKey { + /// Creates a new `VersionKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_keyStore::client::Client, + input: crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_keyStore::conversions::version_key::_version_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_keyStore::operation::version_key::_version_key_output::VersionKeyOutput; + +pub use crate::deps::aws_cryptography_keyStore::operation::version_key::_version_key_input::VersionKeyInput; + +pub(crate) mod _version_key_output; + +pub(crate) mod _version_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_input.rs new file mode 100644 index 000000000..e622a3e4d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for versioning a Branch Key. +pub struct VersionKeyInput { + /// The identifier for the Branch Key to be versioned. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl VersionKeyInput { + /// The identifier for the Branch Key to be versioned. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl VersionKeyInput { + /// Creates a new builder-style object to manufacture [`VersionKeyInput`](crate::operation::version_key::builders::VersionKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyInputBuilder::default() + } +} + +/// A builder for [`VersionKeyInput`](crate::operation::operation::VersionKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VersionKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl VersionKeyInputBuilder { + /// The identifier for the Branch Key to be versioned. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to be versioned. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to be versioned. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`VersionKeyInput`](crate::operation::operation::VersionKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_output.rs new file mode 100644 index 000000000..90bed9ee3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_output.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for versioning a Branch Key. +pub struct VersionKeyOutput { + +} +impl VersionKeyOutput { + +} +impl VersionKeyOutput { + /// Creates a new builder-style object to manufacture [`VersionKeyOutput`](crate::operation::version_key::builders::VersionKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyOutputBuilder::default() + } +} + +/// A builder for [`VersionKeyOutput`](crate::operation::operation::VersionKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VersionKeyOutputBuilder { + +} +impl VersionKeyOutputBuilder { + + /// Consumes the builder and constructs a [`VersionKeyOutput`](crate::operation::operation::VersionKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs new file mode 100644 index 000000000..1ea008c78 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_keyStore::operation::version_key::_version_key_output::VersionKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::operation::version_key::_version_key_input::VersionKeyInputBuilder; + +impl VersionKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_keyStore::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let mut fluent_builder = client.version_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `VersionKey`. +/// +/// Create a new ACTIVE version of an existing Branch Key in the Key Store, and set the previously ACTIVE version to DECRYPT_ONLY. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct VersionKeyFluentBuilder { + client: crate::deps::aws_cryptography_keyStore::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyInputBuilder, +} +impl VersionKeyFluentBuilder { + /// Creates a new `VersionKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_keyStore::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the VersionKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_keyStore::operation::version_key::builders::VersionKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKeyOutput, + crate::deps::aws_cryptography_keyStore::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_keyStore::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_keyStore::operation::version_key::VersionKey::send(&self.client, input).await + } + + /// The identifier for the Branch Key to be versioned. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_identifier(input.into()); + self +} +/// The identifier for the Branch Key to be versioned. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_identifier(input); + self +} +/// The identifier for the Branch Key to be versioned. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types.rs new file mode 100644 index 000000000..dba654686 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types.rs @@ -0,0 +1,51 @@ +// 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. +/// Types for the `KeyStoreConfig` +pub mod key_store_config; + +pub mod builders; + + + +mod _beacon_key_materials; +pub use crate::deps::aws_cryptography_keyStore::types::_beacon_key_materials::BeaconKeyMaterials; +mod _branch_key_materials; +pub use crate::deps::aws_cryptography_keyStore::types::_branch_key_materials::BranchKeyMaterials; +mod _create_key_input; +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_input::CreateKeyInput; +mod _create_key_output; +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_output::CreateKeyOutput; +mod _create_key_store_input; +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_store_input::CreateKeyStoreInput; +mod _create_key_store_output; +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_store_output::CreateKeyStoreOutput; +mod _discovery; +pub use crate::deps::aws_cryptography_keyStore::types::_discovery::Discovery; +mod _get_active_branch_key_input; +pub use crate::deps::aws_cryptography_keyStore::types::_get_active_branch_key_input::GetActiveBranchKeyInput; +mod _get_active_branch_key_output; +pub use crate::deps::aws_cryptography_keyStore::types::_get_active_branch_key_output::GetActiveBranchKeyOutput; +mod _get_beacon_key_input; +pub use crate::deps::aws_cryptography_keyStore::types::_get_beacon_key_input::GetBeaconKeyInput; +mod _get_beacon_key_output; +pub use crate::deps::aws_cryptography_keyStore::types::_get_beacon_key_output::GetBeaconKeyOutput; +mod _get_branch_key_version_input; +pub use crate::deps::aws_cryptography_keyStore::types::_get_branch_key_version_input::GetBranchKeyVersionInput; +mod _get_branch_key_version_output; +pub use crate::deps::aws_cryptography_keyStore::types::_get_branch_key_version_output::GetBranchKeyVersionOutput; +mod _get_key_store_info_output; +pub use crate::deps::aws_cryptography_keyStore::types::_get_key_store_info_output::GetKeyStoreInfoOutput; +mod _mr_discovery; +pub use crate::deps::aws_cryptography_keyStore::types::_mr_discovery::MrDiscovery; +mod _version_key_input; +pub use crate::deps::aws_cryptography_keyStore::types::_version_key_input::VersionKeyInput; +mod _version_key_output; +pub use crate::deps::aws_cryptography_keyStore::types::_version_key_output::VersionKeyOutput; + +pub mod error; + + + +mod _kms_configuration; +pub use crate::deps::aws_cryptography_keyStore::types::_kms_configuration::KmsConfiguration; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs new file mode 100644 index 000000000..fa84ab695 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct BeaconKeyMaterials { + #[allow(missing_docs)] +pub beacon_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub beacon_key_identifier: ::std::option::Option<::std::string::String>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub hmac_keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>, +} +impl BeaconKeyMaterials { + #[allow(missing_docs)] +pub fn beacon_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.beacon_key +} +#[allow(missing_docs)] +pub fn beacon_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.beacon_key_identifier +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn hmac_keys(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>> { + &self.hmac_keys +} +} +impl BeaconKeyMaterials { + /// Creates a new builder-style object to manufacture [`BeaconKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::BeaconKeyMaterialsBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::BeaconKeyMaterialsBuilder::default() + } +} + +/// A builder for [`BeaconKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct BeaconKeyMaterialsBuilder { + pub(crate) beacon_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) beacon_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) hmac_keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>, +} +impl BeaconKeyMaterialsBuilder { + #[allow(missing_docs)] +pub fn beacon_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.beacon_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_beacon_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.beacon_key = input; + self +} +#[allow(missing_docs)] +pub fn get_beacon_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.beacon_key +} +#[allow(missing_docs)] +pub fn beacon_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.beacon_key_identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_beacon_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.beacon_key_identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_beacon_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.beacon_key_identifier +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn hmac_keys(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>) -> Self { + self.hmac_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_hmac_keys(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>>) -> Self { + self.hmac_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_hmac_keys(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::Blob>> { + &self.hmac_keys +} + /// Consumes the builder and constructs a [`BeaconKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials { + beacon_key: self.beacon_key, +beacon_key_identifier: self.beacon_key_identifier, +encryption_context: self.encryption_context, +hmac_keys: self.hmac_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs new file mode 100644 index 000000000..ddc026275 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct BranchKeyMaterials { + #[allow(missing_docs)] +pub branch_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +#[allow(missing_docs)] +pub branch_key_version: ::std::option::Option<::std::string::String>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl BranchKeyMaterials { + #[allow(missing_docs)] +pub fn branch_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.branch_key +} +#[allow(missing_docs)] +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +#[allow(missing_docs)] +pub fn branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +} +impl BranchKeyMaterials { + /// Creates a new builder-style object to manufacture [`BranchKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::BranchKeyMaterialsBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::BranchKeyMaterialsBuilder::default() + } +} + +/// A builder for [`BranchKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct BranchKeyMaterialsBuilder { + pub(crate) branch_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_version: ::std::option::Option<::std::string::String>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl BranchKeyMaterialsBuilder { + #[allow(missing_docs)] +pub fn branch_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.branch_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_branch_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.branch_key = input; + self +} +#[allow(missing_docs)] +pub fn get_branch_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.branch_key +} +#[allow(missing_docs)] +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +#[allow(missing_docs)] +pub fn branch_key_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_version = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_branch_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_version = input; + self +} +#[allow(missing_docs)] +pub fn get_branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} + /// Consumes the builder and constructs a [`BranchKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials { + branch_key: self.branch_key, +branch_key_identifier: self.branch_key_identifier, +branch_key_version: self.branch_key_version, +encryption_context: self.encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs new file mode 100644 index 000000000..42b6f6120 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateKeyInput { + /// The identifier for the created Branch Key. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl CreateKeyInput { + /// The identifier for the created Branch Key. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +} +impl CreateKeyInput { + /// Creates a new builder-style object to manufacture [`CreateKeyInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyInputBuilder::default() + } +} + +/// A builder for [`CreateKeyInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl CreateKeyInputBuilder { + /// The identifier for the created Branch Key. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the created Branch Key. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the created Branch Key. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +/// Custom encryption context for the Branch Key. Required if branchKeyIdentifier is set. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} + /// Consumes the builder and constructs a [`CreateKeyInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::CreateKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::CreateKeyInput { + branch_key_identifier: self.branch_key_identifier, +encryption_context: self.encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs new file mode 100644 index 000000000..13dc72671 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for Branch Key creation. +pub struct CreateKeyOutput { + /// A identifier for the created Branch Key. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl CreateKeyOutput { + /// A identifier for the created Branch Key. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl CreateKeyOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyOutputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl CreateKeyOutputBuilder { + /// A identifier for the created Branch Key. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// A identifier for the created Branch Key. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// A identifier for the created Branch Key. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`CreateKeyOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::CreateKeyOutput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs new file mode 100644 index 000000000..4ead13969 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateKeyStoreInput { + +} +impl CreateKeyStoreInput { + +} +impl CreateKeyStoreInput { + /// Creates a new builder-style object to manufacture [`CreateKeyStoreInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyStoreInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyStoreInputBuilder::default() + } +} + +/// A builder for [`CreateKeyStoreInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyStoreInputBuilder { + +} +impl CreateKeyStoreInputBuilder { + + /// Consumes the builder and constructs a [`CreateKeyStoreInput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreInput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs new file mode 100644 index 000000000..9531e7de0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for Key Store DynamoDB table creation. +pub struct CreateKeyStoreOutput { + /// The ARN of the DynamoDB table that backs this Key Store. +pub table_arn: ::std::option::Option<::std::string::String>, +} +impl CreateKeyStoreOutput { + /// The ARN of the DynamoDB table that backs this Key Store. +pub fn table_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.table_arn +} +} +impl CreateKeyStoreOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyStoreOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyStoreOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::CreateKeyStoreOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyStoreOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyStoreOutputBuilder { + pub(crate) table_arn: ::std::option::Option<::std::string::String>, +} +impl CreateKeyStoreOutputBuilder { + /// The ARN of the DynamoDB table that backs this Key Store. +pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_arn = ::std::option::Option::Some(input.into()); + self +} +/// The ARN of the DynamoDB table that backs this Key Store. +pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_arn = input; + self +} +/// The ARN of the DynamoDB table that backs this Key Store. +pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.table_arn +} + /// Consumes the builder and constructs a [`CreateKeyStoreOutput`](crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::CreateKeyStoreOutput { + table_arn: self.table_arn, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs new file mode 100644 index 000000000..ead61262a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Discovery { + +} +impl Discovery { + +} +impl Discovery { + /// Creates a new builder-style object to manufacture [`Discovery`](crate::deps::aws_cryptography_keyStore::types::Discovery). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::DiscoveryBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::DiscoveryBuilder::default() + } +} + +/// A builder for [`Discovery`](crate::deps::aws_cryptography_keyStore::types::Discovery). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DiscoveryBuilder { + +} +impl DiscoveryBuilder { + + /// Consumes the builder and constructs a [`Discovery`](crate::deps::aws_cryptography_keyStore::types::Discovery). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::Discovery, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::Discovery { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_input.rs new file mode 100644 index 000000000..f5cb6fa03 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a Branch Key's ACTIVE version. +pub struct GetActiveBranchKeyInput { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetActiveBranchKeyInput { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl GetActiveBranchKeyInput { + /// Creates a new builder-style object to manufacture [`GetActiveBranchKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetActiveBranchKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetActiveBranchKeyInputBuilder::default() + } +} + +/// A builder for [`GetActiveBranchKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetActiveBranchKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetActiveBranchKeyInputBuilder { + /// The identifier for the Branch Key to get the ACTIVE version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to get the ACTIVE version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`GetActiveBranchKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_output.rs new file mode 100644 index 000000000..14f1653ea --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a Branch Key's ACTIVE version. +pub struct GetActiveBranchKeyOutput { + /// The materials for the Branch Key. +pub branch_key_materials: ::std::option::Option, +} +impl GetActiveBranchKeyOutput { + /// The materials for the Branch Key. +pub fn branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} +} +impl GetActiveBranchKeyOutput { + /// Creates a new builder-style object to manufacture [`GetActiveBranchKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetActiveBranchKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetActiveBranchKeyOutputBuilder::default() + } +} + +/// A builder for [`GetActiveBranchKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetActiveBranchKeyOutputBuilder { + pub(crate) branch_key_materials: ::std::option::Option, +} +impl GetActiveBranchKeyOutputBuilder { + /// The materials for the Branch Key. +pub fn branch_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Branch Key. +pub fn set_branch_key_materials(mut self, input: ::std::option::Option) -> Self { + self.branch_key_materials = input; + self +} +/// The materials for the Branch Key. +pub fn get_branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} + /// Consumes the builder and constructs a [`GetActiveBranchKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetActiveBranchKeyOutput { + branch_key_materials: self.branch_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs new file mode 100644 index 000000000..07c09e254 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a Beacon Key +pub struct GetBeaconKeyInput { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetBeaconKeyInput { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl GetBeaconKeyInput { + /// Creates a new builder-style object to manufacture [`GetBeaconKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetBeaconKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetBeaconKeyInputBuilder::default() + } +} + +/// A builder for [`GetBeaconKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBeaconKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl GetBeaconKeyInputBuilder { + /// The identifier of the Branch Key the Beacon Key is associated with. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier of the Branch Key the Beacon Key is associated with. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`GetBeaconKeyInput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs new file mode 100644 index 000000000..a6e5b641e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a Beacon Key +pub struct GetBeaconKeyOutput { + /// The materials for the Beacon Key. +pub beacon_key_materials: ::std::option::Option, +} +impl GetBeaconKeyOutput { + /// The materials for the Beacon Key. +pub fn beacon_key_materials(&self) -> &::std::option::Option { + &self.beacon_key_materials +} +} +impl GetBeaconKeyOutput { + /// Creates a new builder-style object to manufacture [`GetBeaconKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetBeaconKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetBeaconKeyOutputBuilder::default() + } +} + +/// A builder for [`GetBeaconKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBeaconKeyOutputBuilder { + pub(crate) beacon_key_materials: ::std::option::Option, +} +impl GetBeaconKeyOutputBuilder { + /// The materials for the Beacon Key. +pub fn beacon_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.beacon_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Beacon Key. +pub fn set_beacon_key_materials(mut self, input: ::std::option::Option) -> Self { + self.beacon_key_materials = input; + self +} +/// The materials for the Beacon Key. +pub fn get_beacon_key_materials(&self) -> &::std::option::Option { + &self.beacon_key_materials +} + /// Consumes the builder and constructs a [`GetBeaconKeyOutput`](crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetBeaconKeyOutput { + beacon_key_materials: self.beacon_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_input.rs new file mode 100644 index 000000000..858f8a81a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a version of a Branch Key. +pub struct GetBranchKeyVersionInput { + /// The identifier for the Branch Key to get a particular version for. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +/// The version to get. +pub branch_key_version: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyVersionInput { + /// The identifier for the Branch Key to get a particular version for. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// The version to get. +pub fn branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +} +impl GetBranchKeyVersionInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyVersionInput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetBranchKeyVersionInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetBranchKeyVersionInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyVersionInput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyVersionInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_version: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyVersionInputBuilder { + /// The identifier for the Branch Key to get a particular version for. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to get a particular version for. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +/// The version to get. +pub fn branch_key_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_version = ::std::option::Option::Some(input.into()); + self +} +/// The version to get. +pub fn set_branch_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_version = input; + self +} +/// The version to get. +pub fn get_branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} + /// Consumes the builder and constructs a [`GetBranchKeyVersionInput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionInput { + branch_key_identifier: self.branch_key_identifier, +branch_key_version: self.branch_key_version, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_output.rs new file mode 100644 index 000000000..dd67e2029 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for getting a version of a Branch Key. +pub struct GetBranchKeyVersionOutput { + /// The materials for the Branch Key. +pub branch_key_materials: ::std::option::Option, +} +impl GetBranchKeyVersionOutput { + /// The materials for the Branch Key. +pub fn branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} +} +impl GetBranchKeyVersionOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyVersionOutput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetBranchKeyVersionOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetBranchKeyVersionOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyVersionOutput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyVersionOutputBuilder { + pub(crate) branch_key_materials: ::std::option::Option, +} +impl GetBranchKeyVersionOutputBuilder { + /// The materials for the Branch Key. +pub fn branch_key_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_materials = ::std::option::Option::Some(input.into()); + self +} +/// The materials for the Branch Key. +pub fn set_branch_key_materials(mut self, input: ::std::option::Option) -> Self { + self.branch_key_materials = input; + self +} +/// The materials for the Branch Key. +pub fn get_branch_key_materials(&self) -> &::std::option::Option { + &self.branch_key_materials +} + /// Consumes the builder and constructs a [`GetBranchKeyVersionOutput`](crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetBranchKeyVersionOutput { + branch_key_materials: self.branch_key_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_key_store_info_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_key_store_info_output.rs new file mode 100644 index 000000000..fcde43780 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_get_key_store_info_output.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// The configuration information for a Key Store. +pub struct GetKeyStoreInfoOutput { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// An identifier for this Key Store. +pub key_store_id: ::std::option::Option<::std::string::String>, +/// The DynamoDB table name that backs this Key Store. +pub key_store_name: ::std::option::Option<::std::string::String>, +/// Configures Key Store's KMS Key ARN restrictions. +pub kms_configuration: ::std::option::Option, +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl GetKeyStoreInfoOutput { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn key_store_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_id +} +/// The DynamoDB table name that backs this Key Store. +pub fn key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_name +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} +} +impl GetKeyStoreInfoOutput { + /// Creates a new builder-style object to manufacture [`GetKeyStoreInfoOutput`](crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::GetKeyStoreInfoOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::GetKeyStoreInfoOutputBuilder::default() + } +} + +/// A builder for [`GetKeyStoreInfoOutput`](crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetKeyStoreInfoOutputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) key_store_id: ::std::option::Option<::std::string::String>, +pub(crate) key_store_name: ::std::option::Option<::std::string::String>, +pub(crate) kms_configuration: ::std::option::Option, +pub(crate) logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl GetKeyStoreInfoOutputBuilder { + /// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn key_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_store_id = ::std::option::Option::Some(input.into()); + self +} +/// An identifier for this Key Store. +pub fn set_key_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_store_id = input; + self +} +/// An identifier for this Key Store. +pub fn get_key_store_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_id +} +/// The DynamoDB table name that backs this Key Store. +pub fn key_store_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_store_name = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn set_key_store_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_store_name = input; + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn get_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_store_name +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_configuration = ::std::option::Option::Some(input.into()); + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn set_kms_configuration(mut self, input: ::std::option::Option) -> Self { + self.kms_configuration = input; + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn get_kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn logical_key_store_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.logical_key_store_name = ::std::option::Option::Some(input.into()); + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn set_logical_key_store_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.logical_key_store_name = input; + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. +pub fn get_logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} + /// Consumes the builder and constructs a [`GetKeyStoreInfoOutput`](crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::GetKeyStoreInfoOutput { + grant_tokens: self.grant_tokens, +key_store_id: self.key_store_id, +key_store_name: self.key_store_name, +kms_configuration: self.kms_configuration, +logical_key_store_name: self.logical_key_store_name, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs new file mode 100644 index 000000000..eb91186fd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs @@ -0,0 +1,83 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Configures Key Store's KMS Key ARN restrictions. +pub enum KmsConfiguration { + /// Key Store is restricted to only this KMS Key ARN. If a different KMS Key ARN is encountered when creating, versioning, or getting a Branch Key or Beacon Key, KMS is never called and an exception is thrown. While a Multi-Region Key (MKR) may be provided, the whole ARN, including the Region, is persisted in Branch Keys and MUST strictly equal this value to be considered valid. +KmsKeyArn(::std::string::String), +/// If an MRK ARN is provided, and the Key Store table holds an MRK ARN, then those two ARNs may differ in region, although they must be otherwise equal. If either ARN is not an MRK ARN, then mrkKmsKeyArn behaves exactly as kmsKeyArn. +KmsMrKeyArn(::std::string::String), +/// The Key Store can use the KMS Key ARNs already persisted in the Backing Table. The VersionKey and CreateKey Operations are NOT supported and will fail with a runtime exception. There is no Multi-Region logic with this configuration; if a Multi-Region Key is encountered, and the region in the ARN is not the region of the KMS Client, requests will Fail with KMS Exceptions. +Discovery(crate::deps::aws_cryptography_keyStore::types::Discovery), +/// The Key Store can use the KMS Key ARNs already persisted in the Backing Table. The VersionKey and CreateKey Operations are NOT supported and will fail with a runtime exception. If a Multi-Region Key is encountered, the region in the ARN is changed to the configured region. +MrDiscovery(crate::deps::aws_cryptography_keyStore::types::MrDiscovery), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl KmsConfiguration { + /// Tries to convert the enum instance into [`KmsKeyArn`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn), extracting the inner [`::std::string::String`](::std::string::String). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_kms_key_arn(&self) -> ::std::result::Result<&::std::string::String, &Self> { + if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`KmsMrKeyArn`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn), extracting the inner [`::std::string::String`](::std::string::String). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_kms_mr_key_arn(&self) -> ::std::result::Result<&::std::string::String, &Self> { + if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Discovery`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery), extracting the inner [`crate::deps::aws_cryptography_keyStore::types::Discovery`](crate::deps::aws_cryptography_keyStore::types::Discovery). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_discovery(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_keyStore::types::Discovery, &Self> { + if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery), extracting the inner [`crate::deps::aws_cryptography_keyStore::types::MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::MrDiscovery). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_mr_discovery(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_keyStore::types::MrDiscovery, &Self> { + if let crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`KmsKeyArn`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn). +pub fn is_kms_key_arn(&self) -> ::std::primitive::bool { + self.as_kms_key_arn().is_ok() +} +/// Returns true if this is a [`KmsMrKeyArn`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn). +pub fn is_kms_mr_key_arn(&self) -> ::std::primitive::bool { + self.as_kms_mr_key_arn().is_ok() +} +/// Returns true if this is a [`Discovery`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery). +pub fn is_discovery(&self) -> ::std::primitive::bool { + self.as_discovery().is_ok() +} +/// Returns true if this is a [`MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery). +pub fn is_mr_discovery(&self) -> ::std::primitive::bool { + self.as_mr_discovery().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs new file mode 100644 index 000000000..8182d8aca --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct MrDiscovery { + /// Any MRK ARN discovered will have its region replaced with this. +pub region: ::std::option::Option<::std::string::String>, +} +impl MrDiscovery { + /// Any MRK ARN discovered will have its region replaced with this. +pub fn region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} +} +impl MrDiscovery { + /// Creates a new builder-style object to manufacture [`MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::MrDiscovery). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::MrDiscoveryBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::MrDiscoveryBuilder::default() + } +} + +/// A builder for [`MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::MrDiscovery). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct MrDiscoveryBuilder { + pub(crate) region: ::std::option::Option<::std::string::String>, +} +impl MrDiscoveryBuilder { + /// Any MRK ARN discovered will have its region replaced with this. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.region = ::std::option::Option::Some(input.into()); + self +} +/// Any MRK ARN discovered will have its region replaced with this. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.region = input; + self +} +/// Any MRK ARN discovered will have its region replaced with this. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} + /// Consumes the builder and constructs a [`MrDiscovery`](crate::deps::aws_cryptography_keyStore::types::MrDiscovery). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::MrDiscovery, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::MrDiscovery { + region: self.region, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs new file mode 100644 index 000000000..03b736bb2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for versioning a Branch Key. +pub struct VersionKeyInput { + /// The identifier for the Branch Key to be versioned. +pub branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl VersionKeyInput { + /// The identifier for the Branch Key to be versioned. +pub fn branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} +} +impl VersionKeyInput { + /// Creates a new builder-style object to manufacture [`VersionKeyInput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::VersionKeyInputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::VersionKeyInputBuilder::default() + } +} + +/// A builder for [`VersionKeyInput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VersionKeyInputBuilder { + pub(crate) branch_key_identifier: ::std::option::Option<::std::string::String>, +} +impl VersionKeyInputBuilder { + /// The identifier for the Branch Key to be versioned. +pub fn branch_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_identifier = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the Branch Key to be versioned. +pub fn set_branch_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_identifier = input; + self +} +/// The identifier for the Branch Key to be versioned. +pub fn get_branch_key_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_identifier +} + /// Consumes the builder and constructs a [`VersionKeyInput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::VersionKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::VersionKeyInput { + branch_key_identifier: self.branch_key_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs new file mode 100644 index 000000000..f49019b46 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for versioning a Branch Key. +pub struct VersionKeyOutput { + +} +impl VersionKeyOutput { + +} +impl VersionKeyOutput { + /// Creates a new builder-style object to manufacture [`VersionKeyOutput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::builders::VersionKeyOutputBuilder { + crate::deps::aws_cryptography_keyStore::types::builders::VersionKeyOutputBuilder::default() + } +} + +/// A builder for [`VersionKeyOutput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VersionKeyOutputBuilder { + +} +impl VersionKeyOutputBuilder { + + /// Consumes the builder and constructs a [`VersionKeyOutput`](crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::VersionKeyOutput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/builders.rs new file mode 100644 index 000000000..94a8030a8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/builders.rs @@ -0,0 +1,36 @@ +// 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 use crate::deps::aws_cryptography_keyStore::types::_beacon_key_materials::BeaconKeyMaterialsBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_branch_key_materials::BranchKeyMaterialsBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_input::CreateKeyInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_output::CreateKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_store_input::CreateKeyStoreInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_create_key_store_output::CreateKeyStoreOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_discovery::DiscoveryBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_active_branch_key_input::GetActiveBranchKeyInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_active_branch_key_output::GetActiveBranchKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_beacon_key_input::GetBeaconKeyInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_beacon_key_output::GetBeaconKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_branch_key_version_input::GetBranchKeyVersionInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_branch_key_version_output::GetBranchKeyVersionOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_get_key_store_info_output::GetKeyStoreInfoOutputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_mr_discovery::MrDiscoveryBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_version_key_input::VersionKeyInputBuilder; + +pub use crate::deps::aws_cryptography_keyStore::types::_version_key_output::VersionKeyOutputBuilder; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/error.rs new file mode 100644 index 000000000..b01c396f6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/error.rs @@ -0,0 +1,80 @@ +// 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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + #[allow(missing_docs)] +KeyStoreException { + message: ::std::string::String, +}, + +DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::types::error::Error, +}, + +TrentServiceError { + error: crate::deps::com_amazonaws_kms::types::error::Error, +}, + CollectionOfErrors { + list: ::std::vec::Vec, + message: ::std::string::String, + }, + ValidationError(ValidationError), + Opaque { + obj: ::dafny_runtime::Object, + }, + OpaqueWithText { + obj: ::dafny_runtime::Object, + objMessage: ::std::string::String, + }, +} + +impl ::std::cmp::Eq for Error {} + +impl ::std::fmt::Display for Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + Self::ValidationError(err) => ::std::fmt::Display::fmt(err, f), + _ => ::std::fmt::Debug::fmt(self, f), + } + } +} + +impl ::std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::ValidationError(err) => Some(err), + _ => None, + } + } +} + +impl Error { + pub fn wrap_validation_err(err: E) -> Self + where + E: ::std::error::Error + 'static, + { + Self::ValidationError(ValidationError(::std::rc::Rc::new(err))) + } +} + +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidationError(::std::rc::Rc); + +impl ::std::cmp::PartialEq for ValidationError { + fn eq(&self, other: &Self) -> bool { + ::std::rc::Rc::<(dyn std::error::Error + 'static)>::ptr_eq(&self.0, &other.0) + } +} + +impl ::std::fmt::Display for ValidationError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::fmt::Display::fmt(&self.0, f) + } +} + +impl ::std::error::Error for ValidationError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + ::std::option::Option::Some(self.0.as_ref()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs new file mode 100644 index 000000000..ab4058505 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs @@ -0,0 +1,190 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct KeyStoreConfig { + /// The DynamoDB client this Key Store uses to call Amazon DynamoDB. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub ddb_client: ::std::option::Option, +/// The DynamoDB table name that backs this Key Store. +pub ddb_table_name: ::std::option::Option<::std::string::String>, +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// An identifier for this Key Store. +pub id: ::std::option::Option<::std::string::String>, +/// The KMS client this Key Store uses to call AWS KMS. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub kms_client: ::std::option::Option, +/// Configures Key Store's KMS Key ARN restrictions. +pub kms_configuration: ::std::option::Option, +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. This appears in the Encryption Context of KMS requests as `tablename`. +pub logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl KeyStoreConfig { + /// The DynamoDB client this Key Store uses to call Amazon DynamoDB. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn ddb_client(&self) -> &::std::option::Option { + &self.ddb_client +} +/// The DynamoDB table name that backs this Key Store. +pub fn ddb_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.ddb_table_name +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn id(&self) -> &::std::option::Option<::std::string::String> { + &self.id +} +/// The KMS client this Key Store uses to call AWS KMS. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. This appears in the Encryption Context of KMS requests as `tablename`. +pub fn logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} +} +impl KeyStoreConfig { + /// Creates a new builder-style object to manufacture [`KeyStoreConfig`](crate::deps::aws_cryptography_keyStore::types::KeyStoreConfig). + pub fn builder() -> crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfigBuilder { + crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfigBuilder::default() + } +} + +/// A builder for [`KeyStoreConfig`](crate::deps::aws_cryptography_keyStore::types::KeyStoreConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KeyStoreConfigBuilder { + pub(crate) ddb_client: ::std::option::Option, +pub(crate) ddb_table_name: ::std::option::Option<::std::string::String>, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) id: ::std::option::Option<::std::string::String>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_configuration: ::std::option::Option, +pub(crate) logical_key_store_name: ::std::option::Option<::std::string::String>, +} +impl KeyStoreConfigBuilder { + /// The DynamoDB client this Key Store uses to call Amazon DynamoDB. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn ddb_client(mut self, input: impl ::std::convert::Into) -> Self { + self.ddb_client = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB client this Key Store uses to call Amazon DynamoDB. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn set_ddb_client(mut self, input: ::std::option::Option) -> Self { + self.ddb_client = input; + self +} +/// The DynamoDB client this Key Store uses to call Amazon DynamoDB. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn get_ddb_client(&self) -> &::std::option::Option { + &self.ddb_client +} +/// The DynamoDB table name that backs this Key Store. +pub fn ddb_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.ddb_table_name = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn set_ddb_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.ddb_table_name = input; + self +} +/// The DynamoDB table name that backs this Key Store. +pub fn get_ddb_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.ddb_table_name +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// The AWS KMS grant tokens that are used when this Key Store calls to AWS KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// An identifier for this Key Store. +pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.id = ::std::option::Option::Some(input.into()); + self +} +/// An identifier for this Key Store. +pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.id = input; + self +} +/// An identifier for this Key Store. +pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { + &self.id +} +/// The KMS client this Key Store uses to call AWS KMS. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS client this Key Store uses to call AWS KMS. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS client this Key Store uses to call AWS KMS. If None is provided and the KMS ARN is, the KMS ARN is used to determine the Region of the default client. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn kms_configuration(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_configuration = ::std::option::Option::Some(input.into()); + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn set_kms_configuration(mut self, input: ::std::option::Option) -> Self { + self.kms_configuration = input; + self +} +/// Configures Key Store's KMS Key ARN restrictions. +pub fn get_kms_configuration(&self) -> &::std::option::Option { + &self.kms_configuration +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. This appears in the Encryption Context of KMS requests as `tablename`. +pub fn logical_key_store_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.logical_key_store_name = ::std::option::Option::Some(input.into()); + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. This appears in the Encryption Context of KMS requests as `tablename`. +pub fn set_logical_key_store_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.logical_key_store_name = input; + self +} +/// The logical name for this Key Store, which is cryptographically bound to the keys it holds. This appears in the Encryption Context of KMS requests as `tablename`. +pub fn get_logical_key_store_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_key_store_name +} + /// Consumes the builder and constructs a [`KeyStoreConfig`](crate::deps::aws_cryptography_keyStore::types::KeyStoreConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig { + ddb_client: self.ddb_client, +ddb_table_name: self.ddb_table_name, +grant_tokens: self.grant_tokens, +id: self.id, +kms_client: self.kms_client, +kms_configuration: self.kms_configuration, +logical_key_store_name: self.logical_key_store_name, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders.rs @@ -0,0 +1,11 @@ +// 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 mod client; +pub mod types; +/// Common errors and error handling utilities. +pub mod error; +/// All operations that this crate can perform. +pub mod operation; +pub mod conversions; +pub mod deps; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client.rs new file mode 100644 index 000000000..4d1510900 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client.rs @@ -0,0 +1,90 @@ +// 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. +use aws_smithy_types::error::operation::BuildError; + +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +#[allow(missing_docs)] +pub struct Client { + pub(crate) dafny_client: ::dafny_runtime::Object +} + +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, + ) -> Result { + 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), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod create_aws_kms_keyring; + +mod create_aws_kms_discovery_keyring; + +mod create_aws_kms_multi_keyring; + +mod create_aws_kms_discovery_multi_keyring; + +mod create_aws_kms_mrk_keyring; + +mod create_aws_kms_mrk_multi_keyring; + +mod create_aws_kms_mrk_discovery_keyring; + +mod create_aws_kms_mrk_discovery_multi_keyring; + +mod create_aws_kms_hierarchical_keyring; + +mod create_aws_kms_rsa_keyring; + +mod create_aws_kms_ecdh_keyring; + +mod create_multi_keyring; + +mod create_raw_aes_keyring; + +mod create_raw_rsa_keyring; + +mod create_raw_ecdh_keyring; + +mod create_default_cryptographic_materials_manager; + +mod create_required_encryption_context_cmm; + +mod create_cryptographic_materials_cache; + +mod create_default_client_supplier; + +mod initialize_encryption_materials; + +mod initialize_decryption_materials; + +mod valid_encryption_materials_transition; + +mod valid_decryption_materials_transition; + +mod encryption_materials_has_plaintext_data_key; + +mod decryption_materials_with_plaintext_data_key; + +mod get_algorithm_suite_info; + +mod valid_algorithm_suite_info; + +mod validate_commitment_policy_on_encrypt; + +mod validate_commitment_policy_on_decrypt; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_keyring.rs new file mode 100644 index 000000000..2795b091e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_keyring.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsDiscoveryKeyring`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`discovery_filter(impl Into>)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::discovery_filter) / [`set_discovery_filter(Option)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::set_discovery_filter): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_discovery_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_discovery_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringError) + pub fn create_aws_kms_discovery_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_multi_keyring.rs new file mode 100644 index 000000000..fcbff7c04 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_multi_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsDiscoveryMultiKeyring`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`client_supplier(impl Into>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::client_supplier) / [`set_client_supplier(Option)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::set_client_supplier): (undocumented)
+ /// - [`discovery_filter(impl Into>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::discovery_filter) / [`set_discovery_filter(Option)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::set_discovery_filter): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`regions(impl Into>>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::regions) / [`set_regions(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::set_regions): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_discovery_multi_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_discovery_multi_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringError) + pub fn create_aws_kms_discovery_multi_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_ecdh_keyring.rs new file mode 100644 index 000000000..8436f6dc0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_ecdh_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsEcdhKeyring`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`key_agreement_scheme(impl Into>)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::key_agreement_scheme) / [`set_key_agreement_scheme(Option)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::set_key_agreement_scheme): (undocumented)
+ /// - [`curve_spec(impl Into>)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::curve_spec) / [`set_curve_spec(Option)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::set_curve_spec): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_ecdh_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_ecdh_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringError) + pub fn create_aws_kms_ecdh_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_hierarchical_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_hierarchical_keyring.rs new file mode 100644 index 000000000..d52d2d253 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_hierarchical_keyring.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsHierarchicalKeyring`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`branch_key_id(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::branch_key_id) / [`set_branch_key_id(Option<::std::string::String>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_branch_key_id): (undocumented)
+ /// - [`branch_key_id_supplier(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::branch_key_id_supplier) / [`set_branch_key_id_supplier(Option)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_branch_key_id_supplier): (undocumented)
+ /// - [`cache(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::cache) / [`set_cache(Option)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_cache): (undocumented)
+ /// - [`key_store(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::key_store) / [`set_key_store(Option)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_key_store): (undocumented)
+ /// - [`partition_id(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::partition_id) / [`set_partition_id(Option<::std::string::String>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_partition_id): (undocumented)
+ /// - [`ttl_seconds(impl Into>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::ttl_seconds) / [`set_ttl_seconds(Option<::std::primitive::i64>)`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::set_ttl_seconds): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_hierarchical_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_hierarchical_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringError) + pub fn create_aws_kms_hierarchical_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs new file mode 100644 index 000000000..53dbd176e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsKeyring`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - [`kms_key_id(impl Into>)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<::std::string::String>)`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::set_kms_key_id): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_keyring::CreateAwsKmsKeyringError) + pub fn create_aws_kms_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_keyring.rs new file mode 100644 index 000000000..fffce3b33 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsMrkDiscoveryKeyring`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`discovery_filter(impl Into>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::discovery_filter) / [`set_discovery_filter(Option)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::set_discovery_filter): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - [`region(impl Into>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::region) / [`set_region(Option<::std::string::String>)`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::set_region): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_discovery_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_mrk_discovery_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringError) + pub fn create_aws_kms_mrk_discovery_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_multi_keyring.rs new file mode 100644 index 000000000..8085d5f0e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_multi_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsMrkDiscoveryMultiKeyring`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`client_supplier(impl Into>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::client_supplier) / [`set_client_supplier(Option)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::set_client_supplier): (undocumented)
+ /// - [`discovery_filter(impl Into>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::discovery_filter) / [`set_discovery_filter(Option)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::set_discovery_filter): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`regions(impl Into>>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::regions) / [`set_regions(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::set_regions): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringError) + pub fn create_aws_kms_mrk_discovery_multi_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_keyring.rs new file mode 100644 index 000000000..6130e600c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_keyring.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsMrkKeyring`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - [`kms_key_id(impl Into>)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<::std::string::String>)`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::set_kms_key_id): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_mrk_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringError) + pub fn create_aws_kms_mrk_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_multi_keyring.rs new file mode 100644 index 000000000..306ee0765 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_multi_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsMrkMultiKeyring`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`client_supplier(impl Into>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::client_supplier) / [`set_client_supplier(Option)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::set_client_supplier): (undocumented)
+ /// - [`generator(impl Into>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::generator) / [`set_generator(Option<::std::string::String>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::set_generator): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_key_ids(impl Into>>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::kms_key_ids) / [`set_kms_key_ids(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::set_kms_key_ids): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_multi_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_mrk_multi_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringError) + pub fn create_aws_kms_mrk_multi_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_multi_keyring.rs new file mode 100644 index 000000000..a18850f2b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_multi_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsMultiKeyring`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`client_supplier(impl Into>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::client_supplier) / [`set_client_supplier(Option)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::set_client_supplier): (undocumented)
+ /// - [`generator(impl Into>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::generator) / [`set_generator(Option<::std::string::String>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::set_generator): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_key_ids(impl Into>>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::kms_key_ids) / [`set_kms_key_ids(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::set_kms_key_ids): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_multi_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_multi_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringError) + pub fn create_aws_kms_multi_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_rsa_keyring.rs new file mode 100644 index 000000000..13fdcf673 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_rsa_keyring.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateAwsKmsRsaKeyring`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`encryption_algorithm(impl Into>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::encryption_algorithm) / [`set_encryption_algorithm(Option)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::set_encryption_algorithm): (undocumented)
+ /// - [`grant_tokens(impl Into>>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::grant_tokens) / [`set_grant_tokens(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::set_grant_tokens): (undocumented)
+ /// - [`kms_client(impl Into>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::kms_client) / [`set_kms_client(Option)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::set_kms_client): (undocumented)
+ /// - [`kms_key_id(impl Into>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<::std::string::String>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::set_kms_key_id): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_aws_kms_rsa_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_aws_kms_rsa_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringError) + pub fn create_aws_kms_rsa_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..f0748e205 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateCryptographicMaterialsCache`](crate::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`cache(impl Into>)`](crate::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheFluentBuilder::cache) / [`set_cache(Option)`](crate::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheFluentBuilder::set_cache): (undocumented)
+ /// - On success, responds with [`CreateCryptographicMaterialsCacheOutput`](crate::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheOutput) with field(s): + /// - [`materials_cache(Option)`](crate::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheOutput::materials_cache): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheError) + pub fn create_cryptographic_materials_cache(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs new file mode 100644 index 000000000..b6e602c59 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateDefaultClientSupplier`](crate::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + + /// - On success, responds with [`CreateDefaultClientSupplierOutput`](crate::operation::create_default_client_supplier::CreateDefaultClientSupplierOutput) with field(s): + /// - [`client(Option)`](crate::operation::create_default_client_supplier::CreateDefaultClientSupplierOutput::client): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_default_client_supplier::CreateDefaultClientSupplierError) + pub fn create_default_client_supplier(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_cryptographic_materials_manager.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_cryptographic_materials_manager.rs new file mode 100644 index 000000000..d5fd521ae --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_default_cryptographic_materials_manager.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateDefaultCryptographicMaterialsManager`](crate::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`keyring(impl Into>)`](crate::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerFluentBuilder::keyring) / [`set_keyring(Option)`](crate::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerFluentBuilder::set_keyring): (undocumented)
+ /// - On success, responds with [`CreateCryptographicMaterialsManagerOutput`](crate::operation::create_default_cryptographic_materials_manager::CreateCryptographicMaterialsManagerOutput) with field(s): + /// - [`materials_manager(Option)`](crate::operation::create_default_cryptographic_materials_manager::CreateCryptographicMaterialsManagerOutput::materials_manager): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerError) + pub fn create_default_cryptographic_materials_manager(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs new file mode 100644 index 000000000..c53e0cedc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateMultiKeyring`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`child_keyrings(impl Into>>)`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder::child_keyrings) / [`set_child_keyrings(Option<::std::vec::Vec>)`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder::set_child_keyrings): (undocumented)
+ /// - [`generator(impl Into>)`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder::generator) / [`set_generator(Option)`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder::set_generator): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_multi_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_multi_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_multi_keyring::CreateMultiKeyringError) + pub fn create_multi_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs new file mode 100644 index 000000000..7c5edc157 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateRawAesKeyring`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`key_name(impl Into>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::key_name) / [`set_key_name(Option<::std::string::String>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::set_key_name): (undocumented)
+ /// - [`key_namespace(impl Into>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::key_namespace) / [`set_key_namespace(Option<::std::string::String>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::set_key_namespace): (undocumented)
+ /// - [`wrapping_alg(impl Into>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::wrapping_alg) / [`set_wrapping_alg(Option)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::set_wrapping_alg): (undocumented)
+ /// - [`wrapping_key(impl Into>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::wrapping_key) / [`set_wrapping_key(Option<::aws_smithy_types::Blob>)`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::set_wrapping_key): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_raw_aes_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_raw_aes_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_raw_aes_keyring::CreateRawAesKeyringError) + pub fn create_raw_aes_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..3896843d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateRawEcdhKeyring`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`key_agreement_scheme(impl Into>)`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder::key_agreement_scheme) / [`set_key_agreement_scheme(Option)`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder::set_key_agreement_scheme): (undocumented)
+ /// - [`curve_spec(impl Into>)`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder::curve_spec) / [`set_curve_spec(Option)`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder::set_curve_spec): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_raw_ecdh_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_raw_ecdh_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringError) + pub fn create_raw_ecdh_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..cae547348 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateRawRsaKeyring`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`key_name(impl Into>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::key_name) / [`set_key_name(Option<::std::string::String>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::set_key_name): (undocumented)
+ /// - [`key_namespace(impl Into>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::key_namespace) / [`set_key_namespace(Option<::std::string::String>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::set_key_namespace): (undocumented)
+ /// - [`padding_scheme(impl Into>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::padding_scheme) / [`set_padding_scheme(Option)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::set_padding_scheme): (undocumented)
+ /// - [`private_key(impl Into>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::private_key) / [`set_private_key(Option<::aws_smithy_types::Blob>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::set_private_key): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`CreateKeyringOutput`](crate::operation::create_raw_rsa_keyring::CreateKeyringOutput) with field(s): + /// - [`keyring(Option)`](crate::operation::create_raw_rsa_keyring::CreateKeyringOutput::keyring): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_raw_rsa_keyring::CreateRawRsaKeyringError) + pub fn create_raw_rsa_keyring(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_required_encryption_context_cmm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_required_encryption_context_cmm.rs new file mode 100644 index 000000000..af6338a5d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/create_required_encryption_context_cmm.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`CreateRequiredEncryptionContextCMM`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`keyring(impl Into>)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::keyring) / [`set_keyring(Option)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::set_keyring): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - [`underlying_cmm(impl Into>)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::underlying_cmm) / [`set_underlying_cmm(Option)`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCMMFluentBuilder::set_underlying_cmm): (undocumented)
+ /// - On success, responds with [`CreateRequiredEncryptionContextCmmOutput`](crate::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmOutput) with field(s): + /// - [`materials_manager(Option)`](crate::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCMMOutput::materials_manager): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmError) + pub fn create_required_encryption_context_cmm(&self) -> crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/decryption_materials_with_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/decryption_materials_with_plaintext_data_key.rs new file mode 100644 index 000000000..cc3904b47 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/decryption_materials_with_plaintext_data_key.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`DecryptionMaterialsWithPlaintextDataKey`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite(impl Into>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::algorithm_suite) / [`set_algorithm_suite(Option)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_algorithm_suite): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`plaintext_data_key(impl Into>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::plaintext_data_key) / [`set_plaintext_data_key(Option<::aws_smithy_types::Blob>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_plaintext_data_key): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - [`symmetric_signing_key(impl Into>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::symmetric_signing_key) / [`set_symmetric_signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_symmetric_signing_key): (undocumented)
+ /// - [`verification_key(impl Into>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::verification_key) / [`set_verification_key(Option<::aws_smithy_types::Blob>)`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::set_verification_key): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::decryption_materials_with_plaintext_data_key::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterialsWithPlaintextDataKeyError) + pub fn decryption_materials_with_plaintext_data_key(&self) -> crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsWithPlaintextDataKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/encryption_materials_has_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/encryption_materials_has_plaintext_data_key.rs new file mode 100644 index 000000000..4e796baa8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/encryption_materials_has_plaintext_data_key.rs @@ -0,0 +1,21 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`EncryptionMaterialsHasPlaintextDataKey`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite(impl Into>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::algorithm_suite) / [`set_algorithm_suite(Option)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_algorithm_suite): (undocumented)
+ /// - [`encrypted_data_keys(impl Into>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::encrypted_data_keys) / [`set_encrypted_data_keys(Option<::std::vec::Vec>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_encrypted_data_keys): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`plaintext_data_key(impl Into>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::plaintext_data_key) / [`set_plaintext_data_key(Option<::aws_smithy_types::Blob>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_plaintext_data_key): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - [`signing_key(impl Into>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::signing_key) / [`set_signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_signing_key): (undocumented)
+ /// - [`symmetric_signing_keys(impl Into>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::symmetric_signing_keys) / [`set_symmetric_signing_keys(Option<::std::vec::Vec<::aws_smithy_types::Blob>>)`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::set_symmetric_signing_keys): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::encryption_materials_has_plaintext_data_key::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterialsHasPlaintextDataKeyError) + pub fn encryption_materials_has_plaintext_data_key(&self) -> crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsHasPlaintextDataKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs new file mode 100644 index 000000000..3201df319 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs @@ -0,0 +1,23 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`GetAlgorithmSuiteInfo`](crate::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`binary_id(impl Into>)`](crate::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoFluentBuilder::binary_id) / [`set_binary_id(Option<::aws_smithy_types::Blob>)`](crate::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoFluentBuilder::set_binary_id): (undocumented)
+ /// - On success, responds with [`AlgorithmSuiteInfo`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo) with field(s): + /// - [`binary_id(Option<::aws_smithy_types::Blob>)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::binary_id): (undocumented) + /// - [`commitment(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::commitment): (undocumented) + /// - [`edk_wrapping(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::edk_wrapping): (undocumented) + /// - [`encrypt(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::encrypt): (undocumented) + /// - [`id(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::id): (undocumented) + /// - [`kdf(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::kdf): (undocumented) + /// - [`message_version(Option<::std::primitive::i32>)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::message_version): (undocumented) + /// - [`signature(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::signature): (undocumented) + /// - [`symmetric_signature(Option)`](crate::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::symmetric_signature): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfoError) + pub fn get_algorithm_suite_info(&self) -> crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs new file mode 100644 index 000000000..bb0a43582 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs @@ -0,0 +1,22 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`InitializeDecryptionMaterials`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - On success, responds with [`DecryptionMaterials`](crate::operation::initialize_decryption_materials::DecryptionMaterials) with field(s): + /// - [`algorithm_suite(Option)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::algorithm_suite): (undocumented) + /// - [`encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::encryption_context): (undocumented) + /// - [`plaintext_data_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::plaintext_data_key): (undocumented) + /// - [`required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::required_encryption_context_keys): (undocumented) + /// - [`symmetric_signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::symmetric_signing_key): (undocumented) + /// - [`verification_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_decryption_materials::DecryptionMaterials::verification_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::initialize_decryption_materials::InitializeDecryptionMaterialsError) + pub fn initialize_decryption_materials(&self) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs new file mode 100644 index 000000000..8ba955b0f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs @@ -0,0 +1,25 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`InitializeEncryptionMaterials`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - [`signing_key(impl Into>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::signing_key) / [`set_signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::set_signing_key): (undocumented)
+ /// - [`verification_key(impl Into>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::verification_key) / [`set_verification_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::set_verification_key): (undocumented)
+ /// - On success, responds with [`EncryptionMaterials`](crate::operation::initialize_encryption_materials::EncryptionMaterials) with field(s): + /// - [`algorithm_suite(Option)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::algorithm_suite): (undocumented) + /// - [`encrypted_data_keys(Option<::std::vec::Vec>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::encrypted_data_keys): (undocumented) + /// - [`encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::encryption_context): (undocumented) + /// - [`plaintext_data_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::plaintext_data_key): (undocumented) + /// - [`required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::required_encryption_context_keys): (undocumented) + /// - [`signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::signing_key): (undocumented) + /// - [`symmetric_signing_keys(Option<::std::vec::Vec<::aws_smithy_types::Blob>>)`](crate::operation::initialize_encryption_materials::EncryptionMaterials::symmetric_signing_keys): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::initialize_encryption_materials::InitializeEncryptionMaterialsError) + pub fn initialize_encryption_materials(&self) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..2087d6bad --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs @@ -0,0 +1,23 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`ValidAlgorithmSuiteInfo`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`binary_id(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::binary_id) / [`set_binary_id(Option<::aws_smithy_types::Blob>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_binary_id): (undocumented)
+ /// - [`commitment(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::commitment) / [`set_commitment(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_commitment): (undocumented)
+ /// - [`edk_wrapping(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::edk_wrapping) / [`set_edk_wrapping(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_edk_wrapping): (undocumented)
+ /// - [`encrypt(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::encrypt) / [`set_encrypt(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_encrypt): (undocumented)
+ /// - [`id(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::id) / [`set_id(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_id): (undocumented)
+ /// - [`kdf(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::kdf) / [`set_kdf(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_kdf): (undocumented)
+ /// - [`message_version(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::message_version) / [`set_message_version(Option<::std::primitive::i32>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_message_version): (undocumented)
+ /// - [`signature(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::signature) / [`set_signature(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_signature): (undocumented)
+ /// - [`symmetric_signature(impl Into>)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::symmetric_signature) / [`set_symmetric_signature(Option)`](crate::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::set_symmetric_signature): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::valid_algorithm_suite_info::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::valid_algorithm_suite_info::ValidAlgorithmSuiteInfoError) + pub fn valid_algorithm_suite_info(&self) -> crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::ValidAlgorithmSuiteInfoFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..72e743336 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`ValidDecryptionMaterialsTransition`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`start(impl Into>)`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder::start) / [`set_start(Option)`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder::set_start): (undocumented)
+ /// - [`stop(impl Into>)`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder::stop) / [`set_stop(Option)`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder::set_stop): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::valid_decryption_materials_transition::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionError) + pub fn valid_decryption_materials_transition(&self) -> crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..52e9f7394 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`ValidEncryptionMaterialsTransition`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`start(impl Into>)`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder::start) / [`set_start(Option)`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder::set_start): (undocumented)
+ /// - [`stop(impl Into>)`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder::stop) / [`set_stop(Option)`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder::set_stop): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::valid_encryption_materials_transition::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionError) + pub fn valid_encryption_materials_transition(&self) -> crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_decrypt.rs new file mode 100644 index 000000000..6fe37a089 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_decrypt.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`ValidateCommitmentPolicyOnDecrypt`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm(impl Into>)`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder::algorithm) / [`set_algorithm(Option)`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder::set_algorithm): (undocumented)
+ /// - [`commitment_policy(impl Into>)`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder::commitment_policy) / [`set_commitment_policy(Option)`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder::set_commitment_policy): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::validate_commitment_policy_on_decrypt::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptError) + pub fn validate_commitment_policy_on_decrypt(&self) -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_encrypt.rs new file mode 100644 index 000000000..ebc3db779 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_encrypt.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::client::Client { + /// Constructs a fluent builder for the [`ValidateCommitmentPolicyOnEncrypt`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm(impl Into>)`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder::algorithm) / [`set_algorithm(Option)`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder::set_algorithm): (undocumented)
+ /// - [`commitment_policy(impl Into>)`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder::commitment_policy) / [`set_commitment_policy(Option)`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder::set_commitment_policy): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::validate_commitment_policy_on_encrypt::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptError) + pub fn validate_commitment_policy_on_encrypt(&self) -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions.rs new file mode 100644 index 000000000..214ad84e5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions.rs @@ -0,0 +1,260 @@ +// 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 mod aes_wrapping_alg; + + pub mod algorithm_suite_id; + + pub mod algorithm_suite_info; + + pub mod branch_key_id_supplier; + + pub mod cache_type; + + pub mod client; + + pub mod client_supplier; + + pub mod commitment_policy; + + pub mod create_aws_kms_discovery_keyring; + + pub mod create_aws_kms_discovery_keyring_input; + + pub mod create_aws_kms_discovery_multi_keyring; + + pub mod create_aws_kms_discovery_multi_keyring_input; + + pub mod create_aws_kms_ecdh_keyring; + + pub mod create_aws_kms_ecdh_keyring_input; + + pub mod create_aws_kms_hierarchical_keyring; + + pub mod create_aws_kms_hierarchical_keyring_input; + + pub mod create_aws_kms_keyring; + + pub mod create_aws_kms_keyring_input; + + pub mod create_aws_kms_mrk_discovery_keyring; + + pub mod create_aws_kms_mrk_discovery_keyring_input; + + pub mod create_aws_kms_mrk_discovery_multi_keyring; + + pub mod create_aws_kms_mrk_discovery_multi_keyring_input; + + pub mod create_aws_kms_mrk_keyring; + + pub mod create_aws_kms_mrk_keyring_input; + + pub mod create_aws_kms_mrk_multi_keyring; + + pub mod create_aws_kms_mrk_multi_keyring_input; + + pub mod create_aws_kms_multi_keyring; + + pub mod create_aws_kms_multi_keyring_input; + + pub mod create_aws_kms_rsa_keyring; + + pub mod create_aws_kms_rsa_keyring_input; + + pub mod create_cryptographic_materials_cache; + + pub mod create_cryptographic_materials_cache_input; + + pub mod create_default_client_supplier; + + pub mod create_default_client_supplier_input; + + pub mod create_default_cryptographic_materials_manager; + + pub mod create_default_cryptographic_materials_manager_input; + + pub mod create_multi_keyring; + + pub mod create_multi_keyring_input; + + pub mod create_raw_aes_keyring; + + pub mod create_raw_aes_keyring_input; + + pub mod create_raw_ecdh_keyring; + + pub mod create_raw_ecdh_keyring_input; + + pub mod create_raw_rsa_keyring; + + pub mod create_raw_rsa_keyring_input; + + pub mod create_required_encryption_context_cmm; + + pub mod create_required_encryption_context_cmm_input; + + pub mod cryptographic_materials_cache; + + pub mod cryptographic_materials_manager; + + pub mod dbe_algorithm_suite_id; + + pub mod dbe_commitment_policy; + + pub mod decrypt_materials; + + pub mod decrypt_materials_input; + + pub mod decrypt_materials_output; + + pub mod decryption_materials; + + pub mod decryption_materials_with_plaintext_data_key; + + pub mod default_cache; + + pub mod delete_cache_entry; + + pub mod delete_cache_entry_input; + + pub mod derivation_algorithm; + + pub mod direct_key_wrapping; + + pub mod discovery_filter; + + pub mod ecdsa; + + pub mod edk_wrapping_algorithm; + + pub mod encrypt; + + pub mod encrypted_data_key; + + pub mod encryption_materials; + + pub mod encryption_materials_has_plaintext_data_key; + + pub mod ephemeral_private_key_to_static_public_key_input; + + pub mod error; + + pub mod esdk_algorithm_suite_id; + + pub mod esdk_commitment_policy; + + pub mod get_algorithm_suite_info; + + pub mod get_branch_key_id; + + pub mod get_branch_key_id_input; + + pub mod get_branch_key_id_output; + + pub mod get_cache_entry; + + pub mod get_cache_entry_input; + + pub mod get_cache_entry_output; + + pub mod get_client; + + pub mod get_client_input; + + pub mod get_encryption_materials; + + pub mod get_encryption_materials_input; + + pub mod get_encryption_materials_output; + + pub mod hkdf; + + pub mod identity; + + pub mod initialize_decryption_materials; + + pub mod initialize_decryption_materials_input; + + pub mod initialize_encryption_materials; + + pub mod initialize_encryption_materials_input; + + pub mod intermediate_key_wrapping; + + pub mod key_agreement_scheme; + + pub mod keyring; + + pub mod kms_ecdh_static_configurations; + + pub mod kms_private_key_to_static_public_key_input; + + pub mod kms_public_key_discovery_input; + + pub mod materials; + + pub mod multi_threaded_cache; + + pub mod no_cache; + + pub mod none; + + pub mod on_decrypt; + + pub mod on_decrypt_input; + + pub mod on_decrypt_output; + + pub mod on_encrypt; + + pub mod on_encrypt_input; + + pub mod on_encrypt_output; + + pub mod padding_scheme; + + pub mod public_key_discovery_input; + + pub mod put_cache_entry; + + pub mod put_cache_entry_input; + + pub mod raw_ecdh_static_configurations; + + pub mod raw_private_key_to_static_public_key_input; + + pub mod signature_algorithm; + + pub mod single_threaded_cache; + + pub mod static_configurations; + + pub mod storm_tracking_cache; + + pub mod symmetric_signature_algorithm; + + pub mod time_units; + + pub mod update_usage_metadata; + + pub mod update_usage_metadata_input; + + pub mod valid_algorithm_suite_info; + + pub mod valid_decryption_materials_transition; + + pub mod valid_decryption_materials_transition_input; + + pub mod valid_encryption_materials_transition; + + pub mod valid_encryption_materials_transition_input; + + pub mod validate_commitment_policy_on_decrypt; + + pub mod validate_commitment_policy_on_decrypt_input; + + pub mod validate_commitment_policy_on_encrypt; + + pub mod validate_commitment_policy_on_encrypt_input; + +pub mod material_providers_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs new file mode 100644 index 000000000..5ad0ac1c4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes128GcmIv12Tag16 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16 {}, +crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes192GcmIv12Tag16 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES192_GCM_IV12_TAG16 {}, +crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes256GcmIv12Tag16 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES256_GCM_IV12_TAG16 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg, +) -> crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16 {} => crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes128GcmIv12Tag16, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES192_GCM_IV12_TAG16 {} => crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes192GcmIv12Tag16, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AesWrappingAlg::ALG_AES256_GCM_IV12_TAG16 {} => crate::deps::aws_cryptography_materialProviders::types::AesWrappingAlg::AlgAes256GcmIv12Tag16, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs new file mode 100644 index 000000000..3e2ba7c29 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId::ESDK { + ESDK: crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::to_dafny(x.clone()), + }, +crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId::DBE { + DBE: crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::to_dafny(x.clone()), + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId::ESDK { + ESDK: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk(crate::deps::aws_cryptography_materialProviders::conversions::esdk_algorithm_suite_id::from_dafny(x)), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId::DBE { + DBE: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe(crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(x)), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs new file mode 100644 index 000000000..ab8fd12b3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs @@ -0,0 +1,100 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.id.clone().unwrap()) +, + binaryId: crate::standard_library_conversions::blob_to_dafny(&value.binary_id.unwrap()), + messageVersion: value.message_version.clone().unwrap(), + encrypt: crate::deps::aws_cryptography_materialProviders::conversions::encrypt::to_dafny(&value.encrypt.clone().unwrap()) +, + kdf: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.kdf.clone().unwrap()) +, + commitment: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.commitment.clone().unwrap()) +, + signature: crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::to_dafny(&value.signature.clone().unwrap()) +, + symmetricSignature: crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::to_dafny(&value.symmetric_signature.clone().unwrap()) +, + edkWrapping: crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::to_dafny(&value.edk_wrapping.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, +) -> crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo::AlgorithmSuiteInfo {..} => + crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo::builder() + .set_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.id().clone()) + )) + .set_binary_id(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.binaryId().clone()))) + .set_message_version(Some( dafny_value.messageVersion() .clone() )) + .set_encrypt(Some( crate::deps::aws_cryptography_materialProviders::conversions::encrypt::from_dafny(dafny_value.encrypt().clone()) + )) + .set_kdf(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.kdf().clone()) + )) + .set_commitment(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.commitment().clone()) + )) + .set_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::from_dafny(dafny_value.signature().clone()) + )) + .set_symmetric_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::from_dafny(dafny_value.symmetricSignature().clone()) + )) + .set_edk_wrapping(Some( crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::from_dafny(dafny_value.edkWrapping().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs new file mode 100644 index 000000000..eb2923e81 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs @@ -0,0 +1,97 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier, +> { + let wrap = BranchKeyIdSupplierWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct BranchKeyIdSupplierWrapper { + obj: crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef, +} + +impl ::dafny_runtime::UpcastObject for BranchKeyIdSupplierWrapper { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef { + let wrap = IBranchKeyIdSupplierDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct IBranchKeyIdSupplierDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier, + >, +} + +impl crate::software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier + for BranchKeyIdSupplierWrapper +{ + fn r#_GetBranchKeyId_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_branch_key_id::_get_branch_key_id_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().get_branch_key_id(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::get_branch_key_id::_get_branch_key_id_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplier for IBranchKeyIdSupplierDafnyWrapper +{ + fn get_branch_key_id( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_branch_key_id::_get_branch_key_id_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).GetBranchKeyId(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::get_branch_key_id::_get_branch_key_id_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs new file mode 100644 index 000000000..246b26a5a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CacheType, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::CacheType::Default(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::Default { + Default: crate::deps::aws_cryptography_materialProviders::conversions::default_cache::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::CacheType::No(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::No { + No: crate::deps::aws_cryptography_materialProviders::conversions::no_cache::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::SingleThreaded { + SingleThreaded: crate::deps::aws_cryptography_materialProviders::conversions::single_threaded_cache::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::MultiThreaded { + MultiThreaded: crate::deps::aws_cryptography_materialProviders::conversions::multi_threaded_cache::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::StormTracking { + StormTracking: crate::deps::aws_cryptography_materialProviders::conversions::storm_tracking_cache::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::Shared { + Shared: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_cache::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CacheType { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::Default { + Default: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::Default(crate::deps::aws_cryptography_materialProviders::conversions::default_cache::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::No { + No: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::No(crate::deps::aws_cryptography_materialProviders::conversions::no_cache::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::SingleThreaded { + SingleThreaded: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded(crate::deps::aws_cryptography_materialProviders::conversions::single_threaded_cache::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::MultiThreaded { + MultiThreaded: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded(crate::deps::aws_cryptography_materialProviders::conversions::multi_threaded_cache::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::StormTracking { + StormTracking: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking(crate::deps::aws_cryptography_materialProviders::conversions::storm_tracking_cache::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CacheType::Shared { + Shared: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_cache::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs new file mode 100644 index 000000000..83406d8aa --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs @@ -0,0 +1,24 @@ +// 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. +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::client::Client, +) -> + ::dafny_runtime::Object +{ + value.dafny_client.clone() +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IAwsCryptographicMaterialProvidersClient + >, +) -> crate::deps::aws_cryptography_materialProviders::client::Client { + crate::deps::aws_cryptography_materialProviders::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs new file mode 100644 index 000000000..d3d6c9674 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs @@ -0,0 +1,99 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier, +> { + let wrap = ClientSupplierWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct ClientSupplierWrapper { + obj: crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, +} + +impl ::dafny_runtime::UpcastObject for ClientSupplierWrapper { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef { + let wrap = IClientSupplierDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct IClientSupplierDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier, + >, +} + +impl crate::software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier + for ClientSupplierWrapper +{ + fn r#_GetClient_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::dafny_runtime::Object, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_client::_get_client_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().get_client(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&x.clone()) +, + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplier for IClientSupplierDafnyWrapper +{ + fn get_client( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput, +) -> Result< + crate::deps::com_amazonaws_kms::client::Client, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_client::_get_client_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).GetClient(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::com_amazonaws_kms::conversions::client::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs new file mode 100644 index 000000000..4d7f5a1c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy::ESDK { + ESDK: crate::deps::aws_cryptography_materialProviders::conversions::esdk_commitment_policy::to_dafny(x.clone()), + }, +crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy::DBE { + DBE: crate::deps::aws_cryptography_materialProviders::conversions::dbe_commitment_policy::to_dafny(x.clone()), + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy::ESDK { + ESDK: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk(crate::deps::aws_cryptography_materialProviders::conversions::esdk_commitment_policy::from_dafny(x)), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CommitmentPolicy::DBE { + DBE: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe(crate::deps::aws_cryptography_materialProviders::conversions::dbe_commitment_policy::from_dafny(x)), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring.rs new file mode 100644 index 000000000..19f1a9d79 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_discovery_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs new file mode 100644 index 000000000..e2532d787 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs @@ -0,0 +1,56 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput { + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput::builder() + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring_input.rs new file mode 100644 index 000000000..7605ceda6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput { + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput::builder() + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring.rs new file mode 100644 index 000000000..42ff6cb31 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_discovery_multi_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..deba1957e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs @@ -0,0 +1,71 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput { + regions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.regions.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput::builder() + .set_regions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.regions(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..d8a2b2b79 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring_input.rs @@ -0,0 +1,117 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput { + regions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.regions.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput::builder() + .set_regions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.regions(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring.rs new file mode 100644 index 000000000..70809c81b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_ecdh_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs new file mode 100644 index 000000000..a8f710140 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs @@ -0,0 +1,51 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput { + KeyAgreementScheme: crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::to_dafny(&value.key_agreement_scheme.clone().unwrap()) +, + curveSpec: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.curve_spec.clone().unwrap()), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput::builder() + .set_key_agreement_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::from_dafny(dafny_value.KeyAgreementScheme().clone()) + )) + .set_curve_spec(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.curveSpec()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring_input.rs new file mode 100644 index 000000000..b46d8f6d1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring_input.rs @@ -0,0 +1,97 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput { + KeyAgreementScheme: crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::to_dafny(&value.key_agreement_scheme.clone().unwrap()) +, + curveSpec: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.curve_spec.clone().unwrap()), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput::builder() + .set_key_agreement_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::from_dafny(dafny_value.KeyAgreementScheme().clone()) + )) + .set_curve_spec(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.curveSpec()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring.rs new file mode 100644 index 000000000..5bcc049e4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_hierarchical_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs new file mode 100644 index 000000000..a1917746a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput { + branchKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_id), + branchKeyIdSupplier: ::std::rc::Rc::new(match &value.branch_key_id_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyStore: crate::deps::aws_cryptography_keyStore::conversions::client::to_dafny(&value.key_store.clone().unwrap()) +, + ttlSeconds: value.ttl_seconds.clone().unwrap(), + cache: ::std::rc::Rc::new(match &value.cache { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cache_type::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + partitionId: crate::standard_library_conversions::ostring_to_dafny(&value.partition_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput::builder() + .set_branch_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyId().clone())) + .set_branch_key_id_supplier(match (*dafny_value.branchKeyIdSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_key_store(Some( crate::deps::aws_cryptography_keyStore::conversions::client::from_dafny(dafny_value.keyStore().clone()) + )) + .set_ttl_seconds(Some( dafny_value.ttlSeconds() .clone() )) + .set_cache(match (*dafny_value.cache()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cache_type::from_dafny(value.clone())), + _ => None, +} +) + .set_partition_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.partitionId().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring_input.rs new file mode 100644 index 000000000..ea4f2066f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring_input.rs @@ -0,0 +1,100 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput { + branchKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_id), + branchKeyIdSupplier: ::std::rc::Rc::new(match &value.branch_key_id_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyStore: crate::deps::aws_cryptography_keyStore::conversions::client::to_dafny(&value.key_store.clone().unwrap()) +, + ttlSeconds: value.ttl_seconds.clone().unwrap(), + cache: ::std::rc::Rc::new(match &value.cache { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cache_type::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + partitionId: crate::standard_library_conversions::ostring_to_dafny(&value.partition_id), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput::builder() + .set_branch_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyId().clone())) + .set_branch_key_id_supplier(match (*dafny_value.branchKeyIdSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_key_store(Some( crate::deps::aws_cryptography_keyStore::conversions::client::from_dafny(dafny_value.keyStore().clone()) + )) + .set_ttl_seconds(Some( dafny_value.ttlSeconds() .clone() )) + .set_cache(match (*dafny_value.cache()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cache_type::from_dafny(value.clone())), + _ => None, +} +) + .set_partition_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.partitionId().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs new file mode 100644 index 000000000..0af0a7b57 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs new file mode 100644 index 000000000..09b7b7143 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput { + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput::builder() + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring_input.rs new file mode 100644 index 000000000..3a6fbe990 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring_input.rs @@ -0,0 +1,93 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput { + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput::builder() + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring.rs new file mode 100644 index 000000000..220a689e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_mrk_discovery_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs new file mode 100644 index 000000000..b4fd1068d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs @@ -0,0 +1,58 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput { + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + region: crate::standard_library_conversions::ostring_to_dafny(&value.region) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput::builder() + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.region()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring_input.rs new file mode 100644 index 000000000..e9a44afca --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring_input.rs @@ -0,0 +1,104 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput { + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + region: crate::standard_library_conversions::ostring_to_dafny(&value.region) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput::builder() + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.region()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring.rs new file mode 100644 index 000000000..4d76fedf6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_mrk_discovery_multi_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..ed56fed9a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs @@ -0,0 +1,71 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + regions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.regions.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput::builder() + .set_regions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.regions(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..0014b4978 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring_input.rs @@ -0,0 +1,117 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + regions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.regions.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + discoveryFilter: ::std::rc::Rc::new(match &value.discovery_filter { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput::builder() + .set_regions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.regions(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_discovery_filter(match (*dafny_value.discoveryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::discovery_filter::from_dafny(value.clone())), + _ => None, +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring.rs new file mode 100644 index 000000000..70ab68e36 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_mrk_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs new file mode 100644 index 000000000..f0449ee1f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput { + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput::builder() + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring_input.rs new file mode 100644 index 000000000..0a285c5e5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring_input.rs @@ -0,0 +1,93 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput { + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + kmsClient: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&value.kms_client.clone().unwrap()) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput::builder() + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_kms_client(Some( crate::deps::com_amazonaws_kms::conversions::client::from_dafny(dafny_value.kmsClient().clone()) + )) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring.rs new file mode 100644 index 000000000..e17a31692 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_mrk_multi_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs new file mode 100644 index 000000000..352590699 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs @@ -0,0 +1,73 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput { + generator: crate::standard_library_conversions::ostring_to_dafny(&value.generator), + kmsKeyIds: ::std::rc::Rc::new(match &value.kms_key_ids { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput::builder() + .set_generator(crate::standard_library_conversions::ostring_from_dafny(dafny_value.generator().clone())) + .set_kms_key_ids(match (*dafny_value.kmsKeyIds()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring_input.rs new file mode 100644 index 000000000..254c6a16f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring_input.rs @@ -0,0 +1,119 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput { + generator: crate::standard_library_conversions::ostring_to_dafny(&value.generator), + kmsKeyIds: ::std::rc::Rc::new(match &value.kms_key_ids { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput::builder() + .set_generator(crate::standard_library_conversions::ostring_from_dafny(dafny_value.generator().clone())) + .set_kms_key_ids(match (*dafny_value.kmsKeyIds()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring.rs new file mode 100644 index 000000000..48bb6fb46 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_multi_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs new file mode 100644 index 000000000..0ef98d0e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs @@ -0,0 +1,73 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput { + generator: crate::standard_library_conversions::ostring_to_dafny(&value.generator), + kmsKeyIds: ::std::rc::Rc::new(match &value.kms_key_ids { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput::builder() + .set_generator(crate::standard_library_conversions::ostring_from_dafny(dafny_value.generator().clone())) + .set_kms_key_ids(match (*dafny_value.kmsKeyIds()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring_input.rs new file mode 100644 index 000000000..2de505318 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring_input.rs @@ -0,0 +1,119 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput { + generator: crate::standard_library_conversions::ostring_to_dafny(&value.generator), + kmsKeyIds: ::std::rc::Rc::new(match &value.kms_key_ids { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + clientSupplier: ::std::rc::Rc::new(match &value.client_supplier { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput::builder() + .set_generator(crate::standard_library_conversions::ostring_from_dafny(dafny_value.generator().clone())) + .set_kms_key_ids(match (*dafny_value.kmsKeyIds()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_client_supplier(match (*dafny_value.clientSupplier()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring.rs new file mode 100644 index 000000000..3ceb3074e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_aws_kms_rsa_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs new file mode 100644 index 000000000..cde046b8c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs @@ -0,0 +1,58 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput { + publicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + encryptionAlgorithm: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(value.encryption_algorithm.clone().unwrap()), + kmsClient: ::std::rc::Rc::new(match &value.kms_client { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput::builder() + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.publicKey().clone())) + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_encryption_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(dafny_value.encryptionAlgorithm()) )) + .set_kms_client(match (*dafny_value.kmsClient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::client::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring_input.rs new file mode 100644 index 000000000..f46ccdca7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring_input.rs @@ -0,0 +1,104 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput { + publicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + kmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_key_id) .Extract(), + encryptionAlgorithm: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(value.encryption_algorithm.clone().unwrap()), + kmsClient: ::std::rc::Rc::new(match &value.kms_client { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::client::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + grantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput::builder() + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.publicKey().clone())) + .set_kms_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.kmsKeyId()) )) + .set_encryption_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(dafny_value.encryptionAlgorithm()) )) + .set_kms_client(match (*dafny_value.kmsClient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::client::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.grantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..507ff105e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs @@ -0,0 +1,5 @@ +// 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 mod _create_cryptographic_materials_cache_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs new file mode 100644 index 000000000..d5a1202cf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput { + cache: crate::deps::aws_cryptography_materialProviders::conversions::cache_type::to_dafny(&value.cache.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput { + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput::builder() + .set_cache(Some( crate::deps::aws_cryptography_materialProviders::conversions::cache_type::from_dafny(dafny_value.cache().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache_input.rs new file mode 100644 index 000000000..8b15d6fa0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput { + cache: crate::deps::aws_cryptography_materialProviders::conversions::cache_type::to_dafny(&value.cache.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput::builder() + .set_cache(Some( crate::deps::aws_cryptography_materialProviders::conversions::cache_type::from_dafny(dafny_value.cache().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs new file mode 100644 index 000000000..96c239d0d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs @@ -0,0 +1,5 @@ +// 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 mod _create_default_client_supplier_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier/_create_default_client_supplier_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier/_create_default_client_supplier_input.rs new file mode 100644 index 000000000..5bf9266f1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier/_create_default_client_supplier_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput { + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput::builder() + + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier_input.rs new file mode 100644 index 000000000..b0dd1065a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager.rs new file mode 100644 index 000000000..d0b952b64 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager.rs @@ -0,0 +1,5 @@ +// 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 mod _create_default_cryptographic_materials_manager_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs new file mode 100644 index 000000000..c0aba493b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { + keyring: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&value.keyring.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput { + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput::builder() + .set_keyring(Some( crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(dafny_value.keyring().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager_input.rs new file mode 100644 index 000000000..f866922e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { + keyring: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&value.keyring.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput::builder() + .set_keyring(Some( crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(dafny_value.keyring().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs new file mode 100644 index 000000000..88ed88005 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_multi_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring/_create_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring/_create_multi_keyring_input.rs new file mode 100644 index 000000000..218a5d866 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring/_create_multi_keyring_input.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput::CreateMultiKeyringInput { + generator: ::std::rc::Rc::new(match &value.generator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + childKeyrings: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.child_keyrings.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&e.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput::builder() + .set_generator(match (*dafny_value.generator()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_child_keyrings(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.childKeyrings(), + |e: &::dafny_runtime::Object| crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs new file mode 100644 index 000000000..aaea76c8d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs @@ -0,0 +1,89 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput::CreateMultiKeyringInput { + generator: ::std::rc::Rc::new(match &value.generator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + childKeyrings: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.child_keyrings.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&e.clone()) +, +) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput::CreateMultiKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput::builder() + .set_generator(match (*dafny_value.generator()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_child_keyrings(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.childKeyrings(), + |e: &::dafny_runtime::Object| crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs new file mode 100644 index 000000000..c91560014 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_raw_aes_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs new file mode 100644 index 000000000..eb07fd7f7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput::CreateRawAesKeyringInput { + keyNamespace: crate::standard_library_conversions::ostring_to_dafny(&value.key_namespace) .Extract(), + keyName: crate::standard_library_conversions::ostring_to_dafny(&value.key_name) .Extract(), + wrappingKey: crate::standard_library_conversions::blob_to_dafny(&value.wrapping_key.unwrap()), + wrappingAlg: crate::deps::aws_cryptography_materialProviders::conversions::aes_wrapping_alg::to_dafny(value.wrapping_alg.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput::builder() + .set_key_namespace(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyNamespace()) )) + .set_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyName()) )) + .set_wrapping_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.wrappingKey().clone()))) + .set_wrapping_alg(Some( crate::deps::aws_cryptography_materialProviders::conversions::aes_wrapping_alg::from_dafny(dafny_value.wrappingAlg()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring_input.rs new file mode 100644 index 000000000..0a116c6c1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput::CreateRawAesKeyringInput { + keyNamespace: crate::standard_library_conversions::ostring_to_dafny(&value.key_namespace) .Extract(), + keyName: crate::standard_library_conversions::ostring_to_dafny(&value.key_name) .Extract(), + wrappingKey: crate::standard_library_conversions::blob_to_dafny(&value.wrapping_key.unwrap()), + wrappingAlg: crate::deps::aws_cryptography_materialProviders::conversions::aes_wrapping_alg::to_dafny(value.wrapping_alg.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput::CreateRawAesKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput::builder() + .set_key_namespace(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyNamespace()) )) + .set_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyName()) )) + .set_wrapping_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.wrappingKey().clone()))) + .set_wrapping_alg(Some( crate::deps::aws_cryptography_materialProviders::conversions::aes_wrapping_alg::from_dafny(dafny_value.wrappingAlg()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..dc06a49b0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_raw_ecdh_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs new file mode 100644 index 000000000..9b179528d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput { + KeyAgreementScheme: crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::to_dafny(&value.key_agreement_scheme.clone().unwrap()) +, + curveSpec: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.curve_spec.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput::builder() + .set_key_agreement_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::from_dafny(dafny_value.KeyAgreementScheme().clone()) + )) + .set_curve_spec(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.curveSpec()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring_input.rs new file mode 100644 index 000000000..09d2f7f0d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput { + KeyAgreementScheme: crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::to_dafny(&value.key_agreement_scheme.clone().unwrap()) +, + curveSpec: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.curve_spec.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput::builder() + .set_key_agreement_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::from_dafny(dafny_value.KeyAgreementScheme().clone()) + )) + .set_curve_spec(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.curveSpec()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..345616d80 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs @@ -0,0 +1,5 @@ +// 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 mod _create_raw_rsa_keyring_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs new file mode 100644 index 000000000..260a5983c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput::CreateRawRsaKeyringInput { + keyNamespace: crate::standard_library_conversions::ostring_to_dafny(&value.key_namespace) .Extract(), + keyName: crate::standard_library_conversions::ostring_to_dafny(&value.key_name) .Extract(), + paddingScheme: crate::deps::aws_cryptography_materialProviders::conversions::padding_scheme::to_dafny(value.padding_scheme.clone().unwrap()), + publicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + privateKey: crate::standard_library_conversions::oblob_to_dafny(&value.private_key), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput::builder() + .set_key_namespace(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyNamespace()) )) + .set_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyName()) )) + .set_padding_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::padding_scheme::from_dafny(dafny_value.paddingScheme()) )) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.publicKey().clone())) + .set_private_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.privateKey().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring_input.rs new file mode 100644 index 000000000..1f5d8e495 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring_input.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput::CreateRawRsaKeyringInput { + keyNamespace: crate::standard_library_conversions::ostring_to_dafny(&value.key_namespace) .Extract(), + keyName: crate::standard_library_conversions::ostring_to_dafny(&value.key_name) .Extract(), + paddingScheme: crate::deps::aws_cryptography_materialProviders::conversions::padding_scheme::to_dafny(value.padding_scheme.clone().unwrap()), + publicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + privateKey: crate::standard_library_conversions::oblob_to_dafny(&value.private_key), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput::CreateRawRsaKeyringInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput::builder() + .set_key_namespace(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyNamespace()) )) + .set_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyName()) )) + .set_padding_scheme(Some( crate::deps::aws_cryptography_materialProviders::conversions::padding_scheme::from_dafny(dafny_value.paddingScheme()) )) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.publicKey().clone())) + .set_private_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.privateKey().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm.rs new file mode 100644 index 000000000..785b75474 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm.rs @@ -0,0 +1,5 @@ +// 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 mod _create_required_encryption_context_cmm_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs new file mode 100644 index 000000000..0823ae24c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs @@ -0,0 +1,52 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput { + underlyingCMM: ::std::rc::Rc::new(match &value.underlying_cmm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput { + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput::builder() + .set_underlying_cmm(match (*dafny_value.underlyingCMM()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm_input.rs new file mode 100644 index 000000000..9a87bb8ee --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm_input.rs @@ -0,0 +1,98 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput { + underlyingCMM: ::std::rc::Rc::new(match &value.underlying_cmm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + keyring: ::std::rc::Rc::new(match &value.keyring { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::keyring::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput, +) -> crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput {..} => + crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput::builder() + .set_underlying_cmm(match (*dafny_value.underlyingCMM()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(value.clone())), + _ => None, +} +) + .set_keyring(match (*dafny_value.keyring()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(value.clone())), + _ => None, +} +) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs new file mode 100644 index 000000000..c91eba6d2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs @@ -0,0 +1,235 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache, +> { + let wrap = CryptographicMaterialsCacheWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct CryptographicMaterialsCacheWrapper { + obj: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, +} + +impl ::dafny_runtime::UpcastObject for CryptographicMaterialsCacheWrapper { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + let wrap = ICryptographicMaterialsCacheDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ICryptographicMaterialsCacheDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache, + >, +} + +impl crate::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache + for CryptographicMaterialsCacheWrapper +{ + fn r#_PutCacheEntry_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + (), + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::put_cache_entry::_put_cache_entry_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().put_cache_entry(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: (), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} + +fn r#_UpdateUsageMetadata_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + (), + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::update_usage_metadata::_update_usage_metadata_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().update_usage_metadata(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: (), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} + +fn r#_GetCacheEntry_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_cache_entry::_get_cache_entry_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().get_cache_entry(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::get_cache_entry::_get_cache_entry_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} + +fn r#_DeleteCacheEntry_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + (), + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::delete_cache_entry::_delete_cache_entry_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().delete_cache_entry(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: (), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCache for ICryptographicMaterialsCacheDafnyWrapper +{ + fn put_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput, +) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::put_cache_entry::_put_cache_entry_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).PutCacheEntry(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} + +fn update_usage_metadata( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput, +) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::update_usage_metadata::_update_usage_metadata_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).UpdateUsageMetadata(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} + +fn get_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_cache_entry::_get_cache_entry_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).GetCacheEntry(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::get_cache_entry::_get_cache_entry_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} + +fn delete_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput, +) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::delete_cache_entry::_delete_cache_entry_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).DeleteCacheEntry(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs new file mode 100644 index 000000000..91746b2d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs @@ -0,0 +1,143 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager, +> { + let wrap = CryptographicMaterialsManagerWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct CryptographicMaterialsManagerWrapper { + obj: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, +} + +impl ::dafny_runtime::UpcastObject for CryptographicMaterialsManagerWrapper { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef { + let wrap = ICryptographicMaterialsManagerDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ICryptographicMaterialsManagerDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager, + >, +} + +impl crate::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager + for CryptographicMaterialsManagerWrapper +{ + fn r#_GetEncryptionMaterials_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_encryption_materials::_get_encryption_materials_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().get_encryption_materials(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::get_encryption_materials::_get_encryption_materials_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} + +fn r#_DecryptMaterials_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::decrypt_materials::_decrypt_materials_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().decrypt_materials(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::decrypt_materials::_decrypt_materials_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManager for ICryptographicMaterialsManagerDafnyWrapper +{ + fn get_encryption_materials( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::get_encryption_materials::_get_encryption_materials_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).GetEncryptionMaterials(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::get_encryption_materials::_get_encryption_materials_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} + +fn decrypt_materials( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::decrypt_materials::_decrypt_materials_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).DecryptMaterials(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::decrypt_materials::_decrypt_materials_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs new file mode 100644 index 000000000..2669e43b5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {}, +crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId, +) -> crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {} => crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {} => crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs new file mode 100644 index 000000000..68c428e2f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs @@ -0,0 +1,21 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy::RequireEncryptRequireDecrypt => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBECommitmentPolicy, +) -> crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {} => crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy::RequireEncryptRequireDecrypt, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs new file mode 100644 index 000000000..822e6d67c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs @@ -0,0 +1,7 @@ +// 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 mod _decrypt_materials_input; + + pub mod _decrypt_materials_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_input.rs new file mode 100644 index 000000000..f147397cd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput::DecryptMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + reproducedEncryptionContext: +::std::rc::Rc::new(match &value.reproduced_encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput { + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_reproduced_encryption_context(match (*dafny_value.reproducedEncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_output.rs new file mode 100644 index 000000000..043584068 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput::DecryptMaterialsOutput { + decryptionMaterials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.decryption_materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput { + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput::builder() + .set_decryption_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.decryptionMaterials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs new file mode 100644 index 000000000..36ef6a366 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs @@ -0,0 +1,118 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput::DecryptMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + reproducedEncryptionContext: +::std::rc::Rc::new(match &value.reproduced_encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsInput::DecryptMaterialsInput {..} => + crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_reproduced_encryption_context(match (*dafny_value.reproducedEncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs new file mode 100644 index 000000000..0cc07714f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput::DecryptMaterialsOutput { + decryptionMaterials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.decryption_materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptMaterialsOutput::DecryptMaterialsOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput::builder() + .set_decryption_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.decryptionMaterials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs new file mode 100644 index 000000000..9b0347ff3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs @@ -0,0 +1,96 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials::DecryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + verificationKey: crate::standard_library_conversions::oblob_to_dafny(&value.verification_key), + symmetricSigningKey: crate::standard_library_conversions::oblob_to_dafny(&value.symmetric_signing_key), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, +) -> crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials::DecryptionMaterials {..} => + crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_verification_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.verificationKey().clone())) + .set_symmetric_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.symmetricSigningKey().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key.rs new file mode 100644 index 000000000..55f72bbd5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key.rs @@ -0,0 +1,5 @@ +// 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 mod _decryption_materials_with_plaintext_data_key_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key/_decryption_materials_with_plaintext_data_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key/_decryption_materials_with_plaintext_data_key_input.rs new file mode 100644 index 000000000..6c8b3d75e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key/_decryption_materials_with_plaintext_data_key_input.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials::DecryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + verificationKey: crate::standard_library_conversions::oblob_to_dafny(&value.verification_key), + symmetricSigningKey: crate::standard_library_conversions::oblob_to_dafny(&value.symmetric_signing_key), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials { + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_verification_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.verificationKey().clone())) + .set_symmetric_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.symmetricSigningKey().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs new file mode 100644 index 000000000..8f2423b68 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DefaultCache, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DefaultCache, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache::DefaultCache { + entryCapacity: value.entry_capacity.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DefaultCache { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache, +) -> crate::deps::aws_cryptography_materialProviders::types::DefaultCache { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DefaultCache::DefaultCache {..} => + crate::deps::aws_cryptography_materialProviders::types::DefaultCache::builder() + .set_entry_capacity(Some( dafny_value.entryCapacity() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs new file mode 100644 index 000000000..a83b92feb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs @@ -0,0 +1,5 @@ +// 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 mod _delete_cache_entry_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry/_delete_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry/_delete_cache_entry_input.rs new file mode 100644 index 000000000..b195cd07d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry/_delete_cache_entry_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput::DeleteCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput { + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs new file mode 100644 index 000000000..d44427c55 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput::DeleteCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput, +) -> crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DeleteCacheEntryInput::DeleteCacheEntryInput {..} => + crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs new file mode 100644 index 000000000..6a1f37a29 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF { + HKDF: crate::deps::aws_cryptography_materialProviders::conversions::hkdf::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY { + IDENTITY: crate::deps::aws_cryptography_materialProviders::conversions::identity::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None { + _None: crate::deps::aws_cryptography_materialProviders::conversions::none::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF { + HKDF: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(crate::deps::aws_cryptography_materialProviders::conversions::hkdf::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY { + IDENTITY: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(crate::deps::aws_cryptography_materialProviders::conversions::identity::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None { + _None: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(crate::deps::aws_cryptography_materialProviders::conversions::none::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs new file mode 100644 index 000000000..0136f112b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING, +) -> crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {..} => + crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs new file mode 100644 index 000000000..20d2120d1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter::DiscoveryFilter { + accountIds: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.account_ids.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + partition: crate::standard_library_conversions::ostring_to_dafny(&value.partition) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter, +) -> crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DiscoveryFilter::DiscoveryFilter {..} => + crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter::builder() + .set_account_ids(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.accountIds(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .set_partition(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.partition()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs new file mode 100644 index 000000000..5350cfe1f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::Ecdsa, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::Ecdsa, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.curve.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::Ecdsa { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA, +) -> crate::deps::aws_cryptography_materialProviders::types::Ecdsa { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA {..} => + crate::deps::aws_cryptography_materialProviders::types::Ecdsa::builder() + .set_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.curve()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs new file mode 100644 index 000000000..2bacfa0d8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: crate::deps::aws_cryptography_materialProviders::conversions::direct_key_wrapping::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping { + IntermediateKeyWrapping: crate::deps::aws_cryptography_materialProviders::conversions::intermediate_key_wrapping::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping(crate::deps::aws_cryptography_materialProviders::conversions::direct_key_wrapping::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping { + IntermediateKeyWrapping: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping(crate::deps::aws_cryptography_materialProviders::conversions::intermediate_key_wrapping::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs new file mode 100644 index 000000000..d16d98d41 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::Encrypt, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt::AES_GCM { + AES_GCM: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::Encrypt { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt::AES_GCM { + AES_GCM: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs new file mode 100644 index 000000000..4ed9523c2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey::EncryptedDataKey { + keyProviderId: std::rc::Rc::new(match value.key_provider_id { + Some(s) => crate::_Wrappers_Compile::Option::Some { value: dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&s.as_bytes().to_vec(), |b| *b) }, + None => crate::_Wrappers_Compile::Option::None {}, +}).Extract(), + keyProviderInfo: crate::standard_library_conversions::blob_to_dafny(&value.key_provider_info.unwrap()), + ciphertext: crate::standard_library_conversions::blob_to_dafny(&value.ciphertext.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey, +) -> crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey::EncryptedDataKey {..} => + crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey::builder() + .set_key_provider_id(Some(::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(dafny_value.keyProviderId()), |b| *b)).unwrap())) + .set_key_provider_info(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.keyProviderInfo().clone()))) + .set_ciphertext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ciphertext().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs new file mode 100644 index 000000000..678b1fe51 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs @@ -0,0 +1,123 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials::EncryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + signingKey: crate::standard_library_conversions::oblob_to_dafny(&value.signing_key), + symmetricSigningKeys: ::std::rc::Rc::new(match &value.symmetric_signing_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::standard_library_conversions::blob_to_dafny(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, +) -> crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials::EncryptionMaterials {..} => + crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.signingKey().clone())) + .set_symmetric_signing_keys(match (*dafny_value.symmetricSigningKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| crate::standard_library_conversions::blob_from_dafny(e.clone()), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key.rs new file mode 100644 index 000000000..1acd68adf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key.rs @@ -0,0 +1,5 @@ +// 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 mod _encryption_materials_has_plaintext_data_key_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key/_encryption_materials_has_plaintext_data_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key/_encryption_materials_has_plaintext_data_key_input.rs new file mode 100644 index 000000000..402b9c03b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key/_encryption_materials_has_plaintext_data_key_input.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials::EncryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + signingKey: crate::standard_library_conversions::oblob_to_dafny(&value.signing_key), + symmetricSigningKeys: ::std::rc::Rc::new(match &value.symmetric_signing_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::standard_library_conversions::blob_to_dafny(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials { + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.signingKey().clone())) + .set_symmetric_signing_keys(match (*dafny_value.symmetricSigningKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| crate::standard_library_conversions::blob_from_dafny(e.clone()), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ephemeral_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ephemeral_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..ef7dfba6e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/ephemeral_private_key_to_static_public_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput { + recipientPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.recipient_public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput, +) -> crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput {..} => + crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput::builder() + .set_recipient_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.recipientPublicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs new file mode 100644 index 000000000..79b6e0be2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs @@ -0,0 +1,237 @@ +// 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. +/// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicMaterialProvidersException { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographicMaterialProvidersException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryAlreadyExists { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::EntryAlreadyExists { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryDoesNotExist { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::EntryDoesNotExist { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InFlightTtlExceeded { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InFlightTTLExceeded { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfo { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfo { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfoOnDecrypt { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfoOnDecrypt { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfoOnEncrypt { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfoOnEncrypt { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidDecryptionMaterials { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidDecryptionMaterials { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidDecryptionMaterialsTransition { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidDecryptionMaterialsTransition { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidEncryptionMaterials { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidEncryptionMaterials { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidEncryptionMaterialsTransition { message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidEncryptionMaterialsTransition { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicPrimitivesError { error } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: crate::deps::aws_cryptography_primitives::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::DynamoDB_20120810Error { error } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: crate::deps::com_amazonaws_dynamodb::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::TrentServiceError { error } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::ComAmazonawsKms { + ComAmazonawsKms: crate::deps::com_amazonaws_kms::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_materialProviders::types::error::Error::KeyStoreError { error } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographyKeyStore { + AwsCryptographyKeyStore: crate::deps::aws_cryptography_keyStore::conversions::error::to_dafny(error), + }, + crate::deps::aws_cryptography_materialProviders::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&list, |e| to_dafny(e.clone())) + }, + crate::deps::aws_cryptography_materialProviders::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::Opaque { + obj: { + let rc = ::std::rc::Rc::new(inner) as ::std::rc::Rc; + // safety: `rc` is new, ensuring it has refcount 1 and is uniquely owned. + // we should use `dafny_runtime_conversions::rc_struct_to_dafny_class` once it + // accepts unsized types (https://github.com/dafny-lang/dafny/pull/5769) + unsafe { ::dafny_runtime::Object::from_rc(rc) } + }, + }, + crate::deps::aws_cryptography_materialProviders::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographicMaterialProvidersException { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicMaterialProvidersException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::EntryAlreadyExists { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryAlreadyExists { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::EntryDoesNotExist { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::EntryDoesNotExist { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InFlightTTLExceeded { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InFlightTtlExceeded { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfo { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfo { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfoOnDecrypt { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfoOnDecrypt { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidAlgorithmSuiteInfoOnEncrypt { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidAlgorithmSuiteInfoOnEncrypt { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidDecryptionMaterials { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidDecryptionMaterials { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidDecryptionMaterialsTransition { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidDecryptionMaterialsTransition { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidEncryptionMaterials { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidEncryptionMaterials { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::InvalidEncryptionMaterialsTransition { message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::InvalidEncryptionMaterialsTransition { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographyPrimitives { AwsCryptographyPrimitives } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(AwsCryptographyPrimitives.clone()), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::ComAmazonawsDynamodb { ComAmazonawsDynamodb } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::conversions::error::from_dafny(ComAmazonawsDynamodb.clone()), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::ComAmazonawsKms { ComAmazonawsKms } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::TrentServiceError { + error: crate::deps::com_amazonaws_kms::conversions::error::from_dafny(ComAmazonawsKms.clone()), + }, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographyKeyStore { AwsCryptographyKeyStore } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::KeyStoreError { + error: crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny(AwsCryptographyKeyStore.clone()), + }, + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&list, |e| from_dafny(e.clone())) + }, + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_materialProviders::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_materialProviders::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_materialProviders::types::error::ValidationError); + crate::deps::aws_cryptography_materialProviders::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_materialProviders::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_materialProviders::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_materialProviders::types::error::ValidationError); + crate::deps::aws_cryptography_materialProviders::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + } + } + }, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs new file mode 100644 index 000000000..7829f31b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16NoKdf => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16NoKdf => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16NoKdf => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha256 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha256 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256EcdsaP256 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha384EcdsaP384 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId, +) -> crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16NoKdf, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16NoKdf, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16NoKdf, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha256, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha256, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256EcdsaP256, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha384EcdsaP384, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {} => crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs new file mode 100644 index 000000000..d1b51e99f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::ForbidEncryptAllowDecrypt => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::RequireEncryptAllowDecrypt => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::REQUIRE_ENCRYPT_ALLOW_DECRYPT {}, +crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::RequireEncryptRequireDecrypt => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy, +) -> crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT {} => crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::ForbidEncryptAllowDecrypt, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::REQUIRE_ENCRYPT_ALLOW_DECRYPT {} => crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::RequireEncryptAllowDecrypt, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {} => crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy::RequireEncryptRequireDecrypt, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs new file mode 100644 index 000000000..8af150eab --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs @@ -0,0 +1,5 @@ +// 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 mod _get_algorithm_suite_info_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info/_get_algorithm_suite_info_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info/_get_algorithm_suite_info_output.rs new file mode 100644 index 000000000..2890a5ee7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info/_get_algorithm_suite_info_output.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.id.clone().unwrap()) +, + binaryId: crate::standard_library_conversions::blob_to_dafny(&value.binary_id.unwrap()), + messageVersion: value.message_version.clone().unwrap(), + encrypt: crate::deps::aws_cryptography_materialProviders::conversions::encrypt::to_dafny(&value.encrypt.clone().unwrap()) +, + kdf: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.kdf.clone().unwrap()) +, + commitment: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.commitment.clone().unwrap()) +, + signature: crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::to_dafny(&value.signature.clone().unwrap()) +, + symmetricSignature: crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::to_dafny(&value.symmetric_signature.clone().unwrap()) +, + edkWrapping: crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::to_dafny(&value.edk_wrapping.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo { + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo::builder() + .set_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.id().clone()) + )) + .set_binary_id(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.binaryId().clone()))) + .set_message_version(Some( dafny_value.messageVersion() .clone() )) + .set_encrypt(Some( crate::deps::aws_cryptography_materialProviders::conversions::encrypt::from_dafny(dafny_value.encrypt().clone()) + )) + .set_kdf(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.kdf().clone()) + )) + .set_commitment(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.commitment().clone()) + )) + .set_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::from_dafny(dafny_value.signature().clone()) + )) + .set_symmetric_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::from_dafny(dafny_value.symmetricSignature().clone()) + )) + .set_edk_wrapping(Some( crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::from_dafny(dafny_value.edkWrapping().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs new file mode 100644 index 000000000..ec37422a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs @@ -0,0 +1,7 @@ +// 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 mod _get_branch_key_id_input; + + pub mod _get_branch_key_id_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_input.rs new file mode 100644 index 000000000..72435a649 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_input.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput::GetBranchKeyIdInput { + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput { + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput::builder() + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_output.rs new file mode 100644 index 000000000..81d11b172 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput::GetBranchKeyIdOutput { + branchKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput { + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput::builder() + .set_branch_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_input.rs new file mode 100644 index 000000000..903ae5401 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_input.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput::GetBranchKeyIdInput { + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdInput::GetBranchKeyIdInput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput::builder() + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_output.rs new file mode 100644 index 000000000..773d5bd21 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput::GetBranchKeyIdOutput { + branchKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_id) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetBranchKeyIdOutput::GetBranchKeyIdOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput::builder() + .set_branch_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.branchKeyId()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs new file mode 100644 index 000000000..b9f551530 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs @@ -0,0 +1,7 @@ +// 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 mod _get_cache_entry_input; + + pub mod _get_cache_entry_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_input.rs new file mode 100644 index 000000000..09aaa472a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput::GetCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + bytesUsed: crate::standard_library_conversions::olong_to_dafny(&value.bytes_used), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput { + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_bytes_used(crate::standard_library_conversions::olong_from_dafny(dafny_value.bytesUsed().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_output.rs new file mode 100644 index 000000000..c4e8b39ad --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_output.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput::GetCacheEntryOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::materials::to_dafny(&value.materials.clone().unwrap()) +, + creationTime: value.creation_time.clone().unwrap(), + expiryTime: value.expiry_time.clone().unwrap(), + messagesUsed: value.messages_used.clone().unwrap(), + bytesUsed: value.bytes_used.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput { + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::materials::from_dafny(dafny_value.materials().clone()) + )) + .set_creation_time(Some( dafny_value.creationTime() .clone() )) + .set_expiry_time(Some( dafny_value.expiryTime() .clone() )) + .set_messages_used(Some( dafny_value.messagesUsed() .clone() )) + .set_bytes_used(Some( dafny_value.bytesUsed() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs new file mode 100644 index 000000000..d7b65a5cf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput::GetCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + bytesUsed: crate::standard_library_conversions::olong_to_dafny(&value.bytes_used), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryInput::GetCacheEntryInput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_bytes_used(crate::standard_library_conversions::olong_from_dafny(dafny_value.bytesUsed().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs new file mode 100644 index 000000000..702380c1e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput::GetCacheEntryOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::materials::to_dafny(&value.materials.clone().unwrap()) +, + creationTime: value.creation_time.clone().unwrap(), + expiryTime: value.expiry_time.clone().unwrap(), + messagesUsed: value.messages_used.clone().unwrap(), + bytesUsed: value.bytes_used.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetCacheEntryOutput::GetCacheEntryOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::materials::from_dafny(dafny_value.materials().clone()) + )) + .set_creation_time(Some( dafny_value.creationTime() .clone() )) + .set_expiry_time(Some( dafny_value.expiryTime() .clone() )) + .set_messages_used(Some( dafny_value.messagesUsed() .clone() )) + .set_bytes_used(Some( dafny_value.bytesUsed() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs new file mode 100644 index 000000000..671a7a84d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs @@ -0,0 +1,5 @@ +// 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 mod _get_client_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client/_get_client_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client/_get_client_input.rs new file mode 100644 index 000000000..8b43e1085 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client/_get_client_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput::GetClientInput { + region: crate::standard_library_conversions::ostring_to_dafny(&value.region) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput { + crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput::builder() + .set_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.region()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs new file mode 100644 index 000000000..b9045823f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetClientInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetClientInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput::GetClientInput { + region: crate::standard_library_conversions::ostring_to_dafny(&value.region) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetClientInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetClientInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetClientInput::GetClientInput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetClientInput::builder() + .set_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.region()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs new file mode 100644 index 000000000..40b2ebe43 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs @@ -0,0 +1,7 @@ +// 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 mod _get_encryption_materials_input; + + pub mod _get_encryption_materials_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_input.rs new file mode 100644 index 000000000..c5561945a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_input.rs @@ -0,0 +1,68 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput::GetEncryptionMaterialsInput { + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + maxPlaintextLength: crate::standard_library_conversions::olong_to_dafny(&value.max_plaintext_length), + requiredEncryptionContextKeys: ::std::rc::Rc::new(match &value.required_encryption_context_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput { + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput::builder() + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .set_algorithm_suite_id(match (*dafny_value.algorithmSuiteId()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(value.clone())), + _ => None, +} +) + .set_max_plaintext_length(crate::standard_library_conversions::olong_from_dafny(dafny_value.maxPlaintextLength().clone())) + .set_required_encryption_context_keys(match (*dafny_value.requiredEncryptionContextKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_output.rs new file mode 100644 index 000000000..a166a0890 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput { + encryptionMaterials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.encryption_materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput { + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput::builder() + .set_encryption_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.encryptionMaterials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs new file mode 100644 index 000000000..d492ab870 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs @@ -0,0 +1,114 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput::GetEncryptionMaterialsInput { + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + maxPlaintextLength: crate::standard_library_conversions::olong_to_dafny(&value.max_plaintext_length), + requiredEncryptionContextKeys: ::std::rc::Rc::new(match &value.required_encryption_context_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsInput::GetEncryptionMaterialsInput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput::builder() + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .set_algorithm_suite_id(match (*dafny_value.algorithmSuiteId()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(value.clone())), + _ => None, +} +) + .set_max_plaintext_length(crate::standard_library_conversions::olong_from_dafny(dafny_value.maxPlaintextLength().clone())) + .set_required_encryption_context_keys(match (*dafny_value.requiredEncryptionContextKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), + ) + ), + _ => None +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs new file mode 100644 index 000000000..430a47ef0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput { + encryptionMaterials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.encryption_materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput::builder() + .set_encryption_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.encryptionMaterials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs new file mode 100644 index 000000000..cc1a37e58 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::Hkdf, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::Hkdf, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF::HKDF { + hmac: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.hmac.clone().unwrap()), + saltLength: value.salt_length.clone().unwrap(), + inputKeyLength: value.input_key_length.clone().unwrap(), + outputKeyLength: value.output_key_length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::Hkdf { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF, +) -> crate::deps::aws_cryptography_materialProviders::types::Hkdf { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::HKDF::HKDF {..} => + crate::deps::aws_cryptography_materialProviders::types::Hkdf::builder() + .set_hmac(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.hmac()) )) + .set_salt_length(Some( dafny_value.saltLength() .clone() )) + .set_input_key_length(Some( dafny_value.inputKeyLength() .clone() )) + .set_output_key_length(Some( dafny_value.outputKeyLength() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs new file mode 100644 index 000000000..846a77bab --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::Identity, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::Identity, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY::IDENTITY { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::Identity { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY, +) -> crate::deps::aws_cryptography_materialProviders::types::Identity { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY::IDENTITY {..} => + crate::deps::aws_cryptography_materialProviders::types::Identity::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs new file mode 100644 index 000000000..bac3c925f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs @@ -0,0 +1,7 @@ +// 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 mod _initialize_decryption_materials_input; + + pub mod _initialize_decryption_materials_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_input.rs new file mode 100644 index 000000000..fcd87e2df --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_input.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput { + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_output.rs new file mode 100644 index 000000000..fb2372e38 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_output.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials::DecryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + verificationKey: crate::standard_library_conversions::oblob_to_dafny(&value.verification_key), + symmetricSigningKey: crate::standard_library_conversions::oblob_to_dafny(&value.symmetric_signing_key), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials { + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_verification_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.verificationKey().clone())) + .set_symmetric_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.symmetricSigningKey().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs new file mode 100644 index 000000000..869aa0997 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs @@ -0,0 +1,90 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput, +) -> crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput {..} => + crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs new file mode 100644 index 000000000..f68441c69 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs @@ -0,0 +1,7 @@ +// 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 mod _initialize_encryption_materials_input; + + pub mod _initialize_encryption_materials_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_input.rs new file mode 100644 index 000000000..0874e40ec --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_input.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + signingKey: crate::standard_library_conversions::oblob_to_dafny(&value.signing_key), + verificationKey: crate::standard_library_conversions::oblob_to_dafny(&value.verification_key), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput { + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.signingKey().clone())) + .set_verification_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.verificationKey().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_output.rs new file mode 100644 index 000000000..5a391ad47 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_output.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials::EncryptionMaterials { + algorithmSuite: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::to_dafny(&value.algorithm_suite.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + plaintextDataKey: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext_data_key), + signingKey: crate::standard_library_conversions::oblob_to_dafny(&value.signing_key), + symmetricSigningKeys: ::std::rc::Rc::new(match &value.symmetric_signing_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::standard_library_conversions::blob_to_dafny(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials { + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials::builder() + .set_algorithm_suite(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_info::from_dafny(dafny_value.algorithmSuite().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_plaintext_data_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.plaintextDataKey().clone())) + .set_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.signingKey().clone())) + .set_symmetric_signing_keys(match (*dafny_value.symmetricSigningKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| crate::standard_library_conversions::blob_from_dafny(e.clone()), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs new file mode 100644 index 000000000..a3391ba02 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs @@ -0,0 +1,94 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm_suite_id.clone().unwrap()) +, + encryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encryption_context.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&k.as_bytes().to_vec(), |b| *b), + |v| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v.as_bytes().to_vec(), |b| *b), +) +, + requiredEncryptionContextKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.required_encryption_context_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&e.as_bytes().to_vec(), |b| *b), +) +, + signingKey: crate::standard_library_conversions::oblob_to_dafny(&value.signing_key), + verificationKey: crate::standard_library_conversions::oblob_to_dafny(&value.verification_key), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput, +) -> crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput {..} => + crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId().clone()) + )) + .set_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptionContext(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(k), |b| *b)).unwrap(), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(v), |b| *b)).unwrap(), +) + )) + .set_required_encryption_context_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.requiredEncryptionContextKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| ::std::string::String::from_utf8(dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&::std::borrow::Borrow::borrow(e), |b| *b)).unwrap(), +) + )) + .set_signing_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.signingKey().clone())) + .set_verification_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.verificationKey().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs new file mode 100644 index 000000000..c1e12b854 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping::IntermediateKeyWrapping { + keyEncryptionKeyKdf: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.key_encryption_key_kdf.clone().unwrap()) +, + macKeyKdf: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.mac_key_kdf.clone().unwrap()) +, + pdkEncryptAlgorithm: crate::deps::aws_cryptography_materialProviders::conversions::encrypt::to_dafny(&value.pdk_encrypt_algorithm.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping, +) -> crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping::IntermediateKeyWrapping {..} => + crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping::builder() + .set_key_encryption_key_kdf(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.keyEncryptionKeyKdf().clone()) + )) + .set_mac_key_kdf(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.macKeyKdf().clone()) + )) + .set_pdk_encrypt_algorithm(Some( crate::deps::aws_cryptography_materialProviders::conversions::encrypt::from_dafny(dafny_value.pdkEncryptAlgorithm().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs new file mode 100644 index 000000000..15d87cb3a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KeyAgreementScheme, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme::StaticConfiguration(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KeyAgreementScheme::StaticConfiguration { + StaticConfiguration: crate::deps::aws_cryptography_materialProviders::conversions::static_configurations::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KeyAgreementScheme, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KeyAgreementScheme::StaticConfiguration { + StaticConfiguration: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme::StaticConfiguration(crate::deps::aws_cryptography_materialProviders::conversions::static_configurations::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs new file mode 100644 index 000000000..3b716149d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs @@ -0,0 +1,143 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring, +> { + let wrap = KeyringWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct KeyringWrapper { + obj: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, +} + +impl ::dafny_runtime::UpcastObject for KeyringWrapper { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef { + let wrap = IKeyringDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct IKeyringDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring, + >, +} + +impl crate::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring + for KeyringWrapper +{ + fn r#_OnEncrypt_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::on_encrypt::_on_encrypt_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().on_encrypt(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::on_encrypt::_on_encrypt_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} + +fn r#_OnDecrypt_k( + &self, + input: &::std::rc::Rc, +) -> ::std::rc::Rc< + crate::r#_Wrappers_Compile::Result< + ::std::rc::Rc, + ::std::rc::Rc, + >, +> +{ + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::on_decrypt::_on_decrypt_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().on_decrypt(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_materialProviders::conversions::on_decrypt::_on_decrypt_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_materialProviders::types::keyring::Keyring for IKeyringDafnyWrapper +{ + fn on_encrypt( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::on_encrypt::_on_encrypt_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).OnEncrypt(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::on_encrypt::_on_encrypt_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} + +fn on_decrypt( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput, +) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_materialProviders::conversions::on_decrypt::_on_decrypt_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).OnDecrypt(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::on_decrypt::_on_decrypt_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs new file mode 100644 index 000000000..f738f8456 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery { + KmsPublicKeyDiscovery: crate::deps::aws_cryptography_materialProviders::conversions::kms_public_key_discovery_input::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey { + KmsPrivateKeyToStaticPublicKey: crate::deps::aws_cryptography_materialProviders::conversions::kms_private_key_to_static_public_key_input::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery { + KmsPublicKeyDiscovery: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery(crate::deps::aws_cryptography_materialProviders::conversions::kms_public_key_discovery_input::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey { + KmsPrivateKeyToStaticPublicKey: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::conversions::kms_private_key_to_static_public_key_input::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..0a08cdb66 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_private_key_to_static_public_key_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput { + senderKmsIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.sender_kms_identifier) .Extract(), + senderPublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.sender_public_key), + recipientPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.recipient_public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput, +) -> crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput {..} => + crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput::builder() + .set_sender_kms_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.senderKmsIdentifier()) )) + .set_sender_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.senderPublicKey().clone())) + .set_recipient_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.recipientPublicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_public_key_discovery_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_public_key_discovery_input.rs new file mode 100644 index 000000000..5b1b38b00 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_public_key_discovery_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput { + recipientKmsIdentifier: crate::standard_library_conversions::ostring_to_dafny(&value.recipient_kms_identifier) .Extract(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput, +) -> crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput {..} => + crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput::builder() + .set_recipient_kms_identifier(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.recipientKmsIdentifier()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs new file mode 100644 index 000000000..251af9570 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs @@ -0,0 +1,4 @@ +// 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 mod _material_providers_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config/_material_providers_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config/_material_providers_config.rs new file mode 100644 index 000000000..4cce835c1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config/_material_providers_config.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value)) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig::MaterialProvidersConfig { + + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig, +) -> crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig::MaterialProvidersConfig {..} => + crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig::builder() + + .build() + .unwrap() + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs new file mode 100644 index 000000000..f3f343986 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs @@ -0,0 +1,59 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::Materials, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::Encryption { + Encryption: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::Decryption { + Decryption: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::BranchKey { + BranchKey: crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::BeaconKey { + BeaconKey: crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::Materials { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::Encryption { + Encryption: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption(crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::Decryption { + Decryption: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption(crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::BranchKey { + BranchKey: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey(crate::deps::aws_cryptography_keyStore::conversions::branch_key_materials::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Materials::BeaconKey { + BeaconKey: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey(crate::deps::aws_cryptography_keyStore::conversions::beacon_key_materials::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs new file mode 100644 index 000000000..d42f46523 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache::MultiThreadedCache { + entryCapacity: value.entry_capacity.clone().unwrap(), + entryPruningTailSize: crate::standard_library_conversions::oint_to_dafny(value.entry_pruning_tail_size), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache, +) -> crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::MultiThreadedCache::MultiThreadedCache {..} => + crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache::builder() + .set_entry_capacity(Some( dafny_value.entryCapacity() .clone() )) + .set_entry_pruning_tail_size(crate::standard_library_conversions::oint_from_dafny(dafny_value.entryPruningTailSize().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs new file mode 100644 index 000000000..5f24ea15e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::NoCache, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::NoCache, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache::NoCache { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::NoCache { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache, +) -> crate::deps::aws_cryptography_materialProviders::types::NoCache { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::NoCache::NoCache {..} => + crate::deps::aws_cryptography_materialProviders::types::NoCache::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs new file mode 100644 index 000000000..6c96b86e4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::None, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::None, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None::None { + + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::None { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None, +) -> crate::deps::aws_cryptography_materialProviders::types::None { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::None::None {..} => + crate::deps::aws_cryptography_materialProviders::types::None::builder() + + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs new file mode 100644 index 000000000..11d483a3e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs @@ -0,0 +1,7 @@ +// 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 mod _on_decrypt_input; + + pub mod _on_decrypt_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_input.rs new file mode 100644 index 000000000..ea484f4df --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_input.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput::OnDecryptInput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput { + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_output.rs new file mode 100644 index 000000000..2d63e21bc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput::OnDecryptOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput { + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs new file mode 100644 index 000000000..d47a5eb69 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput::OnDecryptInput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + encryptedDataKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_keys.clone().unwrap(), + |e| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::to_dafny(&e.clone()) +, +) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput, +) -> crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptInput::OnDecryptInput {..} => + crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .set_encrypted_data_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedDataKeys(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_materialProviders::conversions::encrypted_data_key::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs new file mode 100644 index 000000000..595ea28ba --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput::OnDecryptOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnDecryptOutput::OnDecryptOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs new file mode 100644 index 000000000..34ba398b0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs @@ -0,0 +1,7 @@ +// 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 mod _on_encrypt_input; + + pub mod _on_encrypt_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_input.rs new file mode 100644 index 000000000..7cebe330b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput::OnEncryptInput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput { + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_output.rs new file mode 100644 index 000000000..3203b24ea --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput::OnEncryptOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput { + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs new file mode 100644 index 000000000..72b279382 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput::OnEncryptInput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput, +) -> crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptInput::OnEncryptInput {..} => + crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs new file mode 100644 index 000000000..5f435a39c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput::OnEncryptOutput { + materials: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.materials.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput, +) -> crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::OnEncryptOutput::OnEncryptOutput {..} => + crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput::builder() + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.materials().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs new file mode 100644 index 000000000..5dae655d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::PaddingScheme, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::Pkcs1 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::PKCS1 {}, +crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha1Mgf1 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA1_MGF1 {}, +crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha256Mgf1 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA256_MGF1 {}, +crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha384Mgf1 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA384_MGF1 {}, +crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha512Mgf1 => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA512_MGF1 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme, +) -> crate::deps::aws_cryptography_materialProviders::types::PaddingScheme { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::PKCS1 {} => crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::Pkcs1, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA1_MGF1 {} => crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha1Mgf1, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA256_MGF1 {} => crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha256Mgf1, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA384_MGF1 {} => crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha384Mgf1, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PaddingScheme::OAEP_SHA512_MGF1 {} => crate::deps::aws_cryptography_materialProviders::types::PaddingScheme::OaepSha512Mgf1, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs new file mode 100644 index 000000000..ce8313b3b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput::PublicKeyDiscoveryInput { + recipientStaticPrivateKey: crate::standard_library_conversions::blob_to_dafny(&value.recipient_static_private_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput, +) -> crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PublicKeyDiscoveryInput::PublicKeyDiscoveryInput {..} => + crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput::builder() + .set_recipient_static_private_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.recipientStaticPrivateKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs new file mode 100644 index 000000000..9de055a49 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs @@ -0,0 +1,5 @@ +// 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 mod _put_cache_entry_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry/_put_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry/_put_cache_entry_input.rs new file mode 100644 index 000000000..6b425fb73 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry/_put_cache_entry_input.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput::PutCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + materials: crate::deps::aws_cryptography_materialProviders::conversions::materials::to_dafny(&value.materials.clone().unwrap()) +, + creationTime: value.creation_time.clone().unwrap(), + expiryTime: value.expiry_time.clone().unwrap(), + messagesUsed: crate::standard_library_conversions::oint_to_dafny(value.messages_used), + bytesUsed: crate::standard_library_conversions::oint_to_dafny(value.bytes_used), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput { + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::materials::from_dafny(dafny_value.materials().clone()) + )) + .set_creation_time(Some( dafny_value.creationTime() .clone() )) + .set_expiry_time(Some( dafny_value.expiryTime() .clone() )) + .set_messages_used(crate::standard_library_conversions::oint_from_dafny(dafny_value.messagesUsed().clone())) + .set_bytes_used(crate::standard_library_conversions::oint_from_dafny(dafny_value.bytesUsed().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs new file mode 100644 index 000000000..f49dc611c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput::PutCacheEntryInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + materials: crate::deps::aws_cryptography_materialProviders::conversions::materials::to_dafny(&value.materials.clone().unwrap()) +, + creationTime: value.creation_time.clone().unwrap(), + expiryTime: value.expiry_time.clone().unwrap(), + messagesUsed: crate::standard_library_conversions::oint_to_dafny(value.messages_used), + bytesUsed: crate::standard_library_conversions::oint_to_dafny(value.bytes_used), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput, +) -> crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::PutCacheEntryInput::PutCacheEntryInput {..} => + crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_materials(Some( crate::deps::aws_cryptography_materialProviders::conversions::materials::from_dafny(dafny_value.materials().clone()) + )) + .set_creation_time(Some( dafny_value.creationTime() .clone() )) + .set_expiry_time(Some( dafny_value.expiryTime() .clone() )) + .set_messages_used(crate::standard_library_conversions::oint_from_dafny(dafny_value.messagesUsed().clone())) + .set_bytes_used(crate::standard_library_conversions::oint_from_dafny(dafny_value.bytesUsed().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs new file mode 100644 index 000000000..1ca03e57a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::PublicKeyDiscovery { + PublicKeyDiscovery: crate::deps::aws_cryptography_materialProviders::conversions::public_key_discovery_input::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey { + RawPrivateKeyToStaticPublicKey: crate::deps::aws_cryptography_materialProviders::conversions::raw_private_key_to_static_public_key_input::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey { + EphemeralPrivateKeyToStaticPublicKey: crate::deps::aws_cryptography_materialProviders::conversions::ephemeral_private_key_to_static_public_key_input::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::PublicKeyDiscovery { + PublicKeyDiscovery: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery(crate::deps::aws_cryptography_materialProviders::conversions::public_key_discovery_input::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey { + RawPrivateKeyToStaticPublicKey: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::conversions::raw_private_key_to_static_public_key_input::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey { + EphemeralPrivateKeyToStaticPublicKey: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::conversions::ephemeral_private_key_to_static_public_key_input::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..f5301caba --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_private_key_to_static_public_key_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput { + senderStaticPrivateKey: crate::standard_library_conversions::blob_to_dafny(&value.sender_static_private_key.unwrap()), + recipientPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.recipient_public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput, +) -> crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput {..} => + crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput::builder() + .set_sender_static_private_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.senderStaticPrivateKey().clone()))) + .set_recipient_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.recipientPublicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs new file mode 100644 index 000000000..14bdd8ba4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA { + ECDSA: crate::deps::aws_cryptography_materialProviders::conversions::ecdsa::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None { + _None: crate::deps::aws_cryptography_materialProviders::conversions::none::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA { + ECDSA: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa(crate::deps::aws_cryptography_materialProviders::conversions::ecdsa::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None { + _None: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None(crate::deps::aws_cryptography_materialProviders::conversions::none::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs new file mode 100644 index 000000000..3719b51e5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache::SingleThreadedCache { + entryCapacity: value.entry_capacity.clone().unwrap(), + entryPruningTailSize: crate::standard_library_conversions::oint_to_dafny(value.entry_pruning_tail_size), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache, +) -> crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SingleThreadedCache::SingleThreadedCache {..} => + crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache::builder() + .set_entry_capacity(Some( dafny_value.entryCapacity() .clone() )) + .set_entry_pruning_tail_size(crate::standard_library_conversions::oint_from_dafny(dafny_value.entryPruningTailSize().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs new file mode 100644 index 000000000..45d07881b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::AwsKmsEcdh(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations::AWS_KMS_ECDH { + AWS_KMS_ECDH: crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::RawEcdh(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations::RAW_ECDH { + RAW_ECDH: crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations::AWS_KMS_ECDH { + AWS_KMS_ECDH: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::AwsKmsEcdh(crate::deps::aws_cryptography_materialProviders::conversions::kms_ecdh_static_configurations::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StaticConfigurations::RAW_ECDH { + RAW_ECDH: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::RawEcdh(crate::deps::aws_cryptography_materialProviders::conversions::raw_ecdh_static_configurations::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs new file mode 100644 index 000000000..6829cd8c5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs @@ -0,0 +1,94 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache::StormTrackingCache { + entryCapacity: value.entry_capacity.clone().unwrap(), + entryPruningTailSize: crate::standard_library_conversions::oint_to_dafny(value.entry_pruning_tail_size), + gracePeriod: value.grace_period.clone().unwrap(), + graceInterval: value.grace_interval.clone().unwrap(), + fanOut: value.fan_out.clone().unwrap(), + inFlightTTL: value.in_flight_ttl.clone().unwrap(), + sleepMilli: value.sleep_milli.clone().unwrap(), + timeUnits: ::std::rc::Rc::new(match &value.time_units { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::time_units::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache, +) -> crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::StormTrackingCache::StormTrackingCache {..} => + crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache::builder() + .set_entry_capacity(Some( dafny_value.entryCapacity() .clone() )) + .set_entry_pruning_tail_size(crate::standard_library_conversions::oint_from_dafny(dafny_value.entryPruningTailSize().clone())) + .set_grace_period(Some( dafny_value.gracePeriod() .clone() )) + .set_grace_interval(Some( dafny_value.graceInterval() .clone() )) + .set_fan_out(Some( dafny_value.fanOut() .clone() )) + .set_in_flight_ttl(Some( dafny_value.inFlightTTL() .clone() )) + .set_sleep_milli(Some( dafny_value.sleepMilli() .clone() )) + .set_time_units(match &**dafny_value.timeUnits() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::time_units::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs new file mode 100644 index 000000000..261dee9b4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::HMAC { + HMAC: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(x.clone()), + }, +crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None(x) => + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None { + _None: crate::deps::aws_cryptography_materialProviders::conversions::none::to_dafny(&x.clone()) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::HMAC { + HMAC: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac(crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(x)), +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None { + _None: x @ _, +} => crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None(crate::deps::aws_cryptography_materialProviders::conversions::none::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs new file mode 100644 index 000000000..1caaf744c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::types::TimeUnits, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Seconds => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Seconds {}, +crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Milliseconds => crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Milliseconds {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits, +) -> crate::deps::aws_cryptography_materialProviders::types::TimeUnits { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Seconds {} => crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Seconds, +crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::TimeUnits::Milliseconds {} => crate::deps::aws_cryptography_materialProviders::types::TimeUnits::Milliseconds, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs new file mode 100644 index 000000000..2ed31961f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs @@ -0,0 +1,5 @@ +// 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 mod _update_usage_metadata_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata/_update_usage_metadata_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata/_update_usage_metadata_input.rs new file mode 100644 index 000000000..b752ca89e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata/_update_usage_metadata_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput::UpdateUsageMetadataInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + bytesUsed: value.bytes_used.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput { + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_bytes_used(Some( dafny_value.bytesUsed() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs new file mode 100644 index 000000000..600b7caa8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput::UpdateUsageMetadataInput { + identifier: crate::standard_library_conversions::blob_to_dafny(&value.identifier.unwrap()), + bytesUsed: value.bytes_used.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput, +) -> crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::UpdateUsageMetadataInput::UpdateUsageMetadataInput {..} => + crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput::builder() + .set_identifier(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.identifier().clone()))) + .set_bytes_used(Some( dafny_value.bytesUsed() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..a44cde64a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs @@ -0,0 +1,5 @@ +// 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 mod _valid_algorithm_suite_info_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info/_valid_algorithm_suite_info_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info/_valid_algorithm_suite_info_input.rs new file mode 100644 index 000000000..68eb7a51f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info/_valid_algorithm_suite_info_input.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.id.clone().unwrap()) +, + binaryId: crate::standard_library_conversions::blob_to_dafny(&value.binary_id.unwrap()), + messageVersion: value.message_version.clone().unwrap(), + encrypt: crate::deps::aws_cryptography_materialProviders::conversions::encrypt::to_dafny(&value.encrypt.clone().unwrap()) +, + kdf: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.kdf.clone().unwrap()) +, + commitment: crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::to_dafny(&value.commitment.clone().unwrap()) +, + signature: crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::to_dafny(&value.signature.clone().unwrap()) +, + symmetricSignature: crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::to_dafny(&value.symmetric_signature.clone().unwrap()) +, + edkWrapping: crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::to_dafny(&value.edk_wrapping.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo { + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo::builder() + .set_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.id().clone()) + )) + .set_binary_id(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.binaryId().clone()))) + .set_message_version(Some( dafny_value.messageVersion() .clone() )) + .set_encrypt(Some( crate::deps::aws_cryptography_materialProviders::conversions::encrypt::from_dafny(dafny_value.encrypt().clone()) + )) + .set_kdf(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.kdf().clone()) + )) + .set_commitment(Some( crate::deps::aws_cryptography_materialProviders::conversions::derivation_algorithm::from_dafny(dafny_value.commitment().clone()) + )) + .set_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::signature_algorithm::from_dafny(dafny_value.signature().clone()) + )) + .set_symmetric_signature(Some( crate::deps::aws_cryptography_materialProviders::conversions::symmetric_signature_algorithm::from_dafny(dafny_value.symmetricSignature().clone()) + )) + .set_edk_wrapping(Some( crate::deps::aws_cryptography_materialProviders::conversions::edk_wrapping_algorithm::from_dafny(dafny_value.edkWrapping().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..c22cc361b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs @@ -0,0 +1,5 @@ +// 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 mod _valid_decryption_materials_transition_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs new file mode 100644 index 000000000..716e2c473 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput { + start: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.start.clone().unwrap()) +, + stop: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.stop.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput { + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput::builder() + .set_start(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.start().clone()) + )) + .set_stop(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.stop().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition_input.rs new file mode 100644 index 000000000..583033c0d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput { + start: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.start.clone().unwrap()) +, + stop: crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::to_dafny(&value.stop.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput {..} => + crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput::builder() + .set_start(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.start().clone()) + )) + .set_stop(Some( crate::deps::aws_cryptography_materialProviders::conversions::decryption_materials::from_dafny(dafny_value.stop().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..4ef8b822f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs @@ -0,0 +1,5 @@ +// 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 mod _valid_encryption_materials_transition_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs new file mode 100644 index 000000000..c20d73f71 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput { + start: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.start.clone().unwrap()) +, + stop: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.stop.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput { + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput::builder() + .set_start(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.start().clone()) + )) + .set_stop(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.stop().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition_input.rs new file mode 100644 index 000000000..45d23ff1f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput { + start: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.start.clone().unwrap()) +, + stop: crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::to_dafny(&value.stop.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput {..} => + crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput::builder() + .set_start(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.start().clone()) + )) + .set_stop(Some( crate::deps::aws_cryptography_materialProviders::conversions::encryption_materials::from_dafny(dafny_value.stop().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt.rs new file mode 100644 index 000000000..c20bcdd7a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt.rs @@ -0,0 +1,5 @@ +// 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 mod _validate_commitment_policy_on_decrypt_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs new file mode 100644 index 000000000..6258015b5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput { + algorithm: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput::builder() + .set_algorithm(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithm().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt_input.rs new file mode 100644 index 000000000..455f59cf9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput { + algorithm: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput {..} => + crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput::builder() + .set_algorithm(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithm().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt.rs new file mode 100644 index 000000000..cea8f2413 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt.rs @@ -0,0 +1,5 @@ +// 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 mod _validate_commitment_policy_on_encrypt_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs new file mode 100644 index 000000000..39fe31627 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput { + algorithm: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput::builder() + .set_algorithm(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithm().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt_input.rs new file mode 100644 index 000000000..4c7de6bef --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput, +) -> crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput { + algorithm: crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::to_dafny(&value.algorithm.clone().unwrap()) +, + commitmentPolicy: crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::to_dafny(&value.commitment_policy.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput, + >, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput, +) -> crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput {..} => + crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput::builder() + .set_algorithm(Some( crate::deps::aws_cryptography_materialProviders::conversions::algorithm_suite_id::from_dafny(dafny_value.algorithm().clone()) + )) + .set_commitment_policy(Some( crate::deps::aws_cryptography_materialProviders::conversions::commitment_policy::from_dafny(dafny_value.commitmentPolicy().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/deps.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/deps.rs @@ -0,0 +1,3 @@ +// 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. diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error.rs @@ -0,0 +1,16 @@ +// 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 use ::aws_smithy_runtime_api::box_error::BoxError; + +/// Error type returned by the client. +pub type SdkError = + ::aws_smithy_runtime_api::client::result::SdkError; +pub use ::aws_smithy_runtime_api::client::result::ConnectorError; +pub use ::aws_smithy_types::error::operation::BuildError; + +pub use ::aws_smithy_types::error::display::DisplayErrorContext; +pub use ::aws_smithy_types::error::metadata::ErrorMetadata; +pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + +pub(crate) mod sealed_unhandled; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs @@ -0,0 +1,32 @@ +// 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. +use std::any::Any; + +use dafny_runtime::UpcastObject; + +/// This struct is not intended to be used. +/// +/// This struct holds information about an unhandled error, +/// but that information should be obtained by using the +/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait +/// on the error type. +/// +/// This struct intentionally doesn't yield any useful information itself. +#[deprecated( + note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ +variable wildcard pattern and check `.code()`: + \ +   `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ +See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." +)] +#[derive(Debug)] +pub struct Unhandled { + pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, + pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, +} + +impl UpcastObject for Unhandled { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation.rs new file mode 100644 index 000000000..fd6fec56b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation.rs @@ -0,0 +1,119 @@ +// 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. +/// Types for the `CreateAwsKmsDiscoveryKeyring` operation. +pub mod create_aws_kms_discovery_keyring; + +/// Types for the `CreateAwsKmsDiscoveryMultiKeyring` operation. +pub mod create_aws_kms_discovery_multi_keyring; + +/// Types for the `CreateAwsKmsEcdhKeyring` operation. +pub mod create_aws_kms_ecdh_keyring; + +/// Types for the `CreateAwsKmsHierarchicalKeyring` operation. +pub mod create_aws_kms_hierarchical_keyring; + +/// Types for the `CreateAwsKmsKeyring` operation. +pub mod create_aws_kms_keyring; + +/// Types for the `CreateAwsKmsMrkDiscoveryKeyring` operation. +pub mod create_aws_kms_mrk_discovery_keyring; + +/// Types for the `CreateAwsKmsMrkDiscoveryMultiKeyring` operation. +pub mod create_aws_kms_mrk_discovery_multi_keyring; + +/// Types for the `CreateAwsKmsMrkKeyring` operation. +pub mod create_aws_kms_mrk_keyring; + +/// Types for the `CreateAwsKmsMrkMultiKeyring` operation. +pub mod create_aws_kms_mrk_multi_keyring; + +/// Types for the `CreateAwsKmsMultiKeyring` operation. +pub mod create_aws_kms_multi_keyring; + +/// Types for the `CreateAwsKmsRsaKeyring` operation. +pub mod create_aws_kms_rsa_keyring; + +/// Types for the `CreateCryptographicMaterialsCache` operation. +pub mod create_cryptographic_materials_cache; + +/// Types for the `CreateDefaultClientSupplier` operation. +pub mod create_default_client_supplier; + +/// Types for the `CreateDefaultCryptographicMaterialsManager` operation. +pub mod create_default_cryptographic_materials_manager; + +/// Types for the `CreateMultiKeyring` operation. +pub mod create_multi_keyring; + +/// Types for the `CreateRawAesKeyring` operation. +pub mod create_raw_aes_keyring; + +/// Types for the `CreateRawEcdhKeyring` operation. +pub mod create_raw_ecdh_keyring; + +/// Types for the `CreateRawRsaKeyring` operation. +pub mod create_raw_rsa_keyring; + +/// Types for the `CreateRequiredEncryptionContextCMM` operation. +pub mod create_required_encryption_context_cmm; + +/// Types for the `DecryptMaterials` operation. +pub mod decrypt_materials; + +/// Types for the `DecryptionMaterialsWithPlaintextDataKey` operation. +pub mod decryption_materials_with_plaintext_data_key; + +/// Types for the `DeleteCacheEntry` operation. +pub mod delete_cache_entry; + +/// Types for the `EncryptionMaterialsHasPlaintextDataKey` operation. +pub mod encryption_materials_has_plaintext_data_key; + +/// Types for the `GetAlgorithmSuiteInfo` operation. +pub mod get_algorithm_suite_info; + +/// Types for the `GetBranchKeyId` operation. +pub mod get_branch_key_id; + +/// Types for the `GetCacheEntry` operation. +pub mod get_cache_entry; + +/// Types for the `GetClient` operation. +pub mod get_client; + +/// Types for the `GetEncryptionMaterials` operation. +pub mod get_encryption_materials; + +/// Types for the `InitializeDecryptionMaterials` operation. +pub mod initialize_decryption_materials; + +/// Types for the `InitializeEncryptionMaterials` operation. +pub mod initialize_encryption_materials; + +/// Types for the `OnDecrypt` operation. +pub mod on_decrypt; + +/// Types for the `OnEncrypt` operation. +pub mod on_encrypt; + +/// Types for the `PutCacheEntry` operation. +pub mod put_cache_entry; + +/// Types for the `UpdateUsageMetadata` operation. +pub mod update_usage_metadata; + +/// Types for the `ValidAlgorithmSuiteInfo` operation. +pub mod valid_algorithm_suite_info; + +/// Types for the `ValidDecryptionMaterialsTransition` operation. +pub mod valid_decryption_materials_transition; + +/// Types for the `ValidEncryptionMaterialsTransition` operation. +pub mod valid_encryption_materials_transition; + +/// Types for the `ValidateCommitmentPolicyOnDecrypt` operation. +pub mod validate_commitment_policy_on_decrypt; + +/// Types for the `ValidateCommitmentPolicyOnEncrypt` operation. +pub mod validate_commitment_policy_on_encrypt; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs new file mode 100644 index 000000000..01e6e418b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsDiscoveryKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsDiscoveryKeyring; +impl CreateAwsKmsDiscoveryKeyring { + /// Creates a new `CreateAwsKmsDiscoveryKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::_create_aws_kms_discovery_keyring_input::CreateAwsKmsDiscoveryKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_discovery_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs new file mode 100644 index 000000000..cfae4cd9b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Discovery Keyring. +pub struct CreateAwsKmsDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +} +impl CreateAwsKmsDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +} +impl CreateAwsKmsDiscoveryKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsDiscoveryKeyringInput`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsDiscoveryKeyringInput`](crate::operation::operation::CreateAwsKmsDiscoveryKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsDiscoveryKeyringInputBuilder { + pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +} +impl CreateAwsKmsDiscoveryKeyringInputBuilder { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} + /// Consumes the builder and constructs a [`CreateAwsKmsDiscoveryKeyringInput`](crate::operation::operation::CreateAwsKmsDiscoveryKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyringInput { + discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..5483b4242 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_discovery_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/builders.rs new file mode 100644 index 000000000..330961989 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/builders.rs @@ -0,0 +1,107 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::_create_aws_kms_discovery_keyring_input::CreateAwsKmsDiscoveryKeyringInputBuilder; + +impl CreateAwsKmsDiscoveryKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_discovery_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsDiscoveryKeyring`. +/// +/// Creates an AWS KMS Discovery Keyring, which supports unwrapping data keys wrapped by a symmetric AWS KMS Key for a single region. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsDiscoveryKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringInputBuilder, +} +impl CreateAwsKmsDiscoveryKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsDiscoveryKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsDiscoveryKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::builders::CreateAwsKmsDiscoveryKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_keyring::CreateAwsKmsDiscoveryKeyring::send(&self.client, input).await + } + + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.discovery_filter(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_discovery_filter(input); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + self.inner.get_discovery_filter() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs new file mode 100644 index 000000000..0695a53f8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsDiscoveryMultiKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsDiscoveryMultiKeyring; +impl CreateAwsKmsDiscoveryMultiKeyring { + /// Creates a new `CreateAwsKmsDiscoveryMultiKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::_create_aws_kms_discovery_multi_keyring_input::CreateAwsKmsDiscoveryMultiKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_discovery_multi_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..5a2f46187 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating an AWS KMS Discovery Multi-Keyring. +pub struct CreateAwsKmsDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub client_supplier: ::std::option::Option, +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The list of regions this Keyring will creates KMS clients for. +pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} +} +impl CreateAwsKmsDiscoveryMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::operation::operation::CreateAwsKmsDiscoveryMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = ::std::option::Option::Some(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = input; + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} + /// Consumes the builder and constructs a [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::operation::operation::CreateAwsKmsDiscoveryMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyringInput { + client_supplier: self.client_supplier, +discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +regions: self.regions, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..9e2ff6d09 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_discovery_multi_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/builders.rs new file mode 100644 index 000000000..aa6c2202b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::_create_aws_kms_discovery_multi_keyring_input::CreateAwsKmsDiscoveryMultiKeyringInputBuilder; + +impl CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_discovery_multi_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsDiscoveryMultiKeyring`. +/// +/// Creates an AWS KMS Discovery Multi-Keyring, which supports unwrapping data keys wrapped by a symmetric AWS KMS Key, for multiple regions. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsDiscoveryMultiKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder, +} +impl CreateAwsKmsDiscoveryMultiKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsDiscoveryMultiKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsDiscoveryMultiKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_discovery_multi_keyring::CreateAwsKmsDiscoveryMultiKeyring::send(&self.client, input).await + } + + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.client_supplier(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_client_supplier(input); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + self.inner.get_client_supplier() +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.discovery_filter(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_discovery_filter(input); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + self.inner.get_discovery_filter() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.regions(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_regions(input); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_regions() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs new file mode 100644 index 000000000..aa9da5528 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs @@ -0,0 +1,67 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsEcdhKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsEcdhKeyring; +impl CreateAwsKmsEcdhKeyring { + /// Creates a new `CreateAwsKmsEcdhKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::_create_aws_kms_ecdh_keyring_input::CreateAwsKmsEcdhKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_ecdh_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs new file mode 100644 index 000000000..bd8611fc7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating an AWS KMS ECDH Keyring. +pub struct CreateAwsKmsEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub key_agreement_scheme: ::std::option::Option, +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub curve_spec: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +} +impl CreateAwsKmsEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +} +impl CreateAwsKmsEcdhKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsEcdhKeyringInput`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsEcdhKeyringInput`](crate::operation::operation::CreateAwsKmsEcdhKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsEcdhKeyringInputBuilder { + pub(crate) key_agreement_scheme: ::std::option::Option, +pub(crate) curve_spec: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +} +impl CreateAwsKmsEcdhKeyringInputBuilder { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.key_agreement_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.key_agreement_scheme = input; + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.curve_spec = ::std::option::Option::Some(input.into()); + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.curve_spec = input; + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} + /// Consumes the builder and constructs a [`CreateAwsKmsEcdhKeyringInput`](crate::operation::operation::CreateAwsKmsEcdhKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyringInput { + key_agreement_scheme: self.key_agreement_scheme, +curve_spec: self.curve_spec, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..884840db8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_ecdh_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/builders.rs new file mode 100644 index 000000000..54dbdf030 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::_create_aws_kms_ecdh_keyring_input::CreateAwsKmsEcdhKeyringInputBuilder; + +impl CreateAwsKmsEcdhKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_ecdh_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsEcdhKeyring`. +/// +/// Creates an AWS KMS ECDH Keyring, which wraps and unwraps data keys by deriving a shared data key from the established shared secret between parties through the ECDH protocol. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsEcdhKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringInputBuilder, +} +impl CreateAwsKmsEcdhKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsEcdhKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsEcdhKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::builders::CreateAwsKmsEcdhKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_ecdh_keyring::CreateAwsKmsEcdhKeyring::send(&self.client, input).await + } + + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.key_agreement_scheme(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_key_agreement_scheme(input); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + self.inner.get_key_agreement_scheme() +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.curve_spec(input.into()); + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_curve_spec(input); + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + self.inner.get_curve_spec() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs new file mode 100644 index 000000000..1b73da6c1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs @@ -0,0 +1,67 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsHierarchicalKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsHierarchicalKeyring; +impl CreateAwsKmsHierarchicalKeyring { + /// Creates a new `CreateAwsKmsHierarchicalKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::_create_aws_kms_hierarchical_keyring_input::CreateAwsKmsHierarchicalKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_hierarchical_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs new file mode 100644 index 000000000..ff9c24020 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Hierarchical Keyring. +pub struct CreateAwsKmsHierarchicalKeyringInput { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub branch_key_id: ::std::option::Option<::std::string::String>, +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub branch_key_id_supplier: ::std::option::Option, +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub cache: ::std::option::Option, +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub key_store: ::std::option::Option, +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub partition_id: ::std::option::Option<::std::string::String>, +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub ttl_seconds: ::std::option::Option<::std::primitive::i64>, +} +impl CreateAwsKmsHierarchicalKeyringInput { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn cache(&self) -> &::std::option::Option { + &self.cache +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn partition_id(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_id +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn ttl_seconds(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.ttl_seconds +} +} +impl CreateAwsKmsHierarchicalKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsHierarchicalKeyringInput`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsHierarchicalKeyringInput`](crate::operation::operation::CreateAwsKmsHierarchicalKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsHierarchicalKeyringInputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_id_supplier: ::std::option::Option, +pub(crate) cache: ::std::option::Option, +pub(crate) key_store: ::std::option::Option, +pub(crate) partition_id: ::std::option::Option<::std::string::String>, +pub(crate) ttl_seconds: ::std::option::Option<::std::primitive::i64>, +} +impl CreateAwsKmsHierarchicalKeyringInputBuilder { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_id_supplier = ::std::option::Option::Some(input.into()); + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.branch_key_id_supplier = input; + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.cache = ::std::option::Option::Some(input.into()); + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.cache = input; + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn get_cache(&self) -> &::std::option::Option { + &self.cache +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn key_store(mut self, input: impl ::std::convert::Into) -> Self { + self.key_store = ::std::option::Option::Some(input.into()); + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn set_key_store(mut self, input: ::std::option::Option) -> Self { + self.key_store = input; + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn get_key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn partition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.partition_id = ::std::option::Option::Some(input.into()); + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn set_partition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.partition_id = input; + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn get_partition_id(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_id +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn ttl_seconds(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.ttl_seconds = ::std::option::Option::Some(input.into()); + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn set_ttl_seconds(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.ttl_seconds = input; + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn get_ttl_seconds(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.ttl_seconds +} + /// Consumes the builder and constructs a [`CreateAwsKmsHierarchicalKeyringInput`](crate::operation::operation::CreateAwsKmsHierarchicalKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyringInput { + branch_key_id: self.branch_key_id, +branch_key_id_supplier: self.branch_key_id_supplier, +cache: self.cache, +key_store: self.key_store, +partition_id: self.partition_id, +ttl_seconds: self.ttl_seconds, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..fae6dc959 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_hierarchical_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/builders.rs new file mode 100644 index 000000000..87e84acc6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/builders.rs @@ -0,0 +1,149 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::_create_aws_kms_hierarchical_keyring_input::CreateAwsKmsHierarchicalKeyringInputBuilder; + +impl CreateAwsKmsHierarchicalKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_hierarchical_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsHierarchicalKeyring`. +/// +/// Creates a Hierarchical Keyring, which supports wrapping and unwrapping data keys using Branch Keys persisted in DynamoDB and protected by a symmetric AWS KMS Key or AWS KMS Multi-Region Key. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsHierarchicalKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringInputBuilder, +} +impl CreateAwsKmsHierarchicalKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsHierarchicalKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsHierarchicalKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::builders::CreateAwsKmsHierarchicalKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_hierarchical_keyring::CreateAwsKmsHierarchicalKeyring::send(&self.client, input).await + } + + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.branch_key_id(input.into()); + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_branch_key_id(input); + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_branch_key_id() +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.branch_key_id_supplier(input.into()); + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_branch_key_id_supplier(input); + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id_supplier(&self) -> &::std::option::Option { + self.inner.get_branch_key_id_supplier() +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cache(input.into()); + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cache(input); + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn get_cache(&self) -> &::std::option::Option { + self.inner.get_cache() +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn key_store(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.key_store(input.into()); + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn set_key_store(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_key_store(input); + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn get_key_store(&self) -> &::std::option::Option { + self.inner.get_key_store() +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn partition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.partition_id(input.into()); + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn set_partition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_partition_id(input); + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn get_partition_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_partition_id() +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn ttl_seconds(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.inner = self.inner.ttl_seconds(input.into()); + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn set_ttl_seconds(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.inner = self.inner.set_ttl_seconds(input); + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn get_ttl_seconds(&self) -> &::std::option::Option<::std::primitive::i64> { + self.inner.get_ttl_seconds() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs new file mode 100644 index 000000000..9e558d210 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs @@ -0,0 +1,61 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsKeyring; +impl CreateAwsKmsKeyring { + /// Creates a new `CreateAwsKmsKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::_create_aws_kms_keyring_input::CreateAwsKmsKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs new file mode 100644 index 000000000..e73e15717 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Keyring. +pub struct CreateAwsKmsKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +} +impl CreateAwsKmsKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsKeyringInput`](crate::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsKeyringInput`](crate::operation::operation::CreateAwsKmsKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsKeyringInputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsKeyringInputBuilder { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} + /// Consumes the builder and constructs a [`CreateAwsKmsKeyringInput`](crate::operation::operation::CreateAwsKmsKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyringInput { + grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..11153473b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/builders.rs new file mode 100644 index 000000000..e7fe46a13 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/builders.rs @@ -0,0 +1,107 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::_create_aws_kms_keyring_input::CreateAwsKmsKeyringInputBuilder; + +impl CreateAwsKmsKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsKeyring`. +/// +/// Creates an AWS KMS Keyring, which wraps and unwraps data keys using single symmetric AWS KMS Key. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringInputBuilder, +} +impl CreateAwsKmsKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::builders::CreateAwsKmsKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_keyring::CreateAwsKmsKeyring::send(&self.client, input).await + } + + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.kms_key_id(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_kms_key_id(input); + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_kms_key_id() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs new file mode 100644 index 000000000..8a85f4f85 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs @@ -0,0 +1,61 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsMrkDiscoveryKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsMrkDiscoveryKeyring; +impl CreateAwsKmsMrkDiscoveryKeyring { + /// Creates a new `CreateAwsKmsMrkDiscoveryKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::_create_aws_kms_mrk_discovery_keyring_input::CreateAwsKmsMrkDiscoveryKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_mrk_discovery_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs new file mode 100644 index 000000000..b0fea2463 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Discovery Keyring. +pub struct CreateAwsKmsMrkDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The region the input 'kmsClient' is in. +pub region: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The region the input 'kmsClient' is in. +pub fn region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} +} +impl CreateAwsKmsMrkDiscoveryKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::operation::operation::CreateAwsKmsMrkDiscoveryKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) region: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The region the input 'kmsClient' is in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.region = ::std::option::Option::Some(input.into()); + self +} +/// The region the input 'kmsClient' is in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.region = input; + self +} +/// The region the input 'kmsClient' is in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::operation::operation::CreateAwsKmsMrkDiscoveryKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyringInput { + discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +region: self.region, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..f7c27e388 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/builders.rs new file mode 100644 index 000000000..912caa84c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::_create_aws_kms_mrk_discovery_keyring_input::CreateAwsKmsMrkDiscoveryKeyringInputBuilder; + +impl CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_mrk_discovery_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsMrkDiscoveryKeyring`. +/// +/// Creates an AWS KMS MRK Discovery Keyring, which supports unwrapping data keys wrapped by a symmetric AWS KMS Key or AWS KMS Multi-Region Key in a particular region. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsMrkDiscoveryKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder, +} +impl CreateAwsKmsMrkDiscoveryKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsMrkDiscoveryKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsMrkDiscoveryKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_keyring::CreateAwsKmsMrkDiscoveryKeyring::send(&self.client, input).await + } + + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.discovery_filter(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_discovery_filter(input); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + self.inner.get_discovery_filter() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +/// The region the input 'kmsClient' is in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.region(input.into()); + self +} +/// The region the input 'kmsClient' is in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_region(input); + self +} +/// The region the input 'kmsClient' is in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_region() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs new file mode 100644 index 000000000..7d3f579ac --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsMrkDiscoveryMultiKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsMrkDiscoveryMultiKeyring; +impl CreateAwsKmsMrkDiscoveryMultiKeyring { + /// Creates a new `CreateAwsKmsMrkDiscoveryMultiKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::_create_aws_kms_mrk_discovery_multi_keyring_input::CreateAwsKmsMrkDiscoveryMultiKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_mrk_discovery_multi_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..97c0ae720 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_aws_kms_mrk_discovery_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. +pub struct CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub client_supplier: ::std::option::Option, +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The list of regions this Keyring will creates KMS clients for. +pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMrkDiscoveryMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = ::std::option::Option::Some(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = input; + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMrkDiscoveryMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + client_supplier: self.client_supplier, +discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +regions: self.regions, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..6e78d39df --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/builders.rs new file mode 100644 index 000000000..c1ede21d9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::_create_aws_kms_mrk_discovery_multi_keyring_input::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder; + +impl CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_mrk_discovery_multi_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsMrkDiscoveryMultiKeyring`. +/// +/// Creates an AWS KMS MRK Discovery Multi-Keyring that supports unwrapping data keys wrapped by a symmetric AWS KMS Key or AWS KMS Multi-Region Key, for a single region. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder, +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsMrkDiscoveryMultiKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsMrkDiscoveryMultiKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_discovery_multi_keyring::CreateAwsKmsMrkDiscoveryMultiKeyring::send(&self.client, input).await + } + + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.client_supplier(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_client_supplier(input); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + self.inner.get_client_supplier() +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.discovery_filter(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_discovery_filter(input); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + self.inner.get_discovery_filter() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.regions(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_regions(input); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_regions() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs new file mode 100644 index 000000000..4a760427b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs @@ -0,0 +1,61 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsMrkKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsMrkKeyring; +impl CreateAwsKmsMrkKeyring { + /// Creates a new `CreateAwsKmsMrkKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::_create_aws_kms_mrk_keyring_input::CreateAwsKmsMrkKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_mrk_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs new file mode 100644 index 000000000..04342a972 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating an AWS KMS MRK Keyring. +pub struct CreateAwsKmsMrkKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +} +impl CreateAwsKmsMrkKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkKeyringInput`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkKeyringInput`](crate::operation::operation::CreateAwsKmsMrkKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkKeyringInputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkKeyringInputBuilder { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkKeyringInput`](crate::operation::operation::CreateAwsKmsMrkKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyringInput { + grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..ef21752be --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/builders.rs new file mode 100644 index 000000000..57ff953f3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/builders.rs @@ -0,0 +1,107 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::_create_aws_kms_mrk_keyring_input::CreateAwsKmsMrkKeyringInputBuilder; + +impl CreateAwsKmsMrkKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_mrk_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsMrkKeyring`. +/// +/// Creates an AWS KMS MRK Keyring, which wraps and unwraps data keys using single symmetric AWS KMS Key or AWS KMS Multi-Region Key. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsMrkKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringInputBuilder, +} +impl CreateAwsKmsMrkKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsMrkKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsMrkKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::builders::CreateAwsKmsMrkKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_keyring::CreateAwsKmsMrkKeyring::send(&self.client, input).await + } + + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.kms_key_id(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_kms_key_id(input); + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_kms_key_id() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs new file mode 100644 index 000000000..7fbb3d031 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs @@ -0,0 +1,50 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsMrkMultiKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsMrkMultiKeyring; +impl CreateAwsKmsMrkMultiKeyring { + /// Creates a new `CreateAwsKmsMrkMultiKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::_create_aws_kms_mrk_multi_keyring_input::CreateAwsKmsMrkMultiKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_mrk_multi_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs new file mode 100644 index 000000000..d29b1f176 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Multi-Keyring. +pub struct CreateAwsKmsMrkMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub client_supplier: ::std::option::Option, +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub generator: ::std::option::Option<::std::string::String>, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} +} +impl CreateAwsKmsMrkMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkMultiKeyringInput`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMrkMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) generator: ::std::option::Option<::std::string::String>, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.generator = input; + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = ::std::option::Option::Some(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = input; + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMrkMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyringInput { + client_supplier: self.client_supplier, +generator: self.generator, +grant_tokens: self.grant_tokens, +kms_key_ids: self.kms_key_ids, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..472421fa6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_mrk_multi_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/builders.rs new file mode 100644 index 000000000..70c2dbee2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::_create_aws_kms_mrk_multi_keyring_input::CreateAwsKmsMrkMultiKeyringInputBuilder; + +impl CreateAwsKmsMrkMultiKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_mrk_multi_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsMrkMultiKeyring`. +/// +/// Creates an AWS KMS MRK Multi-Keyring, which wraps and unwraps data keys using one or more symmetric AWS KMS Keys or AWS KMS Multi-Region Keys. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsMrkMultiKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringInputBuilder, +} +impl CreateAwsKmsMrkMultiKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsMrkMultiKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsMrkMultiKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::builders::CreateAwsKmsMrkMultiKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_mrk_multi_keyring::CreateAwsKmsMrkMultiKeyring::send(&self.client, input).await + } + + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.client_supplier(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_client_supplier(input); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + self.inner.get_client_supplier() +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.generator(input.into()); + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_generator(input); + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_generator() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.kms_key_ids(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_kms_key_ids(input); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_kms_key_ids() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs new file mode 100644 index 000000000..1c64df8da --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs @@ -0,0 +1,50 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsMultiKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsMultiKeyring; +impl CreateAwsKmsMultiKeyring { + /// Creates a new `CreateAwsKmsMultiKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::_create_aws_kms_multi_keyring_input::CreateAwsKmsMultiKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_multi_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs new file mode 100644 index 000000000..21ad993ec --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Multi-Keyring. +pub struct CreateAwsKmsMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub client_supplier: ::std::option::Option, +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub generator: ::std::option::Option<::std::string::String>, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} +} +impl CreateAwsKmsMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMultiKeyringInput`](crate::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) generator: ::std::option::Option<::std::string::String>, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.generator = input; + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = ::std::option::Option::Some(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = input; + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} + /// Consumes the builder and constructs a [`CreateAwsKmsMultiKeyringInput`](crate::operation::operation::CreateAwsKmsMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyringInput { + client_supplier: self.client_supplier, +generator: self.generator, +grant_tokens: self.grant_tokens, +kms_key_ids: self.kms_key_ids, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..0966a8f62 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_multi_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/builders.rs new file mode 100644 index 000000000..7b71f873c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::_create_aws_kms_multi_keyring_input::CreateAwsKmsMultiKeyringInputBuilder; + +impl CreateAwsKmsMultiKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_multi_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsMultiKeyring`. +/// +/// Creates an AWS KMS Multi-Keyring, which wraps and unwraps data keys using one or more symmetric AWS KMS Keys. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsMultiKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringInputBuilder, +} +impl CreateAwsKmsMultiKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsMultiKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsMultiKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::builders::CreateAwsKmsMultiKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_multi_keyring::CreateAwsKmsMultiKeyring::send(&self.client, input).await + } + + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.client_supplier(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_client_supplier(input); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + self.inner.get_client_supplier() +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.generator(input.into()); + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_generator(input); + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_generator() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.kms_key_ids(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_kms_key_ids(input); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_kms_key_ids() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs new file mode 100644 index 000000000..5abb7251c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs @@ -0,0 +1,61 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateAwsKmsRsaKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateAwsKmsRsaKeyring; +impl CreateAwsKmsRsaKeyring { + /// Creates a new `CreateAwsKmsRsaKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::_create_aws_kms_rsa_keyring_input::CreateAwsKmsRsaKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_aws_kms_rsa_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs new file mode 100644 index 000000000..0cdaeb864 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a AWS KMS RSA Keyring. +pub struct CreateAwsKmsRsaKeyringInput { + /// The RSA algorithm used to wrap and unwrap data keys. +pub encryption_algorithm: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub kms_key_id: ::std::option::Option<::std::string::String>, +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateAwsKmsRsaKeyringInput { + /// The RSA algorithm used to wrap and unwrap data keys. +pub fn encryption_algorithm(&self) -> &::std::option::Option { + &self.encryption_algorithm +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl CreateAwsKmsRsaKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsRsaKeyringInput`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsRsaKeyringInput`](crate::operation::operation::CreateAwsKmsRsaKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsRsaKeyringInputBuilder { + pub(crate) encryption_algorithm: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateAwsKmsRsaKeyringInputBuilder { + /// The RSA algorithm used to wrap and unwrap data keys. +pub fn encryption_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.encryption_algorithm = ::std::option::Option::Some(input.into()); + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn set_encryption_algorithm(mut self, input: ::std::option::Option) -> Self { + self.encryption_algorithm = input; + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn get_encryption_algorithm(&self) -> &::std::option::Option { + &self.encryption_algorithm +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`CreateAwsKmsRsaKeyringInput`](crate::operation::operation::CreateAwsKmsRsaKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyringInput { + encryption_algorithm: self.encryption_algorithm, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..5cf422f7e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_aws_kms_rsa_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/builders.rs new file mode 100644 index 000000000..ade16b06e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/builders.rs @@ -0,0 +1,135 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::_create_aws_kms_rsa_keyring_input::CreateAwsKmsRsaKeyringInputBuilder; + +impl CreateAwsKmsRsaKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_aws_kms_rsa_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateAwsKmsRsaKeyring`. +/// +/// Creates an AWS KMS RSA Keyring, which wraps and unwraps data keys using a single asymmetric AWS KMS Key for RSA. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateAwsKmsRsaKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringInputBuilder, +} +impl CreateAwsKmsRsaKeyringFluentBuilder { + /// Creates a new `CreateAwsKmsRsaKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateAwsKmsRsaKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::builders::CreateAwsKmsRsaKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_aws_kms_rsa_keyring::CreateAwsKmsRsaKeyring::send(&self.client, input).await + } + + /// The RSA algorithm used to wrap and unwrap data keys. +pub fn encryption_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.encryption_algorithm(input.into()); + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn set_encryption_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_encryption_algorithm(input); + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn get_encryption_algorithm(&self) -> &::std::option::Option { + self.inner.get_encryption_algorithm() +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.grant_tokens(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_grant_tokens(input); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_grant_tokens() +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kms_client(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kms_client(input); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + self.inner.get_kms_client() +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.kms_key_id(input.into()); + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_kms_key_id(input); + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_kms_key_id() +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..55e35e487 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateCryptographicMaterialsCache`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateCryptographicMaterialsCache; +impl CreateCryptographicMaterialsCache { + /// Creates a new `CreateCryptographicMaterialsCache` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_cache::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_output::CreateCryptographicMaterialsCacheOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_input::CreateCryptographicMaterialsCacheInput; + +pub(crate) mod _create_cryptographic_materials_cache_output; + +pub(crate) mod _create_cryptographic_materials_cache_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs new file mode 100644 index 000000000..a6bc3b0ff --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateCryptographicMaterialsCacheInput { + /// Which type of local cache to use. +pub cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheInput { + /// Which type of local cache to use. +pub fn cache(&self) -> &::std::option::Option { + &self.cache +} +} +impl CreateCryptographicMaterialsCacheInput { + /// Creates a new builder-style object to manufacture [`CreateCryptographicMaterialsCacheInput`](crate::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheInputBuilder::default() + } +} + +/// A builder for [`CreateCryptographicMaterialsCacheInput`](crate::operation::operation::CreateCryptographicMaterialsCacheInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateCryptographicMaterialsCacheInputBuilder { + pub(crate) cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheInputBuilder { + /// Which type of local cache to use. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.cache = ::std::option::Option::Some(input.into()); + self +} +/// Which type of local cache to use. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.cache = input; + self +} +/// Which type of local cache to use. +pub fn get_cache(&self) -> &::std::option::Option { + &self.cache +} + /// Consumes the builder and constructs a [`CreateCryptographicMaterialsCacheInput`](crate::operation::operation::CreateCryptographicMaterialsCacheInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheInput { + cache: self.cache, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_output.rs new file mode 100644 index 000000000..5cbf6f0a9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateCryptographicMaterialsCacheOutput { + #[allow(missing_docs)] +pub materials_cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheOutput { + #[allow(missing_docs)] +pub fn materials_cache(&self) -> &::std::option::Option { + &self.materials_cache +} +} +impl CreateCryptographicMaterialsCacheOutput { + /// Creates a new builder-style object to manufacture [`CreateCryptographicMaterialsCacheOutput`](crate::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheOutputBuilder::default() + } +} + +/// A builder for [`CreateCryptographicMaterialsCacheOutput`](crate::operation::operation::CreateCryptographicMaterialsCacheOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateCryptographicMaterialsCacheOutputBuilder { + pub(crate) materials_cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheOutputBuilder { + #[allow(missing_docs)] +pub fn materials_cache(mut self, input: impl ::std::convert::Into) -> Self { + self.materials_cache = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials_cache(mut self, input: ::std::option::Option) -> Self { + self.materials_cache = input; + self +} +#[allow(missing_docs)] +pub fn get_materials_cache(&self) -> &::std::option::Option { + &self.materials_cache +} + /// Consumes the builder and constructs a [`CreateCryptographicMaterialsCacheOutput`](crate::operation::operation::CreateCryptographicMaterialsCacheOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCacheOutput { + materials_cache: self.materials_cache, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/builders.rs new file mode 100644 index 000000000..5c4ebe42d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_output::CreateCryptographicMaterialsCacheOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::_create_cryptographic_materials_cache_input::CreateCryptographicMaterialsCacheInputBuilder; + +impl CreateCryptographicMaterialsCacheInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_cryptographic_materials_cache(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateCryptographicMaterialsCache`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateCryptographicMaterialsCacheFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheInputBuilder, +} +impl CreateCryptographicMaterialsCacheFluentBuilder { + /// Creates a new `CreateCryptographicMaterialsCache`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateCryptographicMaterialsCache as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::builders::CreateCryptographicMaterialsCacheInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_cryptographic_materials_cache::CreateCryptographicMaterialsCache::send(&self.client, input).await + } + + /// Which type of local cache to use. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cache(input.into()); + self +} +/// Which type of local cache to use. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cache(input); + self +} +/// Which type of local cache to use. +pub fn get_cache(&self) -> &::std::option::Option { + self.inner.get_cache() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs new file mode 100644 index 000000000..2d81f7447 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs @@ -0,0 +1,50 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateDefaultClientSupplier`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateDefaultClientSupplier; +impl CreateDefaultClientSupplier { + /// Creates a new `CreateDefaultClientSupplier` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::client_supplier::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::_create_default_client_supplier_output::CreateDefaultClientSupplierOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::_create_default_client_supplier_input::CreateDefaultClientSupplierInput; + +pub(crate) mod _create_default_client_supplier_output; + +pub(crate) mod _create_default_client_supplier_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_input.rs new file mode 100644 index 000000000..ffc7d7229 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_input.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateDefaultClientSupplierInput { + +} +impl CreateDefaultClientSupplierInput { + +} +impl CreateDefaultClientSupplierInput { + /// Creates a new builder-style object to manufacture [`CreateDefaultClientSupplierInput`](crate::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierInputBuilder::default() + } +} + +/// A builder for [`CreateDefaultClientSupplierInput`](crate::operation::operation::CreateDefaultClientSupplierInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDefaultClientSupplierInputBuilder { + +} +impl CreateDefaultClientSupplierInputBuilder { + + /// Consumes the builder and constructs a [`CreateDefaultClientSupplierInput`](crate::operation::operation::CreateDefaultClientSupplierInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierInput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_output.rs new file mode 100644 index 000000000..8dcb8a82f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateDefaultClientSupplierOutput { + #[allow(missing_docs)] +pub client: ::std::option::Option, +} +impl CreateDefaultClientSupplierOutput { + #[allow(missing_docs)] +pub fn client(&self) -> &::std::option::Option { + &self.client +} +} +impl CreateDefaultClientSupplierOutput { + /// Creates a new builder-style object to manufacture [`CreateDefaultClientSupplierOutput`](crate::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierOutputBuilder::default() + } +} + +/// A builder for [`CreateDefaultClientSupplierOutput`](crate::operation::operation::CreateDefaultClientSupplierOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDefaultClientSupplierOutputBuilder { + pub(crate) client: ::std::option::Option, +} +impl CreateDefaultClientSupplierOutputBuilder { + #[allow(missing_docs)] +pub fn client(mut self, input: impl ::std::convert::Into) -> Self { + self.client = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_client(mut self, input: ::std::option::Option) -> Self { + self.client = input; + self +} +#[allow(missing_docs)] +pub fn get_client(&self) -> &::std::option::Option { + &self.client +} + /// Consumes the builder and constructs a [`CreateDefaultClientSupplierOutput`](crate::operation::operation::CreateDefaultClientSupplierOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplierOutput { + client: self.client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/builders.rs new file mode 100644 index 000000000..2bfaae0bc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/builders.rs @@ -0,0 +1,65 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::_create_default_client_supplier_output::CreateDefaultClientSupplierOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::_create_default_client_supplier_input::CreateDefaultClientSupplierInputBuilder; + +impl CreateDefaultClientSupplierInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_default_client_supplier(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateDefaultClientSupplier`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateDefaultClientSupplierFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierInputBuilder, +} +impl CreateDefaultClientSupplierFluentBuilder { + /// Creates a new `CreateDefaultClientSupplier`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateDefaultClientSupplier as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::builders::CreateDefaultClientSupplierInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_default_client_supplier::CreateDefaultClientSupplier::send(&self.client, input).await + } + + +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs new file mode 100644 index 000000000..9f72087bc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateDefaultCryptographicMaterialsManager`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateDefaultCryptographicMaterialsManager; +impl CreateDefaultCryptographicMaterialsManager { + /// Creates a new `CreateDefaultCryptographicMaterialsManager` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::_create_cryptographic_materials_manager_output::CreateCryptographicMaterialsManagerOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::_create_default_cryptographic_materials_manager_input::CreateDefaultCryptographicMaterialsManagerInput; + +pub(crate) mod _create_cryptographic_materials_manager_output; + +pub(crate) mod _create_default_cryptographic_materials_manager_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_cryptographic_materials_manager_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_cryptographic_materials_manager_output.rs new file mode 100644 index 000000000..b9199c92a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_cryptographic_materials_manager_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Default Cryptographic Materials Manager. +pub struct CreateCryptographicMaterialsManagerOutput { + /// The created Default Cryptographic Materials Manager. +pub materials_manager: ::std::option::Option, +} +impl CreateCryptographicMaterialsManagerOutput { + /// The created Default Cryptographic Materials Manager. +pub fn materials_manager(&self) -> &::std::option::Option { + &self.materials_manager +} +} +impl CreateCryptographicMaterialsManagerOutput { + /// Creates a new builder-style object to manufacture [`CreateCryptographicMaterialsManagerOutput`](crate::operation::create_default_cryptographic_materials_manager::builders::CreateCryptographicMaterialsManagerOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateCryptographicMaterialsManagerOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateCryptographicMaterialsManagerOutputBuilder::default() + } +} + +/// A builder for [`CreateCryptographicMaterialsManagerOutput`](crate::operation::operation::CreateCryptographicMaterialsManagerOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateCryptographicMaterialsManagerOutputBuilder { + pub(crate) materials_manager: ::std::option::Option, +} +impl CreateCryptographicMaterialsManagerOutputBuilder { + /// The created Default Cryptographic Materials Manager. +pub fn materials_manager(mut self, input: impl ::std::convert::Into) -> Self { + self.materials_manager = ::std::option::Option::Some(input.into()); + self +} +/// The created Default Cryptographic Materials Manager. +pub fn set_materials_manager(mut self, input: ::std::option::Option) -> Self { + self.materials_manager = input; + self +} +/// The created Default Cryptographic Materials Manager. +pub fn get_materials_manager(&self) -> &::std::option::Option { + &self.materials_manager +} + /// Consumes the builder and constructs a [`CreateCryptographicMaterialsManagerOutput`](crate::operation::operation::CreateCryptographicMaterialsManagerOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateCryptographicMaterialsManagerOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateCryptographicMaterialsManagerOutput { + materials_manager: self.materials_manager, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs new file mode 100644 index 000000000..db88dcda5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Default Cryptographic Materials Manager. +pub struct CreateDefaultCryptographicMaterialsManagerInput { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub keyring: ::std::option::Option, +} +impl CreateDefaultCryptographicMaterialsManagerInput { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateDefaultCryptographicMaterialsManagerInput { + /// Creates a new builder-style object to manufacture [`CreateDefaultCryptographicMaterialsManagerInput`](crate::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder::default() + } +} + +/// A builder for [`CreateDefaultCryptographicMaterialsManagerInput`](crate::operation::operation::CreateDefaultCryptographicMaterialsManagerInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDefaultCryptographicMaterialsManagerInputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateDefaultCryptographicMaterialsManagerInputBuilder { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateDefaultCryptographicMaterialsManagerInput`](crate::operation::operation::CreateDefaultCryptographicMaterialsManagerInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManagerInput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/builders.rs new file mode 100644 index 000000000..15ef1c577 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::_create_cryptographic_materials_manager_output::CreateCryptographicMaterialsManagerOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::_create_default_cryptographic_materials_manager_input::CreateDefaultCryptographicMaterialsManagerInputBuilder; + +impl CreateDefaultCryptographicMaterialsManagerInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_default_cryptographic_materials_manager(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateDefaultCryptographicMaterialsManager`. +/// +/// Creates a Default Cryptographic Materials Manager. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateDefaultCryptographicMaterialsManagerFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder, +} +impl CreateDefaultCryptographicMaterialsManagerFluentBuilder { + /// Creates a new `CreateDefaultCryptographicMaterialsManager`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateDefaultCryptographicMaterialsManager as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_default_cryptographic_materials_manager::CreateDefaultCryptographicMaterialsManager::send(&self.client, input).await + } + + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.keyring(input.into()); + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_keyring(input); + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn get_keyring(&self) -> &::std::option::Option { + self.inner.get_keyring() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs new file mode 100644 index 000000000..31e7d2b8b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateMultiKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateMultiKeyring; +impl CreateMultiKeyring { + /// Creates a new `CreateMultiKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::_create_multi_keyring_input::CreateMultiKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_multi_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..de7d26e26 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_multi_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_multi_keyring_input.rs new file mode 100644 index 000000000..3513f83dd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_multi_keyring_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Multi-Keyring. +pub struct CreateMultiKeyringInput { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub child_keyrings: ::std::option::Option<::std::vec::Vec>, +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub generator: ::std::option::Option, +} +impl CreateMultiKeyringInput { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn child_keyrings(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.child_keyrings +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn generator(&self) -> &::std::option::Option { + &self.generator +} +} +impl CreateMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateMultiKeyringInput`](crate::operation::create_multi_keyring::builders::CreateMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateMultiKeyringInput`](crate::operation::operation::CreateMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateMultiKeyringInputBuilder { + pub(crate) child_keyrings: ::std::option::Option<::std::vec::Vec>, +pub(crate) generator: ::std::option::Option, +} +impl CreateMultiKeyringInputBuilder { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn child_keyrings(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.child_keyrings = ::std::option::Option::Some(input.into()); + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn set_child_keyrings(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.child_keyrings = input; + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn get_child_keyrings(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.child_keyrings +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn generator(mut self, input: impl ::std::convert::Into) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn set_generator(mut self, input: ::std::option::Option) -> Self { + self.generator = input; + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn get_generator(&self) -> &::std::option::Option { + &self.generator +} + /// Consumes the builder and constructs a [`CreateMultiKeyringInput`](crate::operation::operation::CreateMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyringInput { + child_keyrings: self.child_keyrings, +generator: self.generator, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs new file mode 100644 index 000000000..7a5266610 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs @@ -0,0 +1,93 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::_create_multi_keyring_input::CreateMultiKeyringInputBuilder; + +impl CreateMultiKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_multi_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateMultiKeyring`. +/// +/// Creates a Multi-Keyring comprised of one or more other Keyrings. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateMultiKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringInputBuilder, +} +impl CreateMultiKeyringFluentBuilder { + /// Creates a new `CreateMultiKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateMultiKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::builders::CreateMultiKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_multi_keyring::CreateMultiKeyring::send(&self.client, input).await + } + + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn child_keyrings(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.child_keyrings(input.into()); + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn set_child_keyrings(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_child_keyrings(input); + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn get_child_keyrings(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_child_keyrings() +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn generator(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.generator(input.into()); + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn set_generator(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_generator(input); + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn get_generator(&self) -> &::std::option::Option { + self.inner.get_generator() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs new file mode 100644 index 000000000..8a6a3efff --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs @@ -0,0 +1,73 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateRawAesKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateRawAesKeyring; +impl CreateRawAesKeyring { + /// Creates a new `CreateRawAesKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::_create_raw_aes_keyring_input::CreateRawAesKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_raw_aes_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..b782a386e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_raw_aes_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs new file mode 100644 index 000000000..50a6722de --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Raw AES Keyring. +pub struct CreateRawAesKeyringInput { + /// A name associated with this wrapping key. +pub key_name: ::std::option::Option<::std::string::String>, +/// A namespace associated with this wrapping key. +pub key_namespace: ::std::option::Option<::std::string::String>, +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub wrapping_alg: ::std::option::Option, +/// The AES key used with AES_GCM encryption and decryption. +pub wrapping_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawAesKeyringInput { + /// A name associated with this wrapping key. +pub fn key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn wrapping_alg(&self) -> &::std::option::Option { + &self.wrapping_alg +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn wrapping_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.wrapping_key +} +} +impl CreateRawAesKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawAesKeyringInput`](crate::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawAesKeyringInput`](crate::operation::operation::CreateRawAesKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawAesKeyringInputBuilder { + pub(crate) key_name: ::std::option::Option<::std::string::String>, +pub(crate) key_namespace: ::std::option::Option<::std::string::String>, +pub(crate) wrapping_alg: ::std::option::Option, +pub(crate) wrapping_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawAesKeyringInputBuilder { + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_name = ::std::option::Option::Some(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_name = input; + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_namespace = ::std::option::Option::Some(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_namespace = input; + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn wrapping_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.wrapping_alg = ::std::option::Option::Some(input.into()); + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn set_wrapping_alg(mut self, input: ::std::option::Option) -> Self { + self.wrapping_alg = input; + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn get_wrapping_alg(&self) -> &::std::option::Option { + &self.wrapping_alg +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn wrapping_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.wrapping_key = ::std::option::Option::Some(input.into()); + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn set_wrapping_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.wrapping_key = input; + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn get_wrapping_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.wrapping_key +} + /// Consumes the builder and constructs a [`CreateRawAesKeyringInput`](crate::operation::operation::CreateRawAesKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyringInput { + key_name: self.key_name, +key_namespace: self.key_namespace, +wrapping_alg: self.wrapping_alg, +wrapping_key: self.wrapping_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/builders.rs new file mode 100644 index 000000000..ff317981a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/builders.rs @@ -0,0 +1,121 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::_create_raw_aes_keyring_input::CreateRawAesKeyringInputBuilder; + +impl CreateRawAesKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_raw_aes_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateRawAesKeyring`. +/// +/// Creates a Raw AES Keyring, which wraps and unwraps data keys locally using AES_GCM. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateRawAesKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringInputBuilder, +} +impl CreateRawAesKeyringFluentBuilder { + /// Creates a new `CreateRawAesKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateRawAesKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::builders::CreateRawAesKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_raw_aes_keyring::CreateRawAesKeyring::send(&self.client, input).await + } + + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.key_name(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_key_name(input); + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_key_name() +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.key_namespace(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_key_namespace(input); + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_key_namespace() +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn wrapping_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.wrapping_alg(input.into()); + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn set_wrapping_alg(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_wrapping_alg(input); + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn get_wrapping_alg(&self) -> &::std::option::Option { + self.inner.get_wrapping_alg() +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn wrapping_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.wrapping_key(input.into()); + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn set_wrapping_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_wrapping_key(input); + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn get_wrapping_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_wrapping_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..91b9f6bdd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs @@ -0,0 +1,61 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateRawEcdhKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateRawEcdhKeyring; +impl CreateRawEcdhKeyring { + /// Creates a new `CreateRawEcdhKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::_create_raw_ecdh_keyring_input::CreateRawEcdhKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_raw_ecdh_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..597962bb5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_raw_ecdh_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs new file mode 100644 index 000000000..e090ebcaa --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a raw ECDH Keyring. +pub struct CreateRawEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub key_agreement_scheme: ::std::option::Option, +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub curve_spec: ::std::option::Option, +} +impl CreateRawEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +} +impl CreateRawEcdhKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawEcdhKeyringInput`](crate::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawEcdhKeyringInput`](crate::operation::operation::CreateRawEcdhKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawEcdhKeyringInputBuilder { + pub(crate) key_agreement_scheme: ::std::option::Option, +pub(crate) curve_spec: ::std::option::Option, +} +impl CreateRawEcdhKeyringInputBuilder { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.key_agreement_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.key_agreement_scheme = input; + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.curve_spec = ::std::option::Option::Some(input.into()); + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.curve_spec = input; + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} + /// Consumes the builder and constructs a [`CreateRawEcdhKeyringInput`](crate::operation::operation::CreateRawEcdhKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyringInput { + key_agreement_scheme: self.key_agreement_scheme, +curve_spec: self.curve_spec, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/builders.rs new file mode 100644 index 000000000..3aad0b022 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/builders.rs @@ -0,0 +1,93 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::_create_raw_ecdh_keyring_input::CreateRawEcdhKeyringInputBuilder; + +impl CreateRawEcdhKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_raw_ecdh_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateRawEcdhKeyring`. +/// +/// Creates a Raw ECDH Keyring, which wraps and unwraps data keys by deriving a shared data key from the established shared secret between parties through the ECDH protocol. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateRawEcdhKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringInputBuilder, +} +impl CreateRawEcdhKeyringFluentBuilder { + /// Creates a new `CreateRawEcdhKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateRawEcdhKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::builders::CreateRawEcdhKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_raw_ecdh_keyring::CreateRawEcdhKeyring::send(&self.client, input).await + } + + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.key_agreement_scheme(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_key_agreement_scheme(input); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + self.inner.get_key_agreement_scheme() +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.curve_spec(input.into()); + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_curve_spec(input); + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + self.inner.get_curve_spec() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..4c8f617b8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs @@ -0,0 +1,67 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateRawRsaKeyring`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateRawRsaKeyring; +impl CreateRawRsaKeyring { + /// Creates a new `CreateRawRsaKeyring` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::keyring::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::_create_keyring_output::CreateKeyringOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::_create_raw_rsa_keyring_input::CreateRawRsaKeyringInput; + +pub(crate) mod _create_keyring_output; + +pub(crate) mod _create_raw_rsa_keyring_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_keyring_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_keyring_output.rs new file mode 100644 index 000000000..ed578fbb7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_keyring_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating a Keyring. +pub struct CreateKeyringOutput { + /// The created Keyring. +pub keyring: ::std::option::Option, +} +impl CreateKeyringOutput { + /// The created Keyring. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateKeyringOutput { + /// Creates a new builder-style object to manufacture [`CreateKeyringOutput`](crate::operation::create_raw_rsa_keyring::builders::CreateKeyringOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateKeyringOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateKeyringOutputBuilder::default() + } +} + +/// A builder for [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateKeyringOutputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateKeyringOutputBuilder { + /// The created Keyring. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The created Keyring. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The created Keyring. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateKeyringOutput`](crate::operation::operation::CreateKeyringOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateKeyringOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateKeyringOutput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs new file mode 100644 index 000000000..275ed8a7e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Raw RAW Keyring. +pub struct CreateRawRsaKeyringInput { + /// A name associated with this wrapping key. +pub key_name: ::std::option::Option<::std::string::String>, +/// A namespace associated with this wrapping key. +pub key_namespace: ::std::option::Option<::std::string::String>, +/// The RSA padding scheme to use with this keyring. +pub padding_scheme: ::std::option::Option, +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub private_key: ::std::option::Option<::aws_smithy_types::Blob>, +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawRsaKeyringInput { + /// A name associated with this wrapping key. +pub fn key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The RSA padding scheme to use with this keyring. +pub fn padding_scheme(&self) -> &::std::option::Option { + &self.padding_scheme +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl CreateRawRsaKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawRsaKeyringInput`](crate::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawRsaKeyringInput`](crate::operation::operation::CreateRawRsaKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawRsaKeyringInputBuilder { + pub(crate) key_name: ::std::option::Option<::std::string::String>, +pub(crate) key_namespace: ::std::option::Option<::std::string::String>, +pub(crate) padding_scheme: ::std::option::Option, +pub(crate) private_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawRsaKeyringInputBuilder { + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_name = ::std::option::Option::Some(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_name = input; + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_namespace = ::std::option::Option::Some(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_namespace = input; + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The RSA padding scheme to use with this keyring. +pub fn padding_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.padding_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The RSA padding scheme to use with this keyring. +pub fn set_padding_scheme(mut self, input: ::std::option::Option) -> Self { + self.padding_scheme = input; + self +} +/// The RSA padding scheme to use with this keyring. +pub fn get_padding_scheme(&self) -> &::std::option::Option { + &self.padding_scheme +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.private_key = input; + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`CreateRawRsaKeyringInput`](crate::operation::operation::CreateRawRsaKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyringInput { + key_name: self.key_name, +key_namespace: self.key_namespace, +padding_scheme: self.padding_scheme, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/builders.rs new file mode 100644 index 000000000..b456f9ef1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/builders.rs @@ -0,0 +1,135 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::_create_keyring_output::CreateKeyringOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::_create_raw_rsa_keyring_input::CreateRawRsaKeyringInputBuilder; + +impl CreateRawRsaKeyringInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_raw_rsa_keyring(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateRawRsaKeyring`. +/// +/// Creates a Raw RSA Keyring, which wraps and unwraps data keys locally using RSA. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateRawRsaKeyringFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringInputBuilder, +} +impl CreateRawRsaKeyringFluentBuilder { + /// Creates a new `CreateRawRsaKeyring`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateRawRsaKeyring as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::builders::CreateRawRsaKeyringInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_raw_rsa_keyring::CreateRawRsaKeyring::send(&self.client, input).await + } + + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.key_name(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_key_name(input); + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_key_name() +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.key_namespace(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_key_namespace(input); + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_key_namespace() +} +/// The RSA padding scheme to use with this keyring. +pub fn padding_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.padding_scheme(input.into()); + self +} +/// The RSA padding scheme to use with this keyring. +pub fn set_padding_scheme(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_padding_scheme(input); + self +} +/// The RSA padding scheme to use with this keyring. +pub fn get_padding_scheme(&self) -> &::std::option::Option { + self.inner.get_padding_scheme() +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.private_key(input.into()); + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_private_key(input); + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_private_key() +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs new file mode 100644 index 000000000..4aea3629f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs @@ -0,0 +1,55 @@ +// 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. +/// Orchestration and serialization glue logic for `CreateRequiredEncryptionContextCmm`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateRequiredEncryptionContextCmm; +impl CreateRequiredEncryptionContextCmm { + /// Creates a new `CreateRequiredEncryptionContextCmm` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(inner_result.value().clone()) +, + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::_create_required_encryption_context_cmm_output::CreateRequiredEncryptionContextCmmOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::_create_required_encryption_context_cmm_input::CreateRequiredEncryptionContextCmmInput; + +pub(crate) mod _create_required_encryption_context_cmm_output; + +pub(crate) mod _create_required_encryption_context_cmm_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs new file mode 100644 index 000000000..63b2ae588 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. +pub struct CreateRequiredEncryptionContextCmmInput { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub keyring: ::std::option::Option, +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub underlying_cmm: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmInput { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn underlying_cmm(&self) -> &::std::option::Option { + &self.underlying_cmm +} +} +impl CreateRequiredEncryptionContextCmmInput { + /// Creates a new builder-style object to manufacture [`CreateRequiredEncryptionContextCmmInput`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmInputBuilder::default() + } +} + +/// A builder for [`CreateRequiredEncryptionContextCmmInput`](crate::operation::operation::CreateRequiredEncryptionContextCmmInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRequiredEncryptionContextCmmInputBuilder { + pub(crate) keyring: ::std::option::Option, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) underlying_cmm: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmInputBuilder { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn underlying_cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.underlying_cmm = ::std::option::Option::Some(input.into()); + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn set_underlying_cmm(mut self, input: ::std::option::Option) -> Self { + self.underlying_cmm = input; + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn get_underlying_cmm(&self) -> &::std::option::Option { + &self.underlying_cmm +} + /// Consumes the builder and constructs a [`CreateRequiredEncryptionContextCmmInput`](crate::operation::operation::CreateRequiredEncryptionContextCmmInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmInput { + keyring: self.keyring, +required_encryption_context_keys: self.required_encryption_context_keys, +underlying_cmm: self.underlying_cmm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_output.rs new file mode 100644 index 000000000..dfdce272b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for creating an Required Encryption Context Cryptographic Materials Manager. +pub struct CreateRequiredEncryptionContextCmmOutput { + /// The created Required Encryption Context Cryptographic Materials Manager. +pub materials_manager: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmOutput { + /// The created Required Encryption Context Cryptographic Materials Manager. +pub fn materials_manager(&self) -> &::std::option::Option { + &self.materials_manager +} +} +impl CreateRequiredEncryptionContextCmmOutput { + /// Creates a new builder-style object to manufacture [`CreateRequiredEncryptionContextCmmOutput`](crate::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmOutputBuilder::default() + } +} + +/// A builder for [`CreateRequiredEncryptionContextCmmOutput`](crate::operation::operation::CreateRequiredEncryptionContextCmmOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRequiredEncryptionContextCmmOutputBuilder { + pub(crate) materials_manager: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmOutputBuilder { + /// The created Required Encryption Context Cryptographic Materials Manager. +pub fn materials_manager(mut self, input: impl ::std::convert::Into) -> Self { + self.materials_manager = ::std::option::Option::Some(input.into()); + self +} +/// The created Required Encryption Context Cryptographic Materials Manager. +pub fn set_materials_manager(mut self, input: ::std::option::Option) -> Self { + self.materials_manager = input; + self +} +/// The created Required Encryption Context Cryptographic Materials Manager. +pub fn get_materials_manager(&self) -> &::std::option::Option { + &self.materials_manager +} + /// Consumes the builder and constructs a [`CreateRequiredEncryptionContextCmmOutput`](crate::operation::operation::CreateRequiredEncryptionContextCmmOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmmOutput { + materials_manager: self.materials_manager, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/builders.rs new file mode 100644 index 000000000..615d5e13a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/builders.rs @@ -0,0 +1,107 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::_create_required_encryption_context_cmm_output::CreateRequiredEncryptionContextCmmOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::_create_required_encryption_context_cmm_input::CreateRequiredEncryptionContextCmmInputBuilder; + +impl CreateRequiredEncryptionContextCmmInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.create_required_encryption_context_cmm(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateRequiredEncryptionContextCmm`. +/// +/// Creates an Required Encryption Context Cryptographic Materials Manager. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateRequiredEncryptionContextCmmFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmInputBuilder, +} +impl CreateRequiredEncryptionContextCmmFluentBuilder { + /// Creates a new `CreateRequiredEncryptionContextCmm`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateRequiredEncryptionContextCmm as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::builders::CreateRequiredEncryptionContextCmmInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::create_required_encryption_context_cmm::CreateRequiredEncryptionContextCmm::send(&self.client, input).await + } + + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.keyring(input.into()); + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_keyring(input); + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn get_keyring(&self) -> &::std::option::Option { + self.inner.get_keyring() +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn underlying_cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.underlying_cmm(input.into()); + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn set_underlying_cmm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_underlying_cmm(input); + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn get_underlying_cmm(&self) -> &::std::option::Option { + self.inner.get_underlying_cmm() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs new file mode 100644 index 000000000..7f29f63a4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs @@ -0,0 +1,58 @@ +// 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. +/// Orchestration and serialization glue logic for `DecryptMaterials`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecryptMaterials; +impl DecryptMaterials { + /// Creates a new `DecryptMaterials` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_manager: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + input: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput, + ) -> ::std::result::Result< + 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); +} + cryptographic_materials_manager.inner.borrow_mut().decrypt_materials(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::_decrypt_materials_output::DecryptMaterialsOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::_decrypt_materials_input::DecryptMaterialsInput; + +pub(crate) mod _decrypt_materials_output; + +pub(crate) mod _decrypt_materials_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_input.rs new file mode 100644 index 000000000..26c3199b2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub reproduced_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl DecryptMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn reproduced_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.reproduced_encryption_context +} +} +impl DecryptMaterialsInput { + /// Creates a new builder-style object to manufacture [`DecryptMaterialsInput`](crate::operation::decrypt_materials::builders::DecryptMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsInputBuilder::default() + } +} + +/// A builder for [`DecryptMaterialsInput`](crate::operation::operation::DecryptMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) reproduced_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl DecryptMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn reproduced_encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.reproduced_encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_reproduced_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.reproduced_encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_reproduced_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.reproduced_encryption_context +} + /// Consumes the builder and constructs a [`DecryptMaterialsInput`](crate::operation::operation::DecryptMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +commitment_policy: self.commitment_policy, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +reproduced_encryption_context: self.reproduced_encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_output.rs new file mode 100644 index 000000000..ec595af3e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptMaterialsOutput { + #[allow(missing_docs)] +pub decryption_materials: ::std::option::Option, +} +impl DecryptMaterialsOutput { + #[allow(missing_docs)] +pub fn decryption_materials(&self) -> &::std::option::Option { + &self.decryption_materials +} +} +impl DecryptMaterialsOutput { + /// Creates a new builder-style object to manufacture [`DecryptMaterialsOutput`](crate::operation::decrypt_materials::builders::DecryptMaterialsOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsOutputBuilder::default() + } +} + +/// A builder for [`DecryptMaterialsOutput`](crate::operation::operation::DecryptMaterialsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptMaterialsOutputBuilder { + pub(crate) decryption_materials: ::std::option::Option, +} +impl DecryptMaterialsOutputBuilder { + #[allow(missing_docs)] +pub fn decryption_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.decryption_materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_decryption_materials(mut self, input: ::std::option::Option) -> Self { + self.decryption_materials = input; + self +} +#[allow(missing_docs)] +pub fn get_decryption_materials(&self) -> &::std::option::Option { + &self.decryption_materials +} + /// Consumes the builder and constructs a [`DecryptMaterialsOutput`](crate::operation::operation::DecryptMaterialsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput { + decryption_materials: self.decryption_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs new file mode 100644 index 000000000..936e0e0d3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::_decrypt_materials_output::DecryptMaterialsOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::_decrypt_materials_input::DecryptMaterialsInputBuilder; + +impl DecryptMaterialsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_manager: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_manager.decrypt_materials(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecryptMaterials`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecryptMaterialsFluentBuilder { + cryptographic_materials_manager: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsInputBuilder, +} +impl DecryptMaterialsFluentBuilder { + /// Creates a new `DecryptMaterials`. + pub(crate) fn new(cryptographic_materials_manager: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) -> Self { + Self { + cryptographic_materials_manager, + inner: ::std::default::Default::default(), + } + } + /// Access the DecryptMaterials as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterials::send(&self.cryptographic_materials_manager, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite_id(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite_id() +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.commitment_policy(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_commitment_policy(input); + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + self.inner.get_commitment_policy() +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.encrypted_data_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_encrypted_data_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_encrypted_data_keys() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn reproduced_encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.reproduced_encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_reproduced_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_reproduced_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_reproduced_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_reproduced_encryption_context() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs new file mode 100644 index 000000000..e940a8106 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `DecryptionMaterialsWithPlaintextDataKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecryptionMaterialsWithPlaintextDataKey; +impl DecryptionMaterialsWithPlaintextDataKey { + /// Creates a new `DecryptionMaterialsWithPlaintextDataKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::_decryption_materials::DecryptionMaterials; + +pub(crate) mod _unit; + +pub(crate) mod _decryption_materials; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_decryption_materials.rs new file mode 100644 index 000000000..c61998d6d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_decryption_materials.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl DecryptionMaterials { + /// Creates a new builder-style object to manufacture [`DecryptionMaterials`](crate::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsBuilder::default() + } +} + +/// A builder for [`DecryptionMaterials`](crate::operation::operation::DecryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`DecryptionMaterials`](crate::operation::operation::DecryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterials { + algorithm_suite: self.algorithm_suite, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +symmetric_signing_key: self.symmetric_signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_unit.rs new file mode 100644 index 000000000..27b42ff84 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::decryption_materials_with_plaintext_data_key::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/builders.rs new file mode 100644 index 000000000..3a3b9dec5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/builders.rs @@ -0,0 +1,148 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::_decryption_materials::DecryptionMaterialsBuilder; + +impl DecryptionMaterialsBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.decryption_materials_with_plaintext_data_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecryptionMaterialsWithPlaintextDataKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecryptionMaterialsWithPlaintextDataKeyFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsBuilder, +} +impl DecryptionMaterialsWithPlaintextDataKeyFluentBuilder { + /// Creates a new `DecryptionMaterialsWithPlaintextDataKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DecryptionMaterialsWithPlaintextDataKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::builders::DecryptionMaterialsBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::decryption_materials_with_plaintext_data_key::DecryptionMaterialsWithPlaintextDataKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.plaintext_data_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_plaintext_data_key(input); + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_plaintext_data_key() +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.symmetric_signing_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_symmetric_signing_key(input); + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_symmetric_signing_key() +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.verification_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_verification_key(input); + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_verification_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs new file mode 100644 index 000000000..8ab002d54 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs @@ -0,0 +1,40 @@ +// 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. +/// Orchestration and serialization glue logic for `DeleteCacheEntry`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DeleteCacheEntry; +impl DeleteCacheEntry { + /// Creates a new `DeleteCacheEntry` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + input: crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput, + ) -> ::std::result::Result< + (), + 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); +} + cryptographic_materials_cache.inner.borrow_mut().delete_cache_entry(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::_delete_cache_entry_input::DeleteCacheEntryInput; + +pub(crate) mod _unit; + +pub(crate) mod _delete_cache_entry_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_delete_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_delete_cache_entry_input.rs new file mode 100644 index 000000000..2a0c69b85 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_delete_cache_entry_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeleteCacheEntryInput { + #[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeleteCacheEntryInput { + #[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl DeleteCacheEntryInput { + /// Creates a new builder-style object to manufacture [`DeleteCacheEntryInput`](crate::operation::delete_cache_entry::builders::DeleteCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryInputBuilder::default() + } +} + +/// A builder for [`DeleteCacheEntryInput`](crate::operation::operation::DeleteCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeleteCacheEntryInputBuilder { + pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeleteCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`DeleteCacheEntryInput`](crate::operation::operation::DeleteCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput { + identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs new file mode 100644 index 000000000..b52810dd9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::delete_cache_entry::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs new file mode 100644 index 000000000..a4f242e0d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::_delete_cache_entry_input::DeleteCacheEntryInputBuilder; + +impl DeleteCacheEntryInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_cache.delete_cache_entry(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DeleteCacheEntry`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DeleteCacheEntryFluentBuilder { + cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryInputBuilder, +} +impl DeleteCacheEntryFluentBuilder { + /// Creates a new `DeleteCacheEntry`. + pub(crate) fn new(cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) -> Self { + Self { + cryptographic_materials_cache, + inner: ::std::default::Default::default(), + } + } + /// Access the DeleteCacheEntry as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntry::send(&self.cryptographic_materials_cache, input).await + } + + #[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.identifier(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_identifier(input); + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs new file mode 100644 index 000000000..7da02cb35 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs @@ -0,0 +1,72 @@ +// 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. +/// Orchestration and serialization glue logic for `EncryptionMaterialsHasPlaintextDataKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EncryptionMaterialsHasPlaintextDataKey; +impl EncryptionMaterialsHasPlaintextDataKey { + /// Creates a new `EncryptionMaterialsHasPlaintextDataKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::_encryption_materials::EncryptionMaterials; + +pub(crate) mod _unit; + +pub(crate) mod _encryption_materials; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_encryption_materials.rs new file mode 100644 index 000000000..607b1af5f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_encryption_materials.rs @@ -0,0 +1,190 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EncryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} +} +impl EncryptionMaterials { + /// Creates a new builder-style object to manufacture [`EncryptionMaterials`](crate::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsBuilder::default() + } +} + +/// A builder for [`EncryptionMaterials`](crate::operation::operation::EncryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} + /// Consumes the builder and constructs a [`EncryptionMaterials`](crate::operation::operation::EncryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterials { + algorithm_suite: self.algorithm_suite, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +signing_key: self.signing_key, +symmetric_signing_keys: self.symmetric_signing_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_unit.rs new file mode 100644 index 000000000..015ef24c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::encryption_materials_has_plaintext_data_key::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/builders.rs new file mode 100644 index 000000000..f3ec99f6d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/builders.rs @@ -0,0 +1,162 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::_encryption_materials::EncryptionMaterialsBuilder; + +impl EncryptionMaterialsBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.encryption_materials_has_plaintext_data_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EncryptionMaterialsHasPlaintextDataKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EncryptionMaterialsHasPlaintextDataKeyFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsBuilder, +} +impl EncryptionMaterialsHasPlaintextDataKeyFluentBuilder { + /// Creates a new `EncryptionMaterialsHasPlaintextDataKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EncryptionMaterialsHasPlaintextDataKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::builders::EncryptionMaterialsBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::encryption_materials_has_plaintext_data_key::EncryptionMaterialsHasPlaintextDataKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite() +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.encrypted_data_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_encrypted_data_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_encrypted_data_keys() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.plaintext_data_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_plaintext_data_key(input); + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_plaintext_data_key() +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.signing_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_signing_key(input); + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_signing_key() +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.inner = self.inner.symmetric_signing_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.inner = self.inner.set_symmetric_signing_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + self.inner.get_symmetric_signing_keys() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs new file mode 100644 index 000000000..0817eb446 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GetAlgorithmSuiteInfo`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAlgorithmSuiteInfo; +impl GetAlgorithmSuiteInfo { + /// Creates a new `GetAlgorithmSuiteInfo` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfoInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::get_algorithm_suite_info::_get_algorithm_suite_info_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::_algorithm_suite_info::AlgorithmSuiteInfo; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::_get_algorithm_suite_info_input::GetAlgorithmSuiteInfoInput; + +pub(crate) mod _algorithm_suite_info; + +pub(crate) mod _get_algorithm_suite_info_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_algorithm_suite_info.rs new file mode 100644 index 000000000..827565a56 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_algorithm_suite_info.rs @@ -0,0 +1,234 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub commitment: ::std::option::Option, +#[allow(missing_docs)] +pub edk_wrapping: ::std::option::Option, +#[allow(missing_docs)] +pub encrypt: ::std::option::Option, +#[allow(missing_docs)] +pub id: ::std::option::Option, +#[allow(missing_docs)] +pub kdf: ::std::option::Option, +#[allow(missing_docs)] +pub message_version: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub signature: ::std::option::Option, +#[allow(missing_docs)] +pub symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub fn binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} +} +impl AlgorithmSuiteInfo { + /// Creates a new builder-style object to manufacture [`AlgorithmSuiteInfo`](crate::operation::get_algorithm_suite_info::builders::AlgorithmSuiteInfo). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder::default() + } +} + +/// A builder for [`AlgorithmSuiteInfo`](crate::operation::operation::AlgorithmSuiteInfo). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AlgorithmSuiteInfoBuilder { + pub(crate) binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) commitment: ::std::option::Option, +pub(crate) edk_wrapping: ::std::option::Option, +pub(crate) encrypt: ::std::option::Option, +pub(crate) id: ::std::option::Option, +pub(crate) kdf: ::std::option::Option, +pub(crate) message_version: ::std::option::Option<::std::primitive::i32>, +pub(crate) signature: ::std::option::Option, +pub(crate) symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfoBuilder { + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.binary_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.binary_id = input; + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment(mut self, input: ::std::option::Option) -> Self { + self.commitment = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(mut self, input: impl ::std::convert::Into) -> Self { + self.edk_wrapping = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_edk_wrapping(mut self, input: ::std::option::Option) -> Self { + self.edk_wrapping = input; + self +} +#[allow(missing_docs)] +pub fn get_edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(mut self, input: impl ::std::convert::Into) -> Self { + self.encrypt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypt(mut self, input: ::std::option::Option) -> Self { + self.encrypt = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(mut self, input: impl ::std::convert::Into) -> Self { + self.id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_id(mut self, input: ::std::option::Option) -> Self { + self.id = input; + self +} +#[allow(missing_docs)] +pub fn get_id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.kdf = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_kdf(mut self, input: ::std::option::Option) -> Self { + self.kdf = input; + self +} +#[allow(missing_docs)] +pub fn get_kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.message_version = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.message_version = input; + self +} +#[allow(missing_docs)] +pub fn get_message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(mut self, input: impl ::std::convert::Into) -> Self { + self.symmetric_signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signature(mut self, input: ::std::option::Option) -> Self { + self.symmetric_signature = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} + /// Consumes the builder and constructs a [`AlgorithmSuiteInfo`](crate::operation::operation::AlgorithmSuiteInfo). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo { + binary_id: self.binary_id, +commitment: self.commitment, +edk_wrapping: self.edk_wrapping, +encrypt: self.encrypt, +id: self.id, +kdf: self.kdf, +message_version: self.message_version, +signature: self.signature, +symmetric_signature: self.symmetric_signature, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_get_algorithm_suite_info_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_get_algorithm_suite_info_input.rs new file mode 100644 index 000000000..b235c23a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_get_algorithm_suite_info_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetAlgorithmSuiteInfoInput { + #[allow(missing_docs)] +pub binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetAlgorithmSuiteInfoInput { + #[allow(missing_docs)] +pub fn binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +} +impl GetAlgorithmSuiteInfoInput { + /// Creates a new builder-style object to manufacture [`GetAlgorithmSuiteInfoInput`](crate::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoInputBuilder::default() + } +} + +/// A builder for [`GetAlgorithmSuiteInfoInput`](crate::operation::operation::GetAlgorithmSuiteInfoInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetAlgorithmSuiteInfoInputBuilder { + pub(crate) binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetAlgorithmSuiteInfoInputBuilder { + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.binary_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.binary_id = input; + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} + /// Consumes the builder and constructs a [`GetAlgorithmSuiteInfoInput`](crate::operation::operation::GetAlgorithmSuiteInfoInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfoInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfoInput { + binary_id: self.binary_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/builders.rs new file mode 100644 index 000000000..b9225f95c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::_algorithm_suite_info::AlgorithmSuiteInfoBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::_get_algorithm_suite_info_input::GetAlgorithmSuiteInfoInputBuilder; + +impl GetAlgorithmSuiteInfoInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.get_algorithm_suite_info(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetAlgorithmSuiteInfo`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetAlgorithmSuiteInfoFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoInputBuilder, +} +impl GetAlgorithmSuiteInfoFluentBuilder { + /// Creates a new `GetAlgorithmSuiteInfo`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetAlgorithmSuiteInfo as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::builders::GetAlgorithmSuiteInfoInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::AlgorithmSuiteInfo, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::get_algorithm_suite_info::GetAlgorithmSuiteInfo::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.binary_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_binary_id(input); + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_binary_id() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs new file mode 100644 index 000000000..cda085422 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs @@ -0,0 +1,40 @@ +// 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. +/// Orchestration and serialization glue logic for `GetBranchKeyId`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetBranchKeyId; +impl GetBranchKeyId { + /// Creates a new `GetBranchKeyId` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + branch_key_id_supplier: &crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef, + input: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput, + ) -> ::std::result::Result< + 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); +} + branch_key_id_supplier.inner.borrow_mut().get_branch_key_id(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::_get_branch_key_id_output::GetBranchKeyIdOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::_get_branch_key_id_input::GetBranchKeyIdInput; + +pub(crate) mod _get_branch_key_id_output; + +pub(crate) mod _get_branch_key_id_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_input.rs new file mode 100644 index 000000000..1e5a6fffb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption +pub struct GetBranchKeyIdInput { + /// The Encryption Context used with this encryption or decryption. +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl GetBranchKeyIdInput { + /// The Encryption Context used with this encryption or decryption. +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +} +impl GetBranchKeyIdInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdInput`](crate::operation::get_branch_key_id::builders::GetBranchKeyIdInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdInput`](crate::operation::operation::GetBranchKeyIdInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdInputBuilder { + pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl GetBranchKeyIdInputBuilder { + /// The Encryption Context used with this encryption or decryption. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} + /// Consumes the builder and constructs a [`GetBranchKeyIdInput`](crate::operation::operation::GetBranchKeyIdInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput { + encryption_context: self.encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_output.rs new file mode 100644 index 000000000..04b71db00 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub struct GetBranchKeyIdOutput { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdOutput { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +} +impl GetBranchKeyIdOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdOutput`](crate::operation::get_branch_key_id::builders::GetBranchKeyIdOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdOutput`](crate::operation::operation::GetBranchKeyIdOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdOutputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdOutputBuilder { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn branch_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} + /// Consumes the builder and constructs a [`GetBranchKeyIdOutput`](crate::operation::operation::GetBranchKeyIdOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput { + branch_key_id: self.branch_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/builders.rs new file mode 100644 index 000000000..5102ba1a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::_get_branch_key_id_output::GetBranchKeyIdOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::_get_branch_key_id_input::GetBranchKeyIdInputBuilder; + +impl GetBranchKeyIdInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + branch_key_id_supplier: &crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = branch_key_id_supplier.get_branch_key_id(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetBranchKeyId`. +/// +/// Given the Encryption Context associated with this encryption or decryption, returns the branch key that should be responsible for unwrapping or wrapping the data key. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetBranchKeyIdFluentBuilder { + branch_key_id_supplier: crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdInputBuilder, +} +impl GetBranchKeyIdFluentBuilder { + /// Creates a new `GetBranchKeyId`. + pub(crate) fn new(branch_key_id_supplier: crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef) -> Self { + Self { + branch_key_id_supplier, + inner: ::std::default::Default::default(), + } + } + /// Access the GetBranchKeyId as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyId::send(&self.branch_key_id_supplier, input).await + } + + /// The Encryption Context used with this encryption or decryption. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs new file mode 100644 index 000000000..af2899554 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs @@ -0,0 +1,40 @@ +// 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. +/// Orchestration and serialization glue logic for `GetCacheEntry`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetCacheEntry; +impl GetCacheEntry { + /// Creates a new `GetCacheEntry` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + input: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput, + ) -> ::std::result::Result< + 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); +} + cryptographic_materials_cache.inner.borrow_mut().get_cache_entry(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::_get_cache_entry_output::GetCacheEntryOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::_get_cache_entry_input::GetCacheEntryInput; + +pub(crate) mod _get_cache_entry_output; + +pub(crate) mod _get_cache_entry_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_input.rs new file mode 100644 index 000000000..b6de75234 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetCacheEntryInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetCacheEntryInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl GetCacheEntryInput { + /// Creates a new builder-style object to manufacture [`GetCacheEntryInput`](crate::operation::get_cache_entry::builders::GetCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryInputBuilder::default() + } +} + +/// A builder for [`GetCacheEntryInput`](crate::operation::operation::GetCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetCacheEntryInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i64>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`GetCacheEntryInput`](crate::operation::operation::GetCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput { + bytes_used: self.bytes_used, +identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_output.rs new file mode 100644 index 000000000..c22962752 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_output.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetCacheEntryOutput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub creation_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub expiry_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +#[allow(missing_docs)] +pub messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl GetCacheEntryOutput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} +} +impl GetCacheEntryOutput { + /// Creates a new builder-style object to manufacture [`GetCacheEntryOutput`](crate::operation::get_cache_entry::builders::GetCacheEntryOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryOutputBuilder::default() + } +} + +/// A builder for [`GetCacheEntryOutput`](crate::operation::operation::GetCacheEntryOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetCacheEntryOutputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) creation_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) expiry_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) materials: ::std::option::Option, +pub(crate) messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl GetCacheEntryOutputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.creation_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_creation_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.creation_time = input; + self +} +#[allow(missing_docs)] +pub fn get_creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.expiry_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expiry_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.expiry_time = input; + self +} +#[allow(missing_docs)] +pub fn get_expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.messages_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_messages_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.messages_used = input; + self +} +#[allow(missing_docs)] +pub fn get_messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} + /// Consumes the builder and constructs a [`GetCacheEntryOutput`](crate::operation::operation::GetCacheEntryOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput { + bytes_used: self.bytes_used, +creation_time: self.creation_time, +expiry_time: self.expiry_time, +materials: self.materials, +messages_used: self.messages_used, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs new file mode 100644 index 000000000..496ac1a45 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::_get_cache_entry_output::GetCacheEntryOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::_get_cache_entry_input::GetCacheEntryInputBuilder; + +impl GetCacheEntryInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_cache.get_cache_entry(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetCacheEntry`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetCacheEntryFluentBuilder { + cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryInputBuilder, +} +impl GetCacheEntryFluentBuilder { + /// Creates a new `GetCacheEntry`. + pub(crate) fn new(cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) -> Self { + Self { + cryptographic_materials_cache, + inner: ::std::default::Default::default(), + } + } + /// Access the GetCacheEntry as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntry::send(&self.cryptographic_materials_cache, input).await + } + + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.inner = self.inner.bytes_used(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.inner = self.inner.set_bytes_used(input); + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i64> { + self.inner.get_bytes_used() +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.identifier(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_identifier(input); + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs new file mode 100644 index 000000000..6b552f7f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs @@ -0,0 +1,40 @@ +// 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. +/// Orchestration and serialization glue logic for `GetClient`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetClient; +impl GetClient { + /// Creates a new `GetClient` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client_supplier: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + input: crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput, + ) -> ::std::result::Result< + 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); +} + client_supplier.inner.borrow_mut().get_client(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_client::_get_client_output::GetClientOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_client::_get_client_input::GetClientInput; + +pub(crate) mod _get_client_output; + +pub(crate) mod _get_client_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_input.rs new file mode 100644 index 000000000..4c9cb6ec1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a AWS KMS Client. +pub struct GetClientInput { + /// The region the client should be created in. +pub region: ::std::option::Option<::std::string::String>, +} +impl GetClientInput { + /// The region the client should be created in. +pub fn region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} +} +impl GetClientInput { + /// Creates a new builder-style object to manufacture [`GetClientInput`](crate::operation::get_client::builders::GetClientInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientInputBuilder::default() + } +} + +/// A builder for [`GetClientInput`](crate::operation::operation::GetClientInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetClientInputBuilder { + pub(crate) region: ::std::option::Option<::std::string::String>, +} +impl GetClientInputBuilder { + /// The region the client should be created in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.region = ::std::option::Option::Some(input.into()); + self +} +/// The region the client should be created in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.region = input; + self +} +/// The region the client should be created in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} + /// Consumes the builder and constructs a [`GetClientInput`](crate::operation::operation::GetClientInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput { + region: self.region, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_output.rs new file mode 100644 index 000000000..e5aa48d82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetClientOutput { + #[allow(missing_docs)] +pub client: ::std::option::Option, +} +impl GetClientOutput { + #[allow(missing_docs)] +pub fn client(&self) -> &::std::option::Option { + &self.client +} +} +impl GetClientOutput { + /// Creates a new builder-style object to manufacture [`GetClientOutput`](crate::operation::get_client::builders::GetClientOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientOutputBuilder::default() + } +} + +/// A builder for [`GetClientOutput`](crate::operation::operation::GetClientOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetClientOutputBuilder { + pub(crate) client: ::std::option::Option, +} +impl GetClientOutputBuilder { + #[allow(missing_docs)] +pub fn client(mut self, input: impl ::std::convert::Into) -> Self { + self.client = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_client(mut self, input: ::std::option::Option) -> Self { + self.client = input; + self +} +#[allow(missing_docs)] +pub fn get_client(&self) -> &::std::option::Option { + &self.client +} + /// Consumes the builder and constructs a [`GetClientOutput`](crate::operation::operation::GetClientOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientOutput { + client: self.client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs new file mode 100644 index 000000000..56ac7ae4a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs @@ -0,0 +1,79 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::get_client::_get_client_output::GetClientOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_client::_get_client_input::GetClientInputBuilder; + +impl GetClientInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client_supplier: &crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + ) -> ::std::result::Result< + crate::deps::com_amazonaws_kms::client::Client, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client_supplier.get_client(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetClient`. +/// +/// Returns an AWS KMS Client. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetClientFluentBuilder { + client_supplier: crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientInputBuilder, +} +impl GetClientFluentBuilder { + /// Creates a new `GetClient`. + pub(crate) fn new(client_supplier: crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef) -> Self { + Self { + client_supplier, + inner: ::std::default::Default::default(), + } + } + /// Access the GetClient as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::com_amazonaws_kms::client::Client, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClient::send(&self.client_supplier, input).await + } + + /// The region the client should be created in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.region(input.into()); + self +} +/// The region the client should be created in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_region(input); + self +} +/// The region the client should be created in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_region() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs new file mode 100644 index 000000000..a437352a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs @@ -0,0 +1,46 @@ +// 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. +/// Orchestration and serialization glue logic for `GetEncryptionMaterials`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetEncryptionMaterials; +impl GetEncryptionMaterials { + /// Creates a new `GetEncryptionMaterials` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_manager: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + input: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput, + ) -> ::std::result::Result< + 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); +} + cryptographic_materials_manager.inner.borrow_mut().get_encryption_materials(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::_get_encryption_materials_output::GetEncryptionMaterialsOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::_get_encryption_materials_input::GetEncryptionMaterialsInput; + +pub(crate) mod _get_encryption_materials_output; + +pub(crate) mod _get_encryption_materials_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_input.rs new file mode 100644 index 000000000..739655f79 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetEncryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub max_plaintext_length: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl GetEncryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn max_plaintext_length(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.max_plaintext_length +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +} +impl GetEncryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`GetEncryptionMaterialsInput`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`GetEncryptionMaterialsInput`](crate::operation::operation::GetEncryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) max_plaintext_length: ::std::option::Option<::std::primitive::i64>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl GetEncryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn max_plaintext_length(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.max_plaintext_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_max_plaintext_length(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.max_plaintext_length = input; + self +} +#[allow(missing_docs)] +pub fn get_max_plaintext_length(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.max_plaintext_length +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} + /// Consumes the builder and constructs a [`GetEncryptionMaterialsInput`](crate::operation::operation::GetEncryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +commitment_policy: self.commitment_policy, +encryption_context: self.encryption_context, +max_plaintext_length: self.max_plaintext_length, +required_encryption_context_keys: self.required_encryption_context_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_output.rs new file mode 100644 index 000000000..84536e476 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetEncryptionMaterialsOutput { + #[allow(missing_docs)] +pub encryption_materials: ::std::option::Option, +} +impl GetEncryptionMaterialsOutput { + #[allow(missing_docs)] +pub fn encryption_materials(&self) -> &::std::option::Option { + &self.encryption_materials +} +} +impl GetEncryptionMaterialsOutput { + /// Creates a new builder-style object to manufacture [`GetEncryptionMaterialsOutput`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsOutputBuilder::default() + } +} + +/// A builder for [`GetEncryptionMaterialsOutput`](crate::operation::operation::GetEncryptionMaterialsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptionMaterialsOutputBuilder { + pub(crate) encryption_materials: ::std::option::Option, +} +impl GetEncryptionMaterialsOutputBuilder { + #[allow(missing_docs)] +pub fn encryption_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.encryption_materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_materials(mut self, input: ::std::option::Option) -> Self { + self.encryption_materials = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_materials(&self) -> &::std::option::Option { + &self.encryption_materials +} + /// Consumes the builder and constructs a [`GetEncryptionMaterialsOutput`](crate::operation::operation::GetEncryptionMaterialsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput { + encryption_materials: self.encryption_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs new file mode 100644 index 000000000..122dd8bc0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::_get_encryption_materials_output::GetEncryptionMaterialsOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::_get_encryption_materials_input::GetEncryptionMaterialsInputBuilder; + +impl GetEncryptionMaterialsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_manager: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_manager.get_encryption_materials(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetEncryptionMaterials`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetEncryptionMaterialsFluentBuilder { + cryptographic_materials_manager: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsInputBuilder, +} +impl GetEncryptionMaterialsFluentBuilder { + /// Creates a new `GetEncryptionMaterials`. + pub(crate) fn new(cryptographic_materials_manager: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef) -> Self { + Self { + cryptographic_materials_manager, + inner: ::std::default::Default::default(), + } + } + /// Access the GetEncryptionMaterials as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterials::send(&self.cryptographic_materials_manager, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite_id(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite_id() +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.commitment_policy(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_commitment_policy(input); + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + self.inner.get_commitment_policy() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn max_plaintext_length(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.inner = self.inner.max_plaintext_length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_max_plaintext_length(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.inner = self.inner.set_max_plaintext_length(input); + self +} +#[allow(missing_docs)] +pub fn get_max_plaintext_length(&self) -> &::std::option::Option<::std::primitive::i64> { + self.inner.get_max_plaintext_length() +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs new file mode 100644 index 000000000..ce56dad8a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `InitializeDecryptionMaterials`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct InitializeDecryptionMaterials; +impl InitializeDecryptionMaterials { + /// Creates a new `InitializeDecryptionMaterials` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::initialize_decryption_materials::_initialize_decryption_materials_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::_decryption_materials::DecryptionMaterials; + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::_initialize_decryption_materials_input::InitializeDecryptionMaterialsInput; + +pub(crate) mod _decryption_materials; + +pub(crate) mod _initialize_decryption_materials_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_decryption_materials.rs new file mode 100644 index 000000000..0e6d1a22b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_decryption_materials.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl DecryptionMaterials { + /// Creates a new builder-style object to manufacture [`DecryptionMaterials`](crate::operation::initialize_decryption_materials::builders::DecryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::DecryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::DecryptionMaterialsBuilder::default() + } +} + +/// A builder for [`DecryptionMaterials`](crate::operation::operation::DecryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`DecryptionMaterials`](crate::operation::operation::DecryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials { + algorithm_suite: self.algorithm_suite, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +symmetric_signing_key: self.symmetric_signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_initialize_decryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_initialize_decryption_materials_input.rs new file mode 100644 index 000000000..4c9f91829 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_initialize_decryption_materials_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct InitializeDecryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl InitializeDecryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +} +impl InitializeDecryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`InitializeDecryptionMaterialsInput`](crate::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`InitializeDecryptionMaterialsInput`](crate::operation::operation::InitializeDecryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct InitializeDecryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl InitializeDecryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} + /// Consumes the builder and constructs a [`InitializeDecryptionMaterialsInput`](crate::operation::operation::InitializeDecryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +encryption_context: self.encryption_context, +required_encryption_context_keys: self.required_encryption_context_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs new file mode 100644 index 000000000..99e971955 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::_decryption_materials::DecryptionMaterialsBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::_initialize_decryption_materials_input::InitializeDecryptionMaterialsInputBuilder; + +impl InitializeDecryptionMaterialsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.initialize_decryption_materials(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `InitializeDecryptionMaterials`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct InitializeDecryptionMaterialsFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsInputBuilder, +} +impl InitializeDecryptionMaterialsFluentBuilder { + /// Creates a new `InitializeDecryptionMaterials`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the InitializeDecryptionMaterials as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::builders::InitializeDecryptionMaterialsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::DecryptionMaterials, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::initialize_decryption_materials::InitializeDecryptionMaterials::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite_id(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite_id() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs new file mode 100644 index 000000000..bbccb29e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `InitializeEncryptionMaterials`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct InitializeEncryptionMaterials; +impl InitializeEncryptionMaterials { + /// Creates a new `InitializeEncryptionMaterials` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_materialProviders::conversions::initialize_encryption_materials::_initialize_encryption_materials_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::_encryption_materials::EncryptionMaterials; + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::_initialize_encryption_materials_input::InitializeEncryptionMaterialsInput; + +pub(crate) mod _encryption_materials; + +pub(crate) mod _initialize_encryption_materials_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_encryption_materials.rs new file mode 100644 index 000000000..f9ff6dad9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_encryption_materials.rs @@ -0,0 +1,190 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EncryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} +} +impl EncryptionMaterials { + /// Creates a new builder-style object to manufacture [`EncryptionMaterials`](crate::operation::initialize_encryption_materials::builders::EncryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::EncryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::EncryptionMaterialsBuilder::default() + } +} + +/// A builder for [`EncryptionMaterials`](crate::operation::operation::EncryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} + /// Consumes the builder and constructs a [`EncryptionMaterials`](crate::operation::operation::EncryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials { + algorithm_suite: self.algorithm_suite, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +signing_key: self.signing_key, +symmetric_signing_keys: self.symmetric_signing_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_initialize_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_initialize_encryption_materials_input.rs new file mode 100644 index 000000000..afb124ace --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_initialize_encryption_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct InitializeEncryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl InitializeEncryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl InitializeEncryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`InitializeEncryptionMaterialsInput`](crate::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`InitializeEncryptionMaterialsInput`](crate::operation::operation::InitializeEncryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct InitializeEncryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl InitializeEncryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`InitializeEncryptionMaterialsInput`](crate::operation::operation::InitializeEncryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +encryption_context: self.encryption_context, +required_encryption_context_keys: self.required_encryption_context_keys, +signing_key: self.signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs new file mode 100644 index 000000000..d68eae967 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::_encryption_materials::EncryptionMaterialsBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::_initialize_encryption_materials_input::InitializeEncryptionMaterialsInputBuilder; + +impl InitializeEncryptionMaterialsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.initialize_encryption_materials(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `InitializeEncryptionMaterials`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct InitializeEncryptionMaterialsFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsInputBuilder, +} +impl InitializeEncryptionMaterialsFluentBuilder { + /// Creates a new `InitializeEncryptionMaterials`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the InitializeEncryptionMaterials as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::builders::InitializeEncryptionMaterialsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::EncryptionMaterials, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::initialize_encryption_materials::InitializeEncryptionMaterials::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm_suite_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm_suite_id(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + self.inner.get_algorithm_suite_id() +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.encryption_context(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.inner = self.inner.set_encryption_context(input); + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.inner.get_encryption_context() +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.required_encryption_context_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_required_encryption_context_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_required_encryption_context_keys() +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.signing_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_signing_key(input); + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_signing_key() +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.verification_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_verification_key(input); + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_verification_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs new file mode 100644 index 000000000..d6c9ef2a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs @@ -0,0 +1,46 @@ +// 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. +/// Orchestration and serialization glue logic for `OnDecrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct OnDecrypt; +impl OnDecrypt { + /// Creates a new `OnDecrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + input: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput, + ) -> ::std::result::Result< + 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); +} + keyring.inner.borrow_mut().on_decrypt(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_output::OnDecryptOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_input::OnDecryptInput; + +pub(crate) mod _on_decrypt_output; + +pub(crate) mod _on_decrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_input.rs new file mode 100644 index 000000000..8a25d564e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnDecryptInput { + #[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnDecryptInput { + #[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnDecryptInput { + /// Creates a new builder-style object to manufacture [`OnDecryptInput`](crate::operation::on_decrypt::builders::OnDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptInputBuilder::default() + } +} + +/// A builder for [`OnDecryptInput`](crate::operation::operation::OnDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnDecryptInputBuilder { + pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) materials: ::std::option::Option, +} +impl OnDecryptInputBuilder { + #[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnDecryptInput`](crate::operation::operation::OnDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput { + encrypted_data_keys: self.encrypted_data_keys, +materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_output.rs new file mode 100644 index 000000000..fedf5395b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnDecryptOutput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnDecryptOutput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnDecryptOutput { + /// Creates a new builder-style object to manufacture [`OnDecryptOutput`](crate::operation::on_decrypt::builders::OnDecryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptOutputBuilder::default() + } +} + +/// A builder for [`OnDecryptOutput`](crate::operation::operation::OnDecryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnDecryptOutputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnDecryptOutputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnDecryptOutput`](crate::operation::operation::OnDecryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs new file mode 100644 index 000000000..9e05198e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_output::OnDecryptOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_input::OnDecryptInputBuilder; + +impl OnDecryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = keyring.on_decrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `OnDecrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct OnDecryptFluentBuilder { + keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptInputBuilder, +} +impl OnDecryptFluentBuilder { + /// Creates a new `OnDecrypt`. + pub(crate) fn new(keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) -> Self { + Self { + keyring, + inner: ::std::default::Default::default(), + } + } + /// Access the OnDecrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecrypt::send(&self.keyring, input).await + } + + #[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.encrypted_data_keys(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_encrypted_data_keys(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_encrypted_data_keys() +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.materials(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_materials(input); + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + self.inner.get_materials() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs new file mode 100644 index 000000000..b37df09c0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs @@ -0,0 +1,40 @@ +// 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. +/// Orchestration and serialization glue logic for `OnEncrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct OnEncrypt; +impl OnEncrypt { + /// Creates a new `OnEncrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + input: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput, + ) -> ::std::result::Result< + 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); +} + keyring.inner.borrow_mut().on_encrypt(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_output::OnEncryptOutput; + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_input::OnEncryptInput; + +pub(crate) mod _on_encrypt_output; + +pub(crate) mod _on_encrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_input.rs new file mode 100644 index 000000000..55ff9c6e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnEncryptInput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnEncryptInput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnEncryptInput { + /// Creates a new builder-style object to manufacture [`OnEncryptInput`](crate::operation::on_encrypt::builders::OnEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder::default() + } +} + +/// A builder for [`OnEncryptInput`](crate::operation::operation::OnEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnEncryptInputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnEncryptInputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnEncryptInput`](crate::operation::operation::OnEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_output.rs new file mode 100644 index 000000000..365ab8839 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnEncryptOutput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnEncryptOutput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnEncryptOutput { + /// Creates a new builder-style object to manufacture [`OnEncryptOutput`](crate::operation::on_encrypt::builders::OnEncryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptOutputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptOutputBuilder::default() + } +} + +/// A builder for [`OnEncryptOutput`](crate::operation::operation::OnEncryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnEncryptOutputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnEncryptOutputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnEncryptOutput`](crate::operation::operation::OnEncryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs new file mode 100644 index 000000000..2b2c6f83b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_output::OnEncryptOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_input::OnEncryptInputBuilder; + +impl OnEncryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = keyring.on_encrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `OnEncrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct OnEncryptFluentBuilder { + keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder, +} +impl OnEncryptFluentBuilder { + /// Creates a new `OnEncrypt`. + pub(crate) fn new(keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef) -> Self { + Self { + keyring, + inner: ::std::default::Default::default(), + } + } + /// Access the OnEncrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncrypt::send(&self.keyring, input).await + } + + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.materials(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_materials(input); + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + self.inner.get_materials() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs new file mode 100644 index 000000000..c498f6ff9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs @@ -0,0 +1,82 @@ +// 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. +/// Orchestration and serialization glue logic for `PutCacheEntry`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct PutCacheEntry; +impl PutCacheEntry { + /// Creates a new `PutCacheEntry` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + input: crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput, + ) -> ::std::result::Result< + (), + 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); +} + cryptographic_materials_cache.inner.borrow_mut().put_cache_entry(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::_put_cache_entry_input::PutCacheEntryInput; + +pub(crate) mod _unit; + +pub(crate) mod _put_cache_entry_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_put_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_put_cache_entry_input.rs new file mode 100644 index 000000000..53fa83e8a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_put_cache_entry_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct PutCacheEntryInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub creation_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub expiry_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +#[allow(missing_docs)] +pub messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl PutCacheEntryInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} +} +impl PutCacheEntryInput { + /// Creates a new builder-style object to manufacture [`PutCacheEntryInput`](crate::operation::put_cache_entry::builders::PutCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryInputBuilder::default() + } +} + +/// A builder for [`PutCacheEntryInput`](crate::operation::operation::PutCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct PutCacheEntryInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) creation_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) expiry_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) materials: ::std::option::Option, +pub(crate) messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl PutCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.creation_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_creation_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.creation_time = input; + self +} +#[allow(missing_docs)] +pub fn get_creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.expiry_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expiry_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.expiry_time = input; + self +} +#[allow(missing_docs)] +pub fn get_expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.messages_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_messages_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.messages_used = input; + self +} +#[allow(missing_docs)] +pub fn get_messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} + /// Consumes the builder and constructs a [`PutCacheEntryInput`](crate::operation::operation::PutCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput { + bytes_used: self.bytes_used, +creation_time: self.creation_time, +expiry_time: self.expiry_time, +identifier: self.identifier, +materials: self.materials, +messages_used: self.messages_used, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs new file mode 100644 index 000000000..813fbbd8d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::put_cache_entry::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs new file mode 100644 index 000000000..bea71c253 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs @@ -0,0 +1,148 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::_put_cache_entry_input::PutCacheEntryInputBuilder; + +impl PutCacheEntryInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_cache.put_cache_entry(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `PutCacheEntry`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct PutCacheEntryFluentBuilder { + cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryInputBuilder, +} +impl PutCacheEntryFluentBuilder { + /// Creates a new `PutCacheEntry`. + pub(crate) fn new(cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) -> Self { + Self { + cryptographic_materials_cache, + inner: ::std::default::Default::default(), + } + } + /// Access the PutCacheEntry as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntry::send(&self.cryptographic_materials_cache, input).await + } + + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.bytes_used(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_bytes_used(input); + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_bytes_used() +} +#[allow(missing_docs)] +pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.inner = self.inner.creation_time(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_creation_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.inner = self.inner.set_creation_time(input); + self +} +#[allow(missing_docs)] +pub fn get_creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + self.inner.get_creation_time() +} +#[allow(missing_docs)] +pub fn expiry_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.inner = self.inner.expiry_time(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expiry_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.inner = self.inner.set_expiry_time(input); + self +} +#[allow(missing_docs)] +pub fn get_expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + self.inner.get_expiry_time() +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.identifier(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_identifier(input); + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_identifier() +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.materials(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_materials(input); + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + self.inner.get_materials() +} +#[allow(missing_docs)] +pub fn messages_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.messages_used(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_messages_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_messages_used(input); + self +} +#[allow(missing_docs)] +pub fn get_messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_messages_used() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs new file mode 100644 index 000000000..f68be1150 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs @@ -0,0 +1,52 @@ +// 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. +/// Orchestration and serialization glue logic for `UpdateUsageMetadata`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateUsageMetadata; +impl UpdateUsageMetadata { + /// Creates a new `UpdateUsageMetadata` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + input: crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput, + ) -> ::std::result::Result< + (), + 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); +} + cryptographic_materials_cache.inner.borrow_mut().update_usage_metadata(input) + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::_update_usage_metadata_input::UpdateUsageMetadataInput; + +pub(crate) mod _unit; + +pub(crate) mod _update_usage_metadata_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs new file mode 100644 index 000000000..1f43786d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::update_usage_metadata::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_update_usage_metadata_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_update_usage_metadata_input.rs new file mode 100644 index 000000000..d6bda9485 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_update_usage_metadata_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct UpdateUsageMetadataInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl UpdateUsageMetadataInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl UpdateUsageMetadataInput { + /// Creates a new builder-style object to manufacture [`UpdateUsageMetadataInput`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataInputBuilder::default() + } +} + +/// A builder for [`UpdateUsageMetadataInput`](crate::operation::operation::UpdateUsageMetadataInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UpdateUsageMetadataInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl UpdateUsageMetadataInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`UpdateUsageMetadataInput`](crate::operation::operation::UpdateUsageMetadataInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput { + bytes_used: self.bytes_used, +identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs new file mode 100644 index 000000000..8e42182a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::_update_usage_metadata_input::UpdateUsageMetadataInputBuilder; + +impl UpdateUsageMetadataInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + cryptographic_materials_cache: &crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = cryptographic_materials_cache.update_usage_metadata(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateUsageMetadata`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateUsageMetadataFluentBuilder { + cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataInputBuilder, +} +impl UpdateUsageMetadataFluentBuilder { + /// Creates a new `UpdateUsageMetadata`. + pub(crate) fn new(cryptographic_materials_cache: crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef) -> Self { + Self { + cryptographic_materials_cache, + inner: ::std::default::Default::default(), + } + } + /// Access the UpdateUsageMetadata as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadata::send(&self.cryptographic_materials_cache, input).await + } + + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.bytes_used(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_bytes_used(input); + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_bytes_used() +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.identifier(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_identifier(input); + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_identifier() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..2e5c12e0b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs @@ -0,0 +1,102 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidAlgorithmSuiteInfo`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidAlgorithmSuiteInfo; +impl ValidAlgorithmSuiteInfo { + /// Creates a new `ValidAlgorithmSuiteInfo` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::_algorithm_suite_info::AlgorithmSuiteInfo; + +pub(crate) mod _unit; + +pub(crate) mod _algorithm_suite_info; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_algorithm_suite_info.rs new file mode 100644 index 000000000..4f88cb1bd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_algorithm_suite_info.rs @@ -0,0 +1,234 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub commitment: ::std::option::Option, +#[allow(missing_docs)] +pub edk_wrapping: ::std::option::Option, +#[allow(missing_docs)] +pub encrypt: ::std::option::Option, +#[allow(missing_docs)] +pub id: ::std::option::Option, +#[allow(missing_docs)] +pub kdf: ::std::option::Option, +#[allow(missing_docs)] +pub message_version: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub signature: ::std::option::Option, +#[allow(missing_docs)] +pub symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub fn binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} +} +impl AlgorithmSuiteInfo { + /// Creates a new builder-style object to manufacture [`AlgorithmSuiteInfo`](crate::operation::valid_algorithm_suite_info::builders::AlgorithmSuiteInfo). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder::default() + } +} + +/// A builder for [`AlgorithmSuiteInfo`](crate::operation::operation::AlgorithmSuiteInfo). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AlgorithmSuiteInfoBuilder { + pub(crate) binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) commitment: ::std::option::Option, +pub(crate) edk_wrapping: ::std::option::Option, +pub(crate) encrypt: ::std::option::Option, +pub(crate) id: ::std::option::Option, +pub(crate) kdf: ::std::option::Option, +pub(crate) message_version: ::std::option::Option<::std::primitive::i32>, +pub(crate) signature: ::std::option::Option, +pub(crate) symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfoBuilder { + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.binary_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.binary_id = input; + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment(mut self, input: ::std::option::Option) -> Self { + self.commitment = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(mut self, input: impl ::std::convert::Into) -> Self { + self.edk_wrapping = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_edk_wrapping(mut self, input: ::std::option::Option) -> Self { + self.edk_wrapping = input; + self +} +#[allow(missing_docs)] +pub fn get_edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(mut self, input: impl ::std::convert::Into) -> Self { + self.encrypt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypt(mut self, input: ::std::option::Option) -> Self { + self.encrypt = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(mut self, input: impl ::std::convert::Into) -> Self { + self.id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_id(mut self, input: ::std::option::Option) -> Self { + self.id = input; + self +} +#[allow(missing_docs)] +pub fn get_id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.kdf = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_kdf(mut self, input: ::std::option::Option) -> Self { + self.kdf = input; + self +} +#[allow(missing_docs)] +pub fn get_kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.message_version = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.message_version = input; + self +} +#[allow(missing_docs)] +pub fn get_message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(mut self, input: impl ::std::convert::Into) -> Self { + self.symmetric_signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signature(mut self, input: ::std::option::Option) -> Self { + self.symmetric_signature = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} + /// Consumes the builder and constructs a [`AlgorithmSuiteInfo`](crate::operation::operation::AlgorithmSuiteInfo). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::AlgorithmSuiteInfo { + binary_id: self.binary_id, +commitment: self.commitment, +edk_wrapping: self.edk_wrapping, +encrypt: self.encrypt, +id: self.id, +kdf: self.kdf, +message_version: self.message_version, +signature: self.signature, +symmetric_signature: self.symmetric_signature, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_unit.rs new file mode 100644 index 000000000..cc4b0eeab --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::valid_algorithm_suite_info::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/builders.rs new file mode 100644 index 000000000..27e560f12 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/builders.rs @@ -0,0 +1,190 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::_algorithm_suite_info::AlgorithmSuiteInfoBuilder; + +impl AlgorithmSuiteInfoBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.valid_algorithm_suite_info(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidAlgorithmSuiteInfo`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidAlgorithmSuiteInfoFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder, +} +impl ValidAlgorithmSuiteInfoFluentBuilder { + /// Creates a new `ValidAlgorithmSuiteInfo`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidAlgorithmSuiteInfo as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::builders::AlgorithmSuiteInfoBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::valid_algorithm_suite_info::ValidAlgorithmSuiteInfo::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.binary_id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_binary_id(input); + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_binary_id() +} +#[allow(missing_docs)] +pub fn commitment(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.commitment(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_commitment(input); + self +} +#[allow(missing_docs)] +pub fn get_commitment(&self) -> &::std::option::Option { + self.inner.get_commitment() +} +#[allow(missing_docs)] +pub fn edk_wrapping(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.edk_wrapping(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_edk_wrapping(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_edk_wrapping(input); + self +} +#[allow(missing_docs)] +pub fn get_edk_wrapping(&self) -> &::std::option::Option { + self.inner.get_edk_wrapping() +} +#[allow(missing_docs)] +pub fn encrypt(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.encrypt(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypt(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_encrypt(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypt(&self) -> &::std::option::Option { + self.inner.get_encrypt() +} +#[allow(missing_docs)] +pub fn id(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.id(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_id(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_id(input); + self +} +#[allow(missing_docs)] +pub fn get_id(&self) -> &::std::option::Option { + self.inner.get_id() +} +#[allow(missing_docs)] +pub fn kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.kdf(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_kdf(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_kdf(input); + self +} +#[allow(missing_docs)] +pub fn get_kdf(&self) -> &::std::option::Option { + self.inner.get_kdf() +} +#[allow(missing_docs)] +pub fn message_version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.message_version(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_message_version(input); + self +} +#[allow(missing_docs)] +pub fn get_message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_message_version() +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.signature(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_signature(input); + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option { + self.inner.get_signature() +} +#[allow(missing_docs)] +pub fn symmetric_signature(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.symmetric_signature(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signature(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_symmetric_signature(input); + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signature(&self) -> &::std::option::Option { + self.inner.get_symmetric_signature() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..da9636ef9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidDecryptionMaterialsTransition`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidDecryptionMaterialsTransition; +impl ValidDecryptionMaterialsTransition { + /// Creates a new `ValidDecryptionMaterialsTransition` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::_valid_decryption_materials_transition_input::ValidDecryptionMaterialsTransitionInput; + +pub(crate) mod _unit; + +pub(crate) mod _valid_decryption_materials_transition_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_unit.rs new file mode 100644 index 000000000..bde19e7e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::valid_decryption_materials_transition::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs new file mode 100644 index 000000000..a40ae9f71 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidDecryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub start: ::std::option::Option, +#[allow(missing_docs)] +pub stop: ::std::option::Option, +} +impl ValidDecryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub fn start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(&self) -> &::std::option::Option { + &self.stop +} +} +impl ValidDecryptionMaterialsTransitionInput { + /// Creates a new builder-style object to manufacture [`ValidDecryptionMaterialsTransitionInput`](crate::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionInputBuilder::default() + } +} + +/// A builder for [`ValidDecryptionMaterialsTransitionInput`](crate::operation::operation::ValidDecryptionMaterialsTransitionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidDecryptionMaterialsTransitionInputBuilder { + pub(crate) start: ::std::option::Option, +pub(crate) stop: ::std::option::Option, +} +impl ValidDecryptionMaterialsTransitionInputBuilder { + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.start = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.start = input; + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.stop = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.stop = input; + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + &self.stop +} + /// Consumes the builder and constructs a [`ValidDecryptionMaterialsTransitionInput`](crate::operation::operation::ValidDecryptionMaterialsTransitionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransitionInput { + start: self.start, +stop: self.stop, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/builders.rs new file mode 100644 index 000000000..880c5a4b7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::_valid_decryption_materials_transition_input::ValidDecryptionMaterialsTransitionInputBuilder; + +impl ValidDecryptionMaterialsTransitionInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.valid_decryption_materials_transition(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidDecryptionMaterialsTransition`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidDecryptionMaterialsTransitionFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionInputBuilder, +} +impl ValidDecryptionMaterialsTransitionFluentBuilder { + /// Creates a new `ValidDecryptionMaterialsTransition`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidDecryptionMaterialsTransition as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::builders::ValidDecryptionMaterialsTransitionInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::valid_decryption_materials_transition::ValidDecryptionMaterialsTransition::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.start(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_start(input); + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + self.inner.get_start() +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.stop(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_stop(input); + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + self.inner.get_stop() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..f78743cd2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidEncryptionMaterialsTransition`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidEncryptionMaterialsTransition; +impl ValidEncryptionMaterialsTransition { + /// Creates a new `ValidEncryptionMaterialsTransition` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::_valid_encryption_materials_transition_input::ValidEncryptionMaterialsTransitionInput; + +pub(crate) mod _unit; + +pub(crate) mod _valid_encryption_materials_transition_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_unit.rs new file mode 100644 index 000000000..7d0106342 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::valid_encryption_materials_transition::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs new file mode 100644 index 000000000..fdb2768fc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidEncryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub start: ::std::option::Option, +#[allow(missing_docs)] +pub stop: ::std::option::Option, +} +impl ValidEncryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub fn start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(&self) -> &::std::option::Option { + &self.stop +} +} +impl ValidEncryptionMaterialsTransitionInput { + /// Creates a new builder-style object to manufacture [`ValidEncryptionMaterialsTransitionInput`](crate::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionInputBuilder::default() + } +} + +/// A builder for [`ValidEncryptionMaterialsTransitionInput`](crate::operation::operation::ValidEncryptionMaterialsTransitionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidEncryptionMaterialsTransitionInputBuilder { + pub(crate) start: ::std::option::Option, +pub(crate) stop: ::std::option::Option, +} +impl ValidEncryptionMaterialsTransitionInputBuilder { + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.start = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.start = input; + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.stop = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.stop = input; + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + &self.stop +} + /// Consumes the builder and constructs a [`ValidEncryptionMaterialsTransitionInput`](crate::operation::operation::ValidEncryptionMaterialsTransitionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransitionInput { + start: self.start, +stop: self.stop, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/builders.rs new file mode 100644 index 000000000..836bb96da --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::_valid_encryption_materials_transition_input::ValidEncryptionMaterialsTransitionInputBuilder; + +impl ValidEncryptionMaterialsTransitionInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.valid_encryption_materials_transition(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidEncryptionMaterialsTransition`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidEncryptionMaterialsTransitionFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionInputBuilder, +} +impl ValidEncryptionMaterialsTransitionFluentBuilder { + /// Creates a new `ValidEncryptionMaterialsTransition`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidEncryptionMaterialsTransition as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::builders::ValidEncryptionMaterialsTransitionInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::valid_encryption_materials_transition::ValidEncryptionMaterialsTransition::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.start(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_start(input); + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + self.inner.get_start() +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.stop(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_stop(input); + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + self.inner.get_stop() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs new file mode 100644 index 000000000..581c27351 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidateCommitmentPolicyOnDecrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidateCommitmentPolicyOnDecrypt; +impl ValidateCommitmentPolicyOnDecrypt { + /// Creates a new `ValidateCommitmentPolicyOnDecrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::_validate_commitment_policy_on_decrypt_input::ValidateCommitmentPolicyOnDecryptInput; + +pub(crate) mod _unit; + +pub(crate) mod _validate_commitment_policy_on_decrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_unit.rs new file mode 100644 index 000000000..877845ee7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::validate_commitment_policy_on_decrypt::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs new file mode 100644 index 000000000..9197a8f79 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidateCommitmentPolicyOnDecryptInput { + #[allow(missing_docs)] +pub algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnDecryptInput { + #[allow(missing_docs)] +pub fn algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +} +impl ValidateCommitmentPolicyOnDecryptInput { + /// Creates a new builder-style object to manufacture [`ValidateCommitmentPolicyOnDecryptInput`](crate::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptInputBuilder::default() + } +} + +/// A builder for [`ValidateCommitmentPolicyOnDecryptInput`](crate::operation::operation::ValidateCommitmentPolicyOnDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidateCommitmentPolicyOnDecryptInputBuilder { + pub(crate) algorithm: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnDecryptInputBuilder { + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} + /// Consumes the builder and constructs a [`ValidateCommitmentPolicyOnDecryptInput`](crate::operation::operation::ValidateCommitmentPolicyOnDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecryptInput { + algorithm: self.algorithm, +commitment_policy: self.commitment_policy, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/builders.rs new file mode 100644 index 000000000..c769df07f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::_validate_commitment_policy_on_decrypt_input::ValidateCommitmentPolicyOnDecryptInputBuilder; + +impl ValidateCommitmentPolicyOnDecryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.validate_commitment_policy_on_decrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidateCommitmentPolicyOnDecrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidateCommitmentPolicyOnDecryptFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptInputBuilder, +} +impl ValidateCommitmentPolicyOnDecryptFluentBuilder { + /// Creates a new `ValidateCommitmentPolicyOnDecrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidateCommitmentPolicyOnDecrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::builders::ValidateCommitmentPolicyOnDecryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_decrypt::ValidateCommitmentPolicyOnDecrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + self.inner.get_algorithm() +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.commitment_policy(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_commitment_policy(input); + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + self.inner.get_commitment_policy() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs new file mode 100644 index 000000000..8ec0fe938 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidateCommitmentPolicyOnEncrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidateCommitmentPolicyOnEncrypt; +impl ValidateCommitmentPolicyOnEncrypt { + /// Creates a new `ValidateCommitmentPolicyOnEncrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + input: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput, + ) -> ::std::result::Result< + (), + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + (), + ) + } else { + Err(crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::_unit::Unit; + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::_validate_commitment_policy_on_encrypt_input::ValidateCommitmentPolicyOnEncryptInput; + +pub(crate) mod _unit; + +pub(crate) mod _validate_commitment_policy_on_encrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_unit.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_unit.rs new file mode 100644 index 000000000..ebb40c887 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_unit.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Unit { + +} +impl Unit { + +} +impl Unit { + /// Creates a new builder-style object to manufacture [`Unit`](crate::operation::validate_commitment_policy_on_encrypt::builders::Unit). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::UnitBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::UnitBuilder::default() + } +} + +/// A builder for [`Unit`](crate::operation::operation::Unit). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UnitBuilder { + +} +impl UnitBuilder { + + /// Consumes the builder and constructs a [`Unit`](crate::operation::operation::Unit). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::Unit, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::Unit { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs new file mode 100644 index 000000000..912f35303 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidateCommitmentPolicyOnEncryptInput { + #[allow(missing_docs)] +pub algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnEncryptInput { + #[allow(missing_docs)] +pub fn algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +} +impl ValidateCommitmentPolicyOnEncryptInput { + /// Creates a new builder-style object to manufacture [`ValidateCommitmentPolicyOnEncryptInput`](crate::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptInputBuilder::default() + } +} + +/// A builder for [`ValidateCommitmentPolicyOnEncryptInput`](crate::operation::operation::ValidateCommitmentPolicyOnEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidateCommitmentPolicyOnEncryptInputBuilder { + pub(crate) algorithm: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnEncryptInputBuilder { + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} + /// Consumes the builder and constructs a [`ValidateCommitmentPolicyOnEncryptInput`](crate::operation::operation::ValidateCommitmentPolicyOnEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncryptInput { + algorithm: self.algorithm, +commitment_policy: self.commitment_policy, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/builders.rs new file mode 100644 index 000000000..2f6b38448 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::_unit::UnitBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::_validate_commitment_policy_on_encrypt_input::ValidateCommitmentPolicyOnEncryptInputBuilder; + +impl ValidateCommitmentPolicyOnEncryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_materialProviders::client::Client, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let mut fluent_builder = client.validate_commitment_policy_on_encrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidateCommitmentPolicyOnEncrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidateCommitmentPolicyOnEncryptFluentBuilder { + client: crate::deps::aws_cryptography_materialProviders::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptInputBuilder, +} +impl ValidateCommitmentPolicyOnEncryptFluentBuilder { + /// Creates a new `ValidateCommitmentPolicyOnEncrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_materialProviders::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidateCommitmentPolicyOnEncrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::builders::ValidateCommitmentPolicyOnEncryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_materialProviders::operation::validate_commitment_policy_on_encrypt::ValidateCommitmentPolicyOnEncrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + self.inner.get_algorithm() +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.commitment_policy(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_commitment_policy(input); + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + self.inner.get_commitment_policy() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types.rs new file mode 100644 index 000000000..7b1a18979 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types.rs @@ -0,0 +1,187 @@ +// 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. +/// Types for the `MaterialProvidersConfig` +pub mod material_providers_config; + +pub mod builders; + +pub mod branch_key_id_supplier; +pub use branch_key_id_supplier::BranchKeyIdSupplier; +pub mod client_supplier; +pub use client_supplier::ClientSupplier; +pub mod cryptographic_materials_cache; +pub use cryptographic_materials_cache::CryptographicMaterialsCache; +pub mod cryptographic_materials_manager; +pub use cryptographic_materials_manager::CryptographicMaterialsManager; +pub mod keyring; +pub use keyring::Keyring; + +mod _algorithm_suite_info; +pub use crate::deps::aws_cryptography_materialProviders::types::_algorithm_suite_info::AlgorithmSuiteInfo; +mod _create_aws_kms_discovery_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_discovery_keyring_input::CreateAwsKmsDiscoveryKeyringInput; +mod _create_aws_kms_discovery_multi_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_discovery_multi_keyring_input::CreateAwsKmsDiscoveryMultiKeyringInput; +mod _create_aws_kms_ecdh_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_ecdh_keyring_input::CreateAwsKmsEcdhKeyringInput; +mod _create_aws_kms_hierarchical_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_hierarchical_keyring_input::CreateAwsKmsHierarchicalKeyringInput; +mod _create_aws_kms_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_keyring_input::CreateAwsKmsKeyringInput; +mod _create_aws_kms_mrk_discovery_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_discovery_keyring_input::CreateAwsKmsMrkDiscoveryKeyringInput; +mod _create_aws_kms_mrk_discovery_multi_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_discovery_multi_keyring_input::CreateAwsKmsMrkDiscoveryMultiKeyringInput; +mod _create_aws_kms_mrk_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_keyring_input::CreateAwsKmsMrkKeyringInput; +mod _create_aws_kms_mrk_multi_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_multi_keyring_input::CreateAwsKmsMrkMultiKeyringInput; +mod _create_aws_kms_multi_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_multi_keyring_input::CreateAwsKmsMultiKeyringInput; +mod _create_aws_kms_rsa_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_rsa_keyring_input::CreateAwsKmsRsaKeyringInput; +mod _create_cryptographic_materials_cache_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_cryptographic_materials_cache_input::CreateCryptographicMaterialsCacheInput; +mod _create_default_client_supplier_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_default_client_supplier_input::CreateDefaultClientSupplierInput; +mod _create_default_cryptographic_materials_manager_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_default_cryptographic_materials_manager_input::CreateDefaultCryptographicMaterialsManagerInput; +mod _create_multi_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_multi_keyring_input::CreateMultiKeyringInput; +mod _create_raw_aes_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_aes_keyring_input::CreateRawAesKeyringInput; +mod _create_raw_ecdh_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_ecdh_keyring_input::CreateRawEcdhKeyringInput; +mod _create_raw_rsa_keyring_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_rsa_keyring_input::CreateRawRsaKeyringInput; +mod _create_required_encryption_context_cmm_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_create_required_encryption_context_cmm_input::CreateRequiredEncryptionContextCmmInput; +mod _decryption_materials; +pub use crate::deps::aws_cryptography_materialProviders::types::_decryption_materials::DecryptionMaterials; +mod _decrypt_materials_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_decrypt_materials_input::DecryptMaterialsInput; +mod _decrypt_materials_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_decrypt_materials_output::DecryptMaterialsOutput; +mod _default_cache; +pub use crate::deps::aws_cryptography_materialProviders::types::_default_cache::DefaultCache; +mod _delete_cache_entry_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_delete_cache_entry_input::DeleteCacheEntryInput; +mod _direct_key_wrapping; +pub use crate::deps::aws_cryptography_materialProviders::types::_direct_key_wrapping::DirectKeyWrapping; +mod _discovery_filter; +pub use crate::deps::aws_cryptography_materialProviders::types::_discovery_filter::DiscoveryFilter; +mod _ecdsa; +pub use crate::deps::aws_cryptography_materialProviders::types::_ecdsa::Ecdsa; +mod _encrypted_data_key; +pub use crate::deps::aws_cryptography_materialProviders::types::_encrypted_data_key::EncryptedDataKey; +mod _encryption_materials; +pub use crate::deps::aws_cryptography_materialProviders::types::_encryption_materials::EncryptionMaterials; +mod _ephemeral_private_key_to_static_public_key_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_ephemeral_private_key_to_static_public_key_input::EphemeralPrivateKeyToStaticPublicKeyInput; +mod _get_branch_key_id_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_branch_key_id_input::GetBranchKeyIdInput; +mod _get_branch_key_id_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_branch_key_id_output::GetBranchKeyIdOutput; +mod _get_cache_entry_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_cache_entry_input::GetCacheEntryInput; +mod _get_cache_entry_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_cache_entry_output::GetCacheEntryOutput; +mod _get_client_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_client_input::GetClientInput; +mod _get_encryption_materials_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_encryption_materials_input::GetEncryptionMaterialsInput; +mod _get_encryption_materials_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_get_encryption_materials_output::GetEncryptionMaterialsOutput; +mod _hkdf; +pub use crate::deps::aws_cryptography_materialProviders::types::_hkdf::Hkdf; +mod _identity; +pub use crate::deps::aws_cryptography_materialProviders::types::_identity::Identity; +mod _initialize_decryption_materials_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_initialize_decryption_materials_input::InitializeDecryptionMaterialsInput; +mod _initialize_encryption_materials_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_initialize_encryption_materials_input::InitializeEncryptionMaterialsInput; +mod _intermediate_key_wrapping; +pub use crate::deps::aws_cryptography_materialProviders::types::_intermediate_key_wrapping::IntermediateKeyWrapping; +mod _kms_private_key_to_static_public_key_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_kms_private_key_to_static_public_key_input::KmsPrivateKeyToStaticPublicKeyInput; +mod _kms_public_key_discovery_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_kms_public_key_discovery_input::KmsPublicKeyDiscoveryInput; +mod _multi_threaded_cache; +pub use crate::deps::aws_cryptography_materialProviders::types::_multi_threaded_cache::MultiThreadedCache; +mod _no_cache; +pub use crate::deps::aws_cryptography_materialProviders::types::_no_cache::NoCache; +mod _none; +pub use crate::deps::aws_cryptography_materialProviders::types::_none::None; +mod _on_decrypt_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_on_decrypt_input::OnDecryptInput; +mod _on_decrypt_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_on_decrypt_output::OnDecryptOutput; +mod _on_encrypt_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_on_encrypt_input::OnEncryptInput; +mod _on_encrypt_output; +pub use crate::deps::aws_cryptography_materialProviders::types::_on_encrypt_output::OnEncryptOutput; +mod _public_key_discovery_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_public_key_discovery_input::PublicKeyDiscoveryInput; +mod _put_cache_entry_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_put_cache_entry_input::PutCacheEntryInput; +mod _raw_private_key_to_static_public_key_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_raw_private_key_to_static_public_key_input::RawPrivateKeyToStaticPublicKeyInput; +mod _single_threaded_cache; +pub use crate::deps::aws_cryptography_materialProviders::types::_single_threaded_cache::SingleThreadedCache; +mod _storm_tracking_cache; +pub use crate::deps::aws_cryptography_materialProviders::types::_storm_tracking_cache::StormTrackingCache; +mod _update_usage_metadata_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_update_usage_metadata_input::UpdateUsageMetadataInput; +mod _validate_commitment_policy_on_decrypt_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_validate_commitment_policy_on_decrypt_input::ValidateCommitmentPolicyOnDecryptInput; +mod _validate_commitment_policy_on_encrypt_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_validate_commitment_policy_on_encrypt_input::ValidateCommitmentPolicyOnEncryptInput; +mod _valid_decryption_materials_transition_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_valid_decryption_materials_transition_input::ValidDecryptionMaterialsTransitionInput; +mod _valid_encryption_materials_transition_input; +pub use crate::deps::aws_cryptography_materialProviders::types::_valid_encryption_materials_transition_input::ValidEncryptionMaterialsTransitionInput; + +pub mod error; + +mod _aes_wrapping_alg; +pub use crate::deps::aws_cryptography_materialProviders::types::_aes_wrapping_alg::AesWrappingAlg; +mod _dbe_algorithm_suite_id; +pub use crate::deps::aws_cryptography_materialProviders::types::_dbe_algorithm_suite_id::DbeAlgorithmSuiteId; +mod _dbe_commitment_policy; +pub use crate::deps::aws_cryptography_materialProviders::types::_dbe_commitment_policy::DbeCommitmentPolicy; +mod _esdk_algorithm_suite_id; +pub use crate::deps::aws_cryptography_materialProviders::types::_esdk_algorithm_suite_id::EsdkAlgorithmSuiteId; +mod _esdk_commitment_policy; +pub use crate::deps::aws_cryptography_materialProviders::types::_esdk_commitment_policy::EsdkCommitmentPolicy; +mod _padding_scheme; +pub use crate::deps::aws_cryptography_materialProviders::types::_padding_scheme::PaddingScheme; +mod _time_units; +pub use crate::deps::aws_cryptography_materialProviders::types::_time_units::TimeUnits; + +mod _algorithm_suite_id; +pub use crate::deps::aws_cryptography_materialProviders::types::_algorithm_suite_id::AlgorithmSuiteId; +mod _cache_type; +pub use crate::deps::aws_cryptography_materialProviders::types::_cache_type::CacheType; +mod _commitment_policy; +pub use crate::deps::aws_cryptography_materialProviders::types::_commitment_policy::CommitmentPolicy; +mod _derivation_algorithm; +pub use crate::deps::aws_cryptography_materialProviders::types::_derivation_algorithm::DerivationAlgorithm; +mod _edk_wrapping_algorithm; +pub use crate::deps::aws_cryptography_materialProviders::types::_edk_wrapping_algorithm::EdkWrappingAlgorithm; +mod _encrypt; +pub use crate::deps::aws_cryptography_materialProviders::types::_encrypt::Encrypt; +mod _key_agreement_scheme; +pub use crate::deps::aws_cryptography_materialProviders::types::_key_agreement_scheme::KeyAgreementScheme; +mod _kms_ecdh_static_configurations; +pub use crate::deps::aws_cryptography_materialProviders::types::_kms_ecdh_static_configurations::KmsEcdhStaticConfigurations; +mod _materials; +pub use crate::deps::aws_cryptography_materialProviders::types::_materials::Materials; +mod _raw_ecdh_static_configurations; +pub use crate::deps::aws_cryptography_materialProviders::types::_raw_ecdh_static_configurations::RawEcdhStaticConfigurations; +mod _signature_algorithm; +pub use crate::deps::aws_cryptography_materialProviders::types::_signature_algorithm::SignatureAlgorithm; +mod _static_configurations; +pub use crate::deps::aws_cryptography_materialProviders::types::_static_configurations::StaticConfigurations; +mod _symmetric_signature_algorithm; +pub use crate::deps::aws_cryptography_materialProviders::types::_symmetric_signature_algorithm::SymmetricSignatureAlgorithm; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs new file mode 100644 index 000000000..052fc5613 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs @@ -0,0 +1,20 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum AesWrappingAlg { + AlgAes128GcmIv12Tag16, +AlgAes192GcmIv12Tag16, +AlgAes256GcmIv12Tag16, +} + +impl ::std::fmt::Display for AesWrappingAlg { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + AesWrappingAlg::AlgAes128GcmIv12Tag16 => write!(f, "ALG_AES128_GCM_IV12_TAG16"), +AesWrappingAlg::AlgAes192GcmIv12Tag16 => write!(f, "ALG_AES192_GCM_IV12_TAG16"), +AesWrappingAlg::AlgAes256GcmIv12Tag16 => write!(f, "ALG_AES256_GCM_IV12_TAG16"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs new file mode 100644 index 000000000..17028a660 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum AlgorithmSuiteId { + #[allow(missing_docs)] +Esdk(crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId), +#[allow(missing_docs)] +Dbe(crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl AlgorithmSuiteId { + /// Tries to convert the enum instance into [`Esdk`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId`](crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_esdk(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Dbe`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId`](crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_dbe(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Esdk`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Esdk). +pub fn is_esdk(&self) -> ::std::primitive::bool { + self.as_esdk().is_ok() +} +/// Returns true if this is a [`Dbe`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteId::Dbe). +pub fn is_dbe(&self) -> ::std::primitive::bool { + self.as_dbe().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs new file mode 100644 index 000000000..892c17c15 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs @@ -0,0 +1,234 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub commitment: ::std::option::Option, +#[allow(missing_docs)] +pub edk_wrapping: ::std::option::Option, +#[allow(missing_docs)] +pub encrypt: ::std::option::Option, +#[allow(missing_docs)] +pub id: ::std::option::Option, +#[allow(missing_docs)] +pub kdf: ::std::option::Option, +#[allow(missing_docs)] +pub message_version: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub signature: ::std::option::Option, +#[allow(missing_docs)] +pub symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfo { + #[allow(missing_docs)] +pub fn binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} +} +impl AlgorithmSuiteInfo { + /// Creates a new builder-style object to manufacture [`AlgorithmSuiteInfo`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::AlgorithmSuiteInfoBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::AlgorithmSuiteInfoBuilder::default() + } +} + +/// A builder for [`AlgorithmSuiteInfo`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AlgorithmSuiteInfoBuilder { + pub(crate) binary_id: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) commitment: ::std::option::Option, +pub(crate) edk_wrapping: ::std::option::Option, +pub(crate) encrypt: ::std::option::Option, +pub(crate) id: ::std::option::Option, +pub(crate) kdf: ::std::option::Option, +pub(crate) message_version: ::std::option::Option<::std::primitive::i32>, +pub(crate) signature: ::std::option::Option, +pub(crate) symmetric_signature: ::std::option::Option, +} +impl AlgorithmSuiteInfoBuilder { + #[allow(missing_docs)] +pub fn binary_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.binary_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_binary_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.binary_id = input; + self +} +#[allow(missing_docs)] +pub fn get_binary_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.binary_id +} +#[allow(missing_docs)] +pub fn commitment(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment(mut self, input: ::std::option::Option) -> Self { + self.commitment = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment(&self) -> &::std::option::Option { + &self.commitment +} +#[allow(missing_docs)] +pub fn edk_wrapping(mut self, input: impl ::std::convert::Into) -> Self { + self.edk_wrapping = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_edk_wrapping(mut self, input: ::std::option::Option) -> Self { + self.edk_wrapping = input; + self +} +#[allow(missing_docs)] +pub fn get_edk_wrapping(&self) -> &::std::option::Option { + &self.edk_wrapping +} +#[allow(missing_docs)] +pub fn encrypt(mut self, input: impl ::std::convert::Into) -> Self { + self.encrypt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypt(mut self, input: ::std::option::Option) -> Self { + self.encrypt = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypt(&self) -> &::std::option::Option { + &self.encrypt +} +#[allow(missing_docs)] +pub fn id(mut self, input: impl ::std::convert::Into) -> Self { + self.id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_id(mut self, input: ::std::option::Option) -> Self { + self.id = input; + self +} +#[allow(missing_docs)] +pub fn get_id(&self) -> &::std::option::Option { + &self.id +} +#[allow(missing_docs)] +pub fn kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.kdf = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_kdf(mut self, input: ::std::option::Option) -> Self { + self.kdf = input; + self +} +#[allow(missing_docs)] +pub fn get_kdf(&self) -> &::std::option::Option { + &self.kdf +} +#[allow(missing_docs)] +pub fn message_version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.message_version = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.message_version = input; + self +} +#[allow(missing_docs)] +pub fn get_message_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.message_version +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option { + &self.signature +} +#[allow(missing_docs)] +pub fn symmetric_signature(mut self, input: impl ::std::convert::Into) -> Self { + self.symmetric_signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signature(mut self, input: ::std::option::Option) -> Self { + self.symmetric_signature = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signature(&self) -> &::std::option::Option { + &self.symmetric_signature +} + /// Consumes the builder and constructs a [`AlgorithmSuiteInfo`](crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::AlgorithmSuiteInfo { + binary_id: self.binary_id, +commitment: self.commitment, +edk_wrapping: self.edk_wrapping, +encrypt: self.encrypt, +id: self.id, +kdf: self.kdf, +message_version: self.message_version, +signature: self.signature, +symmetric_signature: self.symmetric_signature, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs new file mode 100644 index 000000000..b1b20ecec --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs @@ -0,0 +1,113 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum CacheType { + #[allow(missing_docs)] +Default(crate::deps::aws_cryptography_materialProviders::types::DefaultCache), +#[allow(missing_docs)] +No(crate::deps::aws_cryptography_materialProviders::types::NoCache), +#[allow(missing_docs)] +SingleThreaded(crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache), +#[allow(missing_docs)] +MultiThreaded(crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache), +#[allow(missing_docs)] +StormTracking(crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache), +/// Shared cache across multiple Hierarchical Keyrings. For this cache type, the user should provide an already constructed CryptographicMaterialsCache to the Hierarchical Keyring at initialization. +Shared(crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl CacheType { + /// Tries to convert the enum instance into [`Default`](crate::deps::aws_cryptography_materialProviders::types::CacheType::Default), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::DefaultCache`](crate::deps::aws_cryptography_materialProviders::types::DefaultCache). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_default(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::DefaultCache, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::Default(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`No`](crate::deps::aws_cryptography_materialProviders::types::CacheType::No), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::NoCache`](crate::deps::aws_cryptography_materialProviders::types::NoCache). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_no(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::NoCache, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::No(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`SingleThreaded`](crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_single_threaded(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`MultiThreaded`](crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_multi_threaded(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`StormTracking`](crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache`](crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_storm_tracking(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Shared`](crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef`](crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_shared(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Default`](crate::deps::aws_cryptography_materialProviders::types::CacheType::Default). +pub fn is_default(&self) -> ::std::primitive::bool { + self.as_default().is_ok() +} +/// Returns true if this is a [`No`](crate::deps::aws_cryptography_materialProviders::types::CacheType::No). +pub fn is_no(&self) -> ::std::primitive::bool { + self.as_no().is_ok() +} +/// Returns true if this is a [`SingleThreaded`](crate::deps::aws_cryptography_materialProviders::types::CacheType::SingleThreaded). +pub fn is_single_threaded(&self) -> ::std::primitive::bool { + self.as_single_threaded().is_ok() +} +/// Returns true if this is a [`MultiThreaded`](crate::deps::aws_cryptography_materialProviders::types::CacheType::MultiThreaded). +pub fn is_multi_threaded(&self) -> ::std::primitive::bool { + self.as_multi_threaded().is_ok() +} +/// Returns true if this is a [`StormTracking`](crate::deps::aws_cryptography_materialProviders::types::CacheType::StormTracking). +pub fn is_storm_tracking(&self) -> ::std::primitive::bool { + self.as_storm_tracking().is_ok() +} +/// Returns true if this is a [`Shared`](crate::deps::aws_cryptography_materialProviders::types::CacheType::Shared). +pub fn is_shared(&self) -> ::std::primitive::bool { + self.as_shared().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs new file mode 100644 index 000000000..58f2f77a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum CommitmentPolicy { + #[allow(missing_docs)] +Esdk(crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy), +#[allow(missing_docs)] +Dbe(crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl CommitmentPolicy { + /// Tries to convert the enum instance into [`Esdk`](crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy`](crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_esdk(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::EsdkCommitmentPolicy, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Dbe`](crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy`](crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_dbe(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::DbeCommitmentPolicy, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Esdk`](crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Esdk). +pub fn is_esdk(&self) -> ::std::primitive::bool { + self.as_esdk().is_ok() +} +/// Returns true if this is a [`Dbe`](crate::deps::aws_cryptography_materialProviders::types::CommitmentPolicy::Dbe). +pub fn is_dbe(&self) -> ::std::primitive::bool { + self.as_dbe().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_keyring_input.rs new file mode 100644 index 000000000..727904133 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Discovery Keyring. +pub struct CreateAwsKmsDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +} +impl CreateAwsKmsDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +} +impl CreateAwsKmsDiscoveryKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsDiscoveryKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsDiscoveryKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsDiscoveryKeyringInputBuilder { + pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +} +impl CreateAwsKmsDiscoveryKeyringInputBuilder { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} + /// Consumes the builder and constructs a [`CreateAwsKmsDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryKeyringInput { + discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..c58cc0f2c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating an AWS KMS Discovery Multi-Keyring. +pub struct CreateAwsKmsDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub client_supplier: ::std::option::Option, +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The list of regions this Keyring will creates KMS clients for. +pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} +} +impl CreateAwsKmsDiscoveryMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsDiscoveryMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsDiscoveryMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = ::std::option::Option::Some(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = input; + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} + /// Consumes the builder and constructs a [`CreateAwsKmsDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsDiscoveryMultiKeyringInput { + client_supplier: self.client_supplier, +discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +regions: self.regions, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_ecdh_keyring_input.rs new file mode 100644 index 000000000..567b60402 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_ecdh_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating an AWS KMS ECDH Keyring. +pub struct CreateAwsKmsEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub key_agreement_scheme: ::std::option::Option, +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub curve_spec: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +} +impl CreateAwsKmsEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +} +impl CreateAwsKmsEcdhKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsEcdhKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsEcdhKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsEcdhKeyringInputBuilder { + pub(crate) key_agreement_scheme: ::std::option::Option, +pub(crate) curve_spec: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +} +impl CreateAwsKmsEcdhKeyringInputBuilder { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.key_agreement_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.key_agreement_scheme = input; + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.curve_spec = ::std::option::Option::Some(input.into()); + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.curve_spec = input; + self +} +/// The named curve that corresponds to the curve on which the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} + /// Consumes the builder and constructs a [`CreateAwsKmsEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsEcdhKeyringInput { + key_agreement_scheme: self.key_agreement_scheme, +curve_spec: self.curve_spec, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_hierarchical_keyring_input.rs new file mode 100644 index 000000000..b87e3888b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_hierarchical_keyring_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Hierarchical Keyring. +pub struct CreateAwsKmsHierarchicalKeyringInput { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub branch_key_id: ::std::option::Option<::std::string::String>, +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub branch_key_id_supplier: ::std::option::Option, +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub cache: ::std::option::Option, +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub key_store: ::std::option::Option, +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub partition_id: ::std::option::Option<::std::string::String>, +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub ttl_seconds: ::std::option::Option<::std::primitive::i64>, +} +impl CreateAwsKmsHierarchicalKeyringInput { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn cache(&self) -> &::std::option::Option { + &self.cache +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn partition_id(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_id +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn ttl_seconds(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.ttl_seconds +} +} +impl CreateAwsKmsHierarchicalKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsHierarchicalKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsHierarchicalKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsHierarchicalKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsHierarchicalKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsHierarchicalKeyringInputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_id_supplier: ::std::option::Option, +pub(crate) cache: ::std::option::Option, +pub(crate) key_store: ::std::option::Option, +pub(crate) partition_id: ::std::option::Option<::std::string::String>, +pub(crate) ttl_seconds: ::std::option::Option<::std::primitive::i64>, +} +impl CreateAwsKmsHierarchicalKeyringInputBuilder { + /// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The identifier for the single Branch Key responsible for wrapping and unwrapping the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.branch_key_id_supplier = ::std::option::Option::Some(input.into()); + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn set_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.branch_key_id_supplier = input; + self +} +/// A Branch Key Supplier which determines what Branch Key to use to wrap and unwrap the data key. Either a Branch Key ID or Branch Key Supplier must be specified. +pub fn get_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.cache = ::std::option::Option::Some(input.into()); + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.cache = input; + self +} +/// Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. +pub fn get_cache(&self) -> &::std::option::Option { + &self.cache +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn key_store(mut self, input: impl ::std::convert::Into) -> Self { + self.key_store = ::std::option::Option::Some(input.into()); + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn set_key_store(mut self, input: ::std::option::Option) -> Self { + self.key_store = input; + self +} +/// The Key Store which contains the Branch Key(s) responsible for wrapping and unwrapping data keys. +pub fn get_key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn partition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.partition_id = ::std::option::Option::Some(input.into()); + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn set_partition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.partition_id = input; + self +} +/// Partition ID to distinguish Cryptographic Material Providers (i.e: Keyrings) writing to a cache. If the Partition ID is the same for two Hierarchical Keyrings (or another Material Provider), they can share the same cache entries in the cache. +pub fn get_partition_id(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_id +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn ttl_seconds(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.ttl_seconds = ::std::option::Option::Some(input.into()); + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn set_ttl_seconds(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.ttl_seconds = input; + self +} +/// How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. +pub fn get_ttl_seconds(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.ttl_seconds +} + /// Consumes the builder and constructs a [`CreateAwsKmsHierarchicalKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsHierarchicalKeyringInput { + branch_key_id: self.branch_key_id, +branch_key_id_supplier: self.branch_key_id_supplier, +cache: self.cache, +key_store: self.key_store, +partition_id: self.partition_id, +ttl_seconds: self.ttl_seconds, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_keyring_input.rs new file mode 100644 index 000000000..0db2025a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Keyring. +pub struct CreateAwsKmsKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +} +impl CreateAwsKmsKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsKeyringInputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsKeyringInputBuilder { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The identifier for the symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. This should not be a AWS KMS Multi-Region Key. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} + /// Consumes the builder and constructs a [`CreateAwsKmsKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsKeyringInput { + grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_keyring_input.rs new file mode 100644 index 000000000..99e87368e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Discovery Keyring. +pub struct CreateAwsKmsMrkDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The region the input 'kmsClient' is in. +pub region: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkDiscoveryKeyringInput { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The region the input 'kmsClient' is in. +pub fn region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} +} +impl CreateAwsKmsMrkDiscoveryKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkDiscoveryKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) region: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkDiscoveryKeyringInputBuilder { + /// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The region the input 'kmsClient' is in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.region = ::std::option::Option::Some(input.into()); + self +} +/// The region the input 'kmsClient' is in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.region = input; + self +} +/// The region the input 'kmsClient' is in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkDiscoveryKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryKeyringInput { + discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +region: self.region, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_multi_keyring_input.rs new file mode 100644 index 000000000..a22dc11cc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. +pub struct CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub client_supplier: ::std::option::Option, +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub discovery_filter: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The list of regions this Keyring will creates KMS clients for. +pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) discovery_filter: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. If not specified on input, a Default Client Supplier is created which creates a KMS Client for each region in the 'regions' input. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn discovery_filter(mut self, input: impl ::std::convert::Into) -> Self { + self.discovery_filter = ::std::option::Option::Some(input.into()); + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn set_discovery_filter(mut self, input: ::std::option::Option) -> Self { + self.discovery_filter = input; + self +} +/// A filter which restricts which KMS Keys this Keyring may attempt to decrypt with by AWS partition and account. +pub fn get_discovery_filter(&self) -> &::std::option::Option { + &self.discovery_filter +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn regions(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = ::std::option::Option::Some(input.into()); + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = input; + self +} +/// The list of regions this Keyring will creates KMS clients for. +pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkDiscoveryMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + client_supplier: self.client_supplier, +discovery_filter: self.discovery_filter, +grant_tokens: self.grant_tokens, +regions: self.regions, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_keyring_input.rs new file mode 100644 index 000000000..a509149ed --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_keyring_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating an AWS KMS MRK Keyring. +pub struct CreateAwsKmsMrkKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkKeyringInput { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +} +impl CreateAwsKmsMrkKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkKeyringInputBuilder { + pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +} +impl CreateAwsKmsMrkKeyringInputBuilder { + /// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The identifier for the symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkKeyringInput { + grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_multi_keyring_input.rs new file mode 100644 index 000000000..712d714e3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS MRK Multi-Keyring. +pub struct CreateAwsKmsMrkMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub client_supplier: ::std::option::Option, +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub generator: ::std::option::Option<::std::string::String>, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} +} +impl CreateAwsKmsMrkMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMrkMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMrkMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMrkMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMrkMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) generator: ::std::option::Option<::std::string::String>, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMrkMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.generator = input; + self +} +/// A symmetric AWS KMS Key or AWS KMS Multi-Region Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = ::std::option::Option::Some(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = input; + self +} +/// A list of identifiers for the symmetric AWS KMS Keys and/or AWS KMS Multi-Region Keys (other than the generator) responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} + /// Consumes the builder and constructs a [`CreateAwsKmsMrkMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMrkMultiKeyringInput { + client_supplier: self.client_supplier, +generator: self.generator, +grant_tokens: self.grant_tokens, +kms_key_ids: self.kms_key_ids, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_multi_keyring_input.rs new file mode 100644 index 000000000..a29eee4af --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_multi_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for for creating a AWS KMS Multi-Keyring. +pub struct CreateAwsKmsMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub client_supplier: ::std::option::Option, +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub generator: ::std::option::Option<::std::string::String>, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMultiKeyringInput { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} +} +impl CreateAwsKmsMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsMultiKeyringInputBuilder { + pub(crate) client_supplier: ::std::option::Option, +pub(crate) generator: ::std::option::Option<::std::string::String>, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_key_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl CreateAwsKmsMultiKeyringInputBuilder { + /// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn client_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.client_supplier = ::std::option::Option::Some(input.into()); + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn set_client_supplier(mut self, input: ::std::option::Option) -> Self { + self.client_supplier = input; + self +} +/// The Client Supplier which will be used to get KMS Clients for use with this Keyring. The Client Supplier will create a client for each region specified in the generator and kmsKeyIds ARNs. If not specified on input, the Default Client Supplier is used. +pub fn get_client_supplier(&self) -> &::std::option::Option { + &self.client_supplier +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn generator(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn set_generator(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.generator = input; + self +} +/// A identifier for a symmetric AWS KMS Key responsible for wrapping and unwrapping data keys. KMS.GenerateDataKey may be called with this key if the data key has not already been generated by another Keyring. This should not be a AWS KMS Multi-Region Key. +pub fn get_generator(&self) -> &::std::option::Option<::std::string::String> { + &self.generator +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn kms_key_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = ::std::option::Option::Some(input.into()); + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn set_kms_key_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.kms_key_ids = input; + self +} +/// A list of identifiers for the symmetric AWS KMS Keys (other than the generator) responsible for wrapping and unwrapping data keys. This list should not contain AWS KMS Multi-Region Keys. +pub fn get_kms_key_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.kms_key_ids +} + /// Consumes the builder and constructs a [`CreateAwsKmsMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsMultiKeyringInput { + client_supplier: self.client_supplier, +generator: self.generator, +grant_tokens: self.grant_tokens, +kms_key_ids: self.kms_key_ids, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_rsa_keyring_input.rs new file mode 100644 index 000000000..94bca74e3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_rsa_keyring_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a AWS KMS RSA Keyring. +pub struct CreateAwsKmsRsaKeyringInput { + /// The RSA algorithm used to wrap and unwrap data keys. +pub encryption_algorithm: ::std::option::Option, +/// A list of grant tokens to be used when calling KMS. +pub grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The KMS Client this Keyring will use to call KMS. +pub kms_client: ::std::option::Option, +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub kms_key_id: ::std::option::Option<::std::string::String>, +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateAwsKmsRsaKeyringInput { + /// The RSA algorithm used to wrap and unwrap data keys. +pub fn encryption_algorithm(&self) -> &::std::option::Option { + &self.encryption_algorithm +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl CreateAwsKmsRsaKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateAwsKmsRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsRsaKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateAwsKmsRsaKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateAwsKmsRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateAwsKmsRsaKeyringInputBuilder { + pub(crate) encryption_algorithm: ::std::option::Option, +pub(crate) grant_tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) kms_client: ::std::option::Option, +pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateAwsKmsRsaKeyringInputBuilder { + /// The RSA algorithm used to wrap and unwrap data keys. +pub fn encryption_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.encryption_algorithm = ::std::option::Option::Some(input.into()); + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn set_encryption_algorithm(mut self, input: ::std::option::Option) -> Self { + self.encryption_algorithm = input; + self +} +/// The RSA algorithm used to wrap and unwrap data keys. +pub fn get_encryption_algorithm(&self) -> &::std::option::Option { + &self.encryption_algorithm +} +/// A list of grant tokens to be used when calling KMS. +pub fn grant_tokens(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = ::std::option::Option::Some(input.into()); + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn set_grant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.grant_tokens = input; + self +} +/// A list of grant tokens to be used when calling KMS. +pub fn get_grant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.grant_tokens +} +/// The KMS Client this Keyring will use to call KMS. +pub fn kms_client(mut self, input: impl ::std::convert::Into) -> Self { + self.kms_client = ::std::option::Option::Some(input.into()); + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn set_kms_client(mut self, input: ::std::option::Option) -> Self { + self.kms_client = input; + self +} +/// The KMS Client this Keyring will use to call KMS. +pub fn get_kms_client(&self) -> &::std::option::Option { + &self.kms_client +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self +} +/// The ARN for the asymmetric AWS KMS Key for RSA responsible for wrapping and unwrapping data keys. +pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. This should be the public key as exported from KMS. If not specified, this Keyring cannot be used on encrypt. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`CreateAwsKmsRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateAwsKmsRsaKeyringInput { + encryption_algorithm: self.encryption_algorithm, +grant_tokens: self.grant_tokens, +kms_client: self.kms_client, +kms_key_id: self.kms_key_id, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_cryptographic_materials_cache_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_cryptographic_materials_cache_input.rs new file mode 100644 index 000000000..008c3e860 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_cryptographic_materials_cache_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateCryptographicMaterialsCacheInput { + /// Which type of local cache to use. +pub cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheInput { + /// Which type of local cache to use. +pub fn cache(&self) -> &::std::option::Option { + &self.cache +} +} +impl CreateCryptographicMaterialsCacheInput { + /// Creates a new builder-style object to manufacture [`CreateCryptographicMaterialsCacheInput`](crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateCryptographicMaterialsCacheInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateCryptographicMaterialsCacheInputBuilder::default() + } +} + +/// A builder for [`CreateCryptographicMaterialsCacheInput`](crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateCryptographicMaterialsCacheInputBuilder { + pub(crate) cache: ::std::option::Option, +} +impl CreateCryptographicMaterialsCacheInputBuilder { + /// Which type of local cache to use. +pub fn cache(mut self, input: impl ::std::convert::Into) -> Self { + self.cache = ::std::option::Option::Some(input.into()); + self +} +/// Which type of local cache to use. +pub fn set_cache(mut self, input: ::std::option::Option) -> Self { + self.cache = input; + self +} +/// Which type of local cache to use. +pub fn get_cache(&self) -> &::std::option::Option { + &self.cache +} + /// Consumes the builder and constructs a [`CreateCryptographicMaterialsCacheInput`](crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateCryptographicMaterialsCacheInput { + cache: self.cache, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_client_supplier_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_client_supplier_input.rs new file mode 100644 index 000000000..24a13380e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_client_supplier_input.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CreateDefaultClientSupplierInput { + +} +impl CreateDefaultClientSupplierInput { + +} +impl CreateDefaultClientSupplierInput { + /// Creates a new builder-style object to manufacture [`CreateDefaultClientSupplierInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateDefaultClientSupplierInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateDefaultClientSupplierInputBuilder::default() + } +} + +/// A builder for [`CreateDefaultClientSupplierInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDefaultClientSupplierInputBuilder { + +} +impl CreateDefaultClientSupplierInputBuilder { + + /// Consumes the builder and constructs a [`CreateDefaultClientSupplierInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateDefaultClientSupplierInput { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_cryptographic_materials_manager_input.rs new file mode 100644 index 000000000..4945e2ae3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_cryptographic_materials_manager_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Default Cryptographic Materials Manager. +pub struct CreateDefaultCryptographicMaterialsManagerInput { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub keyring: ::std::option::Option, +} +impl CreateDefaultCryptographicMaterialsManagerInput { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +} +impl CreateDefaultCryptographicMaterialsManagerInput { + /// Creates a new builder-style object to manufacture [`CreateDefaultCryptographicMaterialsManagerInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateDefaultCryptographicMaterialsManagerInputBuilder::default() + } +} + +/// A builder for [`CreateDefaultCryptographicMaterialsManagerInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDefaultCryptographicMaterialsManagerInputBuilder { + pub(crate) keyring: ::std::option::Option, +} +impl CreateDefaultCryptographicMaterialsManagerInputBuilder { + /// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that the created Default Cryprographic Materials Manager will use to wrap data keys. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} + /// Consumes the builder and constructs a [`CreateDefaultCryptographicMaterialsManagerInput`](crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateDefaultCryptographicMaterialsManagerInput { + keyring: self.keyring, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs new file mode 100644 index 000000000..28e44160b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Multi-Keyring. +pub struct CreateMultiKeyringInput { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub child_keyrings: ::std::option::Option<::std::vec::Vec>, +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub generator: ::std::option::Option, +} +impl CreateMultiKeyringInput { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn child_keyrings(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.child_keyrings +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn generator(&self) -> &::std::option::Option { + &self.generator +} +} +impl CreateMultiKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateMultiKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateMultiKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateMultiKeyringInputBuilder { + pub(crate) child_keyrings: ::std::option::Option<::std::vec::Vec>, +pub(crate) generator: ::std::option::Option, +} +impl CreateMultiKeyringInputBuilder { + /// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn child_keyrings(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.child_keyrings = ::std::option::Option::Some(input.into()); + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn set_child_keyrings(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.child_keyrings = input; + self +} +/// A list of keyrings (other than the generator) responsible for wrapping and unwrapping the data key. +pub fn get_child_keyrings(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.child_keyrings +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn generator(mut self, input: impl ::std::convert::Into) -> Self { + self.generator = ::std::option::Option::Some(input.into()); + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn set_generator(mut self, input: ::std::option::Option) -> Self { + self.generator = input; + self +} +/// A keyring responsible for wrapping and unwrapping the data key. This is the first keyring that will be used to wrap the data key, and may be responsible for additionally generating the data key. +pub fn get_generator(&self) -> &::std::option::Option { + &self.generator +} + /// Consumes the builder and constructs a [`CreateMultiKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateMultiKeyringInput { + child_keyrings: self.child_keyrings, +generator: self.generator, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_aes_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_aes_keyring_input.rs new file mode 100644 index 000000000..790783100 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_aes_keyring_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Raw AES Keyring. +pub struct CreateRawAesKeyringInput { + /// A name associated with this wrapping key. +pub key_name: ::std::option::Option<::std::string::String>, +/// A namespace associated with this wrapping key. +pub key_namespace: ::std::option::Option<::std::string::String>, +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub wrapping_alg: ::std::option::Option, +/// The AES key used with AES_GCM encryption and decryption. +pub wrapping_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawAesKeyringInput { + /// A name associated with this wrapping key. +pub fn key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn wrapping_alg(&self) -> &::std::option::Option { + &self.wrapping_alg +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn wrapping_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.wrapping_key +} +} +impl CreateRawAesKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawAesKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawAesKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawAesKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawAesKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawAesKeyringInputBuilder { + pub(crate) key_name: ::std::option::Option<::std::string::String>, +pub(crate) key_namespace: ::std::option::Option<::std::string::String>, +pub(crate) wrapping_alg: ::std::option::Option, +pub(crate) wrapping_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawAesKeyringInputBuilder { + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_name = ::std::option::Option::Some(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_name = input; + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_namespace = ::std::option::Option::Some(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_namespace = input; + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn wrapping_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.wrapping_alg = ::std::option::Option::Some(input.into()); + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn set_wrapping_alg(mut self, input: ::std::option::Option) -> Self { + self.wrapping_alg = input; + self +} +/// The AES_GCM algorithm this Keyring uses to wrap and unwrap data keys. +pub fn get_wrapping_alg(&self) -> &::std::option::Option { + &self.wrapping_alg +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn wrapping_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.wrapping_key = ::std::option::Option::Some(input.into()); + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn set_wrapping_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.wrapping_key = input; + self +} +/// The AES key used with AES_GCM encryption and decryption. +pub fn get_wrapping_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.wrapping_key +} + /// Consumes the builder and constructs a [`CreateRawAesKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateRawAesKeyringInput { + key_name: self.key_name, +key_namespace: self.key_namespace, +wrapping_alg: self.wrapping_alg, +wrapping_key: self.wrapping_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_ecdh_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_ecdh_keyring_input.rs new file mode 100644 index 000000000..638016e03 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_ecdh_keyring_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a raw ECDH Keyring. +pub struct CreateRawEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub key_agreement_scheme: ::std::option::Option, +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub curve_spec: ::std::option::Option, +} +impl CreateRawEcdhKeyringInput { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} +} +impl CreateRawEcdhKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawEcdhKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawEcdhKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawEcdhKeyringInputBuilder { + pub(crate) key_agreement_scheme: ::std::option::Option, +pub(crate) curve_spec: ::std::option::Option, +} +impl CreateRawEcdhKeyringInputBuilder { + /// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn key_agreement_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.key_agreement_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn set_key_agreement_scheme(mut self, input: ::std::option::Option) -> Self { + self.key_agreement_scheme = input; + self +} +/// The Key Agreement Scheme configuration that is responsible for how the shared secret is calculated. +pub fn get_key_agreement_scheme(&self) -> &::std::option::Option { + &self.key_agreement_scheme +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn curve_spec(mut self, input: impl ::std::convert::Into) -> Self { + self.curve_spec = ::std::option::Option::Some(input.into()); + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn set_curve_spec(mut self, input: ::std::option::Option) -> Self { + self.curve_spec = input; + self +} +/// The the curve on which the points for the sender's private and recipient's public key lie. +pub fn get_curve_spec(&self) -> &::std::option::Option { + &self.curve_spec +} + /// Consumes the builder and constructs a [`CreateRawEcdhKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateRawEcdhKeyringInput { + key_agreement_scheme: self.key_agreement_scheme, +curve_spec: self.curve_spec, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_rsa_keyring_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_rsa_keyring_input.rs new file mode 100644 index 000000000..95d4da684 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_rsa_keyring_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a Raw RAW Keyring. +pub struct CreateRawRsaKeyringInput { + /// A name associated with this wrapping key. +pub key_name: ::std::option::Option<::std::string::String>, +/// A namespace associated with this wrapping key. +pub key_namespace: ::std::option::Option<::std::string::String>, +/// The RSA padding scheme to use with this keyring. +pub padding_scheme: ::std::option::Option, +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub private_key: ::std::option::Option<::aws_smithy_types::Blob>, +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawRsaKeyringInput { + /// A name associated with this wrapping key. +pub fn key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The RSA padding scheme to use with this keyring. +pub fn padding_scheme(&self) -> &::std::option::Option { + &self.padding_scheme +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl CreateRawRsaKeyringInput { + /// Creates a new builder-style object to manufacture [`CreateRawRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawRsaKeyringInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateRawRsaKeyringInputBuilder::default() + } +} + +/// A builder for [`CreateRawRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRawRsaKeyringInputBuilder { + pub(crate) key_name: ::std::option::Option<::std::string::String>, +pub(crate) key_namespace: ::std::option::Option<::std::string::String>, +pub(crate) padding_scheme: ::std::option::Option, +pub(crate) private_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CreateRawRsaKeyringInputBuilder { + /// A name associated with this wrapping key. +pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_name = ::std::option::Option::Some(input.into()); + self +} +/// A name associated with this wrapping key. +pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_name = input; + self +} +/// A name associated with this wrapping key. +pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_name +} +/// A namespace associated with this wrapping key. +pub fn key_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_namespace = ::std::option::Option::Some(input.into()); + self +} +/// A namespace associated with this wrapping key. +pub fn set_key_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_namespace = input; + self +} +/// A namespace associated with this wrapping key. +pub fn get_key_namespace(&self) -> &::std::option::Option<::std::string::String> { + &self.key_namespace +} +/// The RSA padding scheme to use with this keyring. +pub fn padding_scheme(mut self, input: impl ::std::convert::Into) -> Self { + self.padding_scheme = ::std::option::Option::Some(input.into()); + self +} +/// The RSA padding scheme to use with this keyring. +pub fn set_padding_scheme(mut self, input: ::std::option::Option) -> Self { + self.padding_scheme = input; + self +} +/// The RSA padding scheme to use with this keyring. +pub fn get_padding_scheme(&self) -> &::std::option::Option { + &self.padding_scheme +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.private_key = input; + self +} +/// The private RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded PKCS #8 PrivateKeyInfo structure. If not specified, this Keyring cannot be used on decrypt. A public key and/or a private key must be specified. +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +/// The public RSA Key responsible for wrapping data keys, as a UTF8 encoded, PEM encoded X.509 SubjectPublicKeyInfo structure. If not specified, this Keyring cannot be used on encrypt. A public key and/or a private key must be specified. +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`CreateRawRsaKeyringInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateRawRsaKeyringInput { + key_name: self.key_name, +key_namespace: self.key_namespace, +padding_scheme: self.padding_scheme, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_required_encryption_context_cmm_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_required_encryption_context_cmm_input.rs new file mode 100644 index 000000000..62a050fb5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_create_required_encryption_context_cmm_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. +pub struct CreateRequiredEncryptionContextCmmInput { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub keyring: ::std::option::Option, +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub underlying_cmm: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmInput { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn underlying_cmm(&self) -> &::std::option::Option { + &self.underlying_cmm +} +} +impl CreateRequiredEncryptionContextCmmInput { + /// Creates a new builder-style object to manufacture [`CreateRequiredEncryptionContextCmmInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::CreateRequiredEncryptionContextCmmInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::CreateRequiredEncryptionContextCmmInputBuilder::default() + } +} + +/// A builder for [`CreateRequiredEncryptionContextCmmInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateRequiredEncryptionContextCmmInputBuilder { + pub(crate) keyring: ::std::option::Option, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) underlying_cmm: ::std::option::Option, +} +impl CreateRequiredEncryptionContextCmmInputBuilder { + /// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that the created Cryprographic Materials Manager will use to wrap data keys. The created Required Encryption Context CMM will delegate to a Default Cryptographic Materials Manager created with this Keyring. Either a Keyring or an underlying Cryprographic Materials Manager must be specified as input. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +/// A list of Encryption Context keys which are required to be supplied during encryption and decryption, and correspond to Encryption Context key-value pairs which are not stored on the resulting message. +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn underlying_cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.underlying_cmm = ::std::option::Option::Some(input.into()); + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn set_underlying_cmm(mut self, input: ::std::option::Option) -> Self { + self.underlying_cmm = input; + self +} +/// The Cryprographic Materials Manager that the created Required Encryption Context Cryptographic Materials Manager will delegate to. Either a Keyring or underlying Cryprographic Materials Manager must be specified. +pub fn get_underlying_cmm(&self) -> &::std::option::Option { + &self.underlying_cmm +} + /// Consumes the builder and constructs a [`CreateRequiredEncryptionContextCmmInput`](crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::CreateRequiredEncryptionContextCmmInput { + keyring: self.keyring, +required_encryption_context_keys: self.required_encryption_context_keys, +underlying_cmm: self.underlying_cmm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs new file mode 100644 index 000000000..cd0de5629 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs @@ -0,0 +1,18 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum DbeAlgorithmSuiteId { + AlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384, +AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384, +} + +impl ::std::fmt::Display for DbeAlgorithmSuiteId { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384 => write!(f, "ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384"), +DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 => write!(f, "ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs new file mode 100644 index 000000000..88de0bd7d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs @@ -0,0 +1,16 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum DbeCommitmentPolicy { + RequireEncryptRequireDecrypt, +} + +impl ::std::fmt::Display for DbeCommitmentPolicy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DbeCommitmentPolicy::RequireEncryptRequireDecrypt => write!(f, "REQUIRE_ENCRYPT_REQUIRE_DECRYPT"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs new file mode 100644 index 000000000..c21e05816 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub reproduced_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl DecryptMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn reproduced_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.reproduced_encryption_context +} +} +impl DecryptMaterialsInput { + /// Creates a new builder-style object to manufacture [`DecryptMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DecryptMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DecryptMaterialsInputBuilder::default() + } +} + +/// A builder for [`DecryptMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) reproduced_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl DecryptMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn reproduced_encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.reproduced_encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_reproduced_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.reproduced_encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_reproduced_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.reproduced_encryption_context +} + /// Consumes the builder and constructs a [`DecryptMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +commitment_policy: self.commitment_policy, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +reproduced_encryption_context: self.reproduced_encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs new file mode 100644 index 000000000..fa5b8319d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptMaterialsOutput { + #[allow(missing_docs)] +pub decryption_materials: ::std::option::Option, +} +impl DecryptMaterialsOutput { + #[allow(missing_docs)] +pub fn decryption_materials(&self) -> &::std::option::Option { + &self.decryption_materials +} +} +impl DecryptMaterialsOutput { + /// Creates a new builder-style object to manufacture [`DecryptMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DecryptMaterialsOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DecryptMaterialsOutputBuilder::default() + } +} + +/// A builder for [`DecryptMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptMaterialsOutputBuilder { + pub(crate) decryption_materials: ::std::option::Option, +} +impl DecryptMaterialsOutputBuilder { + #[allow(missing_docs)] +pub fn decryption_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.decryption_materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_decryption_materials(mut self, input: ::std::option::Option) -> Self { + self.decryption_materials = input; + self +} +#[allow(missing_docs)] +pub fn get_decryption_materials(&self) -> &::std::option::Option { + &self.decryption_materials +} + /// Consumes the builder and constructs a [`DecryptMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DecryptMaterialsOutput { + decryption_materials: self.decryption_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs new file mode 100644 index 000000000..a259f204d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl DecryptionMaterials { + /// Creates a new builder-style object to manufacture [`DecryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DecryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DecryptionMaterialsBuilder::default() + } +} + +/// A builder for [`DecryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) symmetric_signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DecryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn symmetric_signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.symmetric_signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.symmetric_signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`DecryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials { + algorithm_suite: self.algorithm_suite, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +symmetric_signing_key: self.symmetric_signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs new file mode 100644 index 000000000..32d840377 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// The best choice for most situations. Probably a StormTrackingCache. +pub struct DefaultCache { + /// Maximum number of entries cached. +pub entry_capacity: ::std::option::Option<::std::primitive::i32>, +} +impl DefaultCache { + /// Maximum number of entries cached. +pub fn entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +} +impl DefaultCache { + /// Creates a new builder-style object to manufacture [`DefaultCache`](crate::deps::aws_cryptography_materialProviders::types::DefaultCache). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DefaultCacheBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DefaultCacheBuilder::default() + } +} + +/// A builder for [`DefaultCache`](crate::deps::aws_cryptography_materialProviders::types::DefaultCache). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DefaultCacheBuilder { + pub(crate) entry_capacity: ::std::option::Option<::std::primitive::i32>, +} +impl DefaultCacheBuilder { + /// Maximum number of entries cached. +pub fn entry_capacity(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_capacity = ::std::option::Option::Some(input.into()); + self +} +/// Maximum number of entries cached. +pub fn set_entry_capacity(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_capacity = input; + self +} +/// Maximum number of entries cached. +pub fn get_entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} + /// Consumes the builder and constructs a [`DefaultCache`](crate::deps::aws_cryptography_materialProviders::types::DefaultCache). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DefaultCache, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DefaultCache { + entry_capacity: self.entry_capacity, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs new file mode 100644 index 000000000..edd445405 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeleteCacheEntryInput { + #[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeleteCacheEntryInput { + #[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl DeleteCacheEntryInput { + /// Creates a new builder-style object to manufacture [`DeleteCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DeleteCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DeleteCacheEntryInputBuilder::default() + } +} + +/// A builder for [`DeleteCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeleteCacheEntryInputBuilder { + pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeleteCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`DeleteCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DeleteCacheEntryInput { + identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs new file mode 100644 index 000000000..1e0cab6b4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs @@ -0,0 +1,68 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum DerivationAlgorithm { + #[allow(missing_docs)] +Hkdf(crate::deps::aws_cryptography_materialProviders::types::Hkdf), +#[allow(missing_docs)] +Identity(crate::deps::aws_cryptography_materialProviders::types::Identity), +#[allow(missing_docs)] +None(crate::deps::aws_cryptography_materialProviders::types::None), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl DerivationAlgorithm { + /// Tries to convert the enum instance into [`Hkdf`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::Hkdf`](crate::deps::aws_cryptography_materialProviders::types::Hkdf). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_hkdf(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::Hkdf, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Identity`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::Identity`](crate::deps::aws_cryptography_materialProviders::types::Identity). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_identity(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::Identity, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`None`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::None`](crate::deps::aws_cryptography_materialProviders::types::None). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_none(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::None, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Hkdf`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf). +pub fn is_hkdf(&self) -> ::std::primitive::bool { + self.as_hkdf().is_ok() +} +/// Returns true if this is a [`Identity`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity). +pub fn is_identity(&self) -> ::std::primitive::bool { + self.as_identity().is_ok() +} +/// Returns true if this is a [`None`](crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None). +pub fn is_none(&self) -> ::std::primitive::bool { + self.as_none().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs new file mode 100644 index 000000000..de8b03fe0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DirectKeyWrapping { + +} +impl DirectKeyWrapping { + +} +impl DirectKeyWrapping { + /// Creates a new builder-style object to manufacture [`DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DirectKeyWrappingBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DirectKeyWrappingBuilder::default() + } +} + +/// A builder for [`DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DirectKeyWrappingBuilder { + +} +impl DirectKeyWrappingBuilder { + + /// Consumes the builder and constructs a [`DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs new file mode 100644 index 000000000..fa9818a73 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// A filter which defines what AWS partition and AWS accounts a KMS Key may be in for a Keyring to be allowed to attempt to decrypt it. +pub struct DiscoveryFilter { + /// A list of allowed AWS account IDs. +pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// The AWS partition which is allowed. +pub partition: ::std::option::Option<::std::string::String>, +} +impl DiscoveryFilter { + /// A list of allowed AWS account IDs. +pub fn account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.account_ids +} +/// The AWS partition which is allowed. +pub fn partition(&self) -> &::std::option::Option<::std::string::String> { + &self.partition +} +} +impl DiscoveryFilter { + /// Creates a new builder-style object to manufacture [`DiscoveryFilter`](crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::DiscoveryFilterBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::DiscoveryFilterBuilder::default() + } +} + +/// A builder for [`DiscoveryFilter`](crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DiscoveryFilterBuilder { + pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) partition: ::std::option::Option<::std::string::String>, +} +impl DiscoveryFilterBuilder { + /// A list of allowed AWS account IDs. +pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.account_ids = ::std::option::Option::Some(input.into()); + self +} +/// A list of allowed AWS account IDs. +pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.account_ids = input; + self +} +/// A list of allowed AWS account IDs. +pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.account_ids +} +/// The AWS partition which is allowed. +pub fn partition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.partition = ::std::option::Option::Some(input.into()); + self +} +/// The AWS partition which is allowed. +pub fn set_partition(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.partition = input; + self +} +/// The AWS partition which is allowed. +pub fn get_partition(&self) -> &::std::option::Option<::std::string::String> { + &self.partition +} + /// Consumes the builder and constructs a [`DiscoveryFilter`](crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::DiscoveryFilter { + account_ids: self.account_ids, +partition: self.partition, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs new file mode 100644 index 000000000..eff4a9e97 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Ecdsa { + #[allow(missing_docs)] +pub curve: ::std::option::Option, +} +impl Ecdsa { + #[allow(missing_docs)] +pub fn curve(&self) -> &::std::option::Option { + &self.curve +} +} +impl Ecdsa { + /// Creates a new builder-style object to manufacture [`Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::Ecdsa). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::EcdsaBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::EcdsaBuilder::default() + } +} + +/// A builder for [`Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::Ecdsa). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaBuilder { + pub(crate) curve: ::std::option::Option, +} +impl EcdsaBuilder { + #[allow(missing_docs)] +pub fn curve(mut self, input: impl ::std::convert::Into) -> Self { + self.curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_curve(mut self, input: ::std::option::Option) -> Self { + self.curve = input; + self +} +#[allow(missing_docs)] +pub fn get_curve(&self) -> &::std::option::Option { + &self.curve +} + /// Consumes the builder and constructs a [`Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::Ecdsa). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::Ecdsa, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::Ecdsa { + curve: self.curve, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs new file mode 100644 index 000000000..f8e6ee1dd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum EdkWrappingAlgorithm { + #[allow(missing_docs)] +DirectKeyWrapping(crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping), +#[allow(missing_docs)] +IntermediateKeyWrapping(crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl EdkWrappingAlgorithm { + /// Tries to convert the enum instance into [`DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_direct_key_wrapping(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::DirectKeyWrapping, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_intermediate_key_wrapping(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`DirectKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::DirectKeyWrapping). +pub fn is_direct_key_wrapping(&self) -> ::std::primitive::bool { + self.as_direct_key_wrapping().is_ok() +} +/// Returns true if this is a [`IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::EdkWrappingAlgorithm::IntermediateKeyWrapping). +pub fn is_intermediate_key_wrapping(&self) -> ::std::primitive::bool { + self.as_intermediate_key_wrapping().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs new file mode 100644 index 000000000..2e3bf6a7b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs @@ -0,0 +1,38 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum Encrypt { + #[allow(missing_docs)] +AesGcm(crate::deps::aws_cryptography_primitives::types::AesGcm), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl Encrypt { + /// Tries to convert the enum instance into [`AesGcm`](crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm), extracting the inner [`crate::deps::aws_cryptography_primitives::types::AesGcm`](crate::deps::aws_cryptography_primitives::types::AesGcm). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_aes_gcm(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_primitives::types::AesGcm, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`AesGcm`](crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm). +pub fn is_aes_gcm(&self) -> ::std::primitive::bool { + self.as_aes_gcm().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs new file mode 100644 index 000000000..01cf4089d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EncryptedDataKey { + #[allow(missing_docs)] +pub ciphertext: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub key_provider_id: ::std::option::Option<::std::string::String>, +#[allow(missing_docs)] +pub key_provider_info: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EncryptedDataKey { + #[allow(missing_docs)] +pub fn ciphertext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ciphertext +} +#[allow(missing_docs)] +pub fn key_provider_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_id +} +#[allow(missing_docs)] +pub fn key_provider_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key_provider_info +} +} +impl EncryptedDataKey { + /// Creates a new builder-style object to manufacture [`EncryptedDataKey`](crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::EncryptedDataKeyBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::EncryptedDataKeyBuilder::default() + } +} + +/// A builder for [`EncryptedDataKey`](crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptedDataKeyBuilder { + pub(crate) ciphertext: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) key_provider_id: ::std::option::Option<::std::string::String>, +pub(crate) key_provider_info: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EncryptedDataKeyBuilder { + #[allow(missing_docs)] +pub fn ciphertext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ciphertext = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ciphertext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ciphertext = input; + self +} +#[allow(missing_docs)] +pub fn get_ciphertext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ciphertext +} +#[allow(missing_docs)] +pub fn key_provider_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_provider_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key_provider_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_provider_id = input; + self +} +#[allow(missing_docs)] +pub fn get_key_provider_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_id +} +#[allow(missing_docs)] +pub fn key_provider_info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key_provider_info = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key_provider_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key_provider_info = input; + self +} +#[allow(missing_docs)] +pub fn get_key_provider_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key_provider_info +} + /// Consumes the builder and constructs a [`EncryptedDataKey`](crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::EncryptedDataKey { + ciphertext: self.ciphertext, +key_provider_id: self.key_provider_id, +key_provider_info: self.key_provider_info, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs new file mode 100644 index 000000000..0afffc8e5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs @@ -0,0 +1,190 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EncryptionMaterials { + #[allow(missing_docs)] +pub algorithm_suite: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterials { + #[allow(missing_docs)] +pub fn algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} +} +impl EncryptionMaterials { + /// Creates a new builder-style object to manufacture [`EncryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::EncryptionMaterialsBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::EncryptionMaterialsBuilder::default() + } +} + +/// A builder for [`EncryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptionMaterialsBuilder { + pub(crate) algorithm_suite: ::std::option::Option, +pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_data_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) symmetric_signing_keys: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>, +} +impl EncryptionMaterialsBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite(&self) -> &::std::option::Option { + &self.algorithm_suite +} +#[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn plaintext_data_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_data_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext_data_key = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_data_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext_data_key +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn symmetric_signing_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_symmetric_signing_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self { + self.symmetric_signing_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_symmetric_signing_keys(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> { + &self.symmetric_signing_keys +} + /// Consumes the builder and constructs a [`EncryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials { + algorithm_suite: self.algorithm_suite, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +plaintext_data_key: self.plaintext_data_key, +required_encryption_context_keys: self.required_encryption_context_keys, +signing_key: self.signing_key, +symmetric_signing_keys: self.symmetric_signing_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ephemeral_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ephemeral_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..381938dfd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_ephemeral_private_key_to_static_public_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration. +pub struct EphemeralPrivateKeyToStaticPublicKeyInput { + /// The recipient's public key. MUST be DER encoded. +pub recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EphemeralPrivateKeyToStaticPublicKeyInput { + /// The recipient's public key. MUST be DER encoded. +pub fn recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} +} +impl EphemeralPrivateKeyToStaticPublicKeyInput { + /// Creates a new builder-style object to manufacture [`EphemeralPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::EphemeralPrivateKeyToStaticPublicKeyInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::EphemeralPrivateKeyToStaticPublicKeyInputBuilder::default() + } +} + +/// A builder for [`EphemeralPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EphemeralPrivateKeyToStaticPublicKeyInputBuilder { + pub(crate) recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EphemeralPrivateKeyToStaticPublicKeyInputBuilder { + /// The recipient's public key. MUST be DER encoded. +pub fn recipient_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = ::std::option::Option::Some(input.into()); + self +} +/// The recipient's public key. MUST be DER encoded. +pub fn set_recipient_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = input; + self +} +/// The recipient's public key. MUST be DER encoded. +pub fn get_recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} + /// Consumes the builder and constructs a [`EphemeralPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput { + recipient_public_key: self.recipient_public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs new file mode 100644 index 000000000..1d452a661 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs @@ -0,0 +1,36 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum EsdkAlgorithmSuiteId { + AlgAes128GcmIv12Tag16NoKdf, +AlgAes192GcmIv12Tag16NoKdf, +AlgAes256GcmIv12Tag16NoKdf, +AlgAes128GcmIv12Tag16HkdfSha256, +AlgAes192GcmIv12Tag16HkdfSha256, +AlgAes256GcmIv12Tag16HkdfSha256, +AlgAes128GcmIv12Tag16HkdfSha256EcdsaP256, +AlgAes192GcmIv12Tag16HkdfSha384EcdsaP384, +AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384, +AlgAes256GcmHkdfSha512CommitKey, +AlgAes256GcmHkdfSha512CommitKeyEcdsaP384, +} + +impl ::std::fmt::Display for EsdkAlgorithmSuiteId { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16NoKdf => write!(f, "ALG_AES_128_GCM_IV12_TAG16_NO_KDF"), +EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16NoKdf => write!(f, "ALG_AES_192_GCM_IV12_TAG16_NO_KDF"), +EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16NoKdf => write!(f, "ALG_AES_256_GCM_IV12_TAG16_NO_KDF"), +EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256 => write!(f, "ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256"), +EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha256 => write!(f, "ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256"), +EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha256 => write!(f, "ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256"), +EsdkAlgorithmSuiteId::AlgAes128GcmIv12Tag16HkdfSha256EcdsaP256 => write!(f, "ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256"), +EsdkAlgorithmSuiteId::AlgAes192GcmIv12Tag16HkdfSha384EcdsaP384 => write!(f, "ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384"), +EsdkAlgorithmSuiteId::AlgAes256GcmIv12Tag16HkdfSha384EcdsaP384 => write!(f, "ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384"), +EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKey => write!(f, "ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY"), +EsdkAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384 => write!(f, "ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs new file mode 100644 index 000000000..f9b951972 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs @@ -0,0 +1,20 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum EsdkCommitmentPolicy { + ForbidEncryptAllowDecrypt, +RequireEncryptAllowDecrypt, +RequireEncryptRequireDecrypt, +} + +impl ::std::fmt::Display for EsdkCommitmentPolicy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + EsdkCommitmentPolicy::ForbidEncryptAllowDecrypt => write!(f, "FORBID_ENCRYPT_ALLOW_DECRYPT"), +EsdkCommitmentPolicy::RequireEncryptAllowDecrypt => write!(f, "REQUIRE_ENCRYPT_ALLOW_DECRYPT"), +EsdkCommitmentPolicy::RequireEncryptRequireDecrypt => write!(f, "REQUIRE_ENCRYPT_REQUIRE_DECRYPT"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_input.rs new file mode 100644 index 000000000..808a36b94 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption +pub struct GetBranchKeyIdInput { + /// The Encryption Context used with this encryption or decryption. +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl GetBranchKeyIdInput { + /// The Encryption Context used with this encryption or decryption. +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +} +impl GetBranchKeyIdInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdInput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetBranchKeyIdInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetBranchKeyIdInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdInput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdInputBuilder { + pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl GetBranchKeyIdInputBuilder { + /// The Encryption Context used with this encryption or decryption. +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +/// The Encryption Context used with this encryption or decryption. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} + /// Consumes the builder and constructs a [`GetBranchKeyIdInput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdInput { + encryption_context: self.encryption_context, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_output.rs new file mode 100644 index 000000000..a553ad5ed --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub struct GetBranchKeyIdOutput { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdOutput { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +} +impl GetBranchKeyIdOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdOutput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetBranchKeyIdOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetBranchKeyIdOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdOutput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdOutputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdOutputBuilder { + /// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn branch_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.branch_key_id = ::std::option::Option::Some(input.into()); + self +} +/// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The identifier of the Branch Key that should be responsible for wrapping or unwrapping the data key in this encryption or decryption. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} + /// Consumes the builder and constructs a [`GetBranchKeyIdOutput`](crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetBranchKeyIdOutput { + branch_key_id: self.branch_key_id, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs new file mode 100644 index 000000000..4c41c7c8e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetCacheEntryInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetCacheEntryInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl GetCacheEntryInput { + /// Creates a new builder-style object to manufacture [`GetCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetCacheEntryInputBuilder::default() + } +} + +/// A builder for [`GetCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetCacheEntryInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i64>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`GetCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryInput { + bytes_used: self.bytes_used, +identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs new file mode 100644 index 000000000..eec078890 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetCacheEntryOutput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub creation_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub expiry_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +#[allow(missing_docs)] +pub messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl GetCacheEntryOutput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} +} +impl GetCacheEntryOutput { + /// Creates a new builder-style object to manufacture [`GetCacheEntryOutput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetCacheEntryOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetCacheEntryOutputBuilder::default() + } +} + +/// A builder for [`GetCacheEntryOutput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetCacheEntryOutputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) creation_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) expiry_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) materials: ::std::option::Option, +pub(crate) messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl GetCacheEntryOutputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.creation_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_creation_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.creation_time = input; + self +} +#[allow(missing_docs)] +pub fn get_creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.expiry_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expiry_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.expiry_time = input; + self +} +#[allow(missing_docs)] +pub fn get_expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.messages_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_messages_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.messages_used = input; + self +} +#[allow(missing_docs)] +pub fn get_messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} + /// Consumes the builder and constructs a [`GetCacheEntryOutput`](crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetCacheEntryOutput { + bytes_used: self.bytes_used, +creation_time: self.creation_time, +expiry_time: self.expiry_time, +materials: self.materials, +messages_used: self.messages_used, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs new file mode 100644 index 000000000..83a9f7232 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for getting a AWS KMS Client. +pub struct GetClientInput { + /// The region the client should be created in. +pub region: ::std::option::Option<::std::string::String>, +} +impl GetClientInput { + /// The region the client should be created in. +pub fn region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} +} +impl GetClientInput { + /// Creates a new builder-style object to manufacture [`GetClientInput`](crate::deps::aws_cryptography_materialProviders::types::GetClientInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetClientInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetClientInputBuilder::default() + } +} + +/// A builder for [`GetClientInput`](crate::deps::aws_cryptography_materialProviders::types::GetClientInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetClientInputBuilder { + pub(crate) region: ::std::option::Option<::std::string::String>, +} +impl GetClientInputBuilder { + /// The region the client should be created in. +pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.region = ::std::option::Option::Some(input.into()); + self +} +/// The region the client should be created in. +pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.region = input; + self +} +/// The region the client should be created in. +pub fn get_region(&self) -> &::std::option::Option<::std::string::String> { + &self.region +} + /// Consumes the builder and constructs a [`GetClientInput`](crate::deps::aws_cryptography_materialProviders::types::GetClientInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetClientInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetClientInput { + region: self.region, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs new file mode 100644 index 000000000..c00f8437f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetEncryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub max_plaintext_length: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl GetEncryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn max_plaintext_length(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.max_plaintext_length +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +} +impl GetEncryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`GetEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetEncryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetEncryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`GetEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) max_plaintext_length: ::std::option::Option<::std::primitive::i64>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl GetEncryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn max_plaintext_length(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.max_plaintext_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_max_plaintext_length(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.max_plaintext_length = input; + self +} +#[allow(missing_docs)] +pub fn get_max_plaintext_length(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.max_plaintext_length +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} + /// Consumes the builder and constructs a [`GetEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +commitment_policy: self.commitment_policy, +encryption_context: self.encryption_context, +max_plaintext_length: self.max_plaintext_length, +required_encryption_context_keys: self.required_encryption_context_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs new file mode 100644 index 000000000..f6a08e67a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetEncryptionMaterialsOutput { + #[allow(missing_docs)] +pub encryption_materials: ::std::option::Option, +} +impl GetEncryptionMaterialsOutput { + #[allow(missing_docs)] +pub fn encryption_materials(&self) -> &::std::option::Option { + &self.encryption_materials +} +} +impl GetEncryptionMaterialsOutput { + /// Creates a new builder-style object to manufacture [`GetEncryptionMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::GetEncryptionMaterialsOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::GetEncryptionMaterialsOutputBuilder::default() + } +} + +/// A builder for [`GetEncryptionMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptionMaterialsOutputBuilder { + pub(crate) encryption_materials: ::std::option::Option, +} +impl GetEncryptionMaterialsOutputBuilder { + #[allow(missing_docs)] +pub fn encryption_materials(mut self, input: impl ::std::convert::Into) -> Self { + self.encryption_materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_materials(mut self, input: ::std::option::Option) -> Self { + self.encryption_materials = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_materials(&self) -> &::std::option::Option { + &self.encryption_materials +} + /// Consumes the builder and constructs a [`GetEncryptionMaterialsOutput`](crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::GetEncryptionMaterialsOutput { + encryption_materials: self.encryption_materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs new file mode 100644 index 000000000..bef68bd11 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Hkdf { + #[allow(missing_docs)] +pub hmac: ::std::option::Option, +#[allow(missing_docs)] +pub input_key_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub output_key_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub salt_length: ::std::option::Option<::std::primitive::i32>, +} +impl Hkdf { + #[allow(missing_docs)] +pub fn hmac(&self) -> &::std::option::Option { + &self.hmac +} +#[allow(missing_docs)] +pub fn input_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.input_key_length +} +#[allow(missing_docs)] +pub fn output_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.output_key_length +} +#[allow(missing_docs)] +pub fn salt_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.salt_length +} +} +impl Hkdf { + /// Creates a new builder-style object to manufacture [`Hkdf`](crate::deps::aws_cryptography_materialProviders::types::Hkdf). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::HkdfBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::HkdfBuilder::default() + } +} + +/// A builder for [`Hkdf`](crate::deps::aws_cryptography_materialProviders::types::Hkdf). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfBuilder { + pub(crate) hmac: ::std::option::Option, +pub(crate) input_key_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) output_key_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) salt_length: ::std::option::Option<::std::primitive::i32>, +} +impl HkdfBuilder { + #[allow(missing_docs)] +pub fn hmac(mut self, input: impl ::std::convert::Into) -> Self { + self.hmac = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_hmac(mut self, input: ::std::option::Option) -> Self { + self.hmac = input; + self +} +#[allow(missing_docs)] +pub fn get_hmac(&self) -> &::std::option::Option { + &self.hmac +} +#[allow(missing_docs)] +pub fn input_key_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.input_key_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_input_key_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.input_key_length = input; + self +} +#[allow(missing_docs)] +pub fn get_input_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.input_key_length +} +#[allow(missing_docs)] +pub fn output_key_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.output_key_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_output_key_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.output_key_length = input; + self +} +#[allow(missing_docs)] +pub fn get_output_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.output_key_length +} +#[allow(missing_docs)] +pub fn salt_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.salt_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.salt_length = input; + self +} +#[allow(missing_docs)] +pub fn get_salt_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.salt_length +} + /// Consumes the builder and constructs a [`Hkdf`](crate::deps::aws_cryptography_materialProviders::types::Hkdf). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::Hkdf, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::Hkdf { + hmac: self.hmac, +input_key_length: self.input_key_length, +output_key_length: self.output_key_length, +salt_length: self.salt_length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs new file mode 100644 index 000000000..f0651dff7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct Identity { + +} +impl Identity { + +} +impl Identity { + /// Creates a new builder-style object to manufacture [`Identity`](crate::deps::aws_cryptography_materialProviders::types::Identity). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::IdentityBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::IdentityBuilder::default() + } +} + +/// A builder for [`Identity`](crate::deps::aws_cryptography_materialProviders::types::Identity). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct IdentityBuilder { + +} +impl IdentityBuilder { + + /// Consumes the builder and constructs a [`Identity`](crate::deps::aws_cryptography_materialProviders::types::Identity). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::Identity, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::Identity { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs new file mode 100644 index 000000000..db818b29f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct InitializeDecryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl InitializeDecryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +} +impl InitializeDecryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`InitializeDecryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::InitializeDecryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::InitializeDecryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`InitializeDecryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct InitializeDecryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl InitializeDecryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} + /// Consumes the builder and constructs a [`InitializeDecryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::InitializeDecryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +encryption_context: self.encryption_context, +required_encryption_context_keys: self.required_encryption_context_keys, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs new file mode 100644 index 000000000..6d3ca6801 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct InitializeEncryptionMaterialsInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl InitializeEncryptionMaterialsInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl InitializeEncryptionMaterialsInput { + /// Creates a new builder-style object to manufacture [`InitializeEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::InitializeEncryptionMaterialsInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::InitializeEncryptionMaterialsInputBuilder::default() + } +} + +/// A builder for [`InitializeEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct InitializeEncryptionMaterialsInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) required_encryption_context_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl InitializeEncryptionMaterialsInputBuilder { + #[allow(missing_docs)] +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +#[allow(missing_docs)] +pub fn required_encryption_context_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_required_encryption_context_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.required_encryption_context_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_required_encryption_context_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.required_encryption_context_keys +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`InitializeEncryptionMaterialsInput`](crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::InitializeEncryptionMaterialsInput { + algorithm_suite_id: self.algorithm_suite_id, +encryption_context: self.encryption_context, +required_encryption_context_keys: self.required_encryption_context_keys, +signing_key: self.signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs new file mode 100644 index 000000000..d4fd182a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct IntermediateKeyWrapping { + #[allow(missing_docs)] +pub key_encryption_key_kdf: ::std::option::Option, +#[allow(missing_docs)] +pub mac_key_kdf: ::std::option::Option, +#[allow(missing_docs)] +pub pdk_encrypt_algorithm: ::std::option::Option, +} +impl IntermediateKeyWrapping { + #[allow(missing_docs)] +pub fn key_encryption_key_kdf(&self) -> &::std::option::Option { + &self.key_encryption_key_kdf +} +#[allow(missing_docs)] +pub fn mac_key_kdf(&self) -> &::std::option::Option { + &self.mac_key_kdf +} +#[allow(missing_docs)] +pub fn pdk_encrypt_algorithm(&self) -> &::std::option::Option { + &self.pdk_encrypt_algorithm +} +} +impl IntermediateKeyWrapping { + /// Creates a new builder-style object to manufacture [`IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::IntermediateKeyWrappingBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::IntermediateKeyWrappingBuilder::default() + } +} + +/// A builder for [`IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct IntermediateKeyWrappingBuilder { + pub(crate) key_encryption_key_kdf: ::std::option::Option, +pub(crate) mac_key_kdf: ::std::option::Option, +pub(crate) pdk_encrypt_algorithm: ::std::option::Option, +} +impl IntermediateKeyWrappingBuilder { + #[allow(missing_docs)] +pub fn key_encryption_key_kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.key_encryption_key_kdf = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key_encryption_key_kdf(mut self, input: ::std::option::Option) -> Self { + self.key_encryption_key_kdf = input; + self +} +#[allow(missing_docs)] +pub fn get_key_encryption_key_kdf(&self) -> &::std::option::Option { + &self.key_encryption_key_kdf +} +#[allow(missing_docs)] +pub fn mac_key_kdf(mut self, input: impl ::std::convert::Into) -> Self { + self.mac_key_kdf = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_mac_key_kdf(mut self, input: ::std::option::Option) -> Self { + self.mac_key_kdf = input; + self +} +#[allow(missing_docs)] +pub fn get_mac_key_kdf(&self) -> &::std::option::Option { + &self.mac_key_kdf +} +#[allow(missing_docs)] +pub fn pdk_encrypt_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.pdk_encrypt_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_pdk_encrypt_algorithm(mut self, input: ::std::option::Option) -> Self { + self.pdk_encrypt_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_pdk_encrypt_algorithm(&self) -> &::std::option::Option { + &self.pdk_encrypt_algorithm +} + /// Consumes the builder and constructs a [`IntermediateKeyWrapping`](crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::IntermediateKeyWrapping { + key_encryption_key_kdf: self.key_encryption_key_kdf, +mac_key_kdf: self.mac_key_kdf, +pdk_encrypt_algorithm: self.pdk_encrypt_algorithm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs new file mode 100644 index 000000000..50edab16c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs @@ -0,0 +1,38 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Supported ECDH Key Agreement Schemes. +pub enum KeyAgreementScheme { + #[allow(missing_docs)] +StaticConfiguration(crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl KeyAgreementScheme { + /// Tries to convert the enum instance into [`StaticConfiguration`](crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme::StaticConfiguration), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations`](crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_static_configuration(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme::StaticConfiguration(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`StaticConfiguration`](crate::deps::aws_cryptography_materialProviders::types::KeyAgreementScheme::StaticConfiguration). +pub fn is_static_configuration(&self) -> ::std::primitive::bool { + self.as_static_configuration().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs new file mode 100644 index 000000000..6d28c8d9a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Allowed configurations when using KmsEcdhStaticConfigurations. +pub enum KmsEcdhStaticConfigurations { + #[allow(missing_docs)] +KmsPublicKeyDiscovery(crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput), +#[allow(missing_docs)] +KmsPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl KmsEcdhStaticConfigurations { + /// Tries to convert the enum instance into [`KmsPublicKeyDiscovery`](crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_kms_public_key_discovery(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`KmsPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_kms_private_key_to_static_public_key(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`KmsPublicKeyDiscovery`](crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery). +pub fn is_kms_public_key_discovery(&self) -> ::std::primitive::bool { + self.as_kms_public_key_discovery().is_ok() +} +/// Returns true if this is a [`KmsPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey). +pub fn is_kms_private_key_to_static_public_key(&self) -> ::std::primitive::bool { + self.as_kms_private_key_to_static_public_key().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..bc6b891b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_private_key_to_static_public_key_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration. +pub struct KmsPrivateKeyToStaticPublicKeyInput { + /// Recipient Public Key. This MUST be a raw public ECC key in DER format. +pub recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +/// AWS KMS Key Identifier belonging to the sender. +pub sender_kms_identifier: ::std::option::Option<::std::string::String>, +/// Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier. +pub sender_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KmsPrivateKeyToStaticPublicKeyInput { + /// Recipient Public Key. This MUST be a raw public ECC key in DER format. +pub fn recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} +/// AWS KMS Key Identifier belonging to the sender. +pub fn sender_kms_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.sender_kms_identifier +} +/// Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier. +pub fn sender_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.sender_public_key +} +} +impl KmsPrivateKeyToStaticPublicKeyInput { + /// Creates a new builder-style object to manufacture [`KmsPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::KmsPrivateKeyToStaticPublicKeyInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::KmsPrivateKeyToStaticPublicKeyInputBuilder::default() + } +} + +/// A builder for [`KmsPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KmsPrivateKeyToStaticPublicKeyInputBuilder { + pub(crate) recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) sender_kms_identifier: ::std::option::Option<::std::string::String>, +pub(crate) sender_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KmsPrivateKeyToStaticPublicKeyInputBuilder { + /// Recipient Public Key. This MUST be a raw public ECC key in DER format. +pub fn recipient_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = ::std::option::Option::Some(input.into()); + self +} +/// Recipient Public Key. This MUST be a raw public ECC key in DER format. +pub fn set_recipient_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = input; + self +} +/// Recipient Public Key. This MUST be a raw public ECC key in DER format. +pub fn get_recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} +/// AWS KMS Key Identifier belonging to the sender. +pub fn sender_kms_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.sender_kms_identifier = ::std::option::Option::Some(input.into()); + self +} +/// AWS KMS Key Identifier belonging to the sender. +pub fn set_sender_kms_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.sender_kms_identifier = input; + self +} +/// AWS KMS Key Identifier belonging to the sender. +pub fn get_sender_kms_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.sender_kms_identifier +} +/// Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier. +pub fn sender_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.sender_public_key = ::std::option::Option::Some(input.into()); + self +} +/// Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier. +pub fn set_sender_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.sender_public_key = input; + self +} +/// Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier. +pub fn get_sender_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.sender_public_key +} + /// Consumes the builder and constructs a [`KmsPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::KmsPrivateKeyToStaticPublicKeyInput { + recipient_public_key: self.recipient_public_key, +sender_kms_identifier: self.sender_kms_identifier, +sender_public_key: self.sender_public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_public_key_discovery_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_public_key_discovery_input.rs new file mode 100644 index 000000000..cdabc8c70 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_kms_public_key_discovery_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration. +pub struct KmsPublicKeyDiscoveryInput { + /// AWS KMS key identifier belonging to the recipient. +pub recipient_kms_identifier: ::std::option::Option<::std::string::String>, +} +impl KmsPublicKeyDiscoveryInput { + /// AWS KMS key identifier belonging to the recipient. +pub fn recipient_kms_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.recipient_kms_identifier +} +} +impl KmsPublicKeyDiscoveryInput { + /// Creates a new builder-style object to manufacture [`KmsPublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::KmsPublicKeyDiscoveryInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::KmsPublicKeyDiscoveryInputBuilder::default() + } +} + +/// A builder for [`KmsPublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KmsPublicKeyDiscoveryInputBuilder { + pub(crate) recipient_kms_identifier: ::std::option::Option<::std::string::String>, +} +impl KmsPublicKeyDiscoveryInputBuilder { + /// AWS KMS key identifier belonging to the recipient. +pub fn recipient_kms_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.recipient_kms_identifier = ::std::option::Option::Some(input.into()); + self +} +/// AWS KMS key identifier belonging to the recipient. +pub fn set_recipient_kms_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.recipient_kms_identifier = input; + self +} +/// AWS KMS key identifier belonging to the recipient. +pub fn get_recipient_kms_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.recipient_kms_identifier +} + /// Consumes the builder and constructs a [`KmsPublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::KmsPublicKeyDiscoveryInput { + recipient_kms_identifier: self.recipient_kms_identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs new file mode 100644 index 000000000..3153f54be --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs @@ -0,0 +1,83 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum Materials { + #[allow(missing_docs)] +Encryption(crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials), +#[allow(missing_docs)] +Decryption(crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials), +#[allow(missing_docs)] +BranchKey(crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials), +#[allow(missing_docs)] +BeaconKey(crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl Materials { + /// Tries to convert the enum instance into [`Encryption`](crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_encryption(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Decryption`](crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials`](crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_decryption(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::DecryptionMaterials, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`BranchKey`](crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey), extracting the inner [`crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_branch_key(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_keyStore::types::BranchKeyMaterials, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`BeaconKey`](crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey), extracting the inner [`crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials`](crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_beacon_key(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Encryption`](crate::deps::aws_cryptography_materialProviders::types::Materials::Encryption). +pub fn is_encryption(&self) -> ::std::primitive::bool { + self.as_encryption().is_ok() +} +/// Returns true if this is a [`Decryption`](crate::deps::aws_cryptography_materialProviders::types::Materials::Decryption). +pub fn is_decryption(&self) -> ::std::primitive::bool { + self.as_decryption().is_ok() +} +/// Returns true if this is a [`BranchKey`](crate::deps::aws_cryptography_materialProviders::types::Materials::BranchKey). +pub fn is_branch_key(&self) -> ::std::primitive::bool { + self.as_branch_key().is_ok() +} +/// Returns true if this is a [`BeaconKey`](crate::deps::aws_cryptography_materialProviders::types::Materials::BeaconKey). +pub fn is_beacon_key(&self) -> ::std::primitive::bool { + self.as_beacon_key().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs new file mode 100644 index 000000000..f3db56d0e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// A cache that is safe for use in a multi threaded environment, but no extra functionality. +pub struct MultiThreadedCache { + /// Maximum number of entries cached. +pub entry_capacity: ::std::option::Option<::std::primitive::i32>, +/// Number of entries to prune at a time. +pub entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +} +impl MultiThreadedCache { + /// Maximum number of entries cached. +pub fn entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} +} +impl MultiThreadedCache { + /// Creates a new builder-style object to manufacture [`MultiThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::MultiThreadedCacheBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::MultiThreadedCacheBuilder::default() + } +} + +/// A builder for [`MultiThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct MultiThreadedCacheBuilder { + pub(crate) entry_capacity: ::std::option::Option<::std::primitive::i32>, +pub(crate) entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +} +impl MultiThreadedCacheBuilder { + /// Maximum number of entries cached. +pub fn entry_capacity(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_capacity = ::std::option::Option::Some(input.into()); + self +} +/// Maximum number of entries cached. +pub fn set_entry_capacity(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_capacity = input; + self +} +/// Maximum number of entries cached. +pub fn get_entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = ::std::option::Option::Some(input.into()); + self +} +/// Number of entries to prune at a time. +pub fn set_entry_pruning_tail_size(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = input; + self +} +/// Number of entries to prune at a time. +pub fn get_entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} + /// Consumes the builder and constructs a [`MultiThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::MultiThreadedCache { + entry_capacity: self.entry_capacity, +entry_pruning_tail_size: self.entry_pruning_tail_size, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs new file mode 100644 index 000000000..6e51e7dd5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Nothing should ever be cached. +pub struct NoCache { + +} +impl NoCache { + +} +impl NoCache { + /// Creates a new builder-style object to manufacture [`NoCache`](crate::deps::aws_cryptography_materialProviders::types::NoCache). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::NoCacheBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::NoCacheBuilder::default() + } +} + +/// A builder for [`NoCache`](crate::deps::aws_cryptography_materialProviders::types::NoCache). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct NoCacheBuilder { + +} +impl NoCacheBuilder { + + /// Consumes the builder and constructs a [`NoCache`](crate::deps::aws_cryptography_materialProviders::types::NoCache). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::NoCache, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::NoCache { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs new file mode 100644 index 000000000..b6ff73666 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct None { + +} +impl None { + +} +impl None { + /// Creates a new builder-style object to manufacture [`None`](crate::deps::aws_cryptography_materialProviders::types::None). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::NoneBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::NoneBuilder::default() + } +} + +/// A builder for [`None`](crate::deps::aws_cryptography_materialProviders::types::None). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct NoneBuilder { + +} +impl NoneBuilder { + + /// Consumes the builder and constructs a [`None`](crate::deps::aws_cryptography_materialProviders::types::None). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::None, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::None { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs new file mode 100644 index 000000000..49bc4997f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnDecryptInput { + #[allow(missing_docs)] +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnDecryptInput { + #[allow(missing_docs)] +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnDecryptInput { + /// Creates a new builder-style object to manufacture [`OnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::OnDecryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::OnDecryptInputBuilder::default() + } +} + +/// A builder for [`OnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnDecryptInputBuilder { + pub(crate) encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +pub(crate) materials: ::std::option::Option, +} +impl OnDecryptInputBuilder { + #[allow(missing_docs)] +pub fn encrypted_data_keys(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::OnDecryptInput { + encrypted_data_keys: self.encrypted_data_keys, +materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs new file mode 100644 index 000000000..0903bd800 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnDecryptOutput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnDecryptOutput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnDecryptOutput { + /// Creates a new builder-style object to manufacture [`OnDecryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::OnDecryptOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::OnDecryptOutputBuilder::default() + } +} + +/// A builder for [`OnDecryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnDecryptOutputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnDecryptOutputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnDecryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::OnDecryptOutput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs new file mode 100644 index 000000000..640653938 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnEncryptInput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnEncryptInput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnEncryptInput { + /// Creates a new builder-style object to manufacture [`OnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::OnEncryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::OnEncryptInputBuilder::default() + } +} + +/// A builder for [`OnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnEncryptInputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnEncryptInputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::OnEncryptInput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs new file mode 100644 index 000000000..34e4de58b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct OnEncryptOutput { + #[allow(missing_docs)] +pub materials: ::std::option::Option, +} +impl OnEncryptOutput { + #[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +} +impl OnEncryptOutput { + /// Creates a new builder-style object to manufacture [`OnEncryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::OnEncryptOutputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::OnEncryptOutputBuilder::default() + } +} + +/// A builder for [`OnEncryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct OnEncryptOutputBuilder { + pub(crate) materials: ::std::option::Option, +} +impl OnEncryptOutputBuilder { + #[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} + /// Consumes the builder and constructs a [`OnEncryptOutput`](crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::OnEncryptOutput { + materials: self.materials, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs new file mode 100644 index 000000000..cc79292c6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs @@ -0,0 +1,24 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum PaddingScheme { + Pkcs1, +OaepSha1Mgf1, +OaepSha256Mgf1, +OaepSha384Mgf1, +OaepSha512Mgf1, +} + +impl ::std::fmt::Display for PaddingScheme { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + PaddingScheme::Pkcs1 => write!(f, "PKCS1"), +PaddingScheme::OaepSha1Mgf1 => write!(f, "OAEP_SHA1_MGF1"), +PaddingScheme::OaepSha256Mgf1 => write!(f, "OAEP_SHA256_MGF1"), +PaddingScheme::OaepSha384Mgf1 => write!(f, "OAEP_SHA384_MGF1"), +PaddingScheme::OaepSha512Mgf1 => write!(f, "OAEP_SHA512_MGF1"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs new file mode 100644 index 000000000..d2b386d3c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a PublicKeyDiscovery Configuration. +pub struct PublicKeyDiscoveryInput { + /// The sender's private key. MUST be PEM encoded. +pub recipient_static_private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl PublicKeyDiscoveryInput { + /// The sender's private key. MUST be PEM encoded. +pub fn recipient_static_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_static_private_key +} +} +impl PublicKeyDiscoveryInput { + /// Creates a new builder-style object to manufacture [`PublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::PublicKeyDiscoveryInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::PublicKeyDiscoveryInputBuilder::default() + } +} + +/// A builder for [`PublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct PublicKeyDiscoveryInputBuilder { + pub(crate) recipient_static_private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl PublicKeyDiscoveryInputBuilder { + /// The sender's private key. MUST be PEM encoded. +pub fn recipient_static_private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.recipient_static_private_key = ::std::option::Option::Some(input.into()); + self +} +/// The sender's private key. MUST be PEM encoded. +pub fn set_recipient_static_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.recipient_static_private_key = input; + self +} +/// The sender's private key. MUST be PEM encoded. +pub fn get_recipient_static_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_static_private_key +} + /// Consumes the builder and constructs a [`PublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput { + recipient_static_private_key: self.recipient_static_private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs new file mode 100644 index 000000000..70565aa83 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct PutCacheEntryInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub creation_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub expiry_time: ::std::option::Option<::std::primitive::i64>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub materials: ::std::option::Option, +#[allow(missing_docs)] +pub messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl PutCacheEntryInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +#[allow(missing_docs)] +pub fn materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} +} +impl PutCacheEntryInput { + /// Creates a new builder-style object to manufacture [`PutCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::PutCacheEntryInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::PutCacheEntryInputBuilder::default() + } +} + +/// A builder for [`PutCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct PutCacheEntryInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) creation_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) expiry_time: ::std::option::Option<::std::primitive::i64>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) materials: ::std::option::Option, +pub(crate) messages_used: ::std::option::Option<::std::primitive::i32>, +} +impl PutCacheEntryInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.creation_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_creation_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.creation_time = input; + self +} +#[allow(missing_docs)] +pub fn get_creation_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.creation_time +} +#[allow(missing_docs)] +pub fn expiry_time(mut self, input: impl ::std::convert::Into<::std::primitive::i64>) -> Self { + self.expiry_time = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expiry_time(mut self, input: ::std::option::Option<::std::primitive::i64>) -> Self { + self.expiry_time = input; + self +} +#[allow(missing_docs)] +pub fn get_expiry_time(&self) -> &::std::option::Option<::std::primitive::i64> { + &self.expiry_time +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +#[allow(missing_docs)] +pub fn materials(mut self, input: impl ::std::convert::Into) -> Self { + self.materials = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_materials(mut self, input: ::std::option::Option) -> Self { + self.materials = input; + self +} +#[allow(missing_docs)] +pub fn get_materials(&self) -> &::std::option::Option { + &self.materials +} +#[allow(missing_docs)] +pub fn messages_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.messages_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_messages_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.messages_used = input; + self +} +#[allow(missing_docs)] +pub fn get_messages_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.messages_used +} + /// Consumes the builder and constructs a [`PutCacheEntryInput`](crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::PutCacheEntryInput { + bytes_used: self.bytes_used, +creation_time: self.creation_time, +expiry_time: self.expiry_time, +identifier: self.identifier, +materials: self.materials, +messages_used: self.messages_used, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs new file mode 100644 index 000000000..e8f639960 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs @@ -0,0 +1,68 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// List of configurations when using RawEcdhStaticConfigurations. +pub enum RawEcdhStaticConfigurations { + #[allow(missing_docs)] +PublicKeyDiscovery(crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput), +#[allow(missing_docs)] +RawPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput), +#[allow(missing_docs)] +EphemeralPrivateKeyToStaticPublicKey(crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl RawEcdhStaticConfigurations { + /// Tries to convert the enum instance into [`PublicKeyDiscovery`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput`](crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_public_key_discovery(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::PublicKeyDiscoveryInput, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`RawPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_raw_private_key_to_static_public_key(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`EphemeralPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_ephemeral_private_key_to_static_public_key(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::EphemeralPrivateKeyToStaticPublicKeyInput, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`PublicKeyDiscovery`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::PublicKeyDiscovery). +pub fn is_public_key_discovery(&self) -> ::std::primitive::bool { + self.as_public_key_discovery().is_ok() +} +/// Returns true if this is a [`RawPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey). +pub fn is_raw_private_key_to_static_public_key(&self) -> ::std::primitive::bool { + self.as_raw_private_key_to_static_public_key().is_ok() +} +/// Returns true if this is a [`EphemeralPrivateKeyToStaticPublicKey`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey). +pub fn is_ephemeral_private_key_to_static_public_key(&self) -> ::std::primitive::bool { + self.as_ephemeral_private_key_to_static_public_key().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_private_key_to_static_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_private_key_to_static_public_key_input.rs new file mode 100644 index 000000000..001878f16 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_raw_private_key_to_static_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration. +pub struct RawPrivateKeyToStaticPublicKeyInput { + /// The recipient's public key. MUST be DER encoded. +pub recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +/// The sender's private key. MUST be PEM encoded. +pub sender_static_private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RawPrivateKeyToStaticPublicKeyInput { + /// The recipient's public key. MUST be DER encoded. +pub fn recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} +/// The sender's private key. MUST be PEM encoded. +pub fn sender_static_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.sender_static_private_key +} +} +impl RawPrivateKeyToStaticPublicKeyInput { + /// Creates a new builder-style object to manufacture [`RawPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::RawPrivateKeyToStaticPublicKeyInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::RawPrivateKeyToStaticPublicKeyInputBuilder::default() + } +} + +/// A builder for [`RawPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RawPrivateKeyToStaticPublicKeyInputBuilder { + pub(crate) recipient_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) sender_static_private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RawPrivateKeyToStaticPublicKeyInputBuilder { + /// The recipient's public key. MUST be DER encoded. +pub fn recipient_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = ::std::option::Option::Some(input.into()); + self +} +/// The recipient's public key. MUST be DER encoded. +pub fn set_recipient_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.recipient_public_key = input; + self +} +/// The recipient's public key. MUST be DER encoded. +pub fn get_recipient_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.recipient_public_key +} +/// The sender's private key. MUST be PEM encoded. +pub fn sender_static_private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.sender_static_private_key = ::std::option::Option::Some(input.into()); + self +} +/// The sender's private key. MUST be PEM encoded. +pub fn set_sender_static_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.sender_static_private_key = input; + self +} +/// The sender's private key. MUST be PEM encoded. +pub fn get_sender_static_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.sender_static_private_key +} + /// Consumes the builder and constructs a [`RawPrivateKeyToStaticPublicKeyInput`](crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::RawPrivateKeyToStaticPublicKeyInput { + recipient_public_key: self.recipient_public_key, +sender_static_private_key: self.sender_static_private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs new file mode 100644 index 000000000..f521441e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum SignatureAlgorithm { + #[allow(missing_docs)] +Ecdsa(crate::deps::aws_cryptography_materialProviders::types::Ecdsa), +#[allow(missing_docs)] +None(crate::deps::aws_cryptography_materialProviders::types::None), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl SignatureAlgorithm { + /// Tries to convert the enum instance into [`Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::Ecdsa). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_ecdsa(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::Ecdsa, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`None`](crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::None`](crate::deps::aws_cryptography_materialProviders::types::None). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_none(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::None, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Ecdsa`](crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::Ecdsa). +pub fn is_ecdsa(&self) -> ::std::primitive::bool { + self.as_ecdsa().is_ok() +} +/// Returns true if this is a [`None`](crate::deps::aws_cryptography_materialProviders::types::SignatureAlgorithm::None). +pub fn is_none(&self) -> ::std::primitive::bool { + self.as_none().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs new file mode 100644 index 000000000..8f509cfd0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// A cache that is NOT safe for use in a multi threaded environment. +pub struct SingleThreadedCache { + /// Maximum number of entries cached. +pub entry_capacity: ::std::option::Option<::std::primitive::i32>, +/// Number of entries to prune at a time. +pub entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +} +impl SingleThreadedCache { + /// Maximum number of entries cached. +pub fn entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} +} +impl SingleThreadedCache { + /// Creates a new builder-style object to manufacture [`SingleThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::SingleThreadedCacheBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::SingleThreadedCacheBuilder::default() + } +} + +/// A builder for [`SingleThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SingleThreadedCacheBuilder { + pub(crate) entry_capacity: ::std::option::Option<::std::primitive::i32>, +pub(crate) entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +} +impl SingleThreadedCacheBuilder { + /// Maximum number of entries cached. +pub fn entry_capacity(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_capacity = ::std::option::Option::Some(input.into()); + self +} +/// Maximum number of entries cached. +pub fn set_entry_capacity(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_capacity = input; + self +} +/// Maximum number of entries cached. +pub fn get_entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = ::std::option::Option::Some(input.into()); + self +} +/// Number of entries to prune at a time. +pub fn set_entry_pruning_tail_size(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = input; + self +} +/// Number of entries to prune at a time. +pub fn get_entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} + /// Consumes the builder and constructs a [`SingleThreadedCache`](crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::SingleThreadedCache { + entry_capacity: self.entry_capacity, +entry_pruning_tail_size: self.entry_pruning_tail_size, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs new file mode 100644 index 000000000..be7f8e7fb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// Supported configurations for the StaticConfiguration Key Agreement Scheme. +pub enum StaticConfigurations { + #[allow(missing_docs)] +AwsKmsEcdh(crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations), +#[allow(missing_docs)] +RawEcdh(crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl StaticConfigurations { + /// Tries to convert the enum instance into [`AwsKmsEcdh`](crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::AwsKmsEcdh), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations`](crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_aws_kms_ecdh(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::KmsEcdhStaticConfigurations, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::AwsKmsEcdh(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`RawEcdh`](crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::RawEcdh), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations`](crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_raw_ecdh(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::RawEcdhStaticConfigurations, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::RawEcdh(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`AwsKmsEcdh`](crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::AwsKmsEcdh). +pub fn is_aws_kms_ecdh(&self) -> ::std::primitive::bool { + self.as_aws_kms_ecdh().is_ok() +} +/// Returns true if this is a [`RawEcdh`](crate::deps::aws_cryptography_materialProviders::types::StaticConfigurations::RawEcdh). +pub fn is_raw_ecdh(&self) -> ::std::primitive::bool { + self.as_raw_ecdh().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs new file mode 100644 index 000000000..f1b37cda4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs @@ -0,0 +1,228 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +/// A cache that is safe for use in a multi threaded environment, +/// and tries to prevent redundant or overly parallel backend calls. +pub struct StormTrackingCache { + /// Maximum number of entries cached. +pub entry_capacity: ::std::option::Option<::std::primitive::i32>, +/// Number of entries to prune at a time. +pub entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +/// How many simultaneous attempts to refresh the materials. +pub fan_out: ::std::option::Option<::std::primitive::i32>, +/// How much time between attempts to refresh the materials. +pub grace_interval: ::std::option::Option<::std::primitive::i32>, +/// How much time before expiration should an attempt be made to refresh the materials. +/// If zero, use a simple cache with no storm tracking. +pub grace_period: ::std::option::Option<::std::primitive::i32>, +/// How much time until an attempt to refresh the materials should be forgotten. +pub in_flight_ttl: ::std::option::Option<::std::primitive::i32>, +/// How many milliseconds should a thread sleep if fanOut is exceeded. +pub sleep_milli: ::std::option::Option<::std::primitive::i32>, +/// The time unit for gracePeriod, graceInterval, and inFlightTTL. +/// The default is seconds. +/// If this is set to milliseconds, then these values will be treated as milliseconds. +pub time_units: ::std::option::Option, +} +impl StormTrackingCache { + /// Maximum number of entries cached. +pub fn entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} +/// How many simultaneous attempts to refresh the materials. +pub fn fan_out(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.fan_out +} +/// How much time between attempts to refresh the materials. +pub fn grace_interval(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.grace_interval +} +/// How much time before expiration should an attempt be made to refresh the materials. +/// If zero, use a simple cache with no storm tracking. +pub fn grace_period(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.grace_period +} +/// How much time until an attempt to refresh the materials should be forgotten. +pub fn in_flight_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.in_flight_ttl +} +/// How many milliseconds should a thread sleep if fanOut is exceeded. +pub fn sleep_milli(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.sleep_milli +} +/// The time unit for gracePeriod, graceInterval, and inFlightTTL. +/// The default is seconds. +/// If this is set to milliseconds, then these values will be treated as milliseconds. +pub fn time_units(&self) -> &::std::option::Option { + &self.time_units +} +} +impl StormTrackingCache { + /// Creates a new builder-style object to manufacture [`StormTrackingCache`](crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::StormTrackingCacheBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::StormTrackingCacheBuilder::default() + } +} + +/// A builder for [`StormTrackingCache`](crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct StormTrackingCacheBuilder { + pub(crate) entry_capacity: ::std::option::Option<::std::primitive::i32>, +pub(crate) entry_pruning_tail_size: ::std::option::Option<::std::primitive::i32>, +pub(crate) fan_out: ::std::option::Option<::std::primitive::i32>, +pub(crate) grace_interval: ::std::option::Option<::std::primitive::i32>, +pub(crate) grace_period: ::std::option::Option<::std::primitive::i32>, +pub(crate) in_flight_ttl: ::std::option::Option<::std::primitive::i32>, +pub(crate) sleep_milli: ::std::option::Option<::std::primitive::i32>, +pub(crate) time_units: ::std::option::Option, +} +impl StormTrackingCacheBuilder { + /// Maximum number of entries cached. +pub fn entry_capacity(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_capacity = ::std::option::Option::Some(input.into()); + self +} +/// Maximum number of entries cached. +pub fn set_entry_capacity(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_capacity = input; + self +} +/// Maximum number of entries cached. +pub fn get_entry_capacity(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_capacity +} +/// Number of entries to prune at a time. +pub fn entry_pruning_tail_size(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = ::std::option::Option::Some(input.into()); + self +} +/// Number of entries to prune at a time. +pub fn set_entry_pruning_tail_size(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.entry_pruning_tail_size = input; + self +} +/// Number of entries to prune at a time. +pub fn get_entry_pruning_tail_size(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.entry_pruning_tail_size +} +/// How many simultaneous attempts to refresh the materials. +pub fn fan_out(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.fan_out = ::std::option::Option::Some(input.into()); + self +} +/// How many simultaneous attempts to refresh the materials. +pub fn set_fan_out(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.fan_out = input; + self +} +/// How many simultaneous attempts to refresh the materials. +pub fn get_fan_out(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.fan_out +} +/// How much time between attempts to refresh the materials. +pub fn grace_interval(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.grace_interval = ::std::option::Option::Some(input.into()); + self +} +/// How much time between attempts to refresh the materials. +pub fn set_grace_interval(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.grace_interval = input; + self +} +/// How much time between attempts to refresh the materials. +pub fn get_grace_interval(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.grace_interval +} +/// How much time before expiration should an attempt be made to refresh the materials. +/// If zero, use a simple cache with no storm tracking. +pub fn grace_period(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.grace_period = ::std::option::Option::Some(input.into()); + self +} +/// How much time before expiration should an attempt be made to refresh the materials. +/// If zero, use a simple cache with no storm tracking. +pub fn set_grace_period(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.grace_period = input; + self +} +/// How much time before expiration should an attempt be made to refresh the materials. +/// If zero, use a simple cache with no storm tracking. +pub fn get_grace_period(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.grace_period +} +/// How much time until an attempt to refresh the materials should be forgotten. +pub fn in_flight_ttl(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.in_flight_ttl = ::std::option::Option::Some(input.into()); + self +} +/// How much time until an attempt to refresh the materials should be forgotten. +pub fn set_in_flight_ttl(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.in_flight_ttl = input; + self +} +/// How much time until an attempt to refresh the materials should be forgotten. +pub fn get_in_flight_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.in_flight_ttl +} +/// How many milliseconds should a thread sleep if fanOut is exceeded. +pub fn sleep_milli(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.sleep_milli = ::std::option::Option::Some(input.into()); + self +} +/// How many milliseconds should a thread sleep if fanOut is exceeded. +pub fn set_sleep_milli(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.sleep_milli = input; + self +} +/// How many milliseconds should a thread sleep if fanOut is exceeded. +pub fn get_sleep_milli(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.sleep_milli +} +/// The time unit for gracePeriod, graceInterval, and inFlightTTL. +/// The default is seconds. +/// If this is set to milliseconds, then these values will be treated as milliseconds. +pub fn time_units(mut self, input: impl ::std::convert::Into) -> Self { + self.time_units = ::std::option::Option::Some(input.into()); + self +} +/// The time unit for gracePeriod, graceInterval, and inFlightTTL. +/// The default is seconds. +/// If this is set to milliseconds, then these values will be treated as milliseconds. +pub fn set_time_units(mut self, input: ::std::option::Option) -> Self { + self.time_units = input; + self +} +/// The time unit for gracePeriod, graceInterval, and inFlightTTL. +/// The default is seconds. +/// If this is set to milliseconds, then these values will be treated as milliseconds. +pub fn get_time_units(&self) -> &::std::option::Option { + &self.time_units +} + /// Consumes the builder and constructs a [`StormTrackingCache`](crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::StormTrackingCache { + entry_capacity: self.entry_capacity, +entry_pruning_tail_size: self.entry_pruning_tail_size, +fan_out: self.fan_out, +grace_interval: self.grace_interval, +grace_period: self.grace_period, +in_flight_ttl: self.in_flight_ttl, +sleep_milli: self.sleep_milli, +time_units: self.time_units, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs new file mode 100644 index 000000000..144ced21d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs @@ -0,0 +1,53 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum SymmetricSignatureAlgorithm { + #[allow(missing_docs)] +Hmac(crate::deps::aws_cryptography_primitives::types::DigestAlgorithm), +#[allow(missing_docs)] +None(crate::deps::aws_cryptography_materialProviders::types::None), + /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. + /// An unknown enum variant + /// + /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ + /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized + /// by the client. This can happen when the server adds new functionality, but the client has not been updated. + /// To investigate this, consider turning on debug logging to print the raw HTTP response. + #[non_exhaustive] + Unknown, +} +impl SymmetricSignatureAlgorithm { + /// Tries to convert the enum instance into [`Hmac`](crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac), extracting the inner [`crate::deps::aws_cryptography_primitives::types::DigestAlgorithm`](crate::deps::aws_cryptography_primitives::types::DigestAlgorithm). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_hmac(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_primitives::types::DigestAlgorithm, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`None`](crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None), extracting the inner [`crate::deps::aws_cryptography_materialProviders::types::None`](crate::deps::aws_cryptography_materialProviders::types::None). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_none(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_materialProviders::types::None, &Self> { + if let crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Hmac`](crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::Hmac). +pub fn is_hmac(&self) -> ::std::primitive::bool { + self.as_hmac().is_ok() +} +/// Returns true if this is a [`None`](crate::deps::aws_cryptography_materialProviders::types::SymmetricSignatureAlgorithm::None). +pub fn is_none(&self) -> ::std::primitive::bool { + self.as_none().is_ok() +} + /// Returns true if the enum instance is the `Unknown` variant. + pub fn is_unknown(&self) -> ::std::primitive::bool { + matches!(self, Self::Unknown) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs new file mode 100644 index 000000000..ab124a7c8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs @@ -0,0 +1,18 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum TimeUnits { + Seconds, +Milliseconds, +} + +impl ::std::fmt::Display for TimeUnits { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + TimeUnits::Seconds => write!(f, "Seconds"), +TimeUnits::Milliseconds => write!(f, "Milliseconds"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs new file mode 100644 index 000000000..49073dea8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct UpdateUsageMetadataInput { + #[allow(missing_docs)] +pub bytes_used: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl UpdateUsageMetadataInput { + #[allow(missing_docs)] +pub fn bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} +} +impl UpdateUsageMetadataInput { + /// Creates a new builder-style object to manufacture [`UpdateUsageMetadataInput`](crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::UpdateUsageMetadataInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::UpdateUsageMetadataInputBuilder::default() + } +} + +/// A builder for [`UpdateUsageMetadataInput`](crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UpdateUsageMetadataInputBuilder { + pub(crate) bytes_used: ::std::option::Option<::std::primitive::i32>, +pub(crate) identifier: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl UpdateUsageMetadataInputBuilder { + #[allow(missing_docs)] +pub fn bytes_used(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.bytes_used = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_bytes_used(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.bytes_used = input; + self +} +#[allow(missing_docs)] +pub fn get_bytes_used(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.bytes_used +} +#[allow(missing_docs)] +pub fn identifier(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.identifier = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_identifier(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.identifier = input; + self +} +#[allow(missing_docs)] +pub fn get_identifier(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.identifier +} + /// Consumes the builder and constructs a [`UpdateUsageMetadataInput`](crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::UpdateUsageMetadataInput { + bytes_used: self.bytes_used, +identifier: self.identifier, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_decryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_decryption_materials_transition_input.rs new file mode 100644 index 000000000..a923d362c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_decryption_materials_transition_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidDecryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub start: ::std::option::Option, +#[allow(missing_docs)] +pub stop: ::std::option::Option, +} +impl ValidDecryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub fn start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(&self) -> &::std::option::Option { + &self.stop +} +} +impl ValidDecryptionMaterialsTransitionInput { + /// Creates a new builder-style object to manufacture [`ValidDecryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::ValidDecryptionMaterialsTransitionInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::ValidDecryptionMaterialsTransitionInputBuilder::default() + } +} + +/// A builder for [`ValidDecryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidDecryptionMaterialsTransitionInputBuilder { + pub(crate) start: ::std::option::Option, +pub(crate) stop: ::std::option::Option, +} +impl ValidDecryptionMaterialsTransitionInputBuilder { + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.start = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.start = input; + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.stop = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.stop = input; + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + &self.stop +} + /// Consumes the builder and constructs a [`ValidDecryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::ValidDecryptionMaterialsTransitionInput { + start: self.start, +stop: self.stop, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_encryption_materials_transition_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_encryption_materials_transition_input.rs new file mode 100644 index 000000000..268786ff5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_valid_encryption_materials_transition_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidEncryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub start: ::std::option::Option, +#[allow(missing_docs)] +pub stop: ::std::option::Option, +} +impl ValidEncryptionMaterialsTransitionInput { + #[allow(missing_docs)] +pub fn start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(&self) -> &::std::option::Option { + &self.stop +} +} +impl ValidEncryptionMaterialsTransitionInput { + /// Creates a new builder-style object to manufacture [`ValidEncryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::ValidEncryptionMaterialsTransitionInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::ValidEncryptionMaterialsTransitionInputBuilder::default() + } +} + +/// A builder for [`ValidEncryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidEncryptionMaterialsTransitionInputBuilder { + pub(crate) start: ::std::option::Option, +pub(crate) stop: ::std::option::Option, +} +impl ValidEncryptionMaterialsTransitionInputBuilder { + #[allow(missing_docs)] +pub fn start(mut self, input: impl ::std::convert::Into) -> Self { + self.start = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_start(mut self, input: ::std::option::Option) -> Self { + self.start = input; + self +} +#[allow(missing_docs)] +pub fn get_start(&self) -> &::std::option::Option { + &self.start +} +#[allow(missing_docs)] +pub fn stop(mut self, input: impl ::std::convert::Into) -> Self { + self.stop = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stop(mut self, input: ::std::option::Option) -> Self { + self.stop = input; + self +} +#[allow(missing_docs)] +pub fn get_stop(&self) -> &::std::option::Option { + &self.stop +} + /// Consumes the builder and constructs a [`ValidEncryptionMaterialsTransitionInput`](crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::ValidEncryptionMaterialsTransitionInput { + start: self.start, +stop: self.stop, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_decrypt_input.rs new file mode 100644 index 000000000..5a3d7a987 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_decrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidateCommitmentPolicyOnDecryptInput { + #[allow(missing_docs)] +pub algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnDecryptInput { + #[allow(missing_docs)] +pub fn algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +} +impl ValidateCommitmentPolicyOnDecryptInput { + /// Creates a new builder-style object to manufacture [`ValidateCommitmentPolicyOnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::ValidateCommitmentPolicyOnDecryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::ValidateCommitmentPolicyOnDecryptInputBuilder::default() + } +} + +/// A builder for [`ValidateCommitmentPolicyOnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidateCommitmentPolicyOnDecryptInputBuilder { + pub(crate) algorithm: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnDecryptInputBuilder { + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} + /// Consumes the builder and constructs a [`ValidateCommitmentPolicyOnDecryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnDecryptInput { + algorithm: self.algorithm, +commitment_policy: self.commitment_policy, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_encrypt_input.rs new file mode 100644 index 000000000..cf9553e74 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_encrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidateCommitmentPolicyOnEncryptInput { + #[allow(missing_docs)] +pub algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnEncryptInput { + #[allow(missing_docs)] +pub fn algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} +} +impl ValidateCommitmentPolicyOnEncryptInput { + /// Creates a new builder-style object to manufacture [`ValidateCommitmentPolicyOnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::builders::ValidateCommitmentPolicyOnEncryptInputBuilder { + crate::deps::aws_cryptography_materialProviders::types::builders::ValidateCommitmentPolicyOnEncryptInputBuilder::default() + } +} + +/// A builder for [`ValidateCommitmentPolicyOnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidateCommitmentPolicyOnEncryptInputBuilder { + pub(crate) algorithm: ::std::option::Option, +pub(crate) commitment_policy: ::std::option::Option, +} +impl ValidateCommitmentPolicyOnEncryptInputBuilder { + #[allow(missing_docs)] +pub fn algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_algorithm(mut self, input: ::std::option::Option) -> Self { + self.algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_algorithm(&self) -> &::std::option::Option { + &self.algorithm +} +#[allow(missing_docs)] +pub fn commitment_policy(mut self, input: impl ::std::convert::Into) -> Self { + self.commitment_policy = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_commitment_policy(mut self, input: ::std::option::Option) -> Self { + self.commitment_policy = input; + self +} +#[allow(missing_docs)] +pub fn get_commitment_policy(&self) -> &::std::option::Option { + &self.commitment_policy +} + /// Consumes the builder and constructs a [`ValidateCommitmentPolicyOnEncryptInput`](crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::ValidateCommitmentPolicyOnEncryptInput { + algorithm: self.algorithm, +commitment_policy: self.commitment_policy, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs new file mode 100644 index 000000000..a5bc831e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs @@ -0,0 +1,40 @@ +// 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. + +#[allow(missing_docs)] +pub trait BranchKeyIdSupplier { + fn get_branch_key_id( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::GetBranchKeyIdOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a BranchKeyIdSupplier +pub struct BranchKeyIdSupplierRef { + pub inner: ::std::rc::Rc> +} + +impl From for BranchKeyIdSupplierRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for BranchKeyIdSupplierRef { + fn eq(&self, other: &BranchKeyIdSupplierRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for BranchKeyIdSupplierRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod get_branch_key_id; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier/get_branch_key_id.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier/get_branch_key_id.rs new file mode 100644 index 000000000..193d040ff --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier/get_branch_key_id.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::branch_key_id_supplier::BranchKeyIdSupplierRef { + /// Constructs a fluent builder for the [`GetBranchKeyId`](crate::operation::get_branch_key_id::builders::GetBranchKeyIdFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`encryption_context(impl Into>>)`](crate::operation::get_branch_key_id::builders::GetBranchKeyIdFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::get_branch_key_id::builders::GetBranchKeyIdFluentBuilder::set_encryption_context): (undocumented)
+ /// - On success, responds with [`GetBranchKeyIdOutput`](crate::operation::get_branch_key_id::GetBranchKeyIdOutput) with field(s): + /// - [`branch_key_id(Option<::std::string::String>)`](crate::operation::get_branch_key_id::GetBranchKeyIdOutput::branch_key_id): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_branch_key_id::GetBranchKeyIdError) + pub fn get_branch_key_id(&self) -> crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_branch_key_id::builders::GetBranchKeyIdFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs new file mode 100644 index 000000000..6d8dbeebf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs @@ -0,0 +1,126 @@ +// 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 use crate::deps::aws_cryptography_materialProviders::types::_algorithm_suite_info::AlgorithmSuiteInfoBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_discovery_keyring_input::CreateAwsKmsDiscoveryKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_discovery_multi_keyring_input::CreateAwsKmsDiscoveryMultiKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_ecdh_keyring_input::CreateAwsKmsEcdhKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_hierarchical_keyring_input::CreateAwsKmsHierarchicalKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_keyring_input::CreateAwsKmsKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_discovery_keyring_input::CreateAwsKmsMrkDiscoveryKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_discovery_multi_keyring_input::CreateAwsKmsMrkDiscoveryMultiKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_keyring_input::CreateAwsKmsMrkKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_mrk_multi_keyring_input::CreateAwsKmsMrkMultiKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_multi_keyring_input::CreateAwsKmsMultiKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_aws_kms_rsa_keyring_input::CreateAwsKmsRsaKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_cryptographic_materials_cache_input::CreateCryptographicMaterialsCacheInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_default_client_supplier_input::CreateDefaultClientSupplierInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_default_cryptographic_materials_manager_input::CreateDefaultCryptographicMaterialsManagerInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_multi_keyring_input::CreateMultiKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_aes_keyring_input::CreateRawAesKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_ecdh_keyring_input::CreateRawEcdhKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_raw_rsa_keyring_input::CreateRawRsaKeyringInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_create_required_encryption_context_cmm_input::CreateRequiredEncryptionContextCmmInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_decryption_materials::DecryptionMaterialsBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_decrypt_materials_input::DecryptMaterialsInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_decrypt_materials_output::DecryptMaterialsOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_default_cache::DefaultCacheBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_delete_cache_entry_input::DeleteCacheEntryInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_direct_key_wrapping::DirectKeyWrappingBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_discovery_filter::DiscoveryFilterBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_ecdsa::EcdsaBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_encrypted_data_key::EncryptedDataKeyBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_encryption_materials::EncryptionMaterialsBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_ephemeral_private_key_to_static_public_key_input::EphemeralPrivateKeyToStaticPublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_branch_key_id_input::GetBranchKeyIdInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_branch_key_id_output::GetBranchKeyIdOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_cache_entry_input::GetCacheEntryInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_cache_entry_output::GetCacheEntryOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_client_input::GetClientInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_encryption_materials_input::GetEncryptionMaterialsInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_get_encryption_materials_output::GetEncryptionMaterialsOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_hkdf::HkdfBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_identity::IdentityBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_initialize_decryption_materials_input::InitializeDecryptionMaterialsInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_initialize_encryption_materials_input::InitializeEncryptionMaterialsInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_intermediate_key_wrapping::IntermediateKeyWrappingBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_kms_private_key_to_static_public_key_input::KmsPrivateKeyToStaticPublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_kms_public_key_discovery_input::KmsPublicKeyDiscoveryInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_multi_threaded_cache::MultiThreadedCacheBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_no_cache::NoCacheBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_none::NoneBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_on_decrypt_input::OnDecryptInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_on_decrypt_output::OnDecryptOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_on_encrypt_input::OnEncryptInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_on_encrypt_output::OnEncryptOutputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_public_key_discovery_input::PublicKeyDiscoveryInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_put_cache_entry_input::PutCacheEntryInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_raw_private_key_to_static_public_key_input::RawPrivateKeyToStaticPublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_single_threaded_cache::SingleThreadedCacheBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_storm_tracking_cache::StormTrackingCacheBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_update_usage_metadata_input::UpdateUsageMetadataInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_validate_commitment_policy_on_decrypt_input::ValidateCommitmentPolicyOnDecryptInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_validate_commitment_policy_on_encrypt_input::ValidateCommitmentPolicyOnEncryptInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_valid_decryption_materials_transition_input::ValidDecryptionMaterialsTransitionInputBuilder; + +pub use crate::deps::aws_cryptography_materialProviders::types::_valid_encryption_materials_transition_input::ValidEncryptionMaterialsTransitionInputBuilder; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs new file mode 100644 index 000000000..22a186c68 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs @@ -0,0 +1,40 @@ +// 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. + +#[allow(missing_docs)] +pub trait ClientSupplier { + fn get_client( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_client::GetClientInput, + ) -> Result< + crate::deps::com_amazonaws_kms::client::Client, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a ClientSupplier +pub struct ClientSupplierRef { + pub inner: ::std::rc::Rc> +} + +impl From for ClientSupplierRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for ClientSupplierRef { + fn eq(&self, other: &ClientSupplierRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for ClientSupplierRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod get_client; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs new file mode 100644 index 000000000..e05a1a060 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::client_supplier::ClientSupplierRef { + /// Constructs a fluent builder for the [`GetClient`](crate::operation::get_client::builders::GetClientFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`region(impl Into>)`](crate::operation::get_client::builders::GetClientFluentBuilder::region) / [`set_region(Option<::std::string::String>)`](crate::operation::get_client::builders::GetClientFluentBuilder::set_region): (undocumented)
+ /// - On success, responds with [`GetClientOutput`](crate::operation::get_client::GetClientOutput) with field(s): + /// - [`client(Option)`](crate::operation::get_client::GetClientOutput::client): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_client::GetClientError) + pub fn get_client(&self) -> crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_client::builders::GetClientFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs new file mode 100644 index 000000000..4521824f8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs @@ -0,0 +1,70 @@ +// 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. + +#[allow(missing_docs)] +pub trait CryptographicMaterialsCache { + fn put_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::PutCacheEntryInput, + ) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; + + fn update_usage_metadata( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::UpdateUsageMetadataInput, + ) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; + + fn get_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::GetCacheEntryOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; + + fn delete_cache_entry( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::DeleteCacheEntryInput, + ) -> Result< + (), + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a CryptographicMaterialsCache +pub struct CryptographicMaterialsCacheRef { + pub inner: ::std::rc::Rc> +} + +impl From for CryptographicMaterialsCacheRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for CryptographicMaterialsCacheRef { + fn eq(&self, other: &CryptographicMaterialsCacheRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for CryptographicMaterialsCacheRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod put_cache_entry; + +mod update_usage_metadata; + +mod get_cache_entry; + +mod delete_cache_entry; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/delete_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/delete_cache_entry.rs new file mode 100644 index 000000000..65e4e7802 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/delete_cache_entry.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + /// Constructs a fluent builder for the [`DeleteCacheEntry`](crate::operation::delete_cache_entry::builders::DeleteCacheEntryFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`identifier(impl Into>)`](crate::operation::delete_cache_entry::builders::DeleteCacheEntryFluentBuilder::identifier) / [`set_identifier(Option<::aws_smithy_types::Blob>)`](crate::operation::delete_cache_entry::builders::DeleteCacheEntryFluentBuilder::set_identifier): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::delete_cache_entry::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::delete_cache_entry::DeleteCacheEntryError) + pub fn delete_cache_entry(&self) -> crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::delete_cache_entry::builders::DeleteCacheEntryFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/get_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/get_cache_entry.rs new file mode 100644 index 000000000..de0724e46 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/get_cache_entry.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + /// Constructs a fluent builder for the [`GetCacheEntry`](crate::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`bytes_used(impl Into>)`](crate::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder::bytes_used) / [`set_bytes_used(Option<::std::primitive::i64>)`](crate::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder::set_bytes_used): (undocumented)
+ /// - [`identifier(impl Into>)`](crate::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder::identifier) / [`set_identifier(Option<::aws_smithy_types::Blob>)`](crate::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder::set_identifier): (undocumented)
+ /// - On success, responds with [`GetCacheEntryOutput`](crate::operation::get_cache_entry::GetCacheEntryOutput) with field(s): + /// - [`bytes_used(Option<::std::primitive::i32>)`](crate::operation::get_cache_entry::GetCacheEntryOutput::bytes_used): (undocumented) + /// - [`creation_time(Option<::std::primitive::i64>)`](crate::operation::get_cache_entry::GetCacheEntryOutput::creation_time): (undocumented) + /// - [`expiry_time(Option<::std::primitive::i64>)`](crate::operation::get_cache_entry::GetCacheEntryOutput::expiry_time): (undocumented) + /// - [`materials(Option)`](crate::operation::get_cache_entry::GetCacheEntryOutput::materials): (undocumented) + /// - [`messages_used(Option<::std::primitive::i32>)`](crate::operation::get_cache_entry::GetCacheEntryOutput::messages_used): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_cache_entry::GetCacheEntryError) + pub fn get_cache_entry(&self) -> crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_cache_entry::builders::GetCacheEntryFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/put_cache_entry.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/put_cache_entry.rs new file mode 100644 index 000000000..b336c0c95 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/put_cache_entry.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + /// Constructs a fluent builder for the [`PutCacheEntry`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`bytes_used(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::bytes_used) / [`set_bytes_used(Option<::std::primitive::i32>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_bytes_used): (undocumented)
+ /// - [`creation_time(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::creation_time) / [`set_creation_time(Option<::std::primitive::i64>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_creation_time): (undocumented)
+ /// - [`expiry_time(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::expiry_time) / [`set_expiry_time(Option<::std::primitive::i64>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_expiry_time): (undocumented)
+ /// - [`identifier(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::identifier) / [`set_identifier(Option<::aws_smithy_types::Blob>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_identifier): (undocumented)
+ /// - [`materials(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::materials) / [`set_materials(Option)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_materials): (undocumented)
+ /// - [`messages_used(impl Into>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::messages_used) / [`set_messages_used(Option<::std::primitive::i32>)`](crate::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::set_messages_used): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::put_cache_entry::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::put_cache_entry::PutCacheEntryError) + pub fn put_cache_entry(&self) -> crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::put_cache_entry::builders::PutCacheEntryFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/update_usage_metadata.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/update_usage_metadata.rs new file mode 100644 index 000000000..5c55d932a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/update_usage_metadata.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef { + /// Constructs a fluent builder for the [`UpdateUsageMetadata`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`bytes_used(impl Into>)`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder::bytes_used) / [`set_bytes_used(Option<::std::primitive::i32>)`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder::set_bytes_used): (undocumented)
+ /// - [`identifier(impl Into>)`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder::identifier) / [`set_identifier(Option<::aws_smithy_types::Blob>)`](crate::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder::set_identifier): (undocumented)
+ /// - On success, responds with [`Unit`](crate::operation::update_usage_metadata::Unit) with field(s): + + /// - On failure, responds with [`SdkError`](crate::operation::update_usage_metadata::UpdateUsageMetadataError) + pub fn update_usage_metadata(&self) -> crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::update_usage_metadata::builders::UpdateUsageMetadataFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs new file mode 100644 index 000000000..9e9b06713 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs @@ -0,0 +1,50 @@ +// 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. + +#[allow(missing_docs)] +pub trait CryptographicMaterialsManager { + fn get_encryption_materials( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; + + fn decrypt_materials( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a CryptographicMaterialsManager +pub struct CryptographicMaterialsManagerRef { + pub inner: ::std::rc::Rc> +} + +impl From for CryptographicMaterialsManagerRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for CryptographicMaterialsManagerRef { + fn eq(&self, other: &CryptographicMaterialsManagerRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for CryptographicMaterialsManagerRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod get_encryption_materials; + +mod decrypt_materials; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/decrypt_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/decrypt_materials.rs new file mode 100644 index 000000000..68ba3b8fb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/decrypt_materials.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef { + /// Constructs a fluent builder for the [`DecryptMaterials`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`commitment_policy(impl Into>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::commitment_policy) / [`set_commitment_policy(Option)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::set_commitment_policy): (undocumented)
+ /// - [`encrypted_data_keys(impl Into>>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::encrypted_data_keys) / [`set_encrypted_data_keys(Option<::std::vec::Vec>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::set_encrypted_data_keys): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`reproduced_encryption_context(impl Into>>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::reproduced_encryption_context) / [`set_reproduced_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::set_reproduced_encryption_context): (undocumented)
+ /// - On success, responds with [`DecryptMaterialsOutput`](crate::operation::decrypt_materials::DecryptMaterialsOutput) with field(s): + /// - [`decryption_materials(Option)`](crate::operation::decrypt_materials::DecryptMaterialsOutput::decryption_materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decrypt_materials::DecryptMaterialsError) + pub fn decrypt_materials(&self) -> crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::decrypt_materials::builders::DecryptMaterialsFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/get_encryption_materials.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/get_encryption_materials.rs new file mode 100644 index 000000000..ecbed32a5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/get_encryption_materials.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef { + /// Constructs a fluent builder for the [`GetEncryptionMaterials`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`commitment_policy(impl Into>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::commitment_policy) / [`set_commitment_policy(Option)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::set_commitment_policy): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`max_plaintext_length(impl Into>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::max_plaintext_length) / [`set_max_plaintext_length(Option<::std::primitive::i64>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::set_max_plaintext_length): (undocumented)
+ /// - [`required_encryption_context_keys(impl Into>>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::required_encryption_context_keys) / [`set_required_encryption_context_keys(Option<::std::vec::Vec<::std::string::String>>)`](crate::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::set_required_encryption_context_keys): (undocumented)
+ /// - On success, responds with [`GetEncryptionMaterialsOutput`](crate::operation::get_encryption_materials::GetEncryptionMaterialsOutput) with field(s): + /// - [`encryption_materials(Option)`](crate::operation::get_encryption_materials::GetEncryptionMaterialsOutput::encryption_materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_encryption_materials::GetEncryptionMaterialsError) + pub fn get_encryption_materials(&self) -> crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::get_encryption_materials::builders::GetEncryptionMaterialsFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/error.rs new file mode 100644 index 000000000..b13185f69 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/error.rs @@ -0,0 +1,138 @@ +// 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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + #[allow(missing_docs)] +AwsCryptographicMaterialProvidersException { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +EntryAlreadyExists { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +EntryDoesNotExist { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InFlightTtlExceeded { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidAlgorithmSuiteInfo { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidAlgorithmSuiteInfoOnDecrypt { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidAlgorithmSuiteInfoOnEncrypt { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidDecryptionMaterials { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidDecryptionMaterialsTransition { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidEncryptionMaterials { + message: ::std::string::String, +}, + +#[allow(missing_docs)] +InvalidEncryptionMaterialsTransition { + message: ::std::string::String, +}, + +AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::types::error::Error, +}, + +DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::types::error::Error, +}, + +TrentServiceError { + error: crate::deps::com_amazonaws_kms::types::error::Error, +}, + +KeyStoreError { + error: crate::deps::aws_cryptography_keyStore::types::error::Error, +}, + CollectionOfErrors { + list: ::std::vec::Vec, + message: ::std::string::String, + }, + ValidationError(ValidationError), + Opaque { + obj: ::dafny_runtime::Object, + }, + OpaqueWithText { + obj: ::dafny_runtime::Object, + objMessage: ::std::string::String, + }, +} + +impl ::std::cmp::Eq for Error {} + +impl ::std::fmt::Display for Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + Self::ValidationError(err) => ::std::fmt::Display::fmt(err, f), + _ => ::std::fmt::Debug::fmt(self, f), + } + } +} + +impl ::std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::ValidationError(err) => Some(err), + _ => None, + } + } +} + +impl Error { + pub fn wrap_validation_err(err: E) -> Self + where + E: ::std::error::Error + 'static, + { + Self::ValidationError(ValidationError(::std::rc::Rc::new(err))) + } +} + +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidationError(::std::rc::Rc); + +impl ::std::cmp::PartialEq for ValidationError { + fn eq(&self, other: &Self) -> bool { + ::std::rc::Rc::<(dyn std::error::Error + 'static)>::ptr_eq(&self.0, &other.0) + } +} + +impl ::std::fmt::Display for ValidationError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::fmt::Display::fmt(&self.0, f) + } +} + +impl ::std::error::Error for ValidationError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + ::std::option::Option::Some(self.0.as_ref()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs new file mode 100644 index 000000000..fdc6253e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs @@ -0,0 +1,50 @@ +// 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. + +#[allow(missing_docs)] +pub trait Keyring { + fn on_encrypt( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; + + fn on_decrypt( + &self, + input: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput, + ) -> Result< + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput, + crate::deps::aws_cryptography_materialProviders::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a Keyring +pub struct KeyringRef { + pub inner: ::std::rc::Rc> +} + +impl From for KeyringRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for KeyringRef { + fn eq(&self, other: &KeyringRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for KeyringRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod on_encrypt; + +mod on_decrypt; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs new file mode 100644 index 000000000..3adcc6c9d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef { + /// Constructs a fluent builder for the [`OnDecrypt`](crate::operation::on_decrypt::builders::OnDecryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`encrypted_data_keys(impl Into>>)`](crate::operation::on_decrypt::builders::OnDecryptFluentBuilder::encrypted_data_keys) / [`set_encrypted_data_keys(Option<::std::vec::Vec>)`](crate::operation::on_decrypt::builders::OnDecryptFluentBuilder::set_encrypted_data_keys): (undocumented)
+ /// - [`materials(impl Into>)`](crate::operation::on_decrypt::builders::OnDecryptFluentBuilder::materials) / [`set_materials(Option)`](crate::operation::on_decrypt::builders::OnDecryptFluentBuilder::set_materials): (undocumented)
+ /// - On success, responds with [`OnDecryptOutput`](crate::operation::on_decrypt::OnDecryptOutput) with field(s): + /// - [`materials(Option)`](crate::operation::on_decrypt::OnDecryptOutput::materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::on_decrypt::OnDecryptError) + pub fn on_decrypt(&self) -> crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::builders::OnDecryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs new file mode 100644 index 000000000..d2d53481e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef { + /// Constructs a fluent builder for the [`OnEncrypt`](crate::operation::on_encrypt::builders::OnEncryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`materials(impl Into>)`](crate::operation::on_encrypt::builders::OnEncryptFluentBuilder::materials) / [`set_materials(Option)`](crate::operation::on_encrypt::builders::OnEncryptFluentBuilder::set_materials): (undocumented)
+ /// - On success, responds with [`OnEncryptOutput`](crate::operation::on_encrypt::OnEncryptOutput) with field(s): + /// - [`materials(Option)`](crate::operation::on_encrypt::OnEncryptOutput::materials): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::on_encrypt::OnEncryptError) + pub fn on_encrypt(&self) -> crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptFluentBuilder { + crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs new file mode 100644 index 000000000..ce505a466 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct MaterialProvidersConfig { + +} +impl MaterialProvidersConfig { + +} +impl MaterialProvidersConfig { + /// Creates a new builder-style object to manufacture [`MaterialProvidersConfig`](crate::deps::aws_cryptography_materialProviders::types::MaterialProvidersConfig). + pub fn builder() -> crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfigBuilder { + crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfigBuilder::default() + } +} + +/// A builder for [`MaterialProvidersConfig`](crate::deps::aws_cryptography_materialProviders::types::MaterialProvidersConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct MaterialProvidersConfigBuilder { + +} +impl MaterialProvidersConfigBuilder { + + /// Consumes the builder and constructs a [`MaterialProvidersConfig`](crate::deps::aws_cryptography_materialProviders::types::MaterialProvidersConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives.rs @@ -0,0 +1,11 @@ +// 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 mod client; +pub mod types; +/// Common errors and error handling utilities. +pub mod error; +/// All operations that this crate can perform. +pub mod operation; +pub mod conversions; +pub mod deps; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client.rs new file mode 100644 index 000000000..ef0e6631e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client.rs @@ -0,0 +1,80 @@ +// 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. +use aws_smithy_types::error::operation::BuildError; + +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +#[allow(missing_docs)] +pub struct Client { + pub(crate) dafny_client: ::dafny_runtime::Object +} + +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, + ) -> Result { + let inner = + crate::software::amazon::cryptography::primitives::internaldafny::_default::AtomicPrimitives( + &crate::deps::aws_cryptography_primitives::conversions::crypto_config::_crypto_config::to_dafny(conf), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod generate_random_bytes; + +mod digest; + +mod h_mac; + +mod hkdf_extract; + +mod hkdf_expand; + +mod hkdf; + +mod kdf_counter_mode; + +mod aes_kdf_counter_mode; + +mod aes_encrypt; + +mod aes_decrypt; + +mod generate_rsa_key_pair; + +mod get_rsa_key_modulus_length; + +mod rsa_decrypt; + +mod rsa_encrypt; + +mod generate_ecdsa_signature_key; + +mod ecdsa_sign; + +mod ecdsa_verify; + +mod generate_ecc_key_pair; + +mod get_public_key_from_private_key; + +mod validate_public_key; + +mod derive_shared_secret; + +mod compress_public_key; + +mod decompress_public_key; + +mod parse_public_key; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs new file mode 100644 index 000000000..e5e702114 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`AESDecrypt`](crate::operation::aes_decrypt::builders::AesDecryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`aad(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::aad) / [`set_aad(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_aad): (undocumented)
+ /// - [`auth_tag(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::auth_tag) / [`set_auth_tag(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_auth_tag): (undocumented)
+ /// - [`cipher_txt(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::cipher_txt) / [`set_cipher_txt(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_cipher_txt): (undocumented)
+ /// - [`enc_alg(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::enc_alg) / [`set_enc_alg(Option)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_enc_alg): (undocumented)
+ /// - [`iv(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::iv) / [`set_iv(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_iv): (undocumented)
+ /// - [`key(impl Into>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::key) / [`set_key(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::builders::AESDecryptFluentBuilder::set_key): (undocumented)
+ /// - On success, responds with [`AesDecryptOutput`](crate::operation::aes_decrypt::AesDecryptOutput) with field(s): + /// - [`plaintext(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_decrypt::AESDecryptOutput::plaintext): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::aes_decrypt::AesDecryptError) + pub fn aes_decrypt(&self) -> crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs new file mode 100644 index 000000000..7ec9e22a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs @@ -0,0 +1,20 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`AESEncrypt`](crate::operation::aes_encrypt::builders::AesEncryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`aad(impl Into>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::aad) / [`set_aad(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::set_aad): (undocumented)
+ /// - [`enc_alg(impl Into>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::enc_alg) / [`set_enc_alg(Option)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::set_enc_alg): (undocumented)
+ /// - [`iv(impl Into>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::iv) / [`set_iv(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::set_iv): (undocumented)
+ /// - [`key(impl Into>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::key) / [`set_key(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::set_key): (undocumented)
+ /// - [`msg(impl Into>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::msg) / [`set_msg(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::builders::AESEncryptFluentBuilder::set_msg): (undocumented)
+ /// - On success, responds with [`AesEncryptOutput`](crate::operation::aes_encrypt::AesEncryptOutput) with field(s): + /// - [`auth_tag(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::AESEncryptOutput::auth_tag): (undocumented) + /// - [`cipher_text(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_encrypt::AESEncryptOutput::cipher_text): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::aes_encrypt::AesEncryptError) + pub fn aes_encrypt(&self) -> crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..37abc3432 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`AesKdfCounterMode`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`expected_length(impl Into>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::expected_length) / [`set_expected_length(Option<::std::primitive::i32>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::set_expected_length): (undocumented)
+ /// - [`ikm(impl Into>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::ikm) / [`set_ikm(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::set_ikm): (undocumented)
+ /// - [`nonce(impl Into>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::nonce) / [`set_nonce(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::set_nonce): (undocumented)
+ /// - On success, responds with [`AesKdfCtrOutput`](crate::operation::aes_kdf_counter_mode::AesKdfCtrOutput) with field(s): + /// - [`okm(Option<::aws_smithy_types::Blob>)`](crate::operation::aes_kdf_counter_mode::AesKdfCtrOutput::okm): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::aes_kdf_counter_mode::AesKdfCounterModeError) + pub fn aes_kdf_counter_mode(&self) -> crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCounterModeFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs new file mode 100644 index 000000000..4e2266c09 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`CompressPublicKey`](crate::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ecc_curve(impl Into>)`](crate::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder::set_ecc_curve): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder::public_key) / [`set_public_key(Option)`](crate::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`CompressPublicKeyOutput`](crate::operation::compress_public_key::CompressPublicKeyOutput) with field(s): + /// - [`compressed_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::compress_public_key::CompressPublicKeyOutput::compressed_public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::compress_public_key::CompressPublicKeyError) + pub fn compress_public_key(&self) -> crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs new file mode 100644 index 000000000..d1b9b6038 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`DecompressPublicKey`](crate::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`compressed_public_key(impl Into>)`](crate::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder::compressed_public_key) / [`set_compressed_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder::set_compressed_public_key): (undocumented)
+ /// - [`ecc_curve(impl Into>)`](crate::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder::set_ecc_curve): (undocumented)
+ /// - On success, responds with [`DecompressPublicKeyOutput`](crate::operation::decompress_public_key::DecompressPublicKeyOutput) with field(s): + /// - [`public_key(Option)`](crate::operation::decompress_public_key::DecompressPublicKeyOutput::public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decompress_public_key::DecompressPublicKeyError) + pub fn decompress_public_key(&self) -> crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs new file mode 100644 index 000000000..9c98fb8d8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`DeriveSharedSecret`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ecc_curve(impl Into>)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::set_ecc_curve): (undocumented)
+ /// - [`private_key(impl Into>)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::private_key) / [`set_private_key(Option)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::set_private_key): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::public_key) / [`set_public_key(Option)`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`DeriveSharedSecretOutput`](crate::operation::derive_shared_secret::DeriveSharedSecretOutput) with field(s): + /// - [`shared_secret(Option<::aws_smithy_types::Blob>)`](crate::operation::derive_shared_secret::DeriveSharedSecretOutput::shared_secret): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::derive_shared_secret::DeriveSharedSecretError) + pub fn derive_shared_secret(&self) -> crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/digest.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/digest.rs new file mode 100644 index 000000000..e24e84609 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/digest.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`Digest`](crate::operation::digest::builders::DigestFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::digest::builders::DigestFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::digest::builders::DigestFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`message(impl Into>)`](crate::operation::digest::builders::DigestFluentBuilder::message) / [`set_message(Option<::aws_smithy_types::Blob>)`](crate::operation::digest::builders::DigestFluentBuilder::set_message): (undocumented)
+ /// - On success, responds with [`DigestOutput`](crate::operation::digest::DigestOutput) with field(s): + /// - [`digest(Option<::aws_smithy_types::Blob>)`](crate::operation::digest::DigestOutput::digest): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::digest::DigestError) + pub fn digest(&self) -> crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs new file mode 100644 index 000000000..b5e62418e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`ECDSASign`](crate::operation::ecdsa_sign::builders::EcdsaSignFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`message(impl Into>)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::message) / [`set_message(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::set_message): (undocumented)
+ /// - [`signature_algorithm(impl Into>)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::signature_algorithm) / [`set_signature_algorithm(Option)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::set_signature_algorithm): (undocumented)
+ /// - [`signing_key(impl Into>)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::signing_key) / [`set_signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_sign::builders::ECDSASignFluentBuilder::set_signing_key): (undocumented)
+ /// - On success, responds with [`EcdsaSignOutput`](crate::operation::ecdsa_sign::EcdsaSignOutput) with field(s): + /// - [`signature(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_sign::ECDSASignOutput::signature): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::ecdsa_sign::EcdsaSignError) + pub fn ecdsa_sign(&self) -> crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs new file mode 100644 index 000000000..114c48283 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`ECDSAVerify`](crate::operation::ecdsa_verify::builders::EcdsaVerifyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`message(impl Into>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::message) / [`set_message(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::set_message): (undocumented)
+ /// - [`signature(impl Into>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::signature) / [`set_signature(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::set_signature): (undocumented)
+ /// - [`signature_algorithm(impl Into>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::signature_algorithm) / [`set_signature_algorithm(Option)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::set_signature_algorithm): (undocumented)
+ /// - [`verification_key(impl Into>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::verification_key) / [`set_verification_key(Option<::aws_smithy_types::Blob>)`](crate::operation::ecdsa_verify::builders::ECDSAVerifyFluentBuilder::set_verification_key): (undocumented)
+ /// - On success, responds with [`EcdsaVerifyOutput`](crate::operation::ecdsa_verify::EcdsaVerifyOutput) with field(s): + /// - [`success(Option<::std::primitive::bool>)`](crate::operation::ecdsa_verify::ECDSAVerifyOutput::success): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::ecdsa_verify::EcdsaVerifyError) + pub fn ecdsa_verify(&self) -> crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs new file mode 100644 index 000000000..1d373b9a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GenerateECCKeyPair`](crate::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ecc_curve(impl Into>)`](crate::operation::generate_ecc_key_pair::builders::GenerateECCKeyPairFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::generate_ecc_key_pair::builders::GenerateECCKeyPairFluentBuilder::set_ecc_curve): (undocumented)
+ /// - On success, responds with [`GenerateEccKeyPairOutput`](crate::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput) with field(s): + /// - [`ecc_curve(Option)`](crate::operation::generate_ecc_key_pair::GenerateECCKeyPairOutput::ecc_curve): (undocumented) + /// - [`private_key(Option)`](crate::operation::generate_ecc_key_pair::GenerateECCKeyPairOutput::private_key): (undocumented) + /// - [`public_key(Option)`](crate::operation::generate_ecc_key_pair::GenerateECCKeyPairOutput::public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::generate_ecc_key_pair::GenerateEccKeyPairError) + pub fn generate_ecc_key_pair(&self) -> crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..141761f71 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GenerateECDSASignatureKey`](crate::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`signature_algorithm(impl Into>)`](crate::operation::generate_ecdsa_signature_key::builders::GenerateECDSASignatureKeyFluentBuilder::signature_algorithm) / [`set_signature_algorithm(Option)`](crate::operation::generate_ecdsa_signature_key::builders::GenerateECDSASignatureKeyFluentBuilder::set_signature_algorithm): (undocumented)
+ /// - On success, responds with [`GenerateEcdsaSignatureKeyOutput`](crate::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput) with field(s): + /// - [`signature_algorithm(Option)`](crate::operation::generate_ecdsa_signature_key::GenerateECDSASignatureKeyOutput::signature_algorithm): (undocumented) + /// - [`signing_key(Option<::aws_smithy_types::Blob>)`](crate::operation::generate_ecdsa_signature_key::GenerateECDSASignatureKeyOutput::signing_key): (undocumented) + /// - [`verification_key(Option<::aws_smithy_types::Blob>)`](crate::operation::generate_ecdsa_signature_key::GenerateECDSASignatureKeyOutput::verification_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyError) + pub fn generate_ecdsa_signature_key(&self) -> crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs new file mode 100644 index 000000000..8a43799ca --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GenerateRandomBytes`](crate::operation::generate_random_bytes::builders::GenerateRandomBytesFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`length(impl Into>)`](crate::operation::generate_random_bytes::builders::GenerateRandomBytesFluentBuilder::length) / [`set_length(Option<::std::primitive::i32>)`](crate::operation::generate_random_bytes::builders::GenerateRandomBytesFluentBuilder::set_length): (undocumented)
+ /// - On success, responds with [`GenerateRandomBytesOutput`](crate::operation::generate_random_bytes::GenerateRandomBytesOutput) with field(s): + /// - [`data(Option<::aws_smithy_types::Blob>)`](crate::operation::generate_random_bytes::GenerateRandomBytesOutput::data): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::generate_random_bytes::GenerateRandomBytesError) + pub fn generate_random_bytes(&self) -> crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs new file mode 100644 index 000000000..d2f3b2d82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GenerateRSAKeyPair`](crate::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`length_bits(impl Into>)`](crate::operation::generate_rsa_key_pair::builders::GenerateRSAKeyPairFluentBuilder::length_bits) / [`set_length_bits(Option<::std::primitive::i32>)`](crate::operation::generate_rsa_key_pair::builders::GenerateRSAKeyPairFluentBuilder::set_length_bits): (undocumented)
+ /// - On success, responds with [`GenerateRsaKeyPairOutput`](crate::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput) with field(s): + /// - [`private_key(Option)`](crate::operation::generate_rsa_key_pair::GenerateRSAKeyPairOutput::private_key): (undocumented) + /// - [`public_key(Option)`](crate::operation::generate_rsa_key_pair::GenerateRSAKeyPairOutput::public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::generate_rsa_key_pair::GenerateRsaKeyPairError) + pub fn generate_rsa_key_pair(&self) -> crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_public_key_from_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_public_key_from_private_key.rs new file mode 100644 index 000000000..80f5b2da5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_public_key_from_private_key.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GetPublicKeyFromPrivateKey`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ecc_curve(impl Into>)`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder::set_ecc_curve): (undocumented)
+ /// - [`private_key(impl Into>)`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder::private_key) / [`set_private_key(Option)`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder::set_private_key): (undocumented)
+ /// - On success, responds with [`GetPublicKeyFromPrivateKeyOutput`](crate::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput) with field(s): + /// - [`ecc_curve(Option)`](crate::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput::ecc_curve): (undocumented) + /// - [`private_key(Option)`](crate::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput::private_key): (undocumented) + /// - [`public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput::public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyError) + pub fn get_public_key_from_private_key(&self) -> crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_rsa_key_modulus_length.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_rsa_key_modulus_length.rs new file mode 100644 index 000000000..6ce384f82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/get_rsa_key_modulus_length.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`GetRSAKeyModulusLength`](crate::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`public_key(impl Into>)`](crate::operation::get_rsa_key_modulus_length::builders::GetRSAKeyModulusLengthFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::get_rsa_key_modulus_length::builders::GetRSAKeyModulusLengthFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`GetRsaKeyModulusLengthOutput`](crate::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput) with field(s): + /// - [`length(Option<::std::primitive::i32>)`](crate::operation::get_rsa_key_modulus_length::GetRSAKeyModulusLengthOutput::length): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthError) + pub fn get_rsa_key_modulus_length(&self) -> crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs new file mode 100644 index 000000000..1bcaf32a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`HMac`](crate::operation::h_mac::builders::HMacFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::h_mac::builders::HMacFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::h_mac::builders::HMacFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`key(impl Into>)`](crate::operation::h_mac::builders::HMacFluentBuilder::key) / [`set_key(Option<::aws_smithy_types::Blob>)`](crate::operation::h_mac::builders::HMacFluentBuilder::set_key): (undocumented)
+ /// - [`message(impl Into>)`](crate::operation::h_mac::builders::HMacFluentBuilder::message) / [`set_message(Option<::aws_smithy_types::Blob>)`](crate::operation::h_mac::builders::HMacFluentBuilder::set_message): (undocumented)
+ /// - On success, responds with [`HMacOutput`](crate::operation::h_mac::HMacOutput) with field(s): + /// - [`digest(Option<::aws_smithy_types::Blob>)`](crate::operation::h_mac::HMacOutput::digest): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::h_mac::HMacError) + pub fn h_mac(&self) -> crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs new file mode 100644 index 000000000..02c903fd0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`Hkdf`](crate::operation::hkdf::builders::HkdfFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::hkdf::builders::HkdfFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`expected_length(impl Into>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::expected_length) / [`set_expected_length(Option<::std::primitive::i32>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::set_expected_length): (undocumented)
+ /// - [`ikm(impl Into>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::ikm) / [`set_ikm(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::set_ikm): (undocumented)
+ /// - [`info(impl Into>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::info) / [`set_info(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::set_info): (undocumented)
+ /// - [`salt(impl Into>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::salt) / [`set_salt(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf::builders::HkdfFluentBuilder::set_salt): (undocumented)
+ /// - On success, responds with [`HkdfOutput`](crate::operation::hkdf::HkdfOutput) with field(s): + /// - [`okm(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf::HkdfOutput::okm): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::hkdf::HkdfError) + pub fn hkdf(&self) -> crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs new file mode 100644 index 000000000..f17e2798f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs @@ -0,0 +1,18 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`HkdfExpand`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`expected_length(impl Into>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::expected_length) / [`set_expected_length(Option<::std::primitive::i32>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::set_expected_length): (undocumented)
+ /// - [`info(impl Into>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::info) / [`set_info(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::set_info): (undocumented)
+ /// - [`prk(impl Into>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::prk) / [`set_prk(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::set_prk): (undocumented)
+ /// - On success, responds with [`HkdfExpandOutput`](crate::operation::hkdf_expand::HkdfExpandOutput) with field(s): + /// - [`okm(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_expand::HkdfExpandOutput::okm): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::hkdf_expand::HkdfExpandError) + pub fn hkdf_expand(&self) -> crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs new file mode 100644 index 000000000..089a02d0e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`HkdfExtract`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`ikm(impl Into>)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::ikm) / [`set_ikm(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::set_ikm): (undocumented)
+ /// - [`salt(impl Into>)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::salt) / [`set_salt(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::set_salt): (undocumented)
+ /// - On success, responds with [`HkdfExtractOutput`](crate::operation::hkdf_extract::HkdfExtractOutput) with field(s): + /// - [`prk(Option<::aws_smithy_types::Blob>)`](crate::operation::hkdf_extract::HkdfExtractOutput::prk): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::hkdf_extract::HkdfExtractError) + pub fn hkdf_extract(&self) -> crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs new file mode 100644 index 000000000..7ffe93300 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs @@ -0,0 +1,19 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`KdfCounterMode`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`digest_algorithm(impl Into>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::digest_algorithm) / [`set_digest_algorithm(Option)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::set_digest_algorithm): (undocumented)
+ /// - [`expected_length(impl Into>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::expected_length) / [`set_expected_length(Option<::std::primitive::i32>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::set_expected_length): (undocumented)
+ /// - [`ikm(impl Into>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::ikm) / [`set_ikm(Option<::aws_smithy_types::Blob>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::set_ikm): (undocumented)
+ /// - [`nonce(impl Into>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::nonce) / [`set_nonce(Option<::aws_smithy_types::Blob>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::set_nonce): (undocumented)
+ /// - [`purpose(impl Into>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::purpose) / [`set_purpose(Option<::aws_smithy_types::Blob>)`](crate::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::set_purpose): (undocumented)
+ /// - On success, responds with [`KdfCtrOutput`](crate::operation::kdf_counter_mode::KdfCtrOutput) with field(s): + /// - [`okm(Option<::aws_smithy_types::Blob>)`](crate::operation::kdf_counter_mode::KdfCtrOutput::okm): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::kdf_counter_mode::KdfCounterModeError) + pub fn kdf_counter_mode(&self) -> crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCounterModeFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs new file mode 100644 index 000000000..8b4e71ef0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs @@ -0,0 +1,15 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`ParsePublicKey`](crate::operation::parse_public_key::builders::ParsePublicKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`public_key(impl Into>)`](crate::operation::parse_public_key::builders::ParsePublicKeyFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::parse_public_key::builders::ParsePublicKeyFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`ParsePublicKeyOutput`](crate::operation::parse_public_key::ParsePublicKeyOutput) with field(s): + /// - [`public_key(Option)`](crate::operation::parse_public_key::ParsePublicKeyOutput::public_key): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::parse_public_key::ParsePublicKeyError) + pub fn parse_public_key(&self) -> crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs new file mode 100644 index 000000000..16f035a44 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`RSADecrypt`](crate::operation::rsa_decrypt::builders::RsaDecryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`cipher_text(impl Into>)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::cipher_text) / [`set_cipher_text(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::set_cipher_text): (undocumented)
+ /// - [`padding(impl Into>)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::padding) / [`set_padding(Option)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::set_padding): (undocumented)
+ /// - [`private_key(impl Into>)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::private_key) / [`set_private_key(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_decrypt::builders::RSADecryptFluentBuilder::set_private_key): (undocumented)
+ /// - On success, responds with [`RsaDecryptOutput`](crate::operation::rsa_decrypt::RsaDecryptOutput) with field(s): + /// - [`plaintext(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_decrypt::RSADecryptOutput::plaintext): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::rsa_decrypt::RsaDecryptError) + pub fn rsa_decrypt(&self) -> crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs new file mode 100644 index 000000000..118ff50ab --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs @@ -0,0 +1,17 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`RSAEncrypt`](crate::operation::rsa_encrypt::builders::RsaEncryptFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`padding(impl Into>)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::padding) / [`set_padding(Option)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::set_padding): (undocumented)
+ /// - [`plaintext(impl Into>)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::plaintext) / [`set_plaintext(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::set_plaintext): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_encrypt::builders::RSAEncryptFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`RsaEncryptOutput`](crate::operation::rsa_encrypt::RsaEncryptOutput) with field(s): + /// - [`cipher_text(Option<::aws_smithy_types::Blob>)`](crate::operation::rsa_encrypt::RSAEncryptOutput::cipher_text): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::rsa_encrypt::RsaEncryptError) + pub fn rsa_encrypt(&self) -> crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs new file mode 100644 index 000000000..a3cbdb423 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs @@ -0,0 +1,16 @@ +// 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. +impl crate::deps::aws_cryptography_primitives::client::Client { + /// Constructs a fluent builder for the [`ValidatePublicKey`](crate::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ecc_curve(impl Into>)`](crate::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder::ecc_curve) / [`set_ecc_curve(Option)`](crate::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder::set_ecc_curve): (undocumented)
+ /// - [`public_key(impl Into>)`](crate::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder::public_key) / [`set_public_key(Option<::aws_smithy_types::Blob>)`](crate::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder::set_public_key): (undocumented)
+ /// - On success, responds with [`ValidatePublicKeyOutput`](crate::operation::validate_public_key::ValidatePublicKeyOutput) with field(s): + /// - [`success(Option<::std::primitive::bool>)`](crate::operation::validate_public_key::ValidatePublicKeyOutput::success): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::validate_public_key::ValidatePublicKeyError) + pub fn validate_public_key(&self) -> crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder { + crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions.rs new file mode 100644 index 000000000..26a7070b8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions.rs @@ -0,0 +1,146 @@ +// 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 mod aes_ctr; + + pub mod aes_decrypt; + + pub mod aes_decrypt_input; + + pub mod aes_encrypt; + + pub mod aes_encrypt_input; + + pub mod aes_encrypt_output; + + pub mod aes_gcm; + + pub mod aes_kdf_counter_mode; + + pub mod aes_kdf_ctr_input; + + pub mod client; + + pub mod compress_public_key; + + pub mod compress_public_key_input; + + pub mod compress_public_key_output; + + pub mod decompress_public_key; + + pub mod decompress_public_key_input; + + pub mod decompress_public_key_output; + + pub mod derive_shared_secret; + + pub mod derive_shared_secret_input; + + pub mod derive_shared_secret_output; + + pub mod digest; + + pub mod digest_algorithm; + + pub mod digest_input; + + pub mod ecc_private_key; + + pub mod ecc_public_key; + + pub mod ecdh_curve_spec; + + pub mod ecdsa_sign; + + pub mod ecdsa_sign_input; + + pub mod ecdsa_signature_algorithm; + + pub mod ecdsa_verify; + + pub mod ecdsa_verify_input; + + pub mod error; + + pub mod generate_ecc_key_pair; + + pub mod generate_ecc_key_pair_input; + + pub mod generate_ecc_key_pair_output; + + pub mod generate_ecdsa_signature_key; + + pub mod generate_ecdsa_signature_key_input; + + pub mod generate_ecdsa_signature_key_output; + + pub mod generate_random_bytes; + + pub mod generate_random_bytes_input; + + pub mod generate_rsa_key_pair; + + pub mod generate_rsa_key_pair_input; + + pub mod generate_rsa_key_pair_output; + + pub mod get_public_key_from_private_key; + + pub mod get_public_key_from_private_key_input; + + pub mod get_public_key_from_private_key_output; + + pub mod get_rsa_key_modulus_length; + + pub mod get_rsa_key_modulus_length_input; + + pub mod get_rsa_key_modulus_length_output; + + pub mod h_mac; + + pub mod h_mac_input; + + pub mod hkdf; + + pub mod hkdf_expand; + + pub mod hkdf_expand_input; + + pub mod hkdf_extract; + + pub mod hkdf_extract_input; + + pub mod hkdf_input; + + pub mod kdf_counter_mode; + + pub mod kdf_ctr_input; + + pub mod parse_public_key; + + pub mod parse_public_key_input; + + pub mod parse_public_key_output; + + pub mod rsa_decrypt; + + pub mod rsa_decrypt_input; + + pub mod rsa_encrypt; + + pub mod rsa_encrypt_input; + + pub mod rsa_padding_mode; + + pub mod rsa_private_key; + + pub mod rsa_public_key; + + pub mod validate_public_key; + + pub mod validate_public_key_input; + + pub mod validate_public_key_output; + +pub mod crypto_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs new file mode 100644 index 000000000..9cd984fed --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesCtr, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesCtr, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR::AES_CTR { + keyLength: value.key_length.clone().unwrap(), + nonceLength: value.nonce_length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesCtr { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR, +) -> crate::deps::aws_cryptography_primitives::types::AesCtr { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_CTR::AES_CTR {..} => + crate::deps::aws_cryptography_primitives::types::AesCtr::builder() + .set_key_length(Some( dafny_value.keyLength() .clone() )) + .set_nonce_length(Some( dafny_value.nonceLength() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs new file mode 100644 index 000000000..ffb1a3974 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs @@ -0,0 +1,5 @@ +// 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 mod _aes_decrypt_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt/_aes_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt/_aes_decrypt_input.rs new file mode 100644 index 000000000..0aa3f5869 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt/_aes_decrypt_input.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput::AESDecryptInput { + encAlg: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&value.enc_alg.clone().unwrap()) +, + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + cipherTxt: crate::standard_library_conversions::blob_to_dafny(&value.cipher_txt.unwrap()), + authTag: crate::standard_library_conversions::blob_to_dafny(&value.auth_tag.unwrap()), + iv: crate::standard_library_conversions::blob_to_dafny(&value.iv.unwrap()), + aad: crate::standard_library_conversions::blob_to_dafny(&value.aad.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput { + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput::builder() + .set_enc_alg(Some( crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(dafny_value.encAlg().clone()) + )) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_cipher_txt(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherTxt().clone()))) + .set_auth_tag(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.authTag().clone()))) + .set_iv(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.iv().clone()))) + .set_aad(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.aad().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs new file mode 100644 index 000000000..7a20f6ba9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs @@ -0,0 +1,82 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesDecryptInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput::AESDecryptInput { + encAlg: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&value.enc_alg.clone().unwrap()) +, + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + cipherTxt: crate::standard_library_conversions::blob_to_dafny(&value.cipher_txt.unwrap()), + authTag: crate::standard_library_conversions::blob_to_dafny(&value.auth_tag.unwrap()), + iv: crate::standard_library_conversions::blob_to_dafny(&value.iv.unwrap()), + aad: crate::standard_library_conversions::blob_to_dafny(&value.aad.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesDecryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput, +) -> crate::deps::aws_cryptography_primitives::types::AesDecryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput::AESDecryptInput {..} => + crate::deps::aws_cryptography_primitives::types::AesDecryptInput::builder() + .set_enc_alg(Some( crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(dafny_value.encAlg().clone()) + )) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_cipher_txt(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherTxt().clone()))) + .set_auth_tag(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.authTag().clone()))) + .set_iv(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.iv().clone()))) + .set_aad(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.aad().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs new file mode 100644 index 000000000..4ab6f77ac --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs @@ -0,0 +1,7 @@ +// 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 mod _aes_encrypt_input; + + pub mod _aes_encrypt_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_input.rs new file mode 100644 index 000000000..b501637b5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_input.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput::AESEncryptInput { + encAlg: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&value.enc_alg.clone().unwrap()) +, + iv: crate::standard_library_conversions::blob_to_dafny(&value.iv.unwrap()), + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + msg: crate::standard_library_conversions::blob_to_dafny(&value.msg.unwrap()), + aad: crate::standard_library_conversions::blob_to_dafny(&value.aad.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput { + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput::builder() + .set_enc_alg(Some( crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(dafny_value.encAlg().clone()) + )) + .set_iv(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.iv().clone()))) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_msg(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.msg().clone()))) + .set_aad(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.aad().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_output.rs new file mode 100644 index 000000000..3f2fea36e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput::AESEncryptOutput { + cipherText: crate::standard_library_conversions::blob_to_dafny(&value.cipher_text.unwrap()), + authTag: crate::standard_library_conversions::blob_to_dafny(&value.auth_tag.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput { + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput::builder() + .set_cipher_text(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherText().clone()))) + .set_auth_tag(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.authTag().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs new file mode 100644 index 000000000..7227104f5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesEncryptInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput::AESEncryptInput { + encAlg: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&value.enc_alg.clone().unwrap()) +, + iv: crate::standard_library_conversions::blob_to_dafny(&value.iv.unwrap()), + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + msg: crate::standard_library_conversions::blob_to_dafny(&value.msg.unwrap()), + aad: crate::standard_library_conversions::blob_to_dafny(&value.aad.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesEncryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput, +) -> crate::deps::aws_cryptography_primitives::types::AesEncryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput::AESEncryptInput {..} => + crate::deps::aws_cryptography_primitives::types::AesEncryptInput::builder() + .set_enc_alg(Some( crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(dafny_value.encAlg().clone()) + )) + .set_iv(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.iv().clone()))) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_msg(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.msg().clone()))) + .set_aad(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.aad().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs new file mode 100644 index 000000000..74c67361f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesEncryptOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesEncryptOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput::AESEncryptOutput { + cipherText: crate::standard_library_conversions::blob_to_dafny(&value.cipher_text.unwrap()), + authTag: crate::standard_library_conversions::blob_to_dafny(&value.auth_tag.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesEncryptOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput, +) -> crate::deps::aws_cryptography_primitives::types::AesEncryptOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput::AESEncryptOutput {..} => + crate::deps::aws_cryptography_primitives::types::AesEncryptOutput::builder() + .set_cipher_text(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherText().clone()))) + .set_auth_tag(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.authTag().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs new file mode 100644 index 000000000..3fa77a592 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesGcm, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesGcm, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM::AES_GCM { + keyLength: value.key_length.clone().unwrap(), + tagLength: value.tag_length.clone().unwrap(), + ivLength: value.iv_length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesGcm { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM, +) -> crate::deps::aws_cryptography_primitives::types::AesGcm { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AES_GCM::AES_GCM {..} => + crate::deps::aws_cryptography_primitives::types::AesGcm::builder() + .set_key_length(Some( dafny_value.keyLength() .clone() )) + .set_tag_length(Some( dafny_value.tagLength() .clone() )) + .set_iv_length(Some( dafny_value.ivLength() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..bad93bdb9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs @@ -0,0 +1,5 @@ +// 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 mod _aes_kdf_counter_mode_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode/_aes_kdf_counter_mode_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode/_aes_kdf_counter_mode_input.rs new file mode 100644 index 000000000..ac9e3eb7c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode/_aes_kdf_counter_mode_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput::AesKdfCtrInput { + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + nonce: crate::standard_library_conversions::oblob_to_dafny(&value.nonce), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput { + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput::builder() + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .set_nonce(crate::standard_library_conversions::oblob_from_dafny(dafny_value.nonce().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs new file mode 100644 index 000000000..2d34b38c5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput::AesKdfCtrInput { + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + nonce: crate::standard_library_conversions::oblob_to_dafny(&value.nonce), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput, +) -> crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput::AesKdfCtrInput {..} => + crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput::builder() + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .set_nonce(crate::standard_library_conversions::oblob_from_dafny(dafny_value.nonce().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/client.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/client.rs new file mode 100644 index 000000000..44de94031 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/client.rs @@ -0,0 +1,24 @@ +// 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. +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::client::Client, +) -> + ::dafny_runtime::Object +{ + value.dafny_client.clone() +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClient + >, +) -> crate::deps::aws_cryptography_primitives::client::Client { + crate::deps::aws_cryptography_primitives::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs new file mode 100644 index 000000000..45fb534e5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs @@ -0,0 +1,7 @@ +// 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 mod _compress_public_key_input; + + pub mod _compress_public_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_input.rs new file mode 100644 index 000000000..c681ffafc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput::CompressPublicKeyInput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput { + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_output.rs new file mode 100644 index 000000000..2d4607b50 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput::CompressPublicKeyOutput { + compressedPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.compressed_public_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput { + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput::builder() + .set_compressed_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.compressedPublicKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs new file mode 100644 index 000000000..a90723dde --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput::CompressPublicKeyInput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput::CompressPublicKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs new file mode 100644 index 000000000..4613bfea8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput::CompressPublicKeyOutput { + compressedPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.compressed_public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput::CompressPublicKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput::builder() + .set_compressed_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.compressedPublicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs new file mode 100644 index 000000000..7a14b80c1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs @@ -0,0 +1,4 @@ +// 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 mod _crypto_config; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs new file mode 100644 index 000000000..25ff96bbc --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value)) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig, + >, +) -> crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig::CryptoConfig { + + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig, +) -> crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig::CryptoConfig {..} => + crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig::builder() + + .build() + .unwrap() + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs new file mode 100644 index 000000000..6c6f388cf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs @@ -0,0 +1,7 @@ +// 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 mod _decompress_public_key_input; + + pub mod _decompress_public_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_input.rs new file mode 100644 index 000000000..61ccf0333 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput::DecompressPublicKeyInput { + compressedPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.compressed_public_key.unwrap()), + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput { + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput::builder() + .set_compressed_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.compressedPublicKey().clone()))) + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_output.rs new file mode 100644 index 000000000..fb0ce52ce --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput::DecompressPublicKeyOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput { + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs new file mode 100644 index 000000000..de620cdc1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput::DecompressPublicKeyInput { + compressedPublicKey: crate::standard_library_conversions::blob_to_dafny(&value.compressed_public_key.unwrap()), + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput::DecompressPublicKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput::builder() + .set_compressed_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.compressedPublicKey().clone()))) + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs new file mode 100644 index 000000000..547519ad8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput::DecompressPublicKeyOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput::DecompressPublicKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs new file mode 100644 index 000000000..aec0c2794 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs @@ -0,0 +1,7 @@ +// 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 mod _derive_shared_secret_input; + + pub mod _derive_shared_secret_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_input.rs new file mode 100644 index 000000000..e12cffbb2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_input.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput::DeriveSharedSecretInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput { + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_output.rs new file mode 100644 index 000000000..54286d5c7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput::DeriveSharedSecretOutput { + sharedSecret: crate::standard_library_conversions::blob_to_dafny(&value.shared_secret.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput { + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput::builder() + .set_shared_secret(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.sharedSecret().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs new file mode 100644 index 000000000..c7d236d62 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput::DeriveSharedSecretInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput, +) -> crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput::DeriveSharedSecretInput {..} => + crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs new file mode 100644 index 000000000..769dcab92 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput::DeriveSharedSecretOutput { + sharedSecret: crate::standard_library_conversions::blob_to_dafny(&value.shared_secret.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput, +) -> crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput::DeriveSharedSecretOutput {..} => + crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput::builder() + .set_shared_secret(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.sharedSecret().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs new file mode 100644 index 000000000..1236a68b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs @@ -0,0 +1,5 @@ +// 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 mod _digest_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs new file mode 100644 index 000000000..ac621374d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::digest::DigestInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput::DigestInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::digest::DigestInput { + crate::deps::aws_cryptography_primitives::operation::digest::DigestInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs new file mode 100644 index 000000000..b042c4750 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::DigestAlgorithm, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha512 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_512 {}, +crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha384 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_384 {}, +crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha256 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_256 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm, +) -> crate::deps::aws_cryptography_primitives::types::DigestAlgorithm { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_512 {} => crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha512, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_384 {} => crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha384, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_256 {} => crate::deps::aws_cryptography_primitives::types::DigestAlgorithm::Sha256, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs new file mode 100644 index 000000000..89a27b3af --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::DigestInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::DigestInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput::DigestInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::DigestInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput, +) -> crate::deps::aws_cryptography_primitives::types::DigestInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::DigestInput::DigestInput {..} => + crate::deps::aws_cryptography_primitives::types::DigestInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs new file mode 100644 index 000000000..3de60a56e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::EccPrivateKey, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::EccPrivateKey, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey::ECCPrivateKey { + pem: crate::standard_library_conversions::blob_to_dafny(&value.pem.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey, + >, +) -> crate::deps::aws_cryptography_primitives::types::EccPrivateKey { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey, +) -> crate::deps::aws_cryptography_primitives::types::EccPrivateKey { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPrivateKey::ECCPrivateKey {..} => + crate::deps::aws_cryptography_primitives::types::EccPrivateKey::builder() + .set_pem(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.pem().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs new file mode 100644 index 000000000..33a364f53 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::EccPublicKey, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::EccPublicKey, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey::ECCPublicKey { + der: crate::standard_library_conversions::blob_to_dafny(&value.der.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey, + >, +) -> crate::deps::aws_cryptography_primitives::types::EccPublicKey { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey, +) -> crate::deps::aws_cryptography_primitives::types::EccPublicKey { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECCPublicKey::ECCPublicKey {..} => + crate::deps::aws_cryptography_primitives::types::EccPublicKey::builder() + .set_der(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.der().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs new file mode 100644 index 000000000..e8695973c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP256 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P256 {}, +crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP384 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P384 {}, +crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP521 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P521 {}, +crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::Sm2 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::SM2 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec, +) -> crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P256 {} => crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP256, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P384 {} => crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP384, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::ECC_NIST_P521 {} => crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::EccNistP521, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec::SM2 {} => crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec::Sm2, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs new file mode 100644 index 000000000..ba8481fd7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs @@ -0,0 +1,5 @@ +// 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 mod _ecdsa_sign_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign/_ecdsa_sign_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign/_ecdsa_sign_input.rs new file mode 100644 index 000000000..bcfa9e90d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign/_ecdsa_sign_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput::ECDSASignInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + signingKey: crate::standard_library_conversions::blob_to_dafny(&value.signing_key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput { + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_signing_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signingKey().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs new file mode 100644 index 000000000..84d5ab4a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::EcdsaSignInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::EcdsaSignInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput::ECDSASignInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + signingKey: crate::standard_library_conversions::blob_to_dafny(&value.signing_key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::EcdsaSignInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput, +) -> crate::deps::aws_cryptography_primitives::types::EcdsaSignInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput::ECDSASignInput {..} => + crate::deps::aws_cryptography_primitives::types::EcdsaSignInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_signing_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signingKey().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs new file mode 100644 index 000000000..d56904660 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm::EcdsaP384 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm::ECDSA_P384 {}, +crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm::EcdsaP256 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm::ECDSA_P256 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm, +) -> crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm::ECDSA_P384 {} => crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm::EcdsaP384, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm::ECDSA_P256 {} => crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm::EcdsaP256, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs new file mode 100644 index 000000000..36b744c48 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs @@ -0,0 +1,5 @@ +// 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 mod _ecdsa_verify_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify/_ecdsa_verify_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify/_ecdsa_verify_input.rs new file mode 100644 index 000000000..e4d4aaa8c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify/_ecdsa_verify_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput::ECDSAVerifyInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + verificationKey: crate::standard_library_conversions::blob_to_dafny(&value.verification_key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + signature: crate::standard_library_conversions::blob_to_dafny(&value.signature.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput { + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_verification_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.verificationKey().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .set_signature(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signature().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs new file mode 100644 index 000000000..a8f733346 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput::ECDSAVerifyInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + verificationKey: crate::standard_library_conversions::blob_to_dafny(&value.verification_key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + signature: crate::standard_library_conversions::blob_to_dafny(&value.signature.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput, +) -> crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput::ECDSAVerifyInput {..} => + crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_verification_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.verificationKey().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .set_signature(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signature().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/error.rs new file mode 100644 index 000000000..8b5b852be --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/error.rs @@ -0,0 +1,125 @@ +// 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. +/// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_primitives::types::error::Error::AwsCryptographicPrimitivesError { message } => + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::AwsCryptographicPrimitivesError { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, + crate::deps::aws_cryptography_primitives::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&list, |e| to_dafny(e.clone())) + }, + crate::deps::aws_cryptography_primitives::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::Opaque { + obj: { + let rc = ::std::rc::Rc::new(inner) as ::std::rc::Rc; + // safety: `rc` is new, ensuring it has refcount 1 and is uniquely owned. + // we should use `dafny_runtime_conversions::rc_struct_to_dafny_class` once it + // accepts unsized types (https://github.com/dafny-lang/dafny/pull/5769) + unsafe { ::dafny_runtime::Object::from_rc(rc) } + }, + }, + crate::deps::aws_cryptography_primitives::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_primitives::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::AwsCryptographicPrimitivesError { message } => + crate::deps::aws_cryptography_primitives::types::error::Error::AwsCryptographicPrimitivesError { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_primitives::types::error::Error::CollectionOfErrors { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + list: ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&list, |e| from_dafny(e.clone())) + }, + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_primitives::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_primitives::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_primitives::types::error::ValidationError); + crate::deps::aws_cryptography_primitives::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_primitives::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::primitives::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_primitives::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_primitives::types::error::ValidationError); + crate::deps::aws_cryptography_primitives::types::error::Error::ValidationError( + // safety: dafny_class_to_struct will increment ValidationError's Rc + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_struct(typed) + } + ) + } else { + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + } + } + }, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs new file mode 100644 index 000000000..81677e94f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs @@ -0,0 +1,7 @@ +// 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 mod _generate_ecc_key_pair_input; + + pub mod _generate_ecc_key_pair_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs new file mode 100644 index 000000000..0237175f7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput::GenerateECCKeyPairInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput { + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs new file mode 100644 index 000000000..05830f6cb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput::GenerateECCKeyPairOutput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput { + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_input.rs new file mode 100644 index 000000000..c51310ce3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput::GenerateECCKeyPairInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput::GenerateECCKeyPairInput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_output.rs new file mode 100644 index 000000000..c8473a738 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_output.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput::GenerateECCKeyPairOutput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput::GenerateECCKeyPairOutput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..56386fe9e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs @@ -0,0 +1,7 @@ +// 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 mod _generate_ecdsa_signature_key_input; + + pub mod _generate_ecdsa_signature_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs new file mode 100644 index 000000000..5aa62ce59 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput { + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs new file mode 100644 index 000000000..6c8acd84d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + verificationKey: crate::standard_library_conversions::blob_to_dafny(&value.verification_key.unwrap()), + signingKey: crate::standard_library_conversions::blob_to_dafny(&value.signing_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput { + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_verification_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.verificationKey().clone()))) + .set_signing_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signingKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_input.rs new file mode 100644 index 000000000..feda0baad --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_output.rs new file mode 100644 index 000000000..eb4043199 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_output.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput { + signatureAlgorithm: crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::to_dafny(value.signature_algorithm.clone().unwrap()), + verificationKey: crate::standard_library_conversions::blob_to_dafny(&value.verification_key.unwrap()), + signingKey: crate::standard_library_conversions::blob_to_dafny(&value.signing_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput::builder() + .set_signature_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::ecdsa_signature_algorithm::from_dafny(dafny_value.signatureAlgorithm()) )) + .set_verification_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.verificationKey().clone()))) + .set_signing_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.signingKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs new file mode 100644 index 000000000..edea89e9d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs @@ -0,0 +1,5 @@ +// 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 mod _generate_random_bytes_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes/_generate_random_bytes_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes/_generate_random_bytes_input.rs new file mode 100644 index 000000000..d5e68caeb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes/_generate_random_bytes_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput::GenerateRandomBytesInput { + length: value.length.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput { + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput::builder() + .set_length(Some( dafny_value.length() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs new file mode 100644 index 000000000..0f1940009 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput::GenerateRandomBytesInput { + length: value.length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput::GenerateRandomBytesInput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput::builder() + .set_length(Some( dafny_value.length() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs new file mode 100644 index 000000000..5e92b854f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs @@ -0,0 +1,7 @@ +// 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 mod _generate_rsa_key_pair_input; + + pub mod _generate_rsa_key_pair_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs new file mode 100644 index 000000000..4e5e5189c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput::GenerateRSAKeyPairInput { + lengthBits: value.length_bits.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput { + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput::builder() + .set_length_bits(Some( dafny_value.lengthBits() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs new file mode 100644 index 000000000..847254da6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::rsa_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + privateKey: crate::deps::aws_cryptography_primitives::conversions::rsa_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput { + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_input.rs new file mode 100644 index 000000000..f6b5d0854 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput::GenerateRSAKeyPairInput { + lengthBits: value.length_bits.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput::GenerateRSAKeyPairInput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput::builder() + .set_length_bits(Some( dafny_value.lengthBits() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_output.rs new file mode 100644 index 000000000..985ec87db --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_output.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::rsa_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + privateKey: crate::deps::aws_cryptography_primitives::conversions::rsa_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput, +) -> crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput {..} => + crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key.rs new file mode 100644 index 000000000..3fe9e1bca --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key.rs @@ -0,0 +1,7 @@ +// 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 mod _get_public_key_from_private_key_input; + + pub mod _get_public_key_from_private_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs new file mode 100644 index 000000000..93e79fd16 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput { + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs new file mode 100644 index 000000000..016fdeaf1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput { + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_input.rs new file mode 100644 index 000000000..025d80560 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_output.rs new file mode 100644 index 000000000..cec3b2ea6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_output.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + privateKey: crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::to_dafny(&value.private_key.clone().unwrap()) +, + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_private_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_private_key::from_dafny(dafny_value.privateKey().clone()) + )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length.rs new file mode 100644 index 000000000..c16e83b52 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length.rs @@ -0,0 +1,7 @@ +// 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 mod _get_rsa_key_modulus_length_input; + + pub mod _get_rsa_key_modulus_length_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs new file mode 100644 index 000000000..5b350dd6a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput { + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput { + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput::builder() + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs new file mode 100644 index 000000000..4673dd251 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput { + length: value.length.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput { + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput::builder() + .set_length(Some( dafny_value.length() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_input.rs new file mode 100644 index 000000000..3c1e46e26 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput { + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput, +) -> crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput {..} => + crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput::builder() + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_output.rs new file mode 100644 index 000000000..19e59f535 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput { + length: value.length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput, +) -> crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput {..} => + crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput::builder() + .set_length(Some( dafny_value.length() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs new file mode 100644 index 000000000..bb9f9c152 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs @@ -0,0 +1,5 @@ +// 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 mod _h_mac_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac/_h_mac_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac/_h_mac_input.rs new file mode 100644 index 000000000..bfb2b1bac --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac/_h_mac_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput::HMacInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput { + crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs new file mode 100644 index 000000000..84ba50913 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::HMacInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::HMacInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput::HMacInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + key: crate::standard_library_conversions::blob_to_dafny(&value.key.unwrap()), + message: crate::standard_library_conversions::blob_to_dafny(&value.message.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::HMacInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput, +) -> crate::deps::aws_cryptography_primitives::types::HMacInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HMacInput::HMacInput {..} => + crate::deps::aws_cryptography_primitives::types::HMacInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.key().clone()))) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.message().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs new file mode 100644 index 000000000..aaa7ec49b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs @@ -0,0 +1,5 @@ +// 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 mod _hkdf_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs new file mode 100644 index 000000000..57ee7e5d3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput::HkdfInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + salt: crate::standard_library_conversions::oblob_to_dafny(&value.salt), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + info: crate::standard_library_conversions::blob_to_dafny(&value.info.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput { + crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_salt(crate::standard_library_conversions::oblob_from_dafny(dafny_value.salt().clone())) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_info(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.info().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs new file mode 100644 index 000000000..90d67d92f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs @@ -0,0 +1,5 @@ +// 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 mod _hkdf_expand_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand/_hkdf_expand_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand/_hkdf_expand_input.rs new file mode 100644 index 000000000..5818a48df --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand/_hkdf_expand_input.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput::HkdfExpandInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + prk: crate::standard_library_conversions::blob_to_dafny(&value.prk.unwrap()), + info: crate::standard_library_conversions::blob_to_dafny(&value.info.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput { + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_prk(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.prk().clone()))) + .set_info(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.info().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs new file mode 100644 index 000000000..d12c2ea3b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs @@ -0,0 +1,76 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::HkdfExpandInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::HkdfExpandInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput::HkdfExpandInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + prk: crate::standard_library_conversions::blob_to_dafny(&value.prk.unwrap()), + info: crate::standard_library_conversions::blob_to_dafny(&value.info.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::HkdfExpandInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput, +) -> crate::deps::aws_cryptography_primitives::types::HkdfExpandInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput::HkdfExpandInput {..} => + crate::deps::aws_cryptography_primitives::types::HkdfExpandInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_prk(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.prk().clone()))) + .set_info(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.info().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs new file mode 100644 index 000000000..c7eae0189 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs @@ -0,0 +1,5 @@ +// 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 mod _hkdf_extract_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract/_hkdf_extract_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract/_hkdf_extract_input.rs new file mode 100644 index 000000000..9acf27d16 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract/_hkdf_extract_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput::HkdfExtractInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + salt: crate::standard_library_conversions::oblob_to_dafny(&value.salt), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput { + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_salt(crate::standard_library_conversions::oblob_from_dafny(dafny_value.salt().clone())) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs new file mode 100644 index 000000000..06bdb833e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::HkdfExtractInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::HkdfExtractInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput::HkdfExtractInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + salt: crate::standard_library_conversions::oblob_to_dafny(&value.salt), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::HkdfExtractInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput, +) -> crate::deps::aws_cryptography_primitives::types::HkdfExtractInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput::HkdfExtractInput {..} => + crate::deps::aws_cryptography_primitives::types::HkdfExtractInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_salt(crate::standard_library_conversions::oblob_from_dafny(dafny_value.salt().clone())) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs new file mode 100644 index 000000000..5c8d92eee --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::HkdfInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::HkdfInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput::HkdfInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + salt: crate::standard_library_conversions::oblob_to_dafny(&value.salt), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + info: crate::standard_library_conversions::blob_to_dafny(&value.info.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::HkdfInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput, +) -> crate::deps::aws_cryptography_primitives::types::HkdfInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::HkdfInput::HkdfInput {..} => + crate::deps::aws_cryptography_primitives::types::HkdfInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_salt(crate::standard_library_conversions::oblob_from_dafny(dafny_value.salt().clone())) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_info(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.info().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs new file mode 100644 index 000000000..8b8068509 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs @@ -0,0 +1,5 @@ +// 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 mod _kdf_counter_mode_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode/_kdf_counter_mode_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode/_kdf_counter_mode_input.rs new file mode 100644 index 000000000..3a35961c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode/_kdf_counter_mode_input.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput::KdfCtrInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + purpose: crate::standard_library_conversions::oblob_to_dafny(&value.purpose), + nonce: crate::standard_library_conversions::oblob_to_dafny(&value.nonce), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput { + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .set_purpose(crate::standard_library_conversions::oblob_from_dafny(dafny_value.purpose().clone())) + .set_nonce(crate::standard_library_conversions::oblob_from_dafny(dafny_value.nonce().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs new file mode 100644 index 000000000..382235be5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::KdfCtrInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::KdfCtrInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput::KdfCtrInput { + digestAlgorithm: crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::to_dafny(value.digest_algorithm.clone().unwrap()), + ikm: crate::standard_library_conversions::blob_to_dafny(&value.ikm.unwrap()), + expectedLength: value.expected_length.clone().unwrap(), + purpose: crate::standard_library_conversions::oblob_to_dafny(&value.purpose), + nonce: crate::standard_library_conversions::oblob_to_dafny(&value.nonce), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::KdfCtrInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput, +) -> crate::deps::aws_cryptography_primitives::types::KdfCtrInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput::KdfCtrInput {..} => + crate::deps::aws_cryptography_primitives::types::KdfCtrInput::builder() + .set_digest_algorithm(Some( crate::deps::aws_cryptography_primitives::conversions::digest_algorithm::from_dafny(dafny_value.digestAlgorithm()) )) + .set_ikm(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ikm().clone()))) + .set_expected_length(Some( dafny_value.expectedLength() .clone() )) + .set_purpose(crate::standard_library_conversions::oblob_from_dafny(dafny_value.purpose().clone())) + .set_nonce(crate::standard_library_conversions::oblob_from_dafny(dafny_value.nonce().clone())) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs new file mode 100644 index 000000000..d9dc23726 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs @@ -0,0 +1,7 @@ +// 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 mod _parse_public_key_input; + + pub mod _parse_public_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_input.rs new file mode 100644 index 000000000..ea1c372bf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_input.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput::ParsePublicKeyInput { + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput { + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput::builder() + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_output.rs new file mode 100644 index 000000000..f72e623a1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_output.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput::ParsePublicKeyOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput { + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs new file mode 100644 index 000000000..d4d93af1b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput::ParsePublicKeyInput { + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput::ParsePublicKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput::builder() + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs new file mode 100644 index 000000000..b3c424c68 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput::ParsePublicKeyOutput { + publicKey: crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::to_dafny(&value.public_key.clone().unwrap()) +, + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput::ParsePublicKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput::builder() + .set_public_key(Some( crate::deps::aws_cryptography_primitives::conversions::ecc_public_key::from_dafny(dafny_value.publicKey().clone()) + )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs new file mode 100644 index 000000000..39bbfe2ac --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs @@ -0,0 +1,5 @@ +// 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 mod _rsa_decrypt_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt/_rsa_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt/_rsa_decrypt_input.rs new file mode 100644 index 000000000..a3f591242 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt/_rsa_decrypt_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput::RSADecryptInput { + padding: crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::to_dafny(value.padding.clone().unwrap()), + privateKey: crate::standard_library_conversions::blob_to_dafny(&value.private_key.unwrap()), + cipherText: crate::standard_library_conversions::blob_to_dafny(&value.cipher_text.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput { + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput::builder() + .set_padding(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::from_dafny(dafny_value.padding()) )) + .set_private_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.privateKey().clone()))) + .set_cipher_text(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherText().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs new file mode 100644 index 000000000..cb2bfaafd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::RsaDecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::RsaDecryptInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput::RSADecryptInput { + padding: crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::to_dafny(value.padding.clone().unwrap()), + privateKey: crate::standard_library_conversions::blob_to_dafny(&value.private_key.unwrap()), + cipherText: crate::standard_library_conversions::blob_to_dafny(&value.cipher_text.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::RsaDecryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput, +) -> crate::deps::aws_cryptography_primitives::types::RsaDecryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput::RSADecryptInput {..} => + crate::deps::aws_cryptography_primitives::types::RsaDecryptInput::builder() + .set_padding(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::from_dafny(dafny_value.padding()) )) + .set_private_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.privateKey().clone()))) + .set_cipher_text(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.cipherText().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs new file mode 100644 index 000000000..084b5d2b1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs @@ -0,0 +1,5 @@ +// 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 mod _rsa_encrypt_input; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt/_rsa_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt/_rsa_encrypt_input.rs new file mode 100644 index 000000000..8fa9942cb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt/_rsa_encrypt_input.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput::RSAEncryptInput { + padding: crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::to_dafny(value.padding.clone().unwrap()), + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput { + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput::builder() + .set_padding(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::from_dafny(dafny_value.padding()) )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs new file mode 100644 index 000000000..db0220e08 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::RsaEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::RsaEncryptInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput::RSAEncryptInput { + padding: crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::to_dafny(value.padding.clone().unwrap()), + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + plaintext: crate::standard_library_conversions::blob_to_dafny(&value.plaintext.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::RsaEncryptInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput, +) -> crate::deps::aws_cryptography_primitives::types::RsaEncryptInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput::RSAEncryptInput {..} => + crate::deps::aws_cryptography_primitives::types::RsaEncryptInput::builder() + .set_padding(Some( crate::deps::aws_cryptography_primitives::conversions::rsa_padding_mode::from_dafny(dafny_value.padding()) )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.plaintext().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs new file mode 100644 index 000000000..7803086c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::types::RsaPaddingMode, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::Pkcs1 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::PKCS1 {}, +crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha1 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA1 {}, +crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha256 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA256 {}, +crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha384 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA384 {}, +crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha512 => crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA512 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode, +) -> crate::deps::aws_cryptography_primitives::types::RsaPaddingMode { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::PKCS1 {} => crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::Pkcs1, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA1 {} => crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha1, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA256 {} => crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha256, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA384 {} => crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha384, +crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPaddingMode::OAEP_SHA512 {} => crate::deps::aws_cryptography_primitives::types::RsaPaddingMode::OaepSha512, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs new file mode 100644 index 000000000..337f913aa --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::RsaPrivateKey, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::RsaPrivateKey, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey::RSAPrivateKey { + lengthBits: value.length_bits.clone().unwrap(), + pem: crate::standard_library_conversions::blob_to_dafny(&value.pem.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey, + >, +) -> crate::deps::aws_cryptography_primitives::types::RsaPrivateKey { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey, +) -> crate::deps::aws_cryptography_primitives::types::RsaPrivateKey { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPrivateKey::RSAPrivateKey {..} => + crate::deps::aws_cryptography_primitives::types::RsaPrivateKey::builder() + .set_length_bits(Some( dafny_value.lengthBits() .clone() )) + .set_pem(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.pem().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs new file mode 100644 index 000000000..ea2445595 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::RsaPublicKey, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::RsaPublicKey, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey::RSAPublicKey { + lengthBits: value.length_bits.clone().unwrap(), + pem: crate::standard_library_conversions::blob_to_dafny(&value.pem.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey, + >, +) -> crate::deps::aws_cryptography_primitives::types::RsaPublicKey { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey, +) -> crate::deps::aws_cryptography_primitives::types::RsaPublicKey { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::RSAPublicKey::RSAPublicKey {..} => + crate::deps::aws_cryptography_primitives::types::RsaPublicKey::builder() + .set_length_bits(Some( dafny_value.lengthBits() .clone() )) + .set_pem(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.pem().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs new file mode 100644 index 000000000..d62a4a550 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs @@ -0,0 +1,7 @@ +// 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 mod _validate_public_key_input; + + pub mod _validate_public_key_output; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_input.rs new file mode 100644 index 000000000..14992dbb8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_input.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput::ValidatePublicKeyInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput { + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_output.rs new file mode 100644 index 000000000..35c49a69d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_output.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput::ValidatePublicKeyOutput { + success: value.success.clone().unwrap(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput { + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput::builder() + .set_success(Some( dafny_value.success() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs new file mode 100644 index 000000000..72861e672 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs @@ -0,0 +1,72 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput::ValidatePublicKeyInput { + eccCurve: crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::to_dafny(value.ecc_curve.clone().unwrap()), + publicKey: crate::standard_library_conversions::blob_to_dafny(&value.public_key.unwrap()), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput, + >, +) -> crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput, +) -> crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput::ValidatePublicKeyInput {..} => + crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput::builder() + .set_ecc_curve(Some( crate::deps::aws_cryptography_primitives::conversions::ecdh_curve_spec::from_dafny(dafny_value.eccCurve()) )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.publicKey().clone()))) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs new file mode 100644 index 000000000..b759809e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput, +) -> crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput::ValidatePublicKeyOutput { + success: value.success.clone().unwrap(), + } +} + +#[allow(dead_code)] +pub fn option_to_dafny( + value: ::std::option::Option, +) -> ::std::rc::Rc>>{ + ::std::rc::Rc::new(match value { + ::std::option::Option::None => crate::_Wrappers_Compile::Option::None {}, + ::std::option::Option::Some(x) => crate::_Wrappers_Compile::Option::Some { + value: ::std::rc::Rc::new(to_dafny_plain(x)), + }, + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput, + >, +) -> crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput, +) -> crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput::ValidatePublicKeyOutput {..} => + crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput::builder() + .set_success(Some( dafny_value.success() .clone() )) + .build() + .unwrap() + } +} + +#[allow(dead_code)] +pub fn option_from_dafny( + dafny_value: ::std::rc::Rc>>, +) -> ::std::option::Option { + match &*dafny_value { + crate::_Wrappers_Compile::Option::Some { value } => { + ::std::option::Option::Some(plain_from_dafny(value)) + } + _ => ::std::option::Option::None, + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/deps.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/deps.rs @@ -0,0 +1,3 @@ +// 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. diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/error.rs @@ -0,0 +1,16 @@ +// 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 use ::aws_smithy_runtime_api::box_error::BoxError; + +/// Error type returned by the client. +pub type SdkError = + ::aws_smithy_runtime_api::client::result::SdkError; +pub use ::aws_smithy_runtime_api::client::result::ConnectorError; +pub use ::aws_smithy_types::error::operation::BuildError; + +pub use ::aws_smithy_types::error::display::DisplayErrorContext; +pub use ::aws_smithy_types::error::metadata::ErrorMetadata; +pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + +pub(crate) mod sealed_unhandled; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs @@ -0,0 +1,32 @@ +// 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. +use std::any::Any; + +use dafny_runtime::UpcastObject; + +/// This struct is not intended to be used. +/// +/// This struct holds information about an unhandled error, +/// but that information should be obtained by using the +/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait +/// on the error type. +/// +/// This struct intentionally doesn't yield any useful information itself. +#[deprecated( + note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ +variable wildcard pattern and check `.code()`: + \ +   `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ +See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." +)] +#[derive(Debug)] +pub struct Unhandled { + pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, + pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, +} + +impl UpcastObject for Unhandled { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation.rs new file mode 100644 index 000000000..2ecbbceda --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation.rs @@ -0,0 +1,74 @@ +// 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. +/// Types for the `AESDecrypt` operation. +pub mod aes_decrypt; + +/// Types for the `AESEncrypt` operation. +pub mod aes_encrypt; + +/// Types for the `AesKdfCounterMode` operation. +pub mod aes_kdf_counter_mode; + +/// Types for the `CompressPublicKey` operation. +pub mod compress_public_key; + +/// Types for the `DecompressPublicKey` operation. +pub mod decompress_public_key; + +/// Types for the `DeriveSharedSecret` operation. +pub mod derive_shared_secret; + +/// Types for the `Digest` operation. +pub mod digest; + +/// Types for the `ECDSASign` operation. +pub mod ecdsa_sign; + +/// Types for the `ECDSAVerify` operation. +pub mod ecdsa_verify; + +/// Types for the `GenerateECCKeyPair` operation. +pub mod generate_ecc_key_pair; + +/// Types for the `GenerateECDSASignatureKey` operation. +pub mod generate_ecdsa_signature_key; + +/// Types for the `GenerateRSAKeyPair` operation. +pub mod generate_rsa_key_pair; + +/// Types for the `GenerateRandomBytes` operation. +pub mod generate_random_bytes; + +/// Types for the `GetPublicKeyFromPrivateKey` operation. +pub mod get_public_key_from_private_key; + +/// Types for the `GetRSAKeyModulusLength` operation. +pub mod get_rsa_key_modulus_length; + +/// Types for the `HMac` operation. +pub mod h_mac; + +/// Types for the `HkdfExpand` operation. +pub mod hkdf_expand; + +/// Types for the `HkdfExtract` operation. +pub mod hkdf_extract; + +/// Types for the `Hkdf` operation. +pub mod hkdf; + +/// Types for the `KdfCounterMode` operation. +pub mod kdf_counter_mode; + +/// Types for the `ParsePublicKey` operation. +pub mod parse_public_key; + +/// Types for the `RSADecrypt` operation. +pub mod rsa_decrypt; + +/// Types for the `RSAEncrypt` operation. +pub mod rsa_encrypt; + +/// Types for the `ValidatePublicKey` operation. +pub mod validate_public_key; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs new file mode 100644 index 000000000..61bc4abb6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs @@ -0,0 +1,84 @@ +// 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. +/// Orchestration and serialization glue logic for `AesDecrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AesDecrypt; +impl AesDecrypt { + /// Creates a new `AesDecrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::aes_decrypt::_aes_decrypt_output::AesDecryptOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_decrypt::_aes_decrypt_input::AesDecryptInput; + +pub(crate) mod _aes_decrypt_output; + +pub(crate) mod _aes_decrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_input.rs new file mode 100644 index 000000000..4f72c51d4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesDecryptInput { + #[allow(missing_docs)] +pub aad: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub cipher_txt: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub enc_alg: ::std::option::Option, +#[allow(missing_docs)] +pub iv: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptInput { + #[allow(missing_docs)] +pub fn aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_txt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_txt +} +#[allow(missing_docs)] +pub fn enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +} +impl AesDecryptInput { + /// Creates a new builder-style object to manufacture [`AesDecryptInput`](crate::operation::aes_decrypt::builders::AesDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptInputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptInputBuilder::default() + } +} + +/// A builder for [`AesDecryptInput`](crate::operation::operation::AesDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesDecryptInputBuilder { + pub(crate) aad: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) cipher_txt: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) enc_alg: ::std::option::Option, +pub(crate) iv: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptInputBuilder { + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.aad = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.aad = input; + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn auth_tag(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_tag(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_txt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_txt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_txt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_txt = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_txt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_txt +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.enc_alg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.enc_alg = input; + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.iv = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.iv = input; + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} + /// Consumes the builder and constructs a [`AesDecryptInput`](crate::operation::operation::AesDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput { + aad: self.aad, +auth_tag: self.auth_tag, +cipher_txt: self.cipher_txt, +enc_alg: self.enc_alg, +iv: self.iv, +key: self.key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_output.rs new file mode 100644 index 000000000..7dd94d0e4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesDecryptOutput { + #[allow(missing_docs)] +pub plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptOutput { + #[allow(missing_docs)] +pub fn plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +} +impl AesDecryptOutput { + /// Creates a new builder-style object to manufacture [`AesDecryptOutput`](crate::operation::aes_decrypt::builders::AesDecryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptOutputBuilder::default() + } +} + +/// A builder for [`AesDecryptOutput`](crate::operation::operation::AesDecryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesDecryptOutputBuilder { + pub(crate) plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptOutputBuilder { + #[allow(missing_docs)] +pub fn plaintext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} + /// Consumes the builder and constructs a [`AesDecryptOutput`](crate::operation::operation::AesDecryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptOutput { + plaintext: self.plaintext, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs new file mode 100644 index 000000000..3f1aa0e78 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs @@ -0,0 +1,148 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::aes_decrypt::_aes_decrypt_output::AesDecryptOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_decrypt::_aes_decrypt_input::AesDecryptInputBuilder; + +impl AesDecryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.aes_decrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `AesDecrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct AesDecryptFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptInputBuilder, +} +impl AesDecryptFluentBuilder { + /// Creates a new `AesDecrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the AesDecrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::aes_decrypt::builders::AesDecryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.aad(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_aad(input); + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_aad() +} +#[allow(missing_docs)] +pub fn auth_tag(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.auth_tag(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_tag(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_auth_tag(input); + self +} +#[allow(missing_docs)] +pub fn get_auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_auth_tag() +} +#[allow(missing_docs)] +pub fn cipher_txt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.cipher_txt(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_txt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_cipher_txt(input); + self +} +#[allow(missing_docs)] +pub fn get_cipher_txt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_cipher_txt() +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.enc_alg(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_enc_alg(input); + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + self.inner.get_enc_alg() +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.iv(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_iv(input); + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_iv() +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_key(input); + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs new file mode 100644 index 000000000..116608779 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs @@ -0,0 +1,78 @@ +// 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. +/// Orchestration and serialization glue logic for `AesEncrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AesEncrypt; +impl AesEncrypt { + /// Creates a new `AesEncrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::aes_encrypt::_aes_encrypt_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::aes_encrypt::_aes_encrypt_output::AesEncryptOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_encrypt::_aes_encrypt_input::AesEncryptInput; + +pub(crate) mod _aes_encrypt_output; + +pub(crate) mod _aes_encrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_input.rs new file mode 100644 index 000000000..97cfeda81 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesEncryptInput { + #[allow(missing_docs)] +pub aad: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub enc_alg: ::std::option::Option, +#[allow(missing_docs)] +pub iv: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub msg: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptInput { + #[allow(missing_docs)] +pub fn aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn msg(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.msg +} +} +impl AesEncryptInput { + /// Creates a new builder-style object to manufacture [`AesEncryptInput`](crate::operation::aes_encrypt::builders::AesEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptInputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptInputBuilder::default() + } +} + +/// A builder for [`AesEncryptInput`](crate::operation::operation::AesEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesEncryptInputBuilder { + pub(crate) aad: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) enc_alg: ::std::option::Option, +pub(crate) iv: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) msg: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptInputBuilder { + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.aad = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.aad = input; + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.enc_alg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.enc_alg = input; + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.iv = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.iv = input; + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn msg(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.msg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_msg(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.msg = input; + self +} +#[allow(missing_docs)] +pub fn get_msg(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.msg +} + /// Consumes the builder and constructs a [`AesEncryptInput`](crate::operation::operation::AesEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput { + aad: self.aad, +enc_alg: self.enc_alg, +iv: self.iv, +key: self.key, +msg: self.msg, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_output.rs new file mode 100644 index 000000000..1930dba8c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_output.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesEncryptOutput { + #[allow(missing_docs)] +pub auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptOutput { + #[allow(missing_docs)] +pub fn auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +} +impl AesEncryptOutput { + /// Creates a new builder-style object to manufacture [`AesEncryptOutput`](crate::operation::aes_encrypt::builders::AesEncryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptOutputBuilder::default() + } +} + +/// A builder for [`AesEncryptOutput`](crate::operation::operation::AesEncryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesEncryptOutputBuilder { + pub(crate) auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptOutputBuilder { + #[allow(missing_docs)] +pub fn auth_tag(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_tag(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} + /// Consumes the builder and constructs a [`AesEncryptOutput`](crate::operation::operation::AesEncryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput { + auth_tag: self.auth_tag, +cipher_text: self.cipher_text, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs new file mode 100644 index 000000000..ea3a69efb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::aes_encrypt::_aes_encrypt_output::AesEncryptOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_encrypt::_aes_encrypt_input::AesEncryptInputBuilder; + +impl AesEncryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.aes_encrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `AesEncrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct AesEncryptFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptInputBuilder, +} +impl AesEncryptFluentBuilder { + /// Creates a new `AesEncrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the AesEncrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::aes_encrypt::builders::AesEncryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.aad(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_aad(input); + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_aad() +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.enc_alg(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_enc_alg(input); + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + self.inner.get_enc_alg() +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.iv(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_iv(input); + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_iv() +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_key(input); + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_key() +} +#[allow(missing_docs)] +pub fn msg(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.msg(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_msg(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_msg(input); + self +} +#[allow(missing_docs)] +pub fn get_msg(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_msg() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..701ef36c4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `AesKdfCounterMode`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AesKdfCounterMode; +impl AesKdfCounterMode { + /// Creates a new `AesKdfCounterMode` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::_aes_kdf_ctr_output::AesKdfCtrOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::_aes_kdf_ctr_input::AesKdfCtrInput; + +pub(crate) mod _aes_kdf_ctr_output; + +pub(crate) mod _aes_kdf_ctr_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_input.rs new file mode 100644 index 000000000..94442b5f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesKdfCtrInput { + #[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub nonce: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrInput { + #[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +} +impl AesKdfCtrInput { + /// Creates a new builder-style object to manufacture [`AesKdfCtrInput`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCtrInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrInputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrInputBuilder::default() + } +} + +/// A builder for [`AesKdfCtrInput`](crate::operation::operation::AesKdfCtrInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesKdfCtrInputBuilder { + pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) nonce: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrInputBuilder { + #[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.nonce = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.nonce = input; + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} + /// Consumes the builder and constructs a [`AesKdfCtrInput`](crate::operation::operation::AesKdfCtrInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput { + expected_length: self.expected_length, +ikm: self.ikm, +nonce: self.nonce, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_output.rs new file mode 100644 index 000000000..b5021d923 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesKdfCtrOutput { + #[allow(missing_docs)] +pub okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrOutput { + #[allow(missing_docs)] +pub fn okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} +} +impl AesKdfCtrOutput { + /// Creates a new builder-style object to manufacture [`AesKdfCtrOutput`](crate::operation::aes_kdf_counter_mode::builders::AesKdfCtrOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrOutputBuilder::default() + } +} + +/// A builder for [`AesKdfCtrOutput`](crate::operation::operation::AesKdfCtrOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesKdfCtrOutputBuilder { + pub(crate) okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrOutputBuilder { + #[allow(missing_docs)] +pub fn okm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.okm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_okm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.okm = input; + self +} +#[allow(missing_docs)] +pub fn get_okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} + /// Consumes the builder and constructs a [`AesKdfCtrOutput`](crate::operation::operation::AesKdfCtrOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrOutput { + okm: self.okm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/builders.rs new file mode 100644 index 000000000..9c08bd672 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::_aes_kdf_ctr_output::AesKdfCtrOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::_aes_kdf_ctr_input::AesKdfCtrInputBuilder; + +impl AesKdfCtrInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.aes_kdf_counter_mode(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `AesKdfCounterMode`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct AesKdfCounterModeFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrInputBuilder, +} +impl AesKdfCounterModeFluentBuilder { + /// Creates a new `AesKdfCounterMode`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the AesKdfCounterMode as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::builders::AesKdfCtrInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCounterMode::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.expected_length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_expected_length(input); + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_expected_length() +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.ikm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_ikm(input); + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_ikm() +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.nonce(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_nonce(input); + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_nonce() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs new file mode 100644 index 000000000..c53de31cd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `CompressPublicKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CompressPublicKey; +impl CompressPublicKey { + /// Creates a new `CompressPublicKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::compress_public_key::_compress_public_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::compress_public_key::_compress_public_key_output::CompressPublicKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::compress_public_key::_compress_public_key_input::CompressPublicKeyInput; + +pub(crate) mod _compress_public_key_output; + +pub(crate) mod _compress_public_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_input.rs new file mode 100644 index 000000000..fc9b97589 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CompressPublicKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl CompressPublicKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl CompressPublicKeyInput { + /// Creates a new builder-style object to manufacture [`CompressPublicKeyInput`](crate::operation::compress_public_key::builders::CompressPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyInputBuilder::default() + } +} + +/// A builder for [`CompressPublicKeyInput`](crate::operation::operation::CompressPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CompressPublicKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl CompressPublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`CompressPublicKeyInput`](crate::operation::operation::CompressPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput { + ecc_curve: self.ecc_curve, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_output.rs new file mode 100644 index 000000000..122120a85 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CompressPublicKeyOutput { + #[allow(missing_docs)] +pub compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CompressPublicKeyOutput { + #[allow(missing_docs)] +pub fn compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +} +impl CompressPublicKeyOutput { + /// Creates a new builder-style object to manufacture [`CompressPublicKeyOutput`](crate::operation::compress_public_key::builders::CompressPublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyOutputBuilder::default() + } +} + +/// A builder for [`CompressPublicKeyOutput`](crate::operation::operation::CompressPublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CompressPublicKeyOutputBuilder { + pub(crate) compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CompressPublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn compressed_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_compressed_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} + /// Consumes the builder and constructs a [`CompressPublicKeyOutput`](crate::operation::operation::CompressPublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput { + compressed_public_key: self.compressed_public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs new file mode 100644 index 000000000..50a3ad467 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::compress_public_key::_compress_public_key_output::CompressPublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::compress_public_key::_compress_public_key_input::CompressPublicKeyInputBuilder; + +impl CompressPublicKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.compress_public_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CompressPublicKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CompressPublicKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyInputBuilder, +} +impl CompressPublicKeyFluentBuilder { + /// Creates a new `CompressPublicKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CompressPublicKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::compress_public_key::builders::CompressPublicKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs new file mode 100644 index 000000000..5250af0a1 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `DecompressPublicKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecompressPublicKey; +impl DecompressPublicKey { + /// Creates a new `DecompressPublicKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::decompress_public_key::_decompress_public_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::decompress_public_key::_decompress_public_key_output::DecompressPublicKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::decompress_public_key::_decompress_public_key_input::DecompressPublicKeyInput; + +pub(crate) mod _decompress_public_key_output; + +pub(crate) mod _decompress_public_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_input.rs new file mode 100644 index 000000000..1acce1b26 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecompressPublicKeyInput { + #[allow(missing_docs)] +pub compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +} +impl DecompressPublicKeyInput { + #[allow(missing_docs)] +pub fn compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +#[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +} +impl DecompressPublicKeyInput { + /// Creates a new builder-style object to manufacture [`DecompressPublicKeyInput`](crate::operation::decompress_public_key::builders::DecompressPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyInputBuilder::default() + } +} + +/// A builder for [`DecompressPublicKeyInput`](crate::operation::operation::DecompressPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecompressPublicKeyInputBuilder { + pub(crate) compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) ecc_curve: ::std::option::Option, +} +impl DecompressPublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn compressed_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_compressed_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +#[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} + /// Consumes the builder and constructs a [`DecompressPublicKeyInput`](crate::operation::operation::DecompressPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput { + compressed_public_key: self.compressed_public_key, +ecc_curve: self.ecc_curve, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_output.rs new file mode 100644 index 000000000..7370a12c6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecompressPublicKeyOutput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl DecompressPublicKeyOutput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl DecompressPublicKeyOutput { + /// Creates a new builder-style object to manufacture [`DecompressPublicKeyOutput`](crate::operation::decompress_public_key::builders::DecompressPublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyOutputBuilder::default() + } +} + +/// A builder for [`DecompressPublicKeyOutput`](crate::operation::operation::DecompressPublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecompressPublicKeyOutputBuilder { + pub(crate) public_key: ::std::option::Option, +} +impl DecompressPublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`DecompressPublicKeyOutput`](crate::operation::operation::DecompressPublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs new file mode 100644 index 000000000..b0c824215 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::decompress_public_key::_decompress_public_key_output::DecompressPublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::decompress_public_key::_decompress_public_key_input::DecompressPublicKeyInputBuilder; + +impl DecompressPublicKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.decompress_public_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecompressPublicKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecompressPublicKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyInputBuilder, +} +impl DecompressPublicKeyFluentBuilder { + /// Creates a new `DecompressPublicKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DecompressPublicKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::decompress_public_key::builders::DecompressPublicKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn compressed_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.compressed_public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_compressed_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_compressed_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_compressed_public_key() +} +#[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs new file mode 100644 index 000000000..f28d5c639 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `DeriveSharedSecret`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DeriveSharedSecret; +impl DeriveSharedSecret { + /// Creates a new `DeriveSharedSecret` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::derive_shared_secret::_derive_shared_secret_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::_derive_shared_secret_output::DeriveSharedSecretOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::_derive_shared_secret_input::DeriveSharedSecretInput; + +pub(crate) mod _derive_shared_secret_output; + +pub(crate) mod _derive_shared_secret_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_input.rs new file mode 100644 index 000000000..f5b49185d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeriveSharedSecretInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl DeriveSharedSecretInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl DeriveSharedSecretInput { + /// Creates a new builder-style object to manufacture [`DeriveSharedSecretInput`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder { + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder::default() + } +} + +/// A builder for [`DeriveSharedSecretInput`](crate::operation::operation::DeriveSharedSecretInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeriveSharedSecretInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl DeriveSharedSecretInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`DeriveSharedSecretInput`](crate::operation::operation::DeriveSharedSecretInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_output.rs new file mode 100644 index 000000000..2aa81ad7a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeriveSharedSecretOutput { + #[allow(missing_docs)] +pub shared_secret: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeriveSharedSecretOutput { + #[allow(missing_docs)] +pub fn shared_secret(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.shared_secret +} +} +impl DeriveSharedSecretOutput { + /// Creates a new builder-style object to manufacture [`DeriveSharedSecretOutput`](crate::operation::derive_shared_secret::builders::DeriveSharedSecretOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretOutputBuilder::default() + } +} + +/// A builder for [`DeriveSharedSecretOutput`](crate::operation::operation::DeriveSharedSecretOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeriveSharedSecretOutputBuilder { + pub(crate) shared_secret: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeriveSharedSecretOutputBuilder { + #[allow(missing_docs)] +pub fn shared_secret(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.shared_secret = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_shared_secret(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.shared_secret = input; + self +} +#[allow(missing_docs)] +pub fn get_shared_secret(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.shared_secret +} + /// Consumes the builder and constructs a [`DeriveSharedSecretOutput`](crate::operation::operation::DeriveSharedSecretOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput { + shared_secret: self.shared_secret, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs new file mode 100644 index 000000000..0bd13a11d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::_derive_shared_secret_output::DeriveSharedSecretOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::_derive_shared_secret_input::DeriveSharedSecretInputBuilder; + +impl DeriveSharedSecretInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.derive_shared_secret(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DeriveSharedSecret`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DeriveSharedSecretFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder, +} +impl DeriveSharedSecretFluentBuilder { + /// Creates a new `DeriveSharedSecret`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DeriveSharedSecret as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecret::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.private_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_private_key(input); + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + self.inner.get_private_key() +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest.rs new file mode 100644 index 000000000..2c88644a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `Digest`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct Digest; +impl Digest { + /// Creates a new `Digest` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::digest::DigestInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::digest::_digest_output::DigestOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::digest::_digest_input::DigestInput; + +pub(crate) mod _digest_output; + +pub(crate) mod _digest_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs new file mode 100644 index 000000000..c8a2d35ef --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DigestInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +} +impl DigestInput { + /// Creates a new builder-style object to manufacture [`DigestInput`](crate::operation::digest::builders::DigestInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestInputBuilder { + crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestInputBuilder::default() + } +} + +/// A builder for [`DigestInput`](crate::operation::operation::DigestInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DigestInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} + /// Consumes the builder and constructs a [`DigestInput`](crate::operation::operation::DigestInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::digest::DigestInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::digest::DigestInput { + digest_algorithm: self.digest_algorithm, +message: self.message, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs new file mode 100644 index 000000000..3032ce2ed --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DigestOutput { + #[allow(missing_docs)] +pub digest: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestOutput { + #[allow(missing_docs)] +pub fn digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.digest +} +} +impl DigestOutput { + /// Creates a new builder-style object to manufacture [`DigestOutput`](crate::operation::digest::builders::DigestOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestOutputBuilder::default() + } +} + +/// A builder for [`DigestOutput`](crate::operation::operation::DigestOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DigestOutputBuilder { + pub(crate) digest: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestOutputBuilder { + #[allow(missing_docs)] +pub fn digest(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.digest = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.digest = input; + self +} +#[allow(missing_docs)] +pub fn get_digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.digest +} + /// Consumes the builder and constructs a [`DigestOutput`](crate::operation::operation::DigestOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::digest::DigestOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::digest::DigestOutput { + digest: self.digest, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs new file mode 100644 index 000000000..8f2baccde --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::digest::_digest_output::DigestOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::digest::_digest_input::DigestInputBuilder; + +impl DigestInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.digest(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `Digest`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DigestFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestInputBuilder, +} +impl DigestFluentBuilder { + /// Creates a new `Digest`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the Digest as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::digest::builders::DigestInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::digest::Digest::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.message(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_message(input); + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_message() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs new file mode 100644 index 000000000..764285cd4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `EcdsaSign`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EcdsaSign; +impl EcdsaSign { + /// Creates a new `EcdsaSign` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::_ecdsa_sign_output::EcdsaSignOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::_ecdsa_sign_input::EcdsaSignInput; + +pub(crate) mod _ecdsa_sign_output; + +pub(crate) mod _ecdsa_sign_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_input.rs new file mode 100644 index 000000000..3dac47d98 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaSignInput { + #[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignInput { + #[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +} +impl EcdsaSignInput { + /// Creates a new builder-style object to manufacture [`EcdsaSignInput`](crate::operation::ecdsa_sign::builders::EcdsaSignInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignInputBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignInputBuilder::default() + } +} + +/// A builder for [`EcdsaSignInput`](crate::operation::operation::EcdsaSignInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaSignInputBuilder { + pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignInputBuilder { + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} + /// Consumes the builder and constructs a [`EcdsaSignInput`](crate::operation::operation::EcdsaSignInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput { + message: self.message, +signature_algorithm: self.signature_algorithm, +signing_key: self.signing_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_output.rs new file mode 100644 index 000000000..e5674bd98 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaSignOutput { + #[allow(missing_docs)] +pub signature: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignOutput { + #[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} +} +impl EcdsaSignOutput { + /// Creates a new builder-style object to manufacture [`EcdsaSignOutput`](crate::operation::ecdsa_sign::builders::EcdsaSignOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignOutputBuilder::default() + } +} + +/// A builder for [`EcdsaSignOutput`](crate::operation::operation::EcdsaSignOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaSignOutputBuilder { + pub(crate) signature: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignOutputBuilder { + #[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} + /// Consumes the builder and constructs a [`EcdsaSignOutput`](crate::operation::operation::EcdsaSignOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignOutput { + signature: self.signature, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs new file mode 100644 index 000000000..23f9f07b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::_ecdsa_sign_output::EcdsaSignOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::_ecdsa_sign_input::EcdsaSignInputBuilder; + +impl EcdsaSignInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.ecdsa_sign(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EcdsaSign`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EcdsaSignFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignInputBuilder, +} +impl EcdsaSignFluentBuilder { + /// Creates a new `EcdsaSign`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EcdsaSign as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::builders::EcdsaSignInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSign::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.message(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_message(input); + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_message() +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.signature_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_signature_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + self.inner.get_signature_algorithm() +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.signing_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_signing_key(input); + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_signing_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs new file mode 100644 index 000000000..cb477c2bb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs @@ -0,0 +1,72 @@ +// 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. +/// Orchestration and serialization glue logic for `EcdsaVerify`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EcdsaVerify; +impl EcdsaVerify { + /// Creates a new `EcdsaVerify` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + inner_result.value() .clone(), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::_ecdsa_verify_output::EcdsaVerifyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::_ecdsa_verify_input::EcdsaVerifyInput; + +pub(crate) mod _ecdsa_verify_output; + +pub(crate) mod _ecdsa_verify_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_input.rs new file mode 100644 index 000000000..bfd32523b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaVerifyInput { + #[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaVerifyInput { + #[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} +#[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl EcdsaVerifyInput { + /// Creates a new builder-style object to manufacture [`EcdsaVerifyInput`](crate::operation::ecdsa_verify::builders::EcdsaVerifyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyInputBuilder::default() + } +} + +/// A builder for [`EcdsaVerifyInput`](crate::operation::operation::EcdsaVerifyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaVerifyInputBuilder { + pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaVerifyInputBuilder { + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`EcdsaVerifyInput`](crate::operation::operation::EcdsaVerifyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput { + message: self.message, +signature: self.signature, +signature_algorithm: self.signature_algorithm, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_output.rs new file mode 100644 index 000000000..58967b5b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaVerifyOutput { + #[allow(missing_docs)] +pub success: ::std::option::Option<::std::primitive::bool>, +} +impl EcdsaVerifyOutput { + #[allow(missing_docs)] +pub fn success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} +} +impl EcdsaVerifyOutput { + /// Creates a new builder-style object to manufacture [`EcdsaVerifyOutput`](crate::operation::ecdsa_verify::builders::EcdsaVerifyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyOutputBuilder::default() + } +} + +/// A builder for [`EcdsaVerifyOutput`](crate::operation::operation::EcdsaVerifyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaVerifyOutputBuilder { + pub(crate) success: ::std::option::Option<::std::primitive::bool>, +} +impl EcdsaVerifyOutputBuilder { + #[allow(missing_docs)] +pub fn success(mut self, input: impl ::std::convert::Into<::std::primitive::bool>) -> Self { + self.success = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_success(mut self, input: ::std::option::Option<::std::primitive::bool>) -> Self { + self.success = input; + self +} +#[allow(missing_docs)] +pub fn get_success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} + /// Consumes the builder and constructs a [`EcdsaVerifyOutput`](crate::operation::operation::EcdsaVerifyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyOutput { + success: self.success, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs new file mode 100644 index 000000000..134aacac7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs @@ -0,0 +1,120 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::_ecdsa_verify_output::EcdsaVerifyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::_ecdsa_verify_input::EcdsaVerifyInputBuilder; + +impl EcdsaVerifyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::std::primitive::bool, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.ecdsa_verify(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EcdsaVerify`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EcdsaVerifyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyInputBuilder, +} +impl EcdsaVerifyFluentBuilder { + /// Creates a new `EcdsaVerify`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EcdsaVerify as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::builders::EcdsaVerifyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::std::primitive::bool, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerify::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.message(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_message(input); + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_message() +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.signature(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_signature(input); + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_signature() +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.signature_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_signature_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + self.inner.get_signature_algorithm() +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.verification_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_verification_key(input); + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_verification_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs new file mode 100644 index 000000000..60e52161d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GenerateEccKeyPair`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GenerateEccKeyPair; +impl GenerateEccKeyPair { + /// Creates a new `GenerateEccKeyPair` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::generate_ecc_key_pair::_generate_ecc_key_pair_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::_generate_ecc_key_pair_output::GenerateEccKeyPairOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::_generate_ecc_key_pair_input::GenerateEccKeyPairInput; + +pub(crate) mod _generate_ecc_key_pair_output; + +pub(crate) mod _generate_ecc_key_pair_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs new file mode 100644 index 000000000..3fe68ae4d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEccKeyPairInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +} +impl GenerateEccKeyPairInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +} +impl GenerateEccKeyPairInput { + /// Creates a new builder-style object to manufacture [`GenerateEccKeyPairInput`](crate::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairInputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairInputBuilder::default() + } +} + +/// A builder for [`GenerateEccKeyPairInput`](crate::operation::operation::GenerateEccKeyPairInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEccKeyPairInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +} +impl GenerateEccKeyPairInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} + /// Consumes the builder and constructs a [`GenerateEccKeyPairInput`](crate::operation::operation::GenerateEccKeyPairInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput { + ecc_curve: self.ecc_curve, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs new file mode 100644 index 000000000..9d6ebf530 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEccKeyPairOutput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl GenerateEccKeyPairOutput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl GenerateEccKeyPairOutput { + /// Creates a new builder-style object to manufacture [`GenerateEccKeyPairOutput`](crate::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairOutputBuilder::default() + } +} + +/// A builder for [`GenerateEccKeyPairOutput`](crate::operation::operation::GenerateEccKeyPairOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEccKeyPairOutputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl GenerateEccKeyPairOutputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`GenerateEccKeyPairOutput`](crate::operation::operation::GenerateEccKeyPairOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/builders.rs new file mode 100644 index 000000000..d46385bdd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::_generate_ecc_key_pair_output::GenerateEccKeyPairOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::_generate_ecc_key_pair_input::GenerateEccKeyPairInputBuilder; + +impl GenerateEccKeyPairInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.generate_ecc_key_pair(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GenerateEccKeyPair`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GenerateEccKeyPairFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairInputBuilder, +} +impl GenerateEccKeyPairFluentBuilder { + /// Creates a new `GenerateEccKeyPair`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GenerateEccKeyPair as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::builders::GenerateEccKeyPairInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPair::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..7d3cebb2d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GenerateEcdsaSignatureKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GenerateEcdsaSignatureKey; +impl GenerateEcdsaSignatureKey { + /// Creates a new `GenerateEcdsaSignatureKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_output::GenerateEcdsaSignatureKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_input::GenerateEcdsaSignatureKeyInput; + +pub(crate) mod _generate_ecdsa_signature_key_output; + +pub(crate) mod _generate_ecdsa_signature_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs new file mode 100644 index 000000000..afb3b6219 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEcdsaSignatureKeyInput { + #[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +} +impl GenerateEcdsaSignatureKeyInput { + #[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +} +impl GenerateEcdsaSignatureKeyInput { + /// Creates a new builder-style object to manufacture [`GenerateEcdsaSignatureKeyInput`](crate::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyInputBuilder::default() + } +} + +/// A builder for [`GenerateEcdsaSignatureKeyInput`](crate::operation::operation::GenerateEcdsaSignatureKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEcdsaSignatureKeyInputBuilder { + pub(crate) signature_algorithm: ::std::option::Option, +} +impl GenerateEcdsaSignatureKeyInputBuilder { + #[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} + /// Consumes the builder and constructs a [`GenerateEcdsaSignatureKeyInput`](crate::operation::operation::GenerateEcdsaSignatureKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput { + signature_algorithm: self.signature_algorithm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs new file mode 100644 index 000000000..0fab3b897 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEcdsaSignatureKeyOutput { + #[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateEcdsaSignatureKeyOutput { + #[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl GenerateEcdsaSignatureKeyOutput { + /// Creates a new builder-style object to manufacture [`GenerateEcdsaSignatureKeyOutput`](crate::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyOutputBuilder::default() + } +} + +/// A builder for [`GenerateEcdsaSignatureKeyOutput`](crate::operation::operation::GenerateEcdsaSignatureKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEcdsaSignatureKeyOutputBuilder { + pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateEcdsaSignatureKeyOutputBuilder { + #[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`GenerateEcdsaSignatureKeyOutput`](crate::operation::operation::GenerateEcdsaSignatureKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput { + signature_algorithm: self.signature_algorithm, +signing_key: self.signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/builders.rs new file mode 100644 index 000000000..3d2e96d2d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_output::GenerateEcdsaSignatureKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::_generate_ecdsa_signature_key_input::GenerateEcdsaSignatureKeyInputBuilder; + +impl GenerateEcdsaSignatureKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.generate_ecdsa_signature_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GenerateEcdsaSignatureKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GenerateEcdsaSignatureKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyInputBuilder, +} +impl GenerateEcdsaSignatureKeyFluentBuilder { + /// Creates a new `GenerateEcdsaSignatureKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GenerateEcdsaSignatureKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::builders::GenerateEcdsaSignatureKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.signature_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_signature_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + self.inner.get_signature_algorithm() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs new file mode 100644 index 000000000..056a246e0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `GenerateRandomBytes`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GenerateRandomBytes; +impl GenerateRandomBytes { + /// Creates a new `GenerateRandomBytes` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_output::GenerateRandomBytesOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_input::GenerateRandomBytesInput; + +pub(crate) mod _generate_random_bytes_output; + +pub(crate) mod _generate_random_bytes_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_input.rs new file mode 100644 index 000000000..32e2da209 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRandomBytesInput { + #[allow(missing_docs)] +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRandomBytesInput { + #[allow(missing_docs)] +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GenerateRandomBytesInput { + /// Creates a new builder-style object to manufacture [`GenerateRandomBytesInput`](crate::operation::generate_random_bytes::builders::GenerateRandomBytesInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder::default() + } +} + +/// A builder for [`GenerateRandomBytesInput`](crate::operation::operation::GenerateRandomBytesInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRandomBytesInputBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRandomBytesInputBuilder { + #[allow(missing_docs)] +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +#[allow(missing_docs)] +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GenerateRandomBytesInput`](crate::operation::operation::GenerateRandomBytesInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput { + length: self.length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_output.rs new file mode 100644 index 000000000..b7360440d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRandomBytesOutput { + #[allow(missing_docs)] +pub data: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateRandomBytesOutput { + #[allow(missing_docs)] +pub fn data(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.data +} +} +impl GenerateRandomBytesOutput { + /// Creates a new builder-style object to manufacture [`GenerateRandomBytesOutput`](crate::operation::generate_random_bytes::builders::GenerateRandomBytesOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesOutputBuilder::default() + } +} + +/// A builder for [`GenerateRandomBytesOutput`](crate::operation::operation::GenerateRandomBytesOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRandomBytesOutputBuilder { + pub(crate) data: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateRandomBytesOutputBuilder { + #[allow(missing_docs)] +pub fn data(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.data = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_data(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.data = input; + self +} +#[allow(missing_docs)] +pub fn get_data(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.data +} + /// Consumes the builder and constructs a [`GenerateRandomBytesOutput`](crate::operation::operation::GenerateRandomBytesOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesOutput { + data: self.data, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs new file mode 100644 index 000000000..d2ebf9309 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_output::GenerateRandomBytesOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_input::GenerateRandomBytesInputBuilder; + +impl GenerateRandomBytesInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.generate_random_bytes(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GenerateRandomBytes`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GenerateRandomBytesFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder, +} +impl GenerateRandomBytesFluentBuilder { + /// Creates a new `GenerateRandomBytes`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GenerateRandomBytes as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytes::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_length(input); + self +} +#[allow(missing_docs)] +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_length() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs new file mode 100644 index 000000000..a36347a7c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `GenerateRsaKeyPair`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GenerateRsaKeyPair; +impl GenerateRsaKeyPair { + /// Creates a new `GenerateRsaKeyPair` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::generate_rsa_key_pair::_generate_rsa_key_pair_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::_generate_rsa_key_pair_output::GenerateRsaKeyPairOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::_generate_rsa_key_pair_input::GenerateRsaKeyPairInput; + +pub(crate) mod _generate_rsa_key_pair_output; + +pub(crate) mod _generate_rsa_key_pair_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs new file mode 100644 index 000000000..6cf24c7f8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRsaKeyPairInput { + #[allow(missing_docs)] +pub length_bits: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRsaKeyPairInput { + #[allow(missing_docs)] +pub fn length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +} +impl GenerateRsaKeyPairInput { + /// Creates a new builder-style object to manufacture [`GenerateRsaKeyPairInput`](crate::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairInputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairInputBuilder::default() + } +} + +/// A builder for [`GenerateRsaKeyPairInput`](crate::operation::operation::GenerateRsaKeyPairInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRsaKeyPairInputBuilder { + pub(crate) length_bits: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRsaKeyPairInputBuilder { + #[allow(missing_docs)] +pub fn length_bits(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length_bits = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length_bits(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length_bits = input; + self +} +#[allow(missing_docs)] +pub fn get_length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} + /// Consumes the builder and constructs a [`GenerateRsaKeyPairInput`](crate::operation::operation::GenerateRsaKeyPairInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput { + length_bits: self.length_bits, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs new file mode 100644 index 000000000..c4ce32710 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRsaKeyPairOutput { + #[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl GenerateRsaKeyPairOutput { + #[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl GenerateRsaKeyPairOutput { + /// Creates a new builder-style object to manufacture [`GenerateRsaKeyPairOutput`](crate::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairOutputBuilder::default() + } +} + +/// A builder for [`GenerateRsaKeyPairOutput`](crate::operation::operation::GenerateRsaKeyPairOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRsaKeyPairOutputBuilder { + pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl GenerateRsaKeyPairOutputBuilder { + #[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`GenerateRsaKeyPairOutput`](crate::operation::operation::GenerateRsaKeyPairOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput { + private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/builders.rs new file mode 100644 index 000000000..c0ef9ed11 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::_generate_rsa_key_pair_output::GenerateRsaKeyPairOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::_generate_rsa_key_pair_input::GenerateRsaKeyPairInputBuilder; + +impl GenerateRsaKeyPairInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.generate_rsa_key_pair(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GenerateRsaKeyPair`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GenerateRsaKeyPairFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairInputBuilder, +} +impl GenerateRsaKeyPairFluentBuilder { + /// Creates a new `GenerateRsaKeyPair`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GenerateRsaKeyPair as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::builders::GenerateRsaKeyPairInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPair::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn length_bits(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.length_bits(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length_bits(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_length_bits(input); + self +} +#[allow(missing_docs)] +pub fn get_length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_length_bits() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs new file mode 100644 index 000000000..43244b450 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `GetPublicKeyFromPrivateKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetPublicKeyFromPrivateKey; +impl GetPublicKeyFromPrivateKey { + /// Creates a new `GetPublicKeyFromPrivateKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::get_public_key_from_private_key::_get_public_key_from_private_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::_get_public_key_from_private_key_output::GetPublicKeyFromPrivateKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::_get_public_key_from_private_key_input::GetPublicKeyFromPrivateKeyInput; + +pub(crate) mod _get_public_key_from_private_key_output; + +pub(crate) mod _get_public_key_from_private_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs new file mode 100644 index 000000000..6356bc9ed --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetPublicKeyFromPrivateKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +} +impl GetPublicKeyFromPrivateKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +} +impl GetPublicKeyFromPrivateKeyInput { + /// Creates a new builder-style object to manufacture [`GetPublicKeyFromPrivateKeyInput`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyInputBuilder::default() + } +} + +/// A builder for [`GetPublicKeyFromPrivateKeyInput`](crate::operation::operation::GetPublicKeyFromPrivateKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetPublicKeyFromPrivateKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +} +impl GetPublicKeyFromPrivateKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} + /// Consumes the builder and constructs a [`GetPublicKeyFromPrivateKeyInput`](crate::operation::operation::GetPublicKeyFromPrivateKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs new file mode 100644 index 000000000..ecf7af990 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetPublicKeyFromPrivateKeyOutput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetPublicKeyFromPrivateKeyOutput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl GetPublicKeyFromPrivateKeyOutput { + /// Creates a new builder-style object to manufacture [`GetPublicKeyFromPrivateKeyOutput`](crate::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyOutputBuilder::default() + } +} + +/// A builder for [`GetPublicKeyFromPrivateKeyOutput`](crate::operation::operation::GetPublicKeyFromPrivateKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetPublicKeyFromPrivateKeyOutputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetPublicKeyFromPrivateKeyOutputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`GetPublicKeyFromPrivateKeyOutput`](crate::operation::operation::GetPublicKeyFromPrivateKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/builders.rs new file mode 100644 index 000000000..9cc3bd372 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::_get_public_key_from_private_key_output::GetPublicKeyFromPrivateKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::_get_public_key_from_private_key_input::GetPublicKeyFromPrivateKeyInputBuilder; + +impl GetPublicKeyFromPrivateKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.get_public_key_from_private_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetPublicKeyFromPrivateKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetPublicKeyFromPrivateKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyInputBuilder, +} +impl GetPublicKeyFromPrivateKeyFluentBuilder { + /// Creates a new `GetPublicKeyFromPrivateKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetPublicKeyFromPrivateKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::builders::GetPublicKeyFromPrivateKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.private_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_private_key(input); + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + self.inner.get_private_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs new file mode 100644 index 000000000..5f6fad61e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `GetRsaKeyModulusLength`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetRsaKeyModulusLength; +impl GetRsaKeyModulusLength { + /// Creates a new `GetRsaKeyModulusLength` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_output::GetRsaKeyModulusLengthOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_input::GetRsaKeyModulusLengthInput; + +pub(crate) mod _get_rsa_key_modulus_length_output; + +pub(crate) mod _get_rsa_key_modulus_length_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs new file mode 100644 index 000000000..7004d6afd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetRsaKeyModulusLengthInput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetRsaKeyModulusLengthInput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl GetRsaKeyModulusLengthInput { + /// Creates a new builder-style object to manufacture [`GetRsaKeyModulusLengthInput`](crate::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthInputBuilder { + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthInputBuilder::default() + } +} + +/// A builder for [`GetRsaKeyModulusLengthInput`](crate::operation::operation::GetRsaKeyModulusLengthInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetRsaKeyModulusLengthInputBuilder { + pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetRsaKeyModulusLengthInputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`GetRsaKeyModulusLengthInput`](crate::operation::operation::GetRsaKeyModulusLengthInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs new file mode 100644 index 000000000..fa5f4e699 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetRsaKeyModulusLengthOutput { + #[allow(missing_docs)] +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GetRsaKeyModulusLengthOutput { + #[allow(missing_docs)] +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GetRsaKeyModulusLengthOutput { + /// Creates a new builder-style object to manufacture [`GetRsaKeyModulusLengthOutput`](crate::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthOutputBuilder::default() + } +} + +/// A builder for [`GetRsaKeyModulusLengthOutput`](crate::operation::operation::GetRsaKeyModulusLengthOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetRsaKeyModulusLengthOutputBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GetRsaKeyModulusLengthOutputBuilder { + #[allow(missing_docs)] +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +#[allow(missing_docs)] +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GetRsaKeyModulusLengthOutput`](crate::operation::operation::GetRsaKeyModulusLengthOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput { + length: self.length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/builders.rs new file mode 100644 index 000000000..dbbdda5a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_output::GetRsaKeyModulusLengthOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::_get_rsa_key_modulus_length_input::GetRsaKeyModulusLengthInputBuilder; + +impl GetRsaKeyModulusLengthInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.get_rsa_key_modulus_length(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetRsaKeyModulusLength`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetRsaKeyModulusLengthFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthInputBuilder, +} +impl GetRsaKeyModulusLengthFluentBuilder { + /// Creates a new `GetRsaKeyModulusLength`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetRsaKeyModulusLength as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::builders::GetRsaKeyModulusLengthInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLength::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs new file mode 100644 index 000000000..e7f02530d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `HMac`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct HMac; +impl HMac { + /// Creates a new `HMac` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_output::HMacOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_input::HMacInput; + +pub(crate) mod _h_mac_output; + +pub(crate) mod _h_mac_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_input.rs new file mode 100644 index 000000000..7a987da10 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HMacInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +} +impl HMacInput { + /// Creates a new builder-style object to manufacture [`HMacInput`](crate::operation::h_mac::builders::HMacInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacInputBuilder { + crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacInputBuilder::default() + } +} + +/// A builder for [`HMacInput`](crate::operation::operation::HMacInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HMacInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} + /// Consumes the builder and constructs a [`HMacInput`](crate::operation::operation::HMacInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput { + digest_algorithm: self.digest_algorithm, +key: self.key, +message: self.message, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_output.rs new file mode 100644 index 000000000..f62c80c83 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HMacOutput { + #[allow(missing_docs)] +pub digest: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacOutput { + #[allow(missing_docs)] +pub fn digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.digest +} +} +impl HMacOutput { + /// Creates a new builder-style object to manufacture [`HMacOutput`](crate::operation::h_mac::builders::HMacOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacOutputBuilder::default() + } +} + +/// A builder for [`HMacOutput`](crate::operation::operation::HMacOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HMacOutputBuilder { + pub(crate) digest: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacOutputBuilder { + #[allow(missing_docs)] +pub fn digest(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.digest = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.digest = input; + self +} +#[allow(missing_docs)] +pub fn get_digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.digest +} + /// Consumes the builder and constructs a [`HMacOutput`](crate::operation::operation::HMacOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::h_mac::HMacOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::h_mac::HMacOutput { + digest: self.digest, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs new file mode 100644 index 000000000..baf4bfb1f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_output::HMacOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_input::HMacInputBuilder; + +impl HMacInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.h_mac(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `HMac`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct HMacFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacInputBuilder, +} +impl HMacFluentBuilder { + /// Creates a new `HMac`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the HMac as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::h_mac::builders::HMacInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::h_mac::HMac::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_key(input); + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_key() +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.message(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_message(input); + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_message() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs new file mode 100644 index 000000000..e6239e24a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs @@ -0,0 +1,78 @@ +// 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. +/// Orchestration and serialization glue logic for `Hkdf`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct Hkdf; +impl Hkdf { + /// Creates a new `Hkdf` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf::_hkdf_output::HkdfOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf::_hkdf_input::HkdfInput; + +pub(crate) mod _hkdf_output; + +pub(crate) mod _hkdf_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs new file mode 100644 index 000000000..751fc6a97 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub info: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} +} +impl HkdfInput { + /// Creates a new builder-style object to manufacture [`HkdfInput`](crate::operation::hkdf::builders::HkdfInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfInputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfInputBuilder::default() + } +} + +/// A builder for [`HkdfInput`](crate::operation::operation::HkdfInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) info: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.info = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.info = input; + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.salt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.salt = input; + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} + /// Consumes the builder and constructs a [`HkdfInput`](crate::operation::operation::HkdfInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +ikm: self.ikm, +info: self.info, +salt: self.salt, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs new file mode 100644 index 000000000..86b65415c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfOutput { + #[allow(missing_docs)] +pub okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfOutput { + #[allow(missing_docs)] +pub fn okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} +} +impl HkdfOutput { + /// Creates a new builder-style object to manufacture [`HkdfOutput`](crate::operation::hkdf::builders::HkdfOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfOutputBuilder::default() + } +} + +/// A builder for [`HkdfOutput`](crate::operation::operation::HkdfOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfOutputBuilder { + pub(crate) okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfOutputBuilder { + #[allow(missing_docs)] +pub fn okm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.okm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_okm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.okm = input; + self +} +#[allow(missing_docs)] +pub fn get_okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} + /// Consumes the builder and constructs a [`HkdfOutput`](crate::operation::operation::HkdfOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfOutput { + okm: self.okm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs new file mode 100644 index 000000000..bfb1e7c2e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::hkdf::_hkdf_output::HkdfOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf::_hkdf_input::HkdfInputBuilder; + +impl HkdfInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.hkdf(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `Hkdf`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct HkdfFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfInputBuilder, +} +impl HkdfFluentBuilder { + /// Creates a new `Hkdf`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the Hkdf as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::hkdf::builders::HkdfInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::hkdf::Hkdf::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.expected_length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_expected_length(input); + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_expected_length() +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.ikm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_ikm(input); + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_ikm() +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.info(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_info(input); + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_info() +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.salt(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_salt(input); + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_salt() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs new file mode 100644 index 000000000..20ca1bef9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs @@ -0,0 +1,78 @@ +// 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. +/// Orchestration and serialization glue logic for `HkdfExpand`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct HkdfExpand; +impl HkdfExpand { + /// Creates a new `HkdfExpand` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_expand::_hkdf_expand_output::HkdfExpandOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_expand::_hkdf_expand_input::HkdfExpandInput; + +pub(crate) mod _hkdf_expand_output; + +pub(crate) mod _hkdf_expand_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_input.rs new file mode 100644 index 000000000..8d0d7a4a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExpandInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub info: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} +} +impl HkdfExpandInput { + /// Creates a new builder-style object to manufacture [`HkdfExpandInput`](crate::operation::hkdf_expand::builders::HkdfExpandInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandInputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandInputBuilder::default() + } +} + +/// A builder for [`HkdfExpandInput`](crate::operation::operation::HkdfExpandInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExpandInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) info: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.info = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.info = input; + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn prk(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.prk = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_prk(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.prk = input; + self +} +#[allow(missing_docs)] +pub fn get_prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} + /// Consumes the builder and constructs a [`HkdfExpandInput`](crate::operation::operation::HkdfExpandInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +info: self.info, +prk: self.prk, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_output.rs new file mode 100644 index 000000000..28e6a7949 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExpandOutput { + #[allow(missing_docs)] +pub okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandOutput { + #[allow(missing_docs)] +pub fn okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} +} +impl HkdfExpandOutput { + /// Creates a new builder-style object to manufacture [`HkdfExpandOutput`](crate::operation::hkdf_expand::builders::HkdfExpandOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandOutputBuilder::default() + } +} + +/// A builder for [`HkdfExpandOutput`](crate::operation::operation::HkdfExpandOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExpandOutputBuilder { + pub(crate) okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandOutputBuilder { + #[allow(missing_docs)] +pub fn okm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.okm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_okm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.okm = input; + self +} +#[allow(missing_docs)] +pub fn get_okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} + /// Consumes the builder and constructs a [`HkdfExpandOutput`](crate::operation::operation::HkdfExpandOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandOutput { + okm: self.okm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs new file mode 100644 index 000000000..2f9f1ae4a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs @@ -0,0 +1,120 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::hkdf_expand::_hkdf_expand_output::HkdfExpandOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_expand::_hkdf_expand_input::HkdfExpandInputBuilder; + +impl HkdfExpandInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.hkdf_expand(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `HkdfExpand`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct HkdfExpandFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandInputBuilder, +} +impl HkdfExpandFluentBuilder { + /// Creates a new `HkdfExpand`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the HkdfExpand as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::hkdf_expand::builders::HkdfExpandInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpand::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.expected_length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_expected_length(input); + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_expected_length() +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.info(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_info(input); + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_info() +} +#[allow(missing_docs)] +pub fn prk(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.prk(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_prk(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_prk(input); + self +} +#[allow(missing_docs)] +pub fn get_prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_prk() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs new file mode 100644 index 000000000..65b9a7d29 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `HkdfExtract`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct HkdfExtract; +impl HkdfExtract { + /// Creates a new `HkdfExtract` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_extract::_hkdf_extract_output::HkdfExtractOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_extract::_hkdf_extract_input::HkdfExtractInput; + +pub(crate) mod _hkdf_extract_output; + +pub(crate) mod _hkdf_extract_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_input.rs new file mode 100644 index 000000000..00d4bbd52 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExtractInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} +} +impl HkdfExtractInput { + /// Creates a new builder-style object to manufacture [`HkdfExtractInput`](crate::operation::hkdf_extract::builders::HkdfExtractInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractInputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractInputBuilder::default() + } +} + +/// A builder for [`HkdfExtractInput`](crate::operation::operation::HkdfExtractInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExtractInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.salt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.salt = input; + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} + /// Consumes the builder and constructs a [`HkdfExtractInput`](crate::operation::operation::HkdfExtractInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput { + digest_algorithm: self.digest_algorithm, +ikm: self.ikm, +salt: self.salt, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_output.rs new file mode 100644 index 000000000..67268719b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExtractOutput { + #[allow(missing_docs)] +pub prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractOutput { + #[allow(missing_docs)] +pub fn prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} +} +impl HkdfExtractOutput { + /// Creates a new builder-style object to manufacture [`HkdfExtractOutput`](crate::operation::hkdf_extract::builders::HkdfExtractOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractOutputBuilder::default() + } +} + +/// A builder for [`HkdfExtractOutput`](crate::operation::operation::HkdfExtractOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExtractOutputBuilder { + pub(crate) prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractOutputBuilder { + #[allow(missing_docs)] +pub fn prk(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.prk = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_prk(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.prk = input; + self +} +#[allow(missing_docs)] +pub fn get_prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} + /// Consumes the builder and constructs a [`HkdfExtractOutput`](crate::operation::operation::HkdfExtractOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractOutput { + prk: self.prk, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs new file mode 100644 index 000000000..6c84c7b1c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::hkdf_extract::_hkdf_extract_output::HkdfExtractOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::hkdf_extract::_hkdf_extract_input::HkdfExtractInputBuilder; + +impl HkdfExtractInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.hkdf_extract(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `HkdfExtract`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct HkdfExtractFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractInputBuilder, +} +impl HkdfExtractFluentBuilder { + /// Creates a new `HkdfExtract`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the HkdfExtract as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::hkdf_extract::builders::HkdfExtractInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtract::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.ikm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_ikm(input); + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_ikm() +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.salt(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_salt(input); + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_salt() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs new file mode 100644 index 000000000..467b3162e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs @@ -0,0 +1,72 @@ +// 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. +/// Orchestration and serialization glue logic for `KdfCounterMode`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct KdfCounterMode; +impl KdfCounterMode { + /// Creates a new `KdfCounterMode` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::_kdf_ctr_output::KdfCtrOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::_kdf_ctr_input::KdfCtrInput; + +pub(crate) mod _kdf_ctr_output; + +pub(crate) mod _kdf_ctr_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_input.rs new file mode 100644 index 000000000..b4bcdf894 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct KdfCtrInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub nonce: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub purpose: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +#[allow(missing_docs)] +pub fn purpose(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.purpose +} +} +impl KdfCtrInput { + /// Creates a new builder-style object to manufacture [`KdfCtrInput`](crate::operation::kdf_counter_mode::builders::KdfCtrInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrInputBuilder { + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrInputBuilder::default() + } +} + +/// A builder for [`KdfCtrInput`](crate::operation::operation::KdfCtrInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KdfCtrInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) nonce: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) purpose: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.nonce = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.nonce = input; + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +#[allow(missing_docs)] +pub fn purpose(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.purpose = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_purpose(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.purpose = input; + self +} +#[allow(missing_docs)] +pub fn get_purpose(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.purpose +} + /// Consumes the builder and constructs a [`KdfCtrInput`](crate::operation::operation::KdfCtrInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +ikm: self.ikm, +nonce: self.nonce, +purpose: self.purpose, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_output.rs new file mode 100644 index 000000000..dcfb7fc58 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct KdfCtrOutput { + #[allow(missing_docs)] +pub okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrOutput { + #[allow(missing_docs)] +pub fn okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} +} +impl KdfCtrOutput { + /// Creates a new builder-style object to manufacture [`KdfCtrOutput`](crate::operation::kdf_counter_mode::builders::KdfCtrOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrOutputBuilder::default() + } +} + +/// A builder for [`KdfCtrOutput`](crate::operation::operation::KdfCtrOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KdfCtrOutputBuilder { + pub(crate) okm: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrOutputBuilder { + #[allow(missing_docs)] +pub fn okm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.okm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_okm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.okm = input; + self +} +#[allow(missing_docs)] +pub fn get_okm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.okm +} + /// Consumes the builder and constructs a [`KdfCtrOutput`](crate::operation::operation::KdfCtrOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrOutput { + okm: self.okm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs new file mode 100644 index 000000000..1d0b21aeb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs @@ -0,0 +1,134 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::_kdf_ctr_output::KdfCtrOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::_kdf_ctr_input::KdfCtrInputBuilder; + +impl KdfCtrInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.kdf_counter_mode(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `KdfCounterMode`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct KdfCounterModeFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrInputBuilder, +} +impl KdfCounterModeFluentBuilder { + /// Creates a new `KdfCounterMode`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the KdfCounterMode as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::builders::KdfCtrInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCounterMode::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.digest_algorithm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_digest_algorithm(input); + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + self.inner.get_digest_algorithm() +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.inner = self.inner.expected_length(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.inner = self.inner.set_expected_length(input); + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + self.inner.get_expected_length() +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.ikm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_ikm(input); + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_ikm() +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.nonce(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_nonce(input); + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_nonce() +} +#[allow(missing_docs)] +pub fn purpose(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.purpose(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_purpose(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_purpose(input); + self +} +#[allow(missing_docs)] +pub fn get_purpose(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_purpose() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs new file mode 100644 index 000000000..f22f60519 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs @@ -0,0 +1,54 @@ +// 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. +/// Orchestration and serialization glue logic for `ParsePublicKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ParsePublicKey; +impl ParsePublicKey { + /// Creates a new `ParsePublicKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::parse_public_key::_parse_public_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::parse_public_key::_parse_public_key_output::ParsePublicKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::parse_public_key::_parse_public_key_input::ParsePublicKeyInput; + +pub(crate) mod _parse_public_key_output; + +pub(crate) mod _parse_public_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_input.rs new file mode 100644 index 000000000..9d9365695 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ParsePublicKeyInput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ParsePublicKeyInput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl ParsePublicKeyInput { + /// Creates a new builder-style object to manufacture [`ParsePublicKeyInput`](crate::operation::parse_public_key::builders::ParsePublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyInputBuilder::default() + } +} + +/// A builder for [`ParsePublicKeyInput`](crate::operation::operation::ParsePublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsePublicKeyInputBuilder { + pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ParsePublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`ParsePublicKeyInput`](crate::operation::operation::ParsePublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_output.rs new file mode 100644 index 000000000..999e9cd22 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ParsePublicKeyOutput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl ParsePublicKeyOutput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl ParsePublicKeyOutput { + /// Creates a new builder-style object to manufacture [`ParsePublicKeyOutput`](crate::operation::parse_public_key::builders::ParsePublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyOutputBuilder::default() + } +} + +/// A builder for [`ParsePublicKeyOutput`](crate::operation::operation::ParsePublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsePublicKeyOutputBuilder { + pub(crate) public_key: ::std::option::Option, +} +impl ParsePublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`ParsePublicKeyOutput`](crate::operation::operation::ParsePublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs new file mode 100644 index 000000000..47e3a0d82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs @@ -0,0 +1,78 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::parse_public_key::_parse_public_key_output::ParsePublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::parse_public_key::_parse_public_key_input::ParsePublicKeyInputBuilder; + +impl ParsePublicKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.parse_public_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ParsePublicKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ParsePublicKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyInputBuilder, +} +impl ParsePublicKeyFluentBuilder { + /// Creates a new `ParsePublicKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ParsePublicKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::parse_public_key::builders::ParsePublicKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs new file mode 100644 index 000000000..2a3a2606c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `RsaDecrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct RsaDecrypt; +impl RsaDecrypt { + /// Creates a new `RsaDecrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_output::RsaDecryptOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_input::RsaDecryptInput; + +pub(crate) mod _rsa_decrypt_output; + +pub(crate) mod _rsa_decrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_input.rs new file mode 100644 index 000000000..faa4a0914 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaDecryptInput { + #[allow(missing_docs)] +pub cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub padding: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptInput { + #[allow(missing_docs)] +pub fn cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +#[allow(missing_docs)] +pub fn padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +} +impl RsaDecryptInput { + /// Creates a new builder-style object to manufacture [`RsaDecryptInput`](crate::operation::rsa_decrypt::builders::RsaDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptInputBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptInputBuilder::default() + } +} + +/// A builder for [`RsaDecryptInput`](crate::operation::operation::RsaDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaDecryptInputBuilder { + pub(crate) cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) padding: ::std::option::Option, +pub(crate) private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptInputBuilder { + #[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +#[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.padding = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.padding = input; + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} + /// Consumes the builder and constructs a [`RsaDecryptInput`](crate::operation::operation::RsaDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput { + cipher_text: self.cipher_text, +padding: self.padding, +private_key: self.private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_output.rs new file mode 100644 index 000000000..633f05bc7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaDecryptOutput { + #[allow(missing_docs)] +pub plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptOutput { + #[allow(missing_docs)] +pub fn plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +} +impl RsaDecryptOutput { + /// Creates a new builder-style object to manufacture [`RsaDecryptOutput`](crate::operation::rsa_decrypt::builders::RsaDecryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptOutputBuilder::default() + } +} + +/// A builder for [`RsaDecryptOutput`](crate::operation::operation::RsaDecryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaDecryptOutputBuilder { + pub(crate) plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptOutputBuilder { + #[allow(missing_docs)] +pub fn plaintext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} + /// Consumes the builder and constructs a [`RsaDecryptOutput`](crate::operation::operation::RsaDecryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptOutput { + plaintext: self.plaintext, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs new file mode 100644 index 000000000..cb8aa39aa --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_output::RsaDecryptOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::_rsa_decrypt_input::RsaDecryptInputBuilder; + +impl RsaDecryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.rsa_decrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `RsaDecrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct RsaDecryptFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptInputBuilder, +} +impl RsaDecryptFluentBuilder { + /// Creates a new `RsaDecrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the RsaDecrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::builders::RsaDecryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.cipher_text(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_cipher_text(input); + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_cipher_text() +} +#[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.padding(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_padding(input); + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + self.inner.get_padding() +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.private_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_private_key(input); + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_private_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs new file mode 100644 index 000000000..d9dafa601 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs @@ -0,0 +1,66 @@ +// 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. +/// Orchestration and serialization glue logic for `RsaEncrypt`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct RsaEncrypt; +impl RsaEncrypt { + /// Creates a new `RsaEncrypt` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput, + ) -> ::std::result::Result< + ::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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::standard_library_conversions::blob_from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::_rsa_encrypt_output::RsaEncryptOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::_rsa_encrypt_input::RsaEncryptInput; + +pub(crate) mod _rsa_encrypt_output; + +pub(crate) mod _rsa_encrypt_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_input.rs new file mode 100644 index 000000000..9aae7d4f5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaEncryptInput { + #[allow(missing_docs)] +pub padding: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptInput { + #[allow(missing_docs)] +pub fn padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl RsaEncryptInput { + /// Creates a new builder-style object to manufacture [`RsaEncryptInput`](crate::operation::rsa_encrypt::builders::RsaEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptInputBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptInputBuilder::default() + } +} + +/// A builder for [`RsaEncryptInput`](crate::operation::operation::RsaEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaEncryptInputBuilder { + pub(crate) padding: ::std::option::Option, +pub(crate) plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptInputBuilder { + #[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.padding = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.padding = input; + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn plaintext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`RsaEncryptInput`](crate::operation::operation::RsaEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput { + padding: self.padding, +plaintext: self.plaintext, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_output.rs new file mode 100644 index 000000000..60a6eaac5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaEncryptOutput { + #[allow(missing_docs)] +pub cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptOutput { + #[allow(missing_docs)] +pub fn cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +} +impl RsaEncryptOutput { + /// Creates a new builder-style object to manufacture [`RsaEncryptOutput`](crate::operation::rsa_encrypt::builders::RsaEncryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptOutputBuilder::default() + } +} + +/// A builder for [`RsaEncryptOutput`](crate::operation::operation::RsaEncryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaEncryptOutputBuilder { + pub(crate) cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptOutputBuilder { + #[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} + /// Consumes the builder and constructs a [`RsaEncryptOutput`](crate::operation::operation::RsaEncryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptOutput { + cipher_text: self.cipher_text, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs new file mode 100644 index 000000000..0ac7437c5 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs @@ -0,0 +1,106 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::_rsa_encrypt_output::RsaEncryptOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::_rsa_encrypt_input::RsaEncryptInputBuilder; + +impl RsaEncryptInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.rsa_encrypt(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `RsaEncrypt`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct RsaEncryptFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptInputBuilder, +} +impl RsaEncryptFluentBuilder { + /// Creates a new `RsaEncrypt`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the RsaEncrypt as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::builders::RsaEncryptInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + ::aws_smithy_types::Blob, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncrypt::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.padding(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_padding(input); + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + self.inner.get_padding() +} +#[allow(missing_docs)] +pub fn plaintext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.plaintext(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_plaintext(input); + self +} +#[allow(missing_docs)] +pub fn get_plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_plaintext() +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs new file mode 100644 index 000000000..b4bfc5bbd --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs @@ -0,0 +1,60 @@ +// 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. +/// Orchestration and serialization glue logic for `ValidatePublicKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ValidatePublicKey; +impl ValidatePublicKey { + /// Creates a new `ValidatePublicKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_primitives::client::Client, + input: crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput, + ) -> ::std::result::Result< + 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); +} + 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); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_primitives::conversions::validate_public_key::_validate_public_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_primitives::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_primitives::operation::validate_public_key::_validate_public_key_output::ValidatePublicKeyOutput; + +pub use crate::deps::aws_cryptography_primitives::operation::validate_public_key::_validate_public_key_input::ValidatePublicKeyInput; + +pub(crate) mod _validate_public_key_output; + +pub(crate) mod _validate_public_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_input.rs new file mode 100644 index 000000000..289a7b3c9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidatePublicKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ValidatePublicKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl ValidatePublicKeyInput { + /// Creates a new builder-style object to manufacture [`ValidatePublicKeyInput`](crate::operation::validate_public_key::builders::ValidatePublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyInputBuilder::default() + } +} + +/// A builder for [`ValidatePublicKeyInput`](crate::operation::operation::ValidatePublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidatePublicKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ValidatePublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`ValidatePublicKeyInput`](crate::operation::operation::ValidatePublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput { + ecc_curve: self.ecc_curve, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_output.rs new file mode 100644 index 000000000..7b7863d8f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidatePublicKeyOutput { + #[allow(missing_docs)] +pub success: ::std::option::Option<::std::primitive::bool>, +} +impl ValidatePublicKeyOutput { + #[allow(missing_docs)] +pub fn success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} +} +impl ValidatePublicKeyOutput { + /// Creates a new builder-style object to manufacture [`ValidatePublicKeyOutput`](crate::operation::validate_public_key::builders::ValidatePublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyOutputBuilder::default() + } +} + +/// A builder for [`ValidatePublicKeyOutput`](crate::operation::operation::ValidatePublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidatePublicKeyOutputBuilder { + pub(crate) success: ::std::option::Option<::std::primitive::bool>, +} +impl ValidatePublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn success(mut self, input: impl ::std::convert::Into<::std::primitive::bool>) -> Self { + self.success = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_success(mut self, input: ::std::option::Option<::std::primitive::bool>) -> Self { + self.success = input; + self +} +#[allow(missing_docs)] +pub fn get_success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} + /// Consumes the builder and constructs a [`ValidatePublicKeyOutput`](crate::operation::operation::ValidatePublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput { + success: self.success, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs new file mode 100644 index 000000000..193ab6469 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs @@ -0,0 +1,92 @@ +// 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 use crate::deps::aws_cryptography_primitives::operation::validate_public_key::_validate_public_key_output::ValidatePublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::operation::validate_public_key::_validate_public_key_input::ValidatePublicKeyInputBuilder; + +impl ValidatePublicKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_primitives::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let mut fluent_builder = client.validate_public_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ValidatePublicKey`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidatePublicKeyFluentBuilder { + client: crate::deps::aws_cryptography_primitives::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyInputBuilder, +} +impl ValidatePublicKeyFluentBuilder { + /// Creates a new `ValidatePublicKey`. + pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ValidatePublicKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::validate_public_key::builders::ValidatePublicKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput, + crate::deps::aws_cryptography_primitives::types::error::Error, + > { + let input = self + .inner + .build() + // Using Opaque since we don't have a validation-specific error yet. + // Operations' models don't declare their own validation error, + // and smithy-rs seems to not generate a ValidationError case unless there is. + // Vanilla smithy-rs uses SdkError::construction_failure, but we aren't using SdkError. + .map_err(|mut e| { + let msg = format!("{:?}", e); + crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKey::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ecc_curve(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ecc_curve(input); + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + self.inner.get_ecc_curve() +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.public_key(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_public_key(input); + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_public_key() +} +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types.rs new file mode 100644 index 000000000..7638d7aba --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types.rs @@ -0,0 +1,104 @@ +// 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. +/// Types for the `CryptoConfig` +pub mod crypto_config; + +pub mod builders; + + + +mod _aes_ctr; +pub use crate::deps::aws_cryptography_primitives::types::_aes_ctr::AesCtr; +mod _aes_gcm; +pub use crate::deps::aws_cryptography_primitives::types::_aes_gcm::AesGcm; +mod _aes_decrypt_input; +pub use crate::deps::aws_cryptography_primitives::types::_aes_decrypt_input::AesDecryptInput; +mod _aes_encrypt_input; +pub use crate::deps::aws_cryptography_primitives::types::_aes_encrypt_input::AesEncryptInput; +mod _aes_encrypt_output; +pub use crate::deps::aws_cryptography_primitives::types::_aes_encrypt_output::AesEncryptOutput; +mod _aes_kdf_ctr_input; +pub use crate::deps::aws_cryptography_primitives::types::_aes_kdf_ctr_input::AesKdfCtrInput; +mod _compress_public_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_compress_public_key_input::CompressPublicKeyInput; +mod _compress_public_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_compress_public_key_output::CompressPublicKeyOutput; +mod _decompress_public_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_decompress_public_key_input::DecompressPublicKeyInput; +mod _decompress_public_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_decompress_public_key_output::DecompressPublicKeyOutput; +mod _derive_shared_secret_input; +pub use crate::deps::aws_cryptography_primitives::types::_derive_shared_secret_input::DeriveSharedSecretInput; +mod _derive_shared_secret_output; +pub use crate::deps::aws_cryptography_primitives::types::_derive_shared_secret_output::DeriveSharedSecretOutput; +mod _digest_input; +pub use crate::deps::aws_cryptography_primitives::types::_digest_input::DigestInput; +mod _ecc_private_key; +pub use crate::deps::aws_cryptography_primitives::types::_ecc_private_key::EccPrivateKey; +mod _ecc_public_key; +pub use crate::deps::aws_cryptography_primitives::types::_ecc_public_key::EccPublicKey; +mod _ecdsa_sign_input; +pub use crate::deps::aws_cryptography_primitives::types::_ecdsa_sign_input::EcdsaSignInput; +mod _ecdsa_verify_input; +pub use crate::deps::aws_cryptography_primitives::types::_ecdsa_verify_input::EcdsaVerifyInput; +mod _generate_ecc_key_pair_input; +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecc_key_pair_input::GenerateEccKeyPairInput; +mod _generate_ecc_key_pair_output; +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecc_key_pair_output::GenerateEccKeyPairOutput; +mod _generate_ecdsa_signature_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecdsa_signature_key_input::GenerateEcdsaSignatureKeyInput; +mod _generate_ecdsa_signature_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecdsa_signature_key_output::GenerateEcdsaSignatureKeyOutput; +mod _generate_random_bytes_input; +pub use crate::deps::aws_cryptography_primitives::types::_generate_random_bytes_input::GenerateRandomBytesInput; +mod _generate_rsa_key_pair_input; +pub use crate::deps::aws_cryptography_primitives::types::_generate_rsa_key_pair_input::GenerateRsaKeyPairInput; +mod _generate_rsa_key_pair_output; +pub use crate::deps::aws_cryptography_primitives::types::_generate_rsa_key_pair_output::GenerateRsaKeyPairOutput; +mod _get_public_key_from_private_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_get_public_key_from_private_key_input::GetPublicKeyFromPrivateKeyInput; +mod _get_public_key_from_private_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_get_public_key_from_private_key_output::GetPublicKeyFromPrivateKeyOutput; +mod _get_rsa_key_modulus_length_input; +pub use crate::deps::aws_cryptography_primitives::types::_get_rsa_key_modulus_length_input::GetRsaKeyModulusLengthInput; +mod _get_rsa_key_modulus_length_output; +pub use crate::deps::aws_cryptography_primitives::types::_get_rsa_key_modulus_length_output::GetRsaKeyModulusLengthOutput; +mod _hkdf_expand_input; +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_expand_input::HkdfExpandInput; +mod _hkdf_extract_input; +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_extract_input::HkdfExtractInput; +mod _hkdf_input; +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_input::HkdfInput; +mod _h_mac_input; +pub use crate::deps::aws_cryptography_primitives::types::_h_mac_input::HMacInput; +mod _kdf_ctr_input; +pub use crate::deps::aws_cryptography_primitives::types::_kdf_ctr_input::KdfCtrInput; +mod _parse_public_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_parse_public_key_input::ParsePublicKeyInput; +mod _parse_public_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_parse_public_key_output::ParsePublicKeyOutput; +mod _rsa_decrypt_input; +pub use crate::deps::aws_cryptography_primitives::types::_rsa_decrypt_input::RsaDecryptInput; +mod _rsa_encrypt_input; +pub use crate::deps::aws_cryptography_primitives::types::_rsa_encrypt_input::RsaEncryptInput; +mod _rsa_private_key; +pub use crate::deps::aws_cryptography_primitives::types::_rsa_private_key::RsaPrivateKey; +mod _rsa_public_key; +pub use crate::deps::aws_cryptography_primitives::types::_rsa_public_key::RsaPublicKey; +mod _validate_public_key_input; +pub use crate::deps::aws_cryptography_primitives::types::_validate_public_key_input::ValidatePublicKeyInput; +mod _validate_public_key_output; +pub use crate::deps::aws_cryptography_primitives::types::_validate_public_key_output::ValidatePublicKeyOutput; + +pub mod error; + +mod _digest_algorithm; +pub use crate::deps::aws_cryptography_primitives::types::_digest_algorithm::DigestAlgorithm; +mod _ecdh_curve_spec; +pub use crate::deps::aws_cryptography_primitives::types::_ecdh_curve_spec::EcdhCurveSpec; +mod _ecdsa_signature_algorithm; +pub use crate::deps::aws_cryptography_primitives::types::_ecdsa_signature_algorithm::EcdsaSignatureAlgorithm; +mod _rsa_padding_mode; +pub use crate::deps::aws_cryptography_primitives::types::_rsa_padding_mode::RsaPaddingMode; + diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs new file mode 100644 index 000000000..edf3c0329 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesCtr { + #[allow(missing_docs)] +pub key_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub nonce_length: ::std::option::Option<::std::primitive::i32>, +} +impl AesCtr { + #[allow(missing_docs)] +pub fn key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.key_length +} +#[allow(missing_docs)] +pub fn nonce_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.nonce_length +} +} +impl AesCtr { + /// Creates a new builder-style object to manufacture [`AesCtr`](crate::deps::aws_cryptography_primitives::types::AesCtr). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesCtrBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesCtrBuilder::default() + } +} + +/// A builder for [`AesCtr`](crate::deps::aws_cryptography_primitives::types::AesCtr). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesCtrBuilder { + pub(crate) key_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) nonce_length: ::std::option::Option<::std::primitive::i32>, +} +impl AesCtrBuilder { + #[allow(missing_docs)] +pub fn key_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.key_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.key_length = input; + self +} +#[allow(missing_docs)] +pub fn get_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.key_length +} +#[allow(missing_docs)] +pub fn nonce_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.nonce_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.nonce_length = input; + self +} +#[allow(missing_docs)] +pub fn get_nonce_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.nonce_length +} + /// Consumes the builder and constructs a [`AesCtr`](crate::deps::aws_cryptography_primitives::types::AesCtr). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesCtr, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesCtr { + key_length: self.key_length, +nonce_length: self.nonce_length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs new file mode 100644 index 000000000..aba7fb20b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs @@ -0,0 +1,168 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesDecryptInput { + #[allow(missing_docs)] +pub aad: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub cipher_txt: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub enc_alg: ::std::option::Option, +#[allow(missing_docs)] +pub iv: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptInput { + #[allow(missing_docs)] +pub fn aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_txt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_txt +} +#[allow(missing_docs)] +pub fn enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +} +impl AesDecryptInput { + /// Creates a new builder-style object to manufacture [`AesDecryptInput`](crate::deps::aws_cryptography_primitives::types::AesDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesDecryptInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesDecryptInputBuilder::default() + } +} + +/// A builder for [`AesDecryptInput`](crate::deps::aws_cryptography_primitives::types::AesDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesDecryptInputBuilder { + pub(crate) aad: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) cipher_txt: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) enc_alg: ::std::option::Option, +pub(crate) iv: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesDecryptInputBuilder { + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.aad = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.aad = input; + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn auth_tag(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_tag(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_txt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_txt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_txt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_txt = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_txt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_txt +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.enc_alg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.enc_alg = input; + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.iv = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.iv = input; + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} + /// Consumes the builder and constructs a [`AesDecryptInput`](crate::deps::aws_cryptography_primitives::types::AesDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesDecryptInput { + aad: self.aad, +auth_tag: self.auth_tag, +cipher_txt: self.cipher_txt, +enc_alg: self.enc_alg, +iv: self.iv, +key: self.key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs new file mode 100644 index 000000000..8bf0315ec --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesEncryptInput { + #[allow(missing_docs)] +pub aad: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub enc_alg: ::std::option::Option, +#[allow(missing_docs)] +pub iv: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub msg: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptInput { + #[allow(missing_docs)] +pub fn aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn msg(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.msg +} +} +impl AesEncryptInput { + /// Creates a new builder-style object to manufacture [`AesEncryptInput`](crate::deps::aws_cryptography_primitives::types::AesEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesEncryptInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesEncryptInputBuilder::default() + } +} + +/// A builder for [`AesEncryptInput`](crate::deps::aws_cryptography_primitives::types::AesEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesEncryptInputBuilder { + pub(crate) aad: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) enc_alg: ::std::option::Option, +pub(crate) iv: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) msg: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptInputBuilder { + #[allow(missing_docs)] +pub fn aad(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.aad = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_aad(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.aad = input; + self +} +#[allow(missing_docs)] +pub fn get_aad(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.aad +} +#[allow(missing_docs)] +pub fn enc_alg(mut self, input: impl ::std::convert::Into) -> Self { + self.enc_alg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_enc_alg(mut self, input: ::std::option::Option) -> Self { + self.enc_alg = input; + self +} +#[allow(missing_docs)] +pub fn get_enc_alg(&self) -> &::std::option::Option { + &self.enc_alg +} +#[allow(missing_docs)] +pub fn iv(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.iv = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.iv = input; + self +} +#[allow(missing_docs)] +pub fn get_iv(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.iv +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn msg(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.msg = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_msg(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.msg = input; + self +} +#[allow(missing_docs)] +pub fn get_msg(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.msg +} + /// Consumes the builder and constructs a [`AesEncryptInput`](crate::deps::aws_cryptography_primitives::types::AesEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesEncryptInput { + aad: self.aad, +enc_alg: self.enc_alg, +iv: self.iv, +key: self.key, +msg: self.msg, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs new file mode 100644 index 000000000..87c7fef40 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesEncryptOutput { + #[allow(missing_docs)] +pub auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptOutput { + #[allow(missing_docs)] +pub fn auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +} +impl AesEncryptOutput { + /// Creates a new builder-style object to manufacture [`AesEncryptOutput`](crate::deps::aws_cryptography_primitives::types::AesEncryptOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesEncryptOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesEncryptOutputBuilder::default() + } +} + +/// A builder for [`AesEncryptOutput`](crate::deps::aws_cryptography_primitives::types::AesEncryptOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesEncryptOutputBuilder { + pub(crate) auth_tag: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesEncryptOutputBuilder { + #[allow(missing_docs)] +pub fn auth_tag(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_tag(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.auth_tag = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_tag(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.auth_tag +} +#[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} + /// Consumes the builder and constructs a [`AesEncryptOutput`](crate::deps::aws_cryptography_primitives::types::AesEncryptOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesEncryptOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesEncryptOutput { + auth_tag: self.auth_tag, +cipher_text: self.cipher_text, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs new file mode 100644 index 000000000..ddfbb9abe --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesGcm { + #[allow(missing_docs)] +pub iv_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub key_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub tag_length: ::std::option::Option<::std::primitive::i32>, +} +impl AesGcm { + #[allow(missing_docs)] +pub fn iv_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.iv_length +} +#[allow(missing_docs)] +pub fn key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.key_length +} +#[allow(missing_docs)] +pub fn tag_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.tag_length +} +} +impl AesGcm { + /// Creates a new builder-style object to manufacture [`AesGcm`](crate::deps::aws_cryptography_primitives::types::AesGcm). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesGcmBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesGcmBuilder::default() + } +} + +/// A builder for [`AesGcm`](crate::deps::aws_cryptography_primitives::types::AesGcm). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesGcmBuilder { + pub(crate) iv_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) key_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) tag_length: ::std::option::Option<::std::primitive::i32>, +} +impl AesGcmBuilder { + #[allow(missing_docs)] +pub fn iv_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.iv_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_iv_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.iv_length = input; + self +} +#[allow(missing_docs)] +pub fn get_iv_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.iv_length +} +#[allow(missing_docs)] +pub fn key_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.key_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.key_length = input; + self +} +#[allow(missing_docs)] +pub fn get_key_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.key_length +} +#[allow(missing_docs)] +pub fn tag_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.tag_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_tag_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.tag_length = input; + self +} +#[allow(missing_docs)] +pub fn get_tag_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.tag_length +} + /// Consumes the builder and constructs a [`AesGcm`](crate::deps::aws_cryptography_primitives::types::AesGcm). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesGcm, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesGcm { + iv_length: self.iv_length, +key_length: self.key_length, +tag_length: self.tag_length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs new file mode 100644 index 000000000..51d1d6ca8 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct AesKdfCtrInput { + #[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub nonce: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrInput { + #[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +} +impl AesKdfCtrInput { + /// Creates a new builder-style object to manufacture [`AesKdfCtrInput`](crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::AesKdfCtrInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::AesKdfCtrInputBuilder::default() + } +} + +/// A builder for [`AesKdfCtrInput`](crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AesKdfCtrInputBuilder { + pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) nonce: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl AesKdfCtrInputBuilder { + #[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.nonce = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.nonce = input; + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} + /// Consumes the builder and constructs a [`AesKdfCtrInput`](crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput { + expected_length: self.expected_length, +ikm: self.ikm, +nonce: self.nonce, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs new file mode 100644 index 000000000..b8279999d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CompressPublicKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl CompressPublicKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl CompressPublicKeyInput { + /// Creates a new builder-style object to manufacture [`CompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::CompressPublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::CompressPublicKeyInputBuilder::default() + } +} + +/// A builder for [`CompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CompressPublicKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl CompressPublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`CompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput { + ecc_curve: self.ecc_curve, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs new file mode 100644 index 000000000..56300269f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CompressPublicKeyOutput { + #[allow(missing_docs)] +pub compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CompressPublicKeyOutput { + #[allow(missing_docs)] +pub fn compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +} +impl CompressPublicKeyOutput { + /// Creates a new builder-style object to manufacture [`CompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::CompressPublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::CompressPublicKeyOutputBuilder::default() + } +} + +/// A builder for [`CompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CompressPublicKeyOutputBuilder { + pub(crate) compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl CompressPublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn compressed_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_compressed_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} + /// Consumes the builder and constructs a [`CompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput { + compressed_public_key: self.compressed_public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs new file mode 100644 index 000000000..f29cfd2d6 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecompressPublicKeyInput { + #[allow(missing_docs)] +pub compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +} +impl DecompressPublicKeyInput { + #[allow(missing_docs)] +pub fn compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +#[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +} +impl DecompressPublicKeyInput { + /// Creates a new builder-style object to manufacture [`DecompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::DecompressPublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::DecompressPublicKeyInputBuilder::default() + } +} + +/// A builder for [`DecompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecompressPublicKeyInputBuilder { + pub(crate) compressed_public_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) ecc_curve: ::std::option::Option, +} +impl DecompressPublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn compressed_public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_compressed_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.compressed_public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_compressed_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.compressed_public_key +} +#[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} + /// Consumes the builder and constructs a [`DecompressPublicKeyInput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput { + compressed_public_key: self.compressed_public_key, +ecc_curve: self.ecc_curve, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs new file mode 100644 index 000000000..90ae6a363 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DecompressPublicKeyOutput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl DecompressPublicKeyOutput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl DecompressPublicKeyOutput { + /// Creates a new builder-style object to manufacture [`DecompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::DecompressPublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::DecompressPublicKeyOutputBuilder::default() + } +} + +/// A builder for [`DecompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecompressPublicKeyOutputBuilder { + pub(crate) public_key: ::std::option::Option, +} +impl DecompressPublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`DecompressPublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs new file mode 100644 index 000000000..6e21023f2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeriveSharedSecretInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl DeriveSharedSecretInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl DeriveSharedSecretInput { + /// Creates a new builder-style object to manufacture [`DeriveSharedSecretInput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::DeriveSharedSecretInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::DeriveSharedSecretInputBuilder::default() + } +} + +/// A builder for [`DeriveSharedSecretInput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeriveSharedSecretInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl DeriveSharedSecretInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`DeriveSharedSecretInput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs new file mode 100644 index 000000000..c9b6af8e2 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DeriveSharedSecretOutput { + #[allow(missing_docs)] +pub shared_secret: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeriveSharedSecretOutput { + #[allow(missing_docs)] +pub fn shared_secret(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.shared_secret +} +} +impl DeriveSharedSecretOutput { + /// Creates a new builder-style object to manufacture [`DeriveSharedSecretOutput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::DeriveSharedSecretOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::DeriveSharedSecretOutputBuilder::default() + } +} + +/// A builder for [`DeriveSharedSecretOutput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DeriveSharedSecretOutputBuilder { + pub(crate) shared_secret: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DeriveSharedSecretOutputBuilder { + #[allow(missing_docs)] +pub fn shared_secret(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.shared_secret = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_shared_secret(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.shared_secret = input; + self +} +#[allow(missing_docs)] +pub fn get_shared_secret(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.shared_secret +} + /// Consumes the builder and constructs a [`DeriveSharedSecretOutput`](crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput { + shared_secret: self.shared_secret, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs new file mode 100644 index 000000000..1b3b425ba --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs @@ -0,0 +1,20 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum DigestAlgorithm { + Sha512, +Sha384, +Sha256, +} + +impl ::std::fmt::Display for DigestAlgorithm { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + DigestAlgorithm::Sha512 => write!(f, "SHA_512"), +DigestAlgorithm::Sha384 => write!(f, "SHA_384"), +DigestAlgorithm::Sha256 => write!(f, "SHA_256"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs new file mode 100644 index 000000000..6da415ea4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct DigestInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +} +impl DigestInput { + /// Creates a new builder-style object to manufacture [`DigestInput`](crate::deps::aws_cryptography_primitives::types::DigestInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::DigestInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::DigestInputBuilder::default() + } +} + +/// A builder for [`DigestInput`](crate::deps::aws_cryptography_primitives::types::DigestInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DigestInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl DigestInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} + /// Consumes the builder and constructs a [`DigestInput`](crate::deps::aws_cryptography_primitives::types::DigestInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::DigestInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::DigestInput { + digest_algorithm: self.digest_algorithm, +message: self.message, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs new file mode 100644 index 000000000..d80cb9561 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EccPrivateKey { + #[allow(missing_docs)] +pub pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EccPrivateKey { + #[allow(missing_docs)] +pub fn pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} +} +impl EccPrivateKey { + /// Creates a new builder-style object to manufacture [`EccPrivateKey`](crate::deps::aws_cryptography_primitives::types::EccPrivateKey). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::EccPrivateKeyBuilder { + crate::deps::aws_cryptography_primitives::types::builders::EccPrivateKeyBuilder::default() + } +} + +/// A builder for [`EccPrivateKey`](crate::deps::aws_cryptography_primitives::types::EccPrivateKey). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EccPrivateKeyBuilder { + pub(crate) pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EccPrivateKeyBuilder { + #[allow(missing_docs)] +pub fn pem(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.pem = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_pem(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.pem = input; + self +} +#[allow(missing_docs)] +pub fn get_pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} + /// Consumes the builder and constructs a [`EccPrivateKey`](crate::deps::aws_cryptography_primitives::types::EccPrivateKey). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::EccPrivateKey, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::EccPrivateKey { + pem: self.pem, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs new file mode 100644 index 000000000..7dd639803 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EccPublicKey { + #[allow(missing_docs)] +pub der: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EccPublicKey { + #[allow(missing_docs)] +pub fn der(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.der +} +} +impl EccPublicKey { + /// Creates a new builder-style object to manufacture [`EccPublicKey`](crate::deps::aws_cryptography_primitives::types::EccPublicKey). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::EccPublicKeyBuilder { + crate::deps::aws_cryptography_primitives::types::builders::EccPublicKeyBuilder::default() + } +} + +/// A builder for [`EccPublicKey`](crate::deps::aws_cryptography_primitives::types::EccPublicKey). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EccPublicKeyBuilder { + pub(crate) der: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EccPublicKeyBuilder { + #[allow(missing_docs)] +pub fn der(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.der = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_der(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.der = input; + self +} +#[allow(missing_docs)] +pub fn get_der(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.der +} + /// Consumes the builder and constructs a [`EccPublicKey`](crate::deps::aws_cryptography_primitives::types::EccPublicKey). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::EccPublicKey, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::EccPublicKey { + der: self.der, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs new file mode 100644 index 000000000..c9050dcb9 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs @@ -0,0 +1,22 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum EcdhCurveSpec { + EccNistP256, +EccNistP384, +EccNistP521, +Sm2, +} + +impl ::std::fmt::Display for EcdhCurveSpec { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + EcdhCurveSpec::EccNistP256 => write!(f, "ECC_NIST_P256"), +EcdhCurveSpec::EccNistP384 => write!(f, "ECC_NIST_P384"), +EcdhCurveSpec::EccNistP521 => write!(f, "ECC_NIST_P521"), +EcdhCurveSpec::Sm2 => write!(f, "SM2"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs new file mode 100644 index 000000000..5269eb9f3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaSignInput { + #[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignInput { + #[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +} +impl EcdsaSignInput { + /// Creates a new builder-style object to manufacture [`EcdsaSignInput`](crate::deps::aws_cryptography_primitives::types::EcdsaSignInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::EcdsaSignInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::EcdsaSignInputBuilder::default() + } +} + +/// A builder for [`EcdsaSignInput`](crate::deps::aws_cryptography_primitives::types::EcdsaSignInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaSignInputBuilder { + pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaSignInputBuilder { + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} + /// Consumes the builder and constructs a [`EcdsaSignInput`](crate::deps::aws_cryptography_primitives::types::EcdsaSignInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::EcdsaSignInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::EcdsaSignInput { + message: self.message, +signature_algorithm: self.signature_algorithm, +signing_key: self.signing_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs new file mode 100644 index 000000000..f67728ed4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs @@ -0,0 +1,18 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum EcdsaSignatureAlgorithm { + EcdsaP384, +EcdsaP256, +} + +impl ::std::fmt::Display for EcdsaSignatureAlgorithm { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + EcdsaSignatureAlgorithm::EcdsaP384 => write!(f, "ECDSA_P384"), +EcdsaSignatureAlgorithm::EcdsaP256 => write!(f, "ECDSA_P256"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs new file mode 100644 index 000000000..c626daf55 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct EcdsaVerifyInput { + #[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaVerifyInput { + #[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} +#[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl EcdsaVerifyInput { + /// Creates a new builder-style object to manufacture [`EcdsaVerifyInput`](crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::EcdsaVerifyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::EcdsaVerifyInputBuilder::default() + } +} + +/// A builder for [`EcdsaVerifyInput`](crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EcdsaVerifyInputBuilder { + pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl EcdsaVerifyInputBuilder { + #[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +#[allow(missing_docs)] +pub fn signature(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signature = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signature = input; + self +} +#[allow(missing_docs)] +pub fn get_signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signature +} +#[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`EcdsaVerifyInput`](crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput { + message: self.message, +signature: self.signature, +signature_algorithm: self.signature_algorithm, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_input.rs new file mode 100644 index 000000000..ae5fbfe1e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEccKeyPairInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +} +impl GenerateEccKeyPairInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +} +impl GenerateEccKeyPairInput { + /// Creates a new builder-style object to manufacture [`GenerateEccKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateEccKeyPairInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateEccKeyPairInputBuilder::default() + } +} + +/// A builder for [`GenerateEccKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEccKeyPairInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +} +impl GenerateEccKeyPairInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} + /// Consumes the builder and constructs a [`GenerateEccKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput { + ecc_curve: self.ecc_curve, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_output.rs new file mode 100644 index 000000000..cda8d96cf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEccKeyPairOutput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl GenerateEccKeyPairOutput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl GenerateEccKeyPairOutput { + /// Creates a new builder-style object to manufacture [`GenerateEccKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateEccKeyPairOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateEccKeyPairOutputBuilder::default() + } +} + +/// A builder for [`GenerateEccKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEccKeyPairOutputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl GenerateEccKeyPairOutputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`GenerateEccKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_input.rs new file mode 100644 index 000000000..6367bb28f --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEcdsaSignatureKeyInput { + #[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +} +impl GenerateEcdsaSignatureKeyInput { + #[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +} +impl GenerateEcdsaSignatureKeyInput { + /// Creates a new builder-style object to manufacture [`GenerateEcdsaSignatureKeyInput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateEcdsaSignatureKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateEcdsaSignatureKeyInputBuilder::default() + } +} + +/// A builder for [`GenerateEcdsaSignatureKeyInput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEcdsaSignatureKeyInputBuilder { + pub(crate) signature_algorithm: ::std::option::Option, +} +impl GenerateEcdsaSignatureKeyInputBuilder { + #[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} + /// Consumes the builder and constructs a [`GenerateEcdsaSignatureKeyInput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput { + signature_algorithm: self.signature_algorithm, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_output.rs new file mode 100644 index 000000000..3f6bdab9a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateEcdsaSignatureKeyOutput { + #[allow(missing_docs)] +pub signature_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateEcdsaSignatureKeyOutput { + #[allow(missing_docs)] +pub fn signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} +} +impl GenerateEcdsaSignatureKeyOutput { + /// Creates a new builder-style object to manufacture [`GenerateEcdsaSignatureKeyOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateEcdsaSignatureKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateEcdsaSignatureKeyOutputBuilder::default() + } +} + +/// A builder for [`GenerateEcdsaSignatureKeyOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateEcdsaSignatureKeyOutputBuilder { + pub(crate) signature_algorithm: ::std::option::Option, +pub(crate) signing_key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) verification_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GenerateEcdsaSignatureKeyOutputBuilder { + #[allow(missing_docs)] +pub fn signature_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.signature_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signature_algorithm(mut self, input: ::std::option::Option) -> Self { + self.signature_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_signature_algorithm(&self) -> &::std::option::Option { + &self.signature_algorithm +} +#[allow(missing_docs)] +pub fn signing_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.signing_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_signing_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.signing_key = input; + self +} +#[allow(missing_docs)] +pub fn get_signing_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.signing_key +} +#[allow(missing_docs)] +pub fn verification_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.verification_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_verification_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.verification_key = input; + self +} +#[allow(missing_docs)] +pub fn get_verification_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.verification_key +} + /// Consumes the builder and constructs a [`GenerateEcdsaSignatureKeyOutput`](crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput { + signature_algorithm: self.signature_algorithm, +signing_key: self.signing_key, +verification_key: self.verification_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs new file mode 100644 index 000000000..39c733162 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRandomBytesInput { + #[allow(missing_docs)] +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRandomBytesInput { + #[allow(missing_docs)] +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GenerateRandomBytesInput { + /// Creates a new builder-style object to manufacture [`GenerateRandomBytesInput`](crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateRandomBytesInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateRandomBytesInputBuilder::default() + } +} + +/// A builder for [`GenerateRandomBytesInput`](crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRandomBytesInputBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRandomBytesInputBuilder { + #[allow(missing_docs)] +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +#[allow(missing_docs)] +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GenerateRandomBytesInput`](crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput { + length: self.length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_input.rs new file mode 100644 index 000000000..15601eda0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRsaKeyPairInput { + #[allow(missing_docs)] +pub length_bits: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRsaKeyPairInput { + #[allow(missing_docs)] +pub fn length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +} +impl GenerateRsaKeyPairInput { + /// Creates a new builder-style object to manufacture [`GenerateRsaKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateRsaKeyPairInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateRsaKeyPairInputBuilder::default() + } +} + +/// A builder for [`GenerateRsaKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRsaKeyPairInputBuilder { + pub(crate) length_bits: ::std::option::Option<::std::primitive::i32>, +} +impl GenerateRsaKeyPairInputBuilder { + #[allow(missing_docs)] +pub fn length_bits(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length_bits = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length_bits(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length_bits = input; + self +} +#[allow(missing_docs)] +pub fn get_length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} + /// Consumes the builder and constructs a [`GenerateRsaKeyPairInput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput { + length_bits: self.length_bits, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_output.rs new file mode 100644 index 000000000..bdbe08ea3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_output.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GenerateRsaKeyPairOutput { + #[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl GenerateRsaKeyPairOutput { + #[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl GenerateRsaKeyPairOutput { + /// Creates a new builder-style object to manufacture [`GenerateRsaKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GenerateRsaKeyPairOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GenerateRsaKeyPairOutputBuilder::default() + } +} + +/// A builder for [`GenerateRsaKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GenerateRsaKeyPairOutputBuilder { + pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option, +} +impl GenerateRsaKeyPairOutputBuilder { + #[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`GenerateRsaKeyPairOutput`](crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput { + private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_input.rs new file mode 100644 index 000000000..1d2d6fccf --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetPublicKeyFromPrivateKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +} +impl GetPublicKeyFromPrivateKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +} +impl GetPublicKeyFromPrivateKeyInput { + /// Creates a new builder-style object to manufacture [`GetPublicKeyFromPrivateKeyInput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GetPublicKeyFromPrivateKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GetPublicKeyFromPrivateKeyInputBuilder::default() + } +} + +/// A builder for [`GetPublicKeyFromPrivateKeyInput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetPublicKeyFromPrivateKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +} +impl GetPublicKeyFromPrivateKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} + /// Consumes the builder and constructs a [`GetPublicKeyFromPrivateKeyInput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_output.rs new file mode 100644 index 000000000..850286683 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_output.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetPublicKeyFromPrivateKeyOutput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetPublicKeyFromPrivateKeyOutput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl GetPublicKeyFromPrivateKeyOutput { + /// Creates a new builder-style object to manufacture [`GetPublicKeyFromPrivateKeyOutput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GetPublicKeyFromPrivateKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GetPublicKeyFromPrivateKeyOutputBuilder::default() + } +} + +/// A builder for [`GetPublicKeyFromPrivateKeyOutput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetPublicKeyFromPrivateKeyOutputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) private_key: ::std::option::Option, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetPublicKeyFromPrivateKeyOutputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option { + &self.private_key +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`GetPublicKeyFromPrivateKeyOutput`](crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput { + ecc_curve: self.ecc_curve, +private_key: self.private_key, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_input.rs new file mode 100644 index 000000000..c8b67acc4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetRsaKeyModulusLengthInput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetRsaKeyModulusLengthInput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl GetRsaKeyModulusLengthInput { + /// Creates a new builder-style object to manufacture [`GetRsaKeyModulusLengthInput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GetRsaKeyModulusLengthInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GetRsaKeyModulusLengthInputBuilder::default() + } +} + +/// A builder for [`GetRsaKeyModulusLengthInput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetRsaKeyModulusLengthInputBuilder { + pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl GetRsaKeyModulusLengthInputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`GetRsaKeyModulusLengthInput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_output.rs new file mode 100644 index 000000000..0169ede02 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct GetRsaKeyModulusLengthOutput { + #[allow(missing_docs)] +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GetRsaKeyModulusLengthOutput { + #[allow(missing_docs)] +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GetRsaKeyModulusLengthOutput { + /// Creates a new builder-style object to manufacture [`GetRsaKeyModulusLengthOutput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::GetRsaKeyModulusLengthOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::GetRsaKeyModulusLengthOutputBuilder::default() + } +} + +/// A builder for [`GetRsaKeyModulusLengthOutput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetRsaKeyModulusLengthOutputBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GetRsaKeyModulusLengthOutputBuilder { + #[allow(missing_docs)] +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +#[allow(missing_docs)] +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GetRsaKeyModulusLengthOutput`](crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput { + length: self.length, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs new file mode 100644 index 000000000..68f03faf7 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HMacInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub key: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} +} +impl HMacInput { + /// Creates a new builder-style object to manufacture [`HMacInput`](crate::deps::aws_cryptography_primitives::types::HMacInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::HMacInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::HMacInputBuilder::default() + } +} + +/// A builder for [`HMacInput`](crate::deps::aws_cryptography_primitives::types::HMacInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HMacInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) key: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) message: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HMacInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.key +} +#[allow(missing_docs)] +pub fn message(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.message = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_message(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.message = input; + self +} +#[allow(missing_docs)] +pub fn get_message(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.message +} + /// Consumes the builder and constructs a [`HMacInput`](crate::deps::aws_cryptography_primitives::types::HMacInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::HMacInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::HMacInput { + digest_algorithm: self.digest_algorithm, +key: self.key, +message: self.message, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs new file mode 100644 index 000000000..2a3ecde57 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs @@ -0,0 +1,124 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExpandInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub info: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} +} +impl HkdfExpandInput { + /// Creates a new builder-style object to manufacture [`HkdfExpandInput`](crate::deps::aws_cryptography_primitives::types::HkdfExpandInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::HkdfExpandInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::HkdfExpandInputBuilder::default() + } +} + +/// A builder for [`HkdfExpandInput`](crate::deps::aws_cryptography_primitives::types::HkdfExpandInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExpandInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) info: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) prk: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExpandInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.info = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.info = input; + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn prk(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.prk = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_prk(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.prk = input; + self +} +#[allow(missing_docs)] +pub fn get_prk(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.prk +} + /// Consumes the builder and constructs a [`HkdfExpandInput`](crate::deps::aws_cryptography_primitives::types::HkdfExpandInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::HkdfExpandInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::HkdfExpandInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +info: self.info, +prk: self.prk, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs new file mode 100644 index 000000000..39dcf2c65 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfExtractInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} +} +impl HkdfExtractInput { + /// Creates a new builder-style object to manufacture [`HkdfExtractInput`](crate::deps::aws_cryptography_primitives::types::HkdfExtractInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::HkdfExtractInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::HkdfExtractInputBuilder::default() + } +} + +/// A builder for [`HkdfExtractInput`](crate::deps::aws_cryptography_primitives::types::HkdfExtractInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfExtractInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfExtractInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.salt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.salt = input; + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} + /// Consumes the builder and constructs a [`HkdfExtractInput`](crate::deps::aws_cryptography_primitives::types::HkdfExtractInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::HkdfExtractInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::HkdfExtractInput { + digest_algorithm: self.digest_algorithm, +ikm: self.ikm, +salt: self.salt, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs new file mode 100644 index 000000000..22995437a --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct HkdfInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub info: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} +} +impl HkdfInput { + /// Creates a new builder-style object to manufacture [`HkdfInput`](crate::deps::aws_cryptography_primitives::types::HkdfInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::HkdfInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::HkdfInputBuilder::default() + } +} + +/// A builder for [`HkdfInput`](crate::deps::aws_cryptography_primitives::types::HkdfInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct HkdfInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) info: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) salt: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl HkdfInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn info(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.info = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_info(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.info = input; + self +} +#[allow(missing_docs)] +pub fn get_info(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.info +} +#[allow(missing_docs)] +pub fn salt(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.salt = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_salt(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.salt = input; + self +} +#[allow(missing_docs)] +pub fn get_salt(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.salt +} + /// Consumes the builder and constructs a [`HkdfInput`](crate::deps::aws_cryptography_primitives::types::HkdfInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::HkdfInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::HkdfInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +ikm: self.ikm, +info: self.info, +salt: self.salt, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs new file mode 100644 index 000000000..02ab761cb --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs @@ -0,0 +1,146 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct KdfCtrInput { + #[allow(missing_docs)] +pub digest_algorithm: ::std::option::Option, +#[allow(missing_docs)] +pub expected_length: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub ikm: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub nonce: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub purpose: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrInput { + #[allow(missing_docs)] +pub fn digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +#[allow(missing_docs)] +pub fn purpose(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.purpose +} +} +impl KdfCtrInput { + /// Creates a new builder-style object to manufacture [`KdfCtrInput`](crate::deps::aws_cryptography_primitives::types::KdfCtrInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::KdfCtrInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::KdfCtrInputBuilder::default() + } +} + +/// A builder for [`KdfCtrInput`](crate::deps::aws_cryptography_primitives::types::KdfCtrInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct KdfCtrInputBuilder { + pub(crate) digest_algorithm: ::std::option::Option, +pub(crate) expected_length: ::std::option::Option<::std::primitive::i32>, +pub(crate) ikm: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) nonce: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) purpose: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl KdfCtrInputBuilder { + #[allow(missing_docs)] +pub fn digest_algorithm(mut self, input: impl ::std::convert::Into) -> Self { + self.digest_algorithm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_digest_algorithm(mut self, input: ::std::option::Option) -> Self { + self.digest_algorithm = input; + self +} +#[allow(missing_docs)] +pub fn get_digest_algorithm(&self) -> &::std::option::Option { + &self.digest_algorithm +} +#[allow(missing_docs)] +pub fn expected_length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.expected_length = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_expected_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.expected_length = input; + self +} +#[allow(missing_docs)] +pub fn get_expected_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.expected_length +} +#[allow(missing_docs)] +pub fn ikm(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.ikm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ikm(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.ikm = input; + self +} +#[allow(missing_docs)] +pub fn get_ikm(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.ikm +} +#[allow(missing_docs)] +pub fn nonce(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.nonce = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_nonce(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.nonce = input; + self +} +#[allow(missing_docs)] +pub fn get_nonce(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.nonce +} +#[allow(missing_docs)] +pub fn purpose(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.purpose = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_purpose(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.purpose = input; + self +} +#[allow(missing_docs)] +pub fn get_purpose(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.purpose +} + /// Consumes the builder and constructs a [`KdfCtrInput`](crate::deps::aws_cryptography_primitives::types::KdfCtrInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::KdfCtrInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::KdfCtrInput { + digest_algorithm: self.digest_algorithm, +expected_length: self.expected_length, +ikm: self.ikm, +nonce: self.nonce, +purpose: self.purpose, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs new file mode 100644 index 000000000..ffb3e261e --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ParsePublicKeyInput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ParsePublicKeyInput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl ParsePublicKeyInput { + /// Creates a new builder-style object to manufacture [`ParsePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::ParsePublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::ParsePublicKeyInputBuilder::default() + } +} + +/// A builder for [`ParsePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsePublicKeyInputBuilder { + pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ParsePublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`ParsePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs new file mode 100644 index 000000000..671dfd760 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ParsePublicKeyOutput { + #[allow(missing_docs)] +pub public_key: ::std::option::Option, +} +impl ParsePublicKeyOutput { + #[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option { + &self.public_key +} +} +impl ParsePublicKeyOutput { + /// Creates a new builder-style object to manufacture [`ParsePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::ParsePublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::ParsePublicKeyOutputBuilder::default() + } +} + +/// A builder for [`ParsePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsePublicKeyOutputBuilder { + pub(crate) public_key: ::std::option::Option, +} +impl ParsePublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option { + &self.public_key +} + /// Consumes the builder and constructs a [`ParsePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput { + public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs new file mode 100644 index 000000000..bf7e33f54 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaDecryptInput { + #[allow(missing_docs)] +pub cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub padding: ::std::option::Option, +#[allow(missing_docs)] +pub private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptInput { + #[allow(missing_docs)] +pub fn cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +#[allow(missing_docs)] +pub fn padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} +} +impl RsaDecryptInput { + /// Creates a new builder-style object to manufacture [`RsaDecryptInput`](crate::deps::aws_cryptography_primitives::types::RsaDecryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::RsaDecryptInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::RsaDecryptInputBuilder::default() + } +} + +/// A builder for [`RsaDecryptInput`](crate::deps::aws_cryptography_primitives::types::RsaDecryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaDecryptInputBuilder { + pub(crate) cipher_text: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) padding: ::std::option::Option, +pub(crate) private_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaDecryptInputBuilder { + #[allow(missing_docs)] +pub fn cipher_text(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cipher_text(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.cipher_text = input; + self +} +#[allow(missing_docs)] +pub fn get_cipher_text(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.cipher_text +} +#[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.padding = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.padding = input; + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn private_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.private_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.private_key = input; + self +} +#[allow(missing_docs)] +pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.private_key +} + /// Consumes the builder and constructs a [`RsaDecryptInput`](crate::deps::aws_cryptography_primitives::types::RsaDecryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::RsaDecryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::RsaDecryptInput { + cipher_text: self.cipher_text, +padding: self.padding, +private_key: self.private_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs new file mode 100644 index 000000000..846979f82 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs @@ -0,0 +1,102 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaEncryptInput { + #[allow(missing_docs)] +pub padding: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptInput { + #[allow(missing_docs)] +pub fn padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl RsaEncryptInput { + /// Creates a new builder-style object to manufacture [`RsaEncryptInput`](crate::deps::aws_cryptography_primitives::types::RsaEncryptInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::RsaEncryptInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::RsaEncryptInputBuilder::default() + } +} + +/// A builder for [`RsaEncryptInput`](crate::deps::aws_cryptography_primitives::types::RsaEncryptInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaEncryptInputBuilder { + pub(crate) padding: ::std::option::Option, +pub(crate) plaintext: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaEncryptInputBuilder { + #[allow(missing_docs)] +pub fn padding(mut self, input: impl ::std::convert::Into) -> Self { + self.padding = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_padding(mut self, input: ::std::option::Option) -> Self { + self.padding = input; + self +} +#[allow(missing_docs)] +pub fn get_padding(&self) -> &::std::option::Option { + &self.padding +} +#[allow(missing_docs)] +pub fn plaintext(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.plaintext = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.plaintext = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.plaintext +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`RsaEncryptInput`](crate::deps::aws_cryptography_primitives::types::RsaEncryptInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::RsaEncryptInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::RsaEncryptInput { + padding: self.padding, +plaintext: self.plaintext, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs new file mode 100644 index 000000000..3d6ad312b --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs @@ -0,0 +1,24 @@ +// 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. +#[derive(Debug, PartialEq, Copy, Clone)] +#[allow(missing_docs)] +pub enum RsaPaddingMode { + Pkcs1, +OaepSha1, +OaepSha256, +OaepSha384, +OaepSha512, +} + +impl ::std::fmt::Display for RsaPaddingMode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + RsaPaddingMode::Pkcs1 => write!(f, "PKCS1"), +RsaPaddingMode::OaepSha1 => write!(f, "OAEP_SHA1"), +RsaPaddingMode::OaepSha256 => write!(f, "OAEP_SHA256"), +RsaPaddingMode::OaepSha384 => write!(f, "OAEP_SHA384"), +RsaPaddingMode::OaepSha512 => write!(f, "OAEP_SHA512"), + } + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs new file mode 100644 index 000000000..1ca854cd0 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaPrivateKey { + #[allow(missing_docs)] +pub length_bits: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaPrivateKey { + #[allow(missing_docs)] +pub fn length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +#[allow(missing_docs)] +pub fn pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} +} +impl RsaPrivateKey { + /// Creates a new builder-style object to manufacture [`RsaPrivateKey`](crate::deps::aws_cryptography_primitives::types::RsaPrivateKey). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::RsaPrivateKeyBuilder { + crate::deps::aws_cryptography_primitives::types::builders::RsaPrivateKeyBuilder::default() + } +} + +/// A builder for [`RsaPrivateKey`](crate::deps::aws_cryptography_primitives::types::RsaPrivateKey). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaPrivateKeyBuilder { + pub(crate) length_bits: ::std::option::Option<::std::primitive::i32>, +pub(crate) pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaPrivateKeyBuilder { + #[allow(missing_docs)] +pub fn length_bits(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length_bits = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length_bits(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length_bits = input; + self +} +#[allow(missing_docs)] +pub fn get_length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +#[allow(missing_docs)] +pub fn pem(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.pem = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_pem(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.pem = input; + self +} +#[allow(missing_docs)] +pub fn get_pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} + /// Consumes the builder and constructs a [`RsaPrivateKey`](crate::deps::aws_cryptography_primitives::types::RsaPrivateKey). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::RsaPrivateKey, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::RsaPrivateKey { + length_bits: self.length_bits, +pem: self.pem, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs new file mode 100644 index 000000000..13d0a048d --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct RsaPublicKey { + #[allow(missing_docs)] +pub length_bits: ::std::option::Option<::std::primitive::i32>, +#[allow(missing_docs)] +pub pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaPublicKey { + #[allow(missing_docs)] +pub fn length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +#[allow(missing_docs)] +pub fn pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} +} +impl RsaPublicKey { + /// Creates a new builder-style object to manufacture [`RsaPublicKey`](crate::deps::aws_cryptography_primitives::types::RsaPublicKey). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::RsaPublicKeyBuilder { + crate::deps::aws_cryptography_primitives::types::builders::RsaPublicKeyBuilder::default() + } +} + +/// A builder for [`RsaPublicKey`](crate::deps::aws_cryptography_primitives::types::RsaPublicKey). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct RsaPublicKeyBuilder { + pub(crate) length_bits: ::std::option::Option<::std::primitive::i32>, +pub(crate) pem: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl RsaPublicKeyBuilder { + #[allow(missing_docs)] +pub fn length_bits(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length_bits = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_length_bits(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length_bits = input; + self +} +#[allow(missing_docs)] +pub fn get_length_bits(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length_bits +} +#[allow(missing_docs)] +pub fn pem(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.pem = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_pem(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.pem = input; + self +} +#[allow(missing_docs)] +pub fn get_pem(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.pem +} + /// Consumes the builder and constructs a [`RsaPublicKey`](crate::deps::aws_cryptography_primitives::types::RsaPublicKey). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::RsaPublicKey, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::RsaPublicKey { + length_bits: self.length_bits, +pem: self.pem, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs new file mode 100644 index 000000000..cb29fe90c --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs @@ -0,0 +1,80 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidatePublicKeyInput { + #[allow(missing_docs)] +pub ecc_curve: ::std::option::Option, +#[allow(missing_docs)] +pub public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ValidatePublicKeyInput { + #[allow(missing_docs)] +pub fn ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} +} +impl ValidatePublicKeyInput { + /// Creates a new builder-style object to manufacture [`ValidatePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::ValidatePublicKeyInputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::ValidatePublicKeyInputBuilder::default() + } +} + +/// A builder for [`ValidatePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidatePublicKeyInputBuilder { + pub(crate) ecc_curve: ::std::option::Option, +pub(crate) public_key: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl ValidatePublicKeyInputBuilder { + #[allow(missing_docs)] +pub fn ecc_curve(mut self, input: impl ::std::convert::Into) -> Self { + self.ecc_curve = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_ecc_curve(mut self, input: ::std::option::Option) -> Self { + self.ecc_curve = input; + self +} +#[allow(missing_docs)] +pub fn get_ecc_curve(&self) -> &::std::option::Option { + &self.ecc_curve +} +#[allow(missing_docs)] +pub fn public_key(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.public_key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_public_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.public_key = input; + self +} +#[allow(missing_docs)] +pub fn get_public_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.public_key +} + /// Consumes the builder and constructs a [`ValidatePublicKeyInput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput { + ecc_curve: self.ecc_curve, +public_key: self.public_key, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs new file mode 100644 index 000000000..70a0aa1d4 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs @@ -0,0 +1,58 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct ValidatePublicKeyOutput { + #[allow(missing_docs)] +pub success: ::std::option::Option<::std::primitive::bool>, +} +impl ValidatePublicKeyOutput { + #[allow(missing_docs)] +pub fn success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} +} +impl ValidatePublicKeyOutput { + /// Creates a new builder-style object to manufacture [`ValidatePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::builders::ValidatePublicKeyOutputBuilder { + crate::deps::aws_cryptography_primitives::types::builders::ValidatePublicKeyOutputBuilder::default() + } +} + +/// A builder for [`ValidatePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ValidatePublicKeyOutputBuilder { + pub(crate) success: ::std::option::Option<::std::primitive::bool>, +} +impl ValidatePublicKeyOutputBuilder { + #[allow(missing_docs)] +pub fn success(mut self, input: impl ::std::convert::Into<::std::primitive::bool>) -> Self { + self.success = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_success(mut self, input: ::std::option::Option<::std::primitive::bool>) -> Self { + self.success = input; + self +} +#[allow(missing_docs)] +pub fn get_success(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.success +} + /// Consumes the builder and constructs a [`ValidatePublicKeyOutput`](crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput { + success: self.success, + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/builders.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/builders.rs new file mode 100644 index 000000000..ce64e6460 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/builders.rs @@ -0,0 +1,84 @@ +// 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 use crate::deps::aws_cryptography_primitives::types::_aes_ctr::AesCtrBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_aes_gcm::AesGcmBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_aes_decrypt_input::AesDecryptInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_aes_encrypt_input::AesEncryptInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_aes_encrypt_output::AesEncryptOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_aes_kdf_ctr_input::AesKdfCtrInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_compress_public_key_input::CompressPublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_compress_public_key_output::CompressPublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_decompress_public_key_input::DecompressPublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_decompress_public_key_output::DecompressPublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_derive_shared_secret_input::DeriveSharedSecretInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_derive_shared_secret_output::DeriveSharedSecretOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_digest_input::DigestInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_ecc_private_key::EccPrivateKeyBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_ecc_public_key::EccPublicKeyBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_ecdsa_sign_input::EcdsaSignInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_ecdsa_verify_input::EcdsaVerifyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecc_key_pair_input::GenerateEccKeyPairInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecc_key_pair_output::GenerateEccKeyPairOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecdsa_signature_key_input::GenerateEcdsaSignatureKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_ecdsa_signature_key_output::GenerateEcdsaSignatureKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_random_bytes_input::GenerateRandomBytesInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_rsa_key_pair_input::GenerateRsaKeyPairInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_generate_rsa_key_pair_output::GenerateRsaKeyPairOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_get_public_key_from_private_key_input::GetPublicKeyFromPrivateKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_get_public_key_from_private_key_output::GetPublicKeyFromPrivateKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_get_rsa_key_modulus_length_input::GetRsaKeyModulusLengthInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_get_rsa_key_modulus_length_output::GetRsaKeyModulusLengthOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_expand_input::HkdfExpandInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_extract_input::HkdfExtractInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_hkdf_input::HkdfInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_h_mac_input::HMacInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_kdf_ctr_input::KdfCtrInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_parse_public_key_input::ParsePublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_parse_public_key_output::ParsePublicKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_rsa_decrypt_input::RsaDecryptInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_rsa_encrypt_input::RsaEncryptInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_rsa_private_key::RsaPrivateKeyBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_rsa_public_key::RsaPublicKeyBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_validate_public_key_input::ValidatePublicKeyInputBuilder; + +pub use crate::deps::aws_cryptography_primitives::types::_validate_public_key_output::ValidatePublicKeyOutputBuilder; diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs new file mode 100644 index 000000000..fada02067 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs @@ -0,0 +1,41 @@ +// 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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub struct CryptoConfig { + +} +impl CryptoConfig { + +} +impl CryptoConfig { + /// Creates a new builder-style object to manufacture [`CryptoConfig`](crate::deps::aws_cryptography_primitives::types::CryptoConfig). + pub fn builder() -> crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfigBuilder { + crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfigBuilder::default() + } +} + +/// A builder for [`CryptoConfig`](crate::deps::aws_cryptography_primitives::types::CryptoConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CryptoConfigBuilder { + +} +impl CryptoConfigBuilder { + + /// Consumes the builder and constructs a [`CryptoConfig`](crate::deps::aws_cryptography_primitives::types::CryptoConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig { + + }) + } +} diff --git a/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/error.rs b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/error.rs new file mode 100644 index 000000000..5fb0d34d3 --- /dev/null +++ b/releases/rust/esdk/src/deps/aws_cryptography_primitives/types/error.rs @@ -0,0 +1,72 @@ +// 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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + #[allow(missing_docs)] +AwsCryptographicPrimitivesError { + message: ::std::string::String, +}, + CollectionOfErrors { + list: ::std::vec::Vec, + message: ::std::string::String, + }, + ValidationError(ValidationError), + Opaque { + obj: ::dafny_runtime::Object, + }, + OpaqueWithText { + obj: ::dafny_runtime::Object, + objMessage: ::std::string::String, + }, +} + +impl ::std::cmp::Eq for Error {} + +impl ::std::fmt::Display for Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + Self::ValidationError(err) => ::std::fmt::Display::fmt(err, f), + _ => ::std::fmt::Debug::fmt(self, f), + } + } +} + +impl ::std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::ValidationError(err) => Some(err), + _ => None, + } + } +} + +impl Error { + pub fn wrap_validation_err(err: E) -> Self + where + E: ::std::error::Error + 'static, + { + Self::ValidationError(ValidationError(::std::rc::Rc::new(err))) + } +} + +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ValidationError(::std::rc::Rc); + +impl ::std::cmp::PartialEq for ValidationError { + fn eq(&self, other: &Self) -> bool { + ::std::rc::Rc::<(dyn std::error::Error + 'static)>::ptr_eq(&self.0, &other.0) + } +} + +impl ::std::fmt::Display for ValidationError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + ::std::fmt::Display::fmt(&self.0, f) + } +} + +impl ::std::error::Error for ValidationError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + ::std::option::Option::Some(self.0.as_ref()) + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb.rs new file mode 100644 index 000000000..ea19ab7eb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb.rs @@ -0,0 +1,6 @@ +// 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 mod client; +pub mod conversions; +pub mod types; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/client.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/client.rs new file mode 100644 index 000000000..3e21cfe89 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/client.rs @@ -0,0 +1,1305 @@ +// 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. +use std::sync::LazyLock; +use crate::deps::com_amazonaws_dynamodb::conversions; + +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct Client { + pub inner: aws_sdk_dynamodb::Client +} + +impl ::std::cmp::PartialEq for Client { + fn eq(&self, other: &Self) -> bool { + false + } +} + +impl ::std::convert::Into for aws_sdk_dynamodb::Client { + fn into(self) -> Client { + Client { inner: self } + } +} + +/// A runtime for executing operations on the asynchronous client in a blocking manner. +/// Necessary because Dafny only generates synchronous code. +static dafny_tokio_runtime: LazyLock = LazyLock::new(|| { + tokio::runtime::Builder::new_multi_thread() + .enable_all() + .build() + .unwrap() +}); + +impl dafny_runtime::UpcastObject for Client { + ::dafny_runtime::UpcastObjectFn!(dyn::std::any::Any); +} + +impl dafny_runtime::UpcastObject for Client { + ::dafny_runtime::UpcastObjectFn!(dyn crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient); +} + +impl crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient + for Client { + fn BatchExecuteStatement(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.batch_execute_statement() + .set_statements(inner_input.statements) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::to_dafny_error) +} + fn BatchGetItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.batch_get_item() + .set_request_items(inner_input.request_items) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::to_dafny_error) +} + fn BatchWriteItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.batch_write_item() + .set_request_items(inner_input.request_items) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_return_item_collection_metrics(inner_input.return_item_collection_metrics) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::to_dafny_error) +} + fn CreateBackup(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::create_backup::_create_backup_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_backup() + .set_table_name(inner_input.table_name) +.set_backup_name(inner_input.backup_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::create_backup::_create_backup_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::create_backup::to_dafny_error) +} + fn CreateGlobalTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::create_global_table::_create_global_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_global_table() + .set_global_table_name(inner_input.global_table_name) +.set_replication_group(inner_input.replication_group) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::create_global_table::_create_global_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::create_global_table::to_dafny_error) +} + fn CreateTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::create_table::_create_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_table() + .set_attribute_definitions(inner_input.attribute_definitions) +.set_table_name(inner_input.table_name) +.set_key_schema(inner_input.key_schema) +.set_local_secondary_indexes(inner_input.local_secondary_indexes) +.set_global_secondary_indexes(inner_input.global_secondary_indexes) +.set_billing_mode(inner_input.billing_mode) +.set_provisioned_throughput(inner_input.provisioned_throughput) +.set_stream_specification(inner_input.stream_specification) +.set_sse_specification(inner_input.sse_specification) +.set_tags(inner_input.tags) +.set_table_class(inner_input.table_class) +.set_deletion_protection_enabled(inner_input.deletion_protection_enabled) +.set_resource_policy(inner_input.resource_policy) +.set_on_demand_throughput(inner_input.on_demand_throughput) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::create_table::_create_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::create_table::to_dafny_error) +} + fn DeleteBackup(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::delete_backup::_delete_backup_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_backup() + .set_backup_arn(inner_input.backup_arn) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::delete_backup::_delete_backup_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::delete_backup::to_dafny_error) +} + fn DeleteItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_item() + .set_table_name(inner_input.table_name) +.set_key(inner_input.key) +.set_expected(inner_input.expected) +.set_conditional_operator(inner_input.conditional_operator) +.set_return_values(inner_input.return_values) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_return_item_collection_metrics(inner_input.return_item_collection_metrics) +.set_condition_expression(inner_input.condition_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) +.set_expression_attribute_values(inner_input.expression_attribute_values) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::delete_item::to_dafny_error) +} + fn DeleteResourcePolicy(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::delete_resource_policy::_delete_resource_policy_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_resource_policy() + .set_resource_arn(inner_input.resource_arn) +.set_expected_revision_id(inner_input.expected_revision_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::delete_resource_policy::_delete_resource_policy_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::delete_resource_policy::to_dafny_error) +} + fn DeleteTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::delete_table::_delete_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_table() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::delete_table::_delete_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::delete_table::to_dafny_error) +} + fn DescribeBackup(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_backup::_describe_backup_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_backup() + .set_backup_arn(inner_input.backup_arn) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_backup::_describe_backup_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_backup::to_dafny_error) +} + fn DescribeContinuousBackups(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_continuous_backups::_describe_continuous_backups_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_continuous_backups() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_continuous_backups::_describe_continuous_backups_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_continuous_backups::to_dafny_error) +} + fn DescribeContributorInsights(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_contributor_insights::_describe_contributor_insights_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_contributor_insights() + .set_table_name(inner_input.table_name) +.set_index_name(inner_input.index_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_contributor_insights::_describe_contributor_insights_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_contributor_insights::to_dafny_error) +} + fn DescribeEndpoints(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_endpoints::_describe_endpoints_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_endpoints() + + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_endpoints::_describe_endpoints_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_endpoints::to_dafny_error) +} + fn DescribeExport(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_export::_describe_export_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_export() + .set_export_arn(inner_input.export_arn) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_export::_describe_export_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_export::to_dafny_error) +} + fn DescribeGlobalTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table::_describe_global_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_global_table() + .set_global_table_name(inner_input.global_table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table::_describe_global_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table::to_dafny_error) +} + fn DescribeGlobalTableSettings(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table_settings::_describe_global_table_settings_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_global_table_settings() + .set_global_table_name(inner_input.global_table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table_settings::_describe_global_table_settings_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_global_table_settings::to_dafny_error) +} + fn DescribeImport(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_import::_describe_import_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_import() + .set_import_arn(inner_input.import_arn) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_import::_describe_import_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_import::to_dafny_error) +} + fn DescribeKinesisStreamingDestination(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_kinesis_streaming_destination::_describe_kinesis_streaming_destination_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_kinesis_streaming_destination() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_kinesis_streaming_destination::_describe_kinesis_streaming_destination_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_kinesis_streaming_destination::to_dafny_error) +} + fn DescribeLimits(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_limits::_describe_limits_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_limits() + + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_limits::_describe_limits_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_limits::to_dafny_error) +} + fn DescribeTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_table::_describe_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_table() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_table::_describe_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_table::to_dafny_error) +} + fn DescribeTableReplicaAutoScaling(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_table_replica_auto_scaling::_describe_table_replica_auto_scaling_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_table_replica_auto_scaling() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_table_replica_auto_scaling::_describe_table_replica_auto_scaling_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_table_replica_auto_scaling::to_dafny_error) +} + fn DescribeTimeToLive(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::describe_time_to_live::_describe_time_to_live_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_time_to_live() + .set_table_name(inner_input.table_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::describe_time_to_live::_describe_time_to_live_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::describe_time_to_live::to_dafny_error) +} + fn DisableKinesisStreamingDestination(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::disable_kinesis_streaming_destination::_disable_kinesis_streaming_destination_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.disable_kinesis_streaming_destination() + .set_table_name(inner_input.table_name) +.set_stream_arn(inner_input.stream_arn) +.set_enable_kinesis_streaming_configuration(inner_input.enable_kinesis_streaming_configuration) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::disable_kinesis_streaming_destination::_disable_kinesis_streaming_destination_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::disable_kinesis_streaming_destination::to_dafny_error) +} + fn EnableKinesisStreamingDestination(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_destination::_enable_kinesis_streaming_destination_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.enable_kinesis_streaming_destination() + .set_table_name(inner_input.table_name) +.set_stream_arn(inner_input.stream_arn) +.set_enable_kinesis_streaming_configuration(inner_input.enable_kinesis_streaming_configuration) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_destination::_enable_kinesis_streaming_destination_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_destination::to_dafny_error) +} + fn ExecuteStatement(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.execute_statement() + .set_statement(inner_input.statement) +.set_parameters(inner_input.parameters) +.set_consistent_read(inner_input.consistent_read) +.set_next_token(inner_input.next_token) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_limit(inner_input.limit) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::to_dafny_error) +} + fn ExecuteTransaction(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.execute_transaction() + .set_transact_statements(inner_input.transact_statements) +.set_client_request_token(inner_input.client_request_token) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::to_dafny_error) +} + fn ExportTableToPointInTime(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::export_table_to_point_in_time::_export_table_to_point_in_time_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.export_table_to_point_in_time() + .set_table_arn(inner_input.table_arn) +.set_export_time(inner_input.export_time) +.set_client_token(inner_input.client_token) +.set_s3_bucket(inner_input.s3_bucket) +.set_s3_bucket_owner(inner_input.s3_bucket_owner) +.set_s3_prefix(inner_input.s3_prefix) +.set_s3_sse_algorithm(inner_input.s3_sse_algorithm) +.set_s3_sse_kms_key_id(inner_input.s3_sse_kms_key_id) +.set_export_format(inner_input.export_format) +.set_export_type(inner_input.export_type) +.set_incremental_export_specification(inner_input.incremental_export_specification) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::export_table_to_point_in_time::_export_table_to_point_in_time_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::export_table_to_point_in_time::to_dafny_error) +} + fn GetItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_item() + .set_table_name(inner_input.table_name) +.set_key(inner_input.key) +.set_attributes_to_get(inner_input.attributes_to_get) +.set_consistent_read(inner_input.consistent_read) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_projection_expression(inner_input.projection_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::get_item::to_dafny_error) +} + fn GetResourcePolicy(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::get_resource_policy::_get_resource_policy_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_resource_policy() + .set_resource_arn(inner_input.resource_arn) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::get_resource_policy::_get_resource_policy_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::get_resource_policy::to_dafny_error) +} + fn ImportTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::import_table::_import_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.import_table() + .set_client_token(inner_input.client_token) +.set_s3_bucket_source(inner_input.s3_bucket_source) +.set_input_format(inner_input.input_format) +.set_input_format_options(inner_input.input_format_options) +.set_input_compression_type(inner_input.input_compression_type) +.set_table_creation_parameters(inner_input.table_creation_parameters) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::import_table::_import_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::import_table::to_dafny_error) +} + fn ListBackups(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_backups::_list_backups_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_backups() + .set_table_name(inner_input.table_name) +.set_limit(inner_input.limit) +.set_time_range_lower_bound(inner_input.time_range_lower_bound) +.set_time_range_upper_bound(inner_input.time_range_upper_bound) +.set_exclusive_start_backup_arn(inner_input.exclusive_start_backup_arn) +.set_backup_type(inner_input.backup_type) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_backups::_list_backups_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_backups::to_dafny_error) +} + fn ListContributorInsights(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_contributor_insights::_list_contributor_insights_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_contributor_insights() + .set_table_name(inner_input.table_name) +.set_next_token(inner_input.next_token) +.set_max_results(inner_input.max_results) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_contributor_insights::_list_contributor_insights_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_contributor_insights::to_dafny_error) +} + fn ListExports(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_exports::_list_exports_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_exports() + .set_table_arn(inner_input.table_arn) +.set_max_results(inner_input.max_results) +.set_next_token(inner_input.next_token) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_exports::_list_exports_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_exports::to_dafny_error) +} + fn ListGlobalTables(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_global_tables::_list_global_tables_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_global_tables() + .set_exclusive_start_global_table_name(inner_input.exclusive_start_global_table_name) +.set_limit(inner_input.limit) +.set_region_name(inner_input.region_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_global_tables::_list_global_tables_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_global_tables::to_dafny_error) +} + fn ListImports(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_imports::_list_imports_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_imports() + .set_table_arn(inner_input.table_arn) +.set_page_size(inner_input.page_size) +.set_next_token(inner_input.next_token) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_imports::_list_imports_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_imports::to_dafny_error) +} + fn ListTables(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_tables::_list_tables_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_tables() + .set_exclusive_start_table_name(inner_input.exclusive_start_table_name) +.set_limit(inner_input.limit) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_tables::_list_tables_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_tables::to_dafny_error) +} + fn ListTagsOfResource(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::list_tags_of_resource::_list_tags_of_resource_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_tags_of_resource() + .set_resource_arn(inner_input.resource_arn) +.set_next_token(inner_input.next_token) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::list_tags_of_resource::_list_tags_of_resource_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::list_tags_of_resource::to_dafny_error) +} + fn PutItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.put_item() + .set_table_name(inner_input.table_name) +.set_item(inner_input.item) +.set_expected(inner_input.expected) +.set_return_values(inner_input.return_values) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_return_item_collection_metrics(inner_input.return_item_collection_metrics) +.set_conditional_operator(inner_input.conditional_operator) +.set_condition_expression(inner_input.condition_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) +.set_expression_attribute_values(inner_input.expression_attribute_values) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::put_item::to_dafny_error) +} + fn PutResourcePolicy(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::put_resource_policy::_put_resource_policy_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.put_resource_policy() + .set_resource_arn(inner_input.resource_arn) +.set_policy(inner_input.policy) +.set_expected_revision_id(inner_input.expected_revision_id) +.set_confirm_remove_self_resource_access(inner_input.confirm_remove_self_resource_access) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::put_resource_policy::_put_resource_policy_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::put_resource_policy::to_dafny_error) +} + fn Query(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.query() + .set_table_name(inner_input.table_name) +.set_index_name(inner_input.index_name) +.set_select(inner_input.select) +.set_attributes_to_get(inner_input.attributes_to_get) +.set_limit(inner_input.limit) +.set_consistent_read(inner_input.consistent_read) +.set_key_conditions(inner_input.key_conditions) +.set_query_filter(inner_input.query_filter) +.set_conditional_operator(inner_input.conditional_operator) +.set_scan_index_forward(inner_input.scan_index_forward) +.set_exclusive_start_key(inner_input.exclusive_start_key) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_projection_expression(inner_input.projection_expression) +.set_filter_expression(inner_input.filter_expression) +.set_key_condition_expression(inner_input.key_condition_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) +.set_expression_attribute_values(inner_input.expression_attribute_values) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::query::to_dafny_error) +} + fn RestoreTableFromBackup(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::restore_table_from_backup::_restore_table_from_backup_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.restore_table_from_backup() + .set_target_table_name(inner_input.target_table_name) +.set_backup_arn(inner_input.backup_arn) +.set_billing_mode_override(inner_input.billing_mode_override) +.set_global_secondary_index_override(inner_input.global_secondary_index_override) +.set_local_secondary_index_override(inner_input.local_secondary_index_override) +.set_provisioned_throughput_override(inner_input.provisioned_throughput_override) +.set_on_demand_throughput_override(inner_input.on_demand_throughput_override) +.set_sse_specification_override(inner_input.sse_specification_override) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::restore_table_from_backup::_restore_table_from_backup_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::restore_table_from_backup::to_dafny_error) +} + fn RestoreTableToPointInTime(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::restore_table_to_point_in_time::_restore_table_to_point_in_time_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.restore_table_to_point_in_time() + .set_source_table_arn(inner_input.source_table_arn) +.set_source_table_name(inner_input.source_table_name) +.set_target_table_name(inner_input.target_table_name) +.set_use_latest_restorable_time(inner_input.use_latest_restorable_time) +.set_restore_date_time(inner_input.restore_date_time) +.set_billing_mode_override(inner_input.billing_mode_override) +.set_global_secondary_index_override(inner_input.global_secondary_index_override) +.set_local_secondary_index_override(inner_input.local_secondary_index_override) +.set_provisioned_throughput_override(inner_input.provisioned_throughput_override) +.set_on_demand_throughput_override(inner_input.on_demand_throughput_override) +.set_sse_specification_override(inner_input.sse_specification_override) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::restore_table_to_point_in_time::_restore_table_to_point_in_time_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::restore_table_to_point_in_time::to_dafny_error) +} + fn Scan(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.scan() + .set_table_name(inner_input.table_name) +.set_index_name(inner_input.index_name) +.set_attributes_to_get(inner_input.attributes_to_get) +.set_limit(inner_input.limit) +.set_select(inner_input.select) +.set_scan_filter(inner_input.scan_filter) +.set_conditional_operator(inner_input.conditional_operator) +.set_exclusive_start_key(inner_input.exclusive_start_key) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_total_segments(inner_input.total_segments) +.set_segment(inner_input.segment) +.set_projection_expression(inner_input.projection_expression) +.set_filter_expression(inner_input.filter_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) +.set_expression_attribute_values(inner_input.expression_attribute_values) +.set_consistent_read(inner_input.consistent_read) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::scan::to_dafny_error) +} + fn TagResource(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::tag_resource::_tag_resource_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.tag_resource() + .set_resource_arn(inner_input.resource_arn) +.set_tags(inner_input.tags) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_dynamodb::conversions::tag_resource::to_dafny_error) +} + fn TransactGetItems(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.transact_get_items() + .set_transact_items(inner_input.transact_items) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::to_dafny_error) +} + fn TransactWriteItems(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.transact_write_items() + .set_transact_items(inner_input.transact_items) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_return_item_collection_metrics(inner_input.return_item_collection_metrics) +.set_client_request_token(inner_input.client_request_token) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::to_dafny_error) +} + fn UntagResource(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::untag_resource::_untag_resource_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.untag_resource() + .set_resource_arn(inner_input.resource_arn) +.set_tag_keys(inner_input.tag_keys) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_dynamodb::conversions::untag_resource::to_dafny_error) +} + fn UpdateContinuousBackups(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_continuous_backups::_update_continuous_backups_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_continuous_backups() + .set_table_name(inner_input.table_name) +.set_point_in_time_recovery_specification(inner_input.point_in_time_recovery_specification) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_continuous_backups::_update_continuous_backups_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_continuous_backups::to_dafny_error) +} + fn UpdateContributorInsights(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_contributor_insights::_update_contributor_insights_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_contributor_insights() + .set_table_name(inner_input.table_name) +.set_index_name(inner_input.index_name) +.set_contributor_insights_action(inner_input.contributor_insights_action) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_contributor_insights::_update_contributor_insights_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_contributor_insights::to_dafny_error) +} + fn UpdateGlobalTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_global_table::_update_global_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_global_table() + .set_global_table_name(inner_input.global_table_name) +.set_replica_updates(inner_input.replica_updates) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_global_table::_update_global_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_global_table::to_dafny_error) +} + fn UpdateGlobalTableSettings(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_global_table_settings::_update_global_table_settings_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_global_table_settings() + .set_global_table_name(inner_input.global_table_name) +.set_global_table_billing_mode(inner_input.global_table_billing_mode) +.set_global_table_provisioned_write_capacity_units(inner_input.global_table_provisioned_write_capacity_units) +.set_global_table_provisioned_write_capacity_auto_scaling_settings_update(inner_input.global_table_provisioned_write_capacity_auto_scaling_settings_update) +.set_global_table_global_secondary_index_settings_update(inner_input.global_table_global_secondary_index_settings_update) +.set_replica_settings_update(inner_input.replica_settings_update) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_global_table_settings::_update_global_table_settings_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_global_table_settings::to_dafny_error) +} + fn UpdateItem(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_item() + .set_table_name(inner_input.table_name) +.set_key(inner_input.key) +.set_attribute_updates(inner_input.attribute_updates) +.set_expected(inner_input.expected) +.set_conditional_operator(inner_input.conditional_operator) +.set_return_values(inner_input.return_values) +.set_return_consumed_capacity(inner_input.return_consumed_capacity) +.set_return_item_collection_metrics(inner_input.return_item_collection_metrics) +.set_update_expression(inner_input.update_expression) +.set_condition_expression(inner_input.condition_expression) +.set_expression_attribute_names(inner_input.expression_attribute_names) +.set_expression_attribute_values(inner_input.expression_attribute_values) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_item::to_dafny_error) +} + fn UpdateKinesisStreamingDestination(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_destination::_update_kinesis_streaming_destination_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_kinesis_streaming_destination() + .set_table_name(inner_input.table_name) +.set_stream_arn(inner_input.stream_arn) +.set_update_kinesis_streaming_configuration(inner_input.update_kinesis_streaming_configuration) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_destination::_update_kinesis_streaming_destination_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_destination::to_dafny_error) +} + fn UpdateTable(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_table::_update_table_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_table() + .set_attribute_definitions(inner_input.attribute_definitions) +.set_table_name(inner_input.table_name) +.set_billing_mode(inner_input.billing_mode) +.set_provisioned_throughput(inner_input.provisioned_throughput) +.set_global_secondary_index_updates(inner_input.global_secondary_index_updates) +.set_stream_specification(inner_input.stream_specification) +.set_sse_specification(inner_input.sse_specification) +.set_replica_updates(inner_input.replica_updates) +.set_table_class(inner_input.table_class) +.set_deletion_protection_enabled(inner_input.deletion_protection_enabled) +.set_on_demand_throughput(inner_input.on_demand_throughput) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_table::_update_table_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_table::to_dafny_error) +} + fn UpdateTableReplicaAutoScaling(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_table_replica_auto_scaling::_update_table_replica_auto_scaling_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_table_replica_auto_scaling() + .set_global_secondary_index_updates(inner_input.global_secondary_index_updates) +.set_table_name(inner_input.table_name) +.set_provisioned_write_capacity_auto_scaling_update(inner_input.provisioned_write_capacity_auto_scaling_update) +.set_replica_updates(inner_input.replica_updates) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_table_replica_auto_scaling::_update_table_replica_auto_scaling_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_table_replica_auto_scaling::to_dafny_error) +} + fn UpdateTimeToLive(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_dynamodb::conversions::update_time_to_live::_update_time_to_live_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_time_to_live() + .set_table_name(inner_input.table_name) +.set_time_to_live_specification(inner_input.time_to_live_specification) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_dynamodb::conversions::update_time_to_live::_update_time_to_live_response::to_dafny, + crate::deps::com_amazonaws_dynamodb::conversions::update_time_to_live::to_dafny_error) +} +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions.rs new file mode 100644 index 000000000..366cd7989 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions.rs @@ -0,0 +1,410 @@ +// 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 mod approximate_creation_date_time_precision; + + pub mod archival_summary; + + pub mod attribute_action; + + pub mod attribute_definition; + + pub mod attribute_value; + + pub mod attribute_value_update; + + pub mod auto_scaling_policy_description; + + pub mod auto_scaling_policy_update; + + pub mod auto_scaling_settings_description; + + pub mod auto_scaling_settings_update; + + pub mod auto_scaling_target_tracking_scaling_policy_configuration_description; + + pub mod auto_scaling_target_tracking_scaling_policy_configuration_update; + + pub mod backup_description; + + pub mod backup_details; + + pub mod backup_status; + + pub mod backup_summary; + + pub mod backup_type; + + pub mod backup_type_filter; + + pub mod batch_execute_statement; + + pub mod batch_get_item; + + pub mod batch_statement_error; + + pub mod batch_statement_error_code_enum; + + pub mod batch_statement_request; + + pub mod batch_statement_response; + + pub mod batch_write_item; + + pub mod billing_mode; + + pub mod billing_mode_summary; + + pub mod cancellation_reason; + + pub mod capacity; + + pub mod client; + + pub mod comparison_operator; + + pub mod condition; + + pub mod condition_check; + + pub mod conditional_operator; + + pub mod consumed_capacity; + + pub mod continuous_backups_description; + + pub mod continuous_backups_status; + + pub mod contributor_insights_action; + + pub mod contributor_insights_status; + + pub mod contributor_insights_summary; + + pub mod create_backup; + + pub mod create_global_secondary_index_action; + + pub mod create_global_table; + + pub mod create_replica_action; + + pub mod create_replication_group_member_action; + + pub mod create_table; + + pub mod csv_options; + + pub mod delete; + + pub mod delete_backup; + + pub mod delete_global_secondary_index_action; + + pub mod delete_item; + + pub mod delete_replica_action; + + pub mod delete_replication_group_member_action; + + pub mod delete_request; + + pub mod delete_resource_policy; + + pub mod delete_table; + + pub mod describe_backup; + + pub mod describe_continuous_backups; + + pub mod describe_contributor_insights; + + pub mod describe_endpoints; + + pub mod describe_export; + + pub mod describe_global_table; + + pub mod describe_global_table_settings; + + pub mod describe_import; + + pub mod describe_kinesis_streaming_destination; + + pub mod describe_limits; + + pub mod describe_table; + + pub mod describe_table_replica_auto_scaling; + + pub mod describe_time_to_live; + + pub mod destination_status; + + pub mod disable_kinesis_streaming_destination; + + pub mod enable_kinesis_streaming_configuration; + + pub mod enable_kinesis_streaming_destination; + + pub mod endpoint; + + pub mod error; + + pub mod execute_statement; + + pub mod execute_transaction; + + pub mod expected_attribute_value; + + pub mod export_description; + + pub mod export_format; + + pub mod export_status; + + pub mod export_summary; + + pub mod export_table_to_point_in_time; + + pub mod export_type; + + pub mod export_view_type; + + pub mod failure_exception; + + pub mod get; + + pub mod get_item; + + pub mod get_resource_policy; + + pub mod global_secondary_index; + + pub mod global_secondary_index_auto_scaling_update; + + pub mod global_secondary_index_description; + + pub mod global_secondary_index_info; + + pub mod global_secondary_index_update; + + pub mod global_table; + + pub mod global_table_description; + + pub mod global_table_global_secondary_index_settings_update; + + pub mod global_table_status; + + pub mod import_status; + + pub mod import_summary; + + pub mod import_table; + + pub mod import_table_description; + + pub mod incremental_export_specification; + + pub mod index_status; + + pub mod input_compression_type; + + pub mod input_format; + + pub mod input_format_options; + + pub mod item_collection_metrics; + + pub mod item_response; + + pub mod key_schema_element; + + pub mod key_type; + + pub mod keys_and_attributes; + + pub mod kinesis_data_stream_destination; + + pub mod list_backups; + + pub mod list_contributor_insights; + + pub mod list_exports; + + pub mod list_global_tables; + + pub mod list_imports; + + pub mod list_tables; + + pub mod list_tags_of_resource; + + pub mod local_secondary_index; + + pub mod local_secondary_index_description; + + pub mod local_secondary_index_info; + + pub mod on_demand_throughput; + + pub mod on_demand_throughput_override; + + pub mod parameterized_statement; + + pub mod point_in_time_recovery_description; + + pub mod point_in_time_recovery_specification; + + pub mod point_in_time_recovery_status; + + pub mod projection; + + pub mod projection_type; + + pub mod provisioned_throughput; + + pub mod provisioned_throughput_description; + + pub mod provisioned_throughput_override; + + pub mod put; + + pub mod put_item; + + pub mod put_request; + + pub mod put_resource_policy; + + pub mod query; + + pub mod replica; + + pub mod replica_auto_scaling_description; + + pub mod replica_auto_scaling_update; + + pub mod replica_description; + + pub mod replica_global_secondary_index; + + pub mod replica_global_secondary_index_auto_scaling_description; + + pub mod replica_global_secondary_index_auto_scaling_update; + + pub mod replica_global_secondary_index_description; + + pub mod replica_global_secondary_index_settings_description; + + pub mod replica_global_secondary_index_settings_update; + + pub mod replica_settings_description; + + pub mod replica_settings_update; + + pub mod replica_status; + + pub mod replica_update; + + pub mod replication_group_update; + + pub mod restore_summary; + + pub mod restore_table_from_backup; + + pub mod restore_table_to_point_in_time; + + pub mod return_consumed_capacity; + + pub mod return_item_collection_metrics; + + pub mod return_value; + + pub mod return_values_on_condition_check_failure; + + pub mod s3_bucket_source; + + pub mod s3_sse_algorithm; + + pub mod scalar_attribute_type; + + pub mod scan; + + pub mod select; + + pub mod source_table_details; + + pub mod source_table_feature_details; + + pub mod sse_description; + + pub mod sse_specification; + + pub mod sse_status; + + pub mod sse_type; + + pub mod stream_specification; + + pub mod stream_view_type; + + pub mod table_auto_scaling_description; + + pub mod table_class; + + pub mod table_class_summary; + + pub mod table_creation_parameters; + + pub mod table_description; + + pub mod table_status; + + pub mod tag; + + pub mod tag_resource; + + pub mod time_to_live_description; + + pub mod time_to_live_specification; + + pub mod time_to_live_status; + + pub mod transact_get_item; + + pub mod transact_get_items; + + pub mod transact_write_item; + + pub mod transact_write_items; + + pub mod untag_resource; + + pub mod update; + + pub mod update_continuous_backups; + + pub mod update_contributor_insights; + + pub mod update_global_secondary_index_action; + + pub mod update_global_table; + + pub mod update_global_table_settings; + + pub mod update_item; + + pub mod update_kinesis_streaming_configuration; + + pub mod update_kinesis_streaming_destination; + + pub mod update_replication_group_member_action; + + pub mod update_table; + + pub mod update_table_replica_auto_scaling; + + pub mod update_time_to_live; + + pub mod write_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/approximate_creation_date_time_precision.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/approximate_creation_date_time_precision.rs new file mode 100644 index 000000000..f0b35c194 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/approximate_creation_date_time_precision.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision::Millisecond => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ApproximateCreationDateTimePrecision::MILLISECOND {}, +aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision::Microsecond => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ApproximateCreationDateTimePrecision::MICROSECOND {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ApproximateCreationDateTimePrecision, +) -> aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ApproximateCreationDateTimePrecision::MILLISECOND {} => aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision::Millisecond, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ApproximateCreationDateTimePrecision::MICROSECOND {} => aws_sdk_dynamodb::types::ApproximateCreationDateTimePrecision::Microsecond, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs new file mode 100644 index 000000000..2bd909c7c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ArchivalSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ArchivalSummary::ArchivalSummary { + ArchivalDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.archival_date_time), + ArchivalReason: crate::standard_library_conversions::ostring_to_dafny(&value.archival_reason), + ArchivalBackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.archival_backup_arn), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ArchivalSummary, + >, +) -> aws_sdk_dynamodb::types::ArchivalSummary { + aws_sdk_dynamodb::types::ArchivalSummary::builder() + .set_archival_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ArchivalDateTime().clone())) + .set_archival_reason(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ArchivalReason().clone())) + .set_archival_backup_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ArchivalBackupArn().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs new file mode 100644 index 000000000..86959a17b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::AttributeAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::AttributeAction::Add => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::ADD {}, +aws_sdk_dynamodb::types::AttributeAction::Put => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::PUT {}, +aws_sdk_dynamodb::types::AttributeAction::Delete => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::DELETE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction, +) -> aws_sdk_dynamodb::types::AttributeAction { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::ADD {} => aws_sdk_dynamodb::types::AttributeAction::Add, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::PUT {} => aws_sdk_dynamodb::types::AttributeAction::Put, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeAction::DELETE {} => aws_sdk_dynamodb::types::AttributeAction::Delete, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs new file mode 100644 index 000000000..7237d688a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AttributeDefinition, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeDefinition::AttributeDefinition { + AttributeName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.attribute_name), + AttributeType: crate::deps::com_amazonaws_dynamodb::conversions::scalar_attribute_type::to_dafny(value.attribute_type.clone()), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeDefinition, + >, +) -> aws_sdk_dynamodb::types::AttributeDefinition { + aws_sdk_dynamodb::types::AttributeDefinition::builder() + .set_attribute_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AttributeName()) )) + .set_attribute_type(Some( crate::deps::com_amazonaws_dynamodb::conversions::scalar_attribute_type::from_dafny(dafny_value.AttributeType()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs new file mode 100644 index 000000000..07025b77c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs @@ -0,0 +1,129 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AttributeValue, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue, +> { + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::AttributeValue::S(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::S { + S: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x), + }, +aws_sdk_dynamodb::types::AttributeValue::N(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::N { + N: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x), + }, +aws_sdk_dynamodb::types::AttributeValue::B(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::B { + B: crate::standard_library_conversions::blob_to_dafny(&x), + }, +aws_sdk_dynamodb::types::AttributeValue::Ss(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::SS { + SS: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + }, +aws_sdk_dynamodb::types::AttributeValue::Ns(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::NS { + NS: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + }, +aws_sdk_dynamodb::types::AttributeValue::Bs(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::BS { + BS: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&x, + |e| crate::standard_library_conversions::blob_to_dafny(&e), +) +, + }, +aws_sdk_dynamodb::types::AttributeValue::M(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::M { + M: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&x.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + }, +aws_sdk_dynamodb::types::AttributeValue::L(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::L { + L: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, +) +, + }, +aws_sdk_dynamodb::types::AttributeValue::Null(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::NULL { + NULL: x.clone(), + }, +aws_sdk_dynamodb::types::AttributeValue::Bool(x) => + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::BOOL { + BOOL: x.clone(), + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue, + >, +) -> aws_sdk_dynamodb::types::AttributeValue { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::S { + S: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::S(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::N { + N: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::N(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::B { + B: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::B(crate::standard_library_conversions::blob_from_dafny(x.clone())), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::SS { + SS: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::Ss(::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(x, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) +), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::NS { + NS: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::Ns(::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(x, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) +), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::BS { + BS: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::Bs(::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(x, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence| crate::standard_library_conversions::blob_from_dafny(e.clone()), +) +), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::M { + M: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::M(::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&x, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::L { + L: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::L(::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(x, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, +) +), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::NULL { + NULL: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::Null(x .clone()), +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue::BOOL { + BOOL: x @ _, +} => aws_sdk_dynamodb::types::AttributeValue::Bool(x .clone()), + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs new file mode 100644 index 000000000..7c6274546 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AttributeValueUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValueUpdate::AttributeValueUpdate { + Value: ::std::rc::Rc::new(match &value.value { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Action: ::std::rc::Rc::new(match &value.action { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::attribute_action::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValueUpdate, + >, +) -> aws_sdk_dynamodb::types::AttributeValueUpdate { + aws_sdk_dynamodb::types::AttributeValueUpdate::builder() + .set_value(match (*dafny_value.Value()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(value.clone())), + _ => None, +} +) + .set_action(match &**dafny_value.Action() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::attribute_action::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs new file mode 100644 index 000000000..b95482859 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingPolicyDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingPolicyDescription::AutoScalingPolicyDescription { + PolicyName: crate::standard_library_conversions::ostring_to_dafny(&value.policy_name), + TargetTrackingScalingPolicyConfiguration: ::std::rc::Rc::new(match &value.target_tracking_scaling_policy_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_target_tracking_scaling_policy_configuration_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingPolicyDescription, + >, +) -> aws_sdk_dynamodb::types::AutoScalingPolicyDescription { + aws_sdk_dynamodb::types::AutoScalingPolicyDescription::builder() + .set_policy_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.PolicyName().clone())) + .set_target_tracking_scaling_policy_configuration(match (*dafny_value.TargetTrackingScalingPolicyConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_target_tracking_scaling_policy_configuration_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs new file mode 100644 index 000000000..15140ccde --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingPolicyUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingPolicyUpdate::AutoScalingPolicyUpdate { + PolicyName: crate::standard_library_conversions::ostring_to_dafny(&value.policy_name), + TargetTrackingScalingPolicyConfiguration: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_target_tracking_scaling_policy_configuration_update::to_dafny(&value.target_tracking_scaling_policy_configuration.clone().unwrap()) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingPolicyUpdate, + >, +) -> aws_sdk_dynamodb::types::AutoScalingPolicyUpdate { + aws_sdk_dynamodb::types::AutoScalingPolicyUpdate::builder() + .set_policy_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.PolicyName().clone())) + .set_target_tracking_scaling_policy_configuration(Some( crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_target_tracking_scaling_policy_configuration_update::from_dafny(dafny_value.TargetTrackingScalingPolicyConfiguration().clone()) + )) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs new file mode 100644 index 000000000..62c6f4e85 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingSettingsDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingSettingsDescription::AutoScalingSettingsDescription { + MinimumUnits: crate::standard_library_conversions::olong_to_dafny(&value.minimum_units), + MaximumUnits: crate::standard_library_conversions::olong_to_dafny(&value.maximum_units), + AutoScalingDisabled: crate::standard_library_conversions::obool_to_dafny(&value.auto_scaling_disabled), + AutoScalingRoleArn: crate::standard_library_conversions::ostring_to_dafny(&value.auto_scaling_role_arn), + ScalingPolicies: ::std::rc::Rc::new(match &value.scaling_policies { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_policy_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingSettingsDescription, + >, +) -> aws_sdk_dynamodb::types::AutoScalingSettingsDescription { + aws_sdk_dynamodb::types::AutoScalingSettingsDescription::builder() + .set_minimum_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MinimumUnits().clone())) + .set_maximum_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MaximumUnits().clone())) + .set_auto_scaling_disabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.AutoScalingDisabled().clone())) + .set_auto_scaling_role_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AutoScalingRoleArn().clone())) + .set_scaling_policies(match (*dafny_value.ScalingPolicies()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_policy_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs new file mode 100644 index 000000000..a8697ad7e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs @@ -0,0 +1,40 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingSettingsUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingSettingsUpdate::AutoScalingSettingsUpdate { + MinimumUnits: crate::standard_library_conversions::olong_to_dafny(&value.minimum_units), + MaximumUnits: crate::standard_library_conversions::olong_to_dafny(&value.maximum_units), + AutoScalingDisabled: crate::standard_library_conversions::obool_to_dafny(&value.auto_scaling_disabled), + AutoScalingRoleArn: crate::standard_library_conversions::ostring_to_dafny(&value.auto_scaling_role_arn), + ScalingPolicyUpdate: ::std::rc::Rc::new(match &value.scaling_policy_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_policy_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingSettingsUpdate, + >, +) -> aws_sdk_dynamodb::types::AutoScalingSettingsUpdate { + aws_sdk_dynamodb::types::AutoScalingSettingsUpdate::builder() + .set_minimum_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MinimumUnits().clone())) + .set_maximum_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MaximumUnits().clone())) + .set_auto_scaling_disabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.AutoScalingDisabled().clone())) + .set_auto_scaling_role_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AutoScalingRoleArn().clone())) + .set_scaling_policy_update(match (*dafny_value.ScalingPolicyUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_policy_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_description.rs new file mode 100644 index 000000000..70a1b938c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_description.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + DisableScaleIn: crate::standard_library_conversions::obool_to_dafny(&value.disable_scale_in), + ScaleInCooldown: crate::standard_library_conversions::oint_to_dafny(value.scale_in_cooldown), + ScaleOutCooldown: crate::standard_library_conversions::oint_to_dafny(value.scale_out_cooldown), + TargetValue: crate::standard_library_conversions::double_to_dafny(value.target_value.clone()), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription, + >, +) -> aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationDescription::builder() + .set_disable_scale_in(crate::standard_library_conversions::obool_from_dafny(dafny_value.DisableScaleIn().clone())) + .set_scale_in_cooldown(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScaleInCooldown().clone())) + .set_scale_out_cooldown(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScaleOutCooldown().clone())) + .set_target_value(Some( crate::standard_library_conversions::double_from_dafny(&dafny_value.TargetValue().clone()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_update.rs new file mode 100644 index 000000000..9f08e5bab --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_update.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + DisableScaleIn: crate::standard_library_conversions::obool_to_dafny(&value.disable_scale_in), + ScaleInCooldown: crate::standard_library_conversions::oint_to_dafny(value.scale_in_cooldown), + ScaleOutCooldown: crate::standard_library_conversions::oint_to_dafny(value.scale_out_cooldown), + TargetValue: crate::standard_library_conversions::double_to_dafny(value.target_value.clone()), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate, + >, +) -> aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + aws_sdk_dynamodb::types::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::builder() + .set_disable_scale_in(crate::standard_library_conversions::obool_from_dafny(dafny_value.DisableScaleIn().clone())) + .set_scale_in_cooldown(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScaleInCooldown().clone())) + .set_scale_out_cooldown(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScaleOutCooldown().clone())) + .set_target_value(Some( crate::standard_library_conversions::double_from_dafny(&dafny_value.TargetValue().clone()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs new file mode 100644 index 000000000..5bf74a3a0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BackupDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupDescription::BackupDescription { + BackupDetails: ::std::rc::Rc::new(match &value.backup_details { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_details::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SourceTableDetails: ::std::rc::Rc::new(match &value.source_table_details { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::source_table_details::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SourceTableFeatureDetails: ::std::rc::Rc::new(match &value.source_table_feature_details { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::source_table_feature_details::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupDescription, + >, +) -> aws_sdk_dynamodb::types::BackupDescription { + aws_sdk_dynamodb::types::BackupDescription::builder() + .set_backup_details(match (*dafny_value.BackupDetails()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::backup_details::from_dafny(value.clone())), + _ => None, +} +) + .set_source_table_details(match (*dafny_value.SourceTableDetails()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::source_table_details::from_dafny(value.clone())), + _ => None, +} +) + .set_source_table_feature_details(match (*dafny_value.SourceTableFeatureDetails()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::source_table_feature_details::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs new file mode 100644 index 000000000..63c28794f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BackupDetails, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupDetails::BackupDetails { + BackupArn: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.backup_arn), + BackupName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.backup_name), + BackupSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.backup_size_bytes), + BackupStatus: crate::deps::com_amazonaws_dynamodb::conversions::backup_status::to_dafny(value.backup_status.clone()), + BackupType: crate::deps::com_amazonaws_dynamodb::conversions::backup_type::to_dafny(value.backup_type.clone()), + BackupCreationDateTime: crate::standard_library_conversions::timestamp_to_dafny(&value.backup_creation_date_time), + BackupExpiryDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.backup_expiry_date_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupDetails, + >, +) -> aws_sdk_dynamodb::types::BackupDetails { + aws_sdk_dynamodb::types::BackupDetails::builder() + .set_backup_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupArn()) )) + .set_backup_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupName()) )) + .set_backup_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.BackupSizeBytes().clone())) + .set_backup_status(Some( crate::deps::com_amazonaws_dynamodb::conversions::backup_status::from_dafny(dafny_value.BackupStatus()) )) + .set_backup_type(Some( crate::deps::com_amazonaws_dynamodb::conversions::backup_type::from_dafny(dafny_value.BackupType()) )) + .set_backup_creation_date_time(Some(crate::standard_library_conversions::timestamp_from_dafny(dafny_value.BackupCreationDateTime().clone()))) + .set_backup_expiry_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.BackupExpiryDateTime().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs new file mode 100644 index 000000000..849f3dfb9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::BackupStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::BackupStatus::Creating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::CREATING {}, +aws_sdk_dynamodb::types::BackupStatus::Deleted => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::DELETED {}, +aws_sdk_dynamodb::types::BackupStatus::Available => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::AVAILABLE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus, +) -> aws_sdk_dynamodb::types::BackupStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::CREATING {} => aws_sdk_dynamodb::types::BackupStatus::Creating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::DELETED {} => aws_sdk_dynamodb::types::BackupStatus::Deleted, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupStatus::AVAILABLE {} => aws_sdk_dynamodb::types::BackupStatus::Available, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs new file mode 100644 index 000000000..f9475dc6d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BackupSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupSummary::BackupSummary { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + TableId: crate::standard_library_conversions::ostring_to_dafny(&value.table_id), + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + BackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.backup_arn), + BackupName: crate::standard_library_conversions::ostring_to_dafny(&value.backup_name), + BackupCreationDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.backup_creation_date_time), + BackupExpiryDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.backup_expiry_date_time), + BackupStatus: ::std::rc::Rc::new(match &value.backup_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + BackupType: ::std::rc::Rc::new(match &value.backup_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + BackupSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.backup_size_bytes), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupSummary, + >, +) -> aws_sdk_dynamodb::types::BackupSummary { + aws_sdk_dynamodb::types::BackupSummary::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_table_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableId().clone())) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_backup_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.BackupArn().clone())) + .set_backup_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.BackupName().clone())) + .set_backup_creation_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.BackupCreationDateTime().clone())) + .set_backup_expiry_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.BackupExpiryDateTime().clone())) + .set_backup_status(match &**dafny_value.BackupStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::backup_status::from_dafny(value) + ), + _ => None, +} +) + .set_backup_type(match &**dafny_value.BackupType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::backup_type::from_dafny(value) + ), + _ => None, +} +) + .set_backup_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.BackupSizeBytes().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs new file mode 100644 index 000000000..d9d38e63e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::BackupType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::BackupType::User => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::USER {}, +aws_sdk_dynamodb::types::BackupType::System => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::SYSTEM {}, +aws_sdk_dynamodb::types::BackupType::AwsBackup => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::AWS_BACKUP {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType, +) -> aws_sdk_dynamodb::types::BackupType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::USER {} => aws_sdk_dynamodb::types::BackupType::User, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::SYSTEM {} => aws_sdk_dynamodb::types::BackupType::System, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupType::AWS_BACKUP {} => aws_sdk_dynamodb::types::BackupType::AwsBackup, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs new file mode 100644 index 000000000..93fc245c7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::BackupTypeFilter, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::BackupTypeFilter::User => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::USER {}, +aws_sdk_dynamodb::types::BackupTypeFilter::System => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::SYSTEM {}, +aws_sdk_dynamodb::types::BackupTypeFilter::AwsBackup => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::AWS_BACKUP {}, +aws_sdk_dynamodb::types::BackupTypeFilter::All => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::ALL {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter, +) -> aws_sdk_dynamodb::types::BackupTypeFilter { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::USER {} => aws_sdk_dynamodb::types::BackupTypeFilter::User, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::SYSTEM {} => aws_sdk_dynamodb::types::BackupTypeFilter::System, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::AWS_BACKUP {} => aws_sdk_dynamodb::types::BackupTypeFilter::AwsBackup, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BackupTypeFilter::ALL {} => aws_sdk_dynamodb::types::BackupTypeFilter::All, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs new file mode 100644 index 000000000..736739eba --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _batch_execute_statement_request; + + pub mod _batch_execute_statement_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_request.rs new file mode 100644 index 000000000..6e559a4f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_request.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementInput::BatchExecuteStatementInput { + Statements: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.statements.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_request::to_dafny(e) +, +) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementInput, + > +) -> aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementInput { + aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementInput::builder() + .set_statements(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Statements(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_request::from_dafny(e.clone()) +, +) + )) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_response.rs new file mode 100644 index 000000000..36119a5fb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_response.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementOutput::BatchExecuteStatementOutput { + Responses: ::std::rc::Rc::new(match &value.responses { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_response::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementOutput, + > +) -> aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementOutput { + aws_sdk_dynamodb::operation::batch_execute_statement::BatchExecuteStatementOutput::builder() + .set_responses(match (*dafny_value.Responses()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_response::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs new file mode 100644 index 000000000..6983ca563 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _batch_get_item_request; + + pub mod _batch_get_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_request.rs new file mode 100644 index 000000000..7ab7dddf1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_request.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemInput::BatchGetItemInput { + RequestItems: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.request_items.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::keys_and_attributes::to_dafny(v) +, +) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemInput, + > +) -> aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemInput { + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemInput::builder() + .set_request_items(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.RequestItems(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::keys_and_attributes::from_dafny(v.clone()) +, +) + )) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_response.rs new file mode 100644 index 000000000..8c68028da --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_response.rs @@ -0,0 +1,106 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemOutput::BatchGetItemOutput { + Responses: +::std::rc::Rc::new(match &value.responses { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v, + |e| ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&e.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + UnprocessedKeys: +::std::rc::Rc::new(match &value.unprocessed_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::keys_and_attributes::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemOutput, + > +) -> aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemOutput { + aws_sdk_dynamodb::operation::batch_get_item::BatchGetItemOutput::builder() + .set_responses(match (*dafny_value.Responses()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>>| ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(v, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&e, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +, +) +, + ) + ), + _ => None +} +) + .set_unprocessed_keys(match (*dafny_value.UnprocessedKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::keys_and_attributes::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs new file mode 100644 index 000000000..0cf0caff6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BatchStatementError, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementError::BatchStatementError { + Code: ::std::rc::Rc::new(match &value.code { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_error_code_enum::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementError, + >, +) -> aws_sdk_dynamodb::types::BatchStatementError { + aws_sdk_dynamodb::types::BatchStatementError::builder() + .set_code(match &**dafny_value.Code() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_error_code_enum::from_dafny(value) + ), + _ => None, +} +) + .set_message(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Message().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error_code_enum.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error_code_enum.rs new file mode 100644 index 000000000..fd53a818a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error_code_enum.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ConditionalCheckFailed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ConditionalCheckFailed {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::RequestLimitExceeded => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::RequestLimitExceeded {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ValidationError => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ValidationError {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::TransactionConflict => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::TransactionConflict {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ThrottlingError => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ThrottlingError {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::InternalServerError => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::InternalServerError {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ResourceNotFound => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ResourceNotFound {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::AccessDenied => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::AccessDenied {}, +aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::DuplicateItem => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::DuplicateItem {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum, +) -> aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ConditionalCheckFailed {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ConditionalCheckFailed, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::RequestLimitExceeded {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::RequestLimitExceeded, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ValidationError {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ValidationError, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::TransactionConflict {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::TransactionConflict, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ThrottlingError {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ThrottlingError, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::InternalServerError {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::InternalServerError, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::ResourceNotFound {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::ResourceNotFound, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::AccessDenied {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::AccessDenied, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementErrorCodeEnum::DuplicateItem {} => aws_sdk_dynamodb::types::BatchStatementErrorCodeEnum::DuplicateItem, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs new file mode 100644 index 000000000..26d8e9c55 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BatchStatementRequest, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementRequest::BatchStatementRequest { + Statement: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.statement), + Parameters: ::std::rc::Rc::new(match &value.parameters { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementRequest, + >, +) -> aws_sdk_dynamodb::types::BatchStatementRequest { + aws_sdk_dynamodb::types::BatchStatementRequest::builder() + .set_statement(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Statement()) )) + .set_parameters(match (*dafny_value.Parameters()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs new file mode 100644 index 000000000..7283116ee --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs @@ -0,0 +1,58 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BatchStatementResponse, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementResponse::BatchStatementResponse { + Error: ::std::rc::Rc::new(match &value.error { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_error::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + Item: +::std::rc::Rc::new(match &value.item { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchStatementResponse, + >, +) -> aws_sdk_dynamodb::types::BatchStatementResponse { + aws_sdk_dynamodb::types::BatchStatementResponse::builder() + .set_error(match (*dafny_value.Error()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::batch_statement_error::from_dafny(value.clone())), + _ => None, +} +) + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_item(match (*dafny_value.Item()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs new file mode 100644 index 000000000..62c68551f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::ItemCollectionSizeLimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _batch_write_item_request; + + pub mod _batch_write_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_request.rs new file mode 100644 index 000000000..0c42f1908 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_request.rs @@ -0,0 +1,64 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemInput::BatchWriteItemInput { + RequestItems: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.request_items.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v, + |e| crate::deps::com_amazonaws_dynamodb::conversions::write_request::to_dafny(e) +, +) +, +) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnItemCollectionMetrics: ::std::rc::Rc::new(match &value.return_item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemInput, + > +) -> aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemInput { + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemInput::builder() + .set_request_items(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.RequestItems(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(v, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::write_request::from_dafny(e.clone()) +, +) +, +) + )) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_return_item_collection_metrics(match &**dafny_value.ReturnItemCollectionMetrics() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_response.rs new file mode 100644 index 000000000..8cc8bb396 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_response.rs @@ -0,0 +1,104 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemOutput::BatchWriteItemOutput { + UnprocessedItems: +::std::rc::Rc::new(match &value.unprocessed_items { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v, + |e| crate::deps::com_amazonaws_dynamodb::conversions::write_request::to_dafny(e) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ItemCollectionMetrics: +::std::rc::Rc::new(match &value.item_collection_metrics { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v, + |e| crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::to_dafny(e) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemOutput, + > +) -> aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemOutput { + aws_sdk_dynamodb::operation::batch_write_item::BatchWriteItemOutput::builder() + .set_unprocessed_items(match (*dafny_value.UnprocessedItems()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(v, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::write_request::from_dafny(e.clone()) +, +) +, + ) + ), + _ => None +} +) + .set_item_collection_metrics(match (*dafny_value.ItemCollectionMetrics()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(v, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::from_dafny(e.clone()) +, +) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs new file mode 100644 index 000000000..a29d5b356 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::BillingMode, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::BillingMode::Provisioned => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingMode::PROVISIONED {}, +aws_sdk_dynamodb::types::BillingMode::PayPerRequest => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingMode::PAY_PER_REQUEST {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingMode, +) -> aws_sdk_dynamodb::types::BillingMode { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingMode::PROVISIONED {} => aws_sdk_dynamodb::types::BillingMode::Provisioned, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingMode::PAY_PER_REQUEST {} => aws_sdk_dynamodb::types::BillingMode::PayPerRequest, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs new file mode 100644 index 000000000..b4b8339f7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::BillingModeSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingModeSummary::BillingModeSummary { + BillingMode: ::std::rc::Rc::new(match &value.billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LastUpdateToPayPerRequestDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_update_to_pay_per_request_date_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::BillingModeSummary, + >, +) -> aws_sdk_dynamodb::types::BillingModeSummary { + aws_sdk_dynamodb::types::BillingModeSummary::builder() + .set_billing_mode(match &**dafny_value.BillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_last_update_to_pay_per_request_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastUpdateToPayPerRequestDateTime().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs new file mode 100644 index 000000000..75a324421 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::CancellationReason, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CancellationReason::CancellationReason { + Item: +::std::rc::Rc::new(match &value.item { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Code: crate::standard_library_conversions::ostring_to_dafny(&value.code), + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CancellationReason, + >, +) -> aws_sdk_dynamodb::types::CancellationReason { + aws_sdk_dynamodb::types::CancellationReason::builder() + .set_item(match (*dafny_value.Item()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_code(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Code().clone())) + .set_message(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Message().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs new file mode 100644 index 000000000..67c651928 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Capacity, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Capacity::Capacity { + ReadCapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.read_capacity_units), + WriteCapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.write_capacity_units), + CapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.capacity_units), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Capacity, + >, +) -> aws_sdk_dynamodb::types::Capacity { + aws_sdk_dynamodb::types::Capacity::builder() + .set_read_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.ReadCapacityUnits().clone())) + .set_write_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.WriteCapacityUnits().clone())) + .set_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.CapacityUnits().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs new file mode 100644 index 000000000..02edf6a18 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs @@ -0,0 +1,38 @@ +// 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. +// 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. +#[allow(dead_code)] + +use std::any::Any; + +pub fn to_dafny( + value: &crate::deps::com_amazonaws_dynamodb::client::Client, +) -> + ::dafny_runtime::Object +{ + let x: std::rc::Rc = std::rc::Rc::new(value.clone()); + let y = x as std::rc::Rc; + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::rc_struct_to_dafny_class(y) + } +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient + >, +) -> crate::deps::com_amazonaws_dynamodb::client::Client { + let as_boxed_any = dafny_runtime::cast_any_object!(dafny_value); + if (dafny_runtime::is_object!(as_boxed_any, crate::deps::com_amazonaws_dynamodb::client::Client)) { + let as_boxed_client = ::dafny_runtime::object::downcast::(as_boxed_any); + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_rc_struct(as_boxed_client).as_ref().clone() + } + } else { + panic!("Unexpected implementation of Dafny client interface"); + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs new file mode 100644 index 000000000..a18dec568 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ComparisonOperator, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ComparisonOperator::Eq => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::EQ {}, +aws_sdk_dynamodb::types::ComparisonOperator::Ne => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NE {}, +aws_sdk_dynamodb::types::ComparisonOperator::In => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::IN {}, +aws_sdk_dynamodb::types::ComparisonOperator::Le => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::LE {}, +aws_sdk_dynamodb::types::ComparisonOperator::Lt => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::LT {}, +aws_sdk_dynamodb::types::ComparisonOperator::Ge => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::GE {}, +aws_sdk_dynamodb::types::ComparisonOperator::Gt => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::GT {}, +aws_sdk_dynamodb::types::ComparisonOperator::Between => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::BETWEEN {}, +aws_sdk_dynamodb::types::ComparisonOperator::NotNull => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NOT_NULL {}, +aws_sdk_dynamodb::types::ComparisonOperator::Null => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NULL {}, +aws_sdk_dynamodb::types::ComparisonOperator::Contains => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::CONTAINS {}, +aws_sdk_dynamodb::types::ComparisonOperator::NotContains => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NOT_CONTAINS {}, +aws_sdk_dynamodb::types::ComparisonOperator::BeginsWith => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::BEGINS_WITH {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator, +) -> aws_sdk_dynamodb::types::ComparisonOperator { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::EQ {} => aws_sdk_dynamodb::types::ComparisonOperator::Eq, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NE {} => aws_sdk_dynamodb::types::ComparisonOperator::Ne, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::IN {} => aws_sdk_dynamodb::types::ComparisonOperator::In, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::LE {} => aws_sdk_dynamodb::types::ComparisonOperator::Le, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::LT {} => aws_sdk_dynamodb::types::ComparisonOperator::Lt, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::GE {} => aws_sdk_dynamodb::types::ComparisonOperator::Ge, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::GT {} => aws_sdk_dynamodb::types::ComparisonOperator::Gt, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::BETWEEN {} => aws_sdk_dynamodb::types::ComparisonOperator::Between, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NOT_NULL {} => aws_sdk_dynamodb::types::ComparisonOperator::NotNull, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NULL {} => aws_sdk_dynamodb::types::ComparisonOperator::Null, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::CONTAINS {} => aws_sdk_dynamodb::types::ComparisonOperator::Contains, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::NOT_CONTAINS {} => aws_sdk_dynamodb::types::ComparisonOperator::NotContains, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ComparisonOperator::BEGINS_WITH {} => aws_sdk_dynamodb::types::ComparisonOperator::BeginsWith, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs new file mode 100644 index 000000000..01fdf84bd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Condition, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Condition::Condition { + AttributeValueList: ::std::rc::Rc::new(match &value.attribute_value_list { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ComparisonOperator: crate::deps::com_amazonaws_dynamodb::conversions::comparison_operator::to_dafny(value.comparison_operator.clone()), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Condition, + >, +) -> aws_sdk_dynamodb::types::Condition { + aws_sdk_dynamodb::types::Condition::builder() + .set_attribute_value_list(match (*dafny_value.AttributeValueList()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_comparison_operator(Some( crate::deps::com_amazonaws_dynamodb::conversions::comparison_operator::from_dafny(dafny_value.ComparisonOperator()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs new file mode 100644 index 000000000..69f644332 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs @@ -0,0 +1,95 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ConditionCheck, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionCheck::ConditionCheck { + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + ConditionExpression: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnValuesOnConditionCheckFailure: ::std::rc::Rc::new(match &value.return_values_on_condition_check_failure { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionCheck, + >, +) -> aws_sdk_dynamodb::types::ConditionCheck { + aws_sdk_dynamodb::types::ConditionCheck::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_condition_expression(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ConditionExpression()) )) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_values_on_condition_check_failure(match &**dafny_value.ReturnValuesOnConditionCheckFailure() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs new file mode 100644 index 000000000..216ac006f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ConditionalOperator, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ConditionalOperator::And => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionalOperator::AND {}, +aws_sdk_dynamodb::types::ConditionalOperator::Or => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionalOperator::OR {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionalOperator, +) -> aws_sdk_dynamodb::types::ConditionalOperator { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionalOperator::AND {} => aws_sdk_dynamodb::types::ConditionalOperator::And, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConditionalOperator::OR {} => aws_sdk_dynamodb::types::ConditionalOperator::Or, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs new file mode 100644 index 000000000..88129b44a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs @@ -0,0 +1,88 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ConsumedCapacity, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConsumedCapacity::ConsumedCapacity { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + CapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.capacity_units), + ReadCapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.read_capacity_units), + WriteCapacityUnits: crate::standard_library_conversions::odouble_to_dafny(&value.write_capacity_units), + Table: ::std::rc::Rc::new(match &value.table { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LocalSecondaryIndexes: +::std::rc::Rc::new(match &value.local_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::capacity::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GlobalSecondaryIndexes: +::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::capacity::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ConsumedCapacity, + >, +) -> aws_sdk_dynamodb::types::ConsumedCapacity { + aws_sdk_dynamodb::types::ConsumedCapacity::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.CapacityUnits().clone())) + .set_read_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.ReadCapacityUnits().clone())) + .set_write_capacity_units(crate::standard_library_conversions::odouble_from_dafny(dafny_value.WriteCapacityUnits().clone())) + .set_table(match (*dafny_value.Table()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::capacity::from_dafny(value.clone())), + _ => None, +} +) + .set_local_secondary_indexes(match (*dafny_value.LocalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::capacity::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::capacity::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs new file mode 100644 index 000000000..683aa1974 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ContinuousBackupsDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsDescription::ContinuousBackupsDescription { + ContinuousBackupsStatus: crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_status::to_dafny(value.continuous_backups_status.clone()), + PointInTimeRecoveryDescription: ::std::rc::Rc::new(match &value.point_in_time_recovery_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsDescription, + >, +) -> aws_sdk_dynamodb::types::ContinuousBackupsDescription { + aws_sdk_dynamodb::types::ContinuousBackupsDescription::builder() + .set_continuous_backups_status(Some( crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_status::from_dafny(dafny_value.ContinuousBackupsStatus()) )) + .set_point_in_time_recovery_description(match (*dafny_value.PointInTimeRecoveryDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs new file mode 100644 index 000000000..a535be766 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ContinuousBackupsStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ContinuousBackupsStatus::Enabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsStatus::ENABLED {}, +aws_sdk_dynamodb::types::ContinuousBackupsStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsStatus::DISABLED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsStatus, +) -> aws_sdk_dynamodb::types::ContinuousBackupsStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsStatus::ENABLED {} => aws_sdk_dynamodb::types::ContinuousBackupsStatus::Enabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContinuousBackupsStatus::DISABLED {} => aws_sdk_dynamodb::types::ContinuousBackupsStatus::Disabled, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs new file mode 100644 index 000000000..ace5bf1fe --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ContributorInsightsAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ContributorInsightsAction::Enable => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsAction::ENABLE {}, +aws_sdk_dynamodb::types::ContributorInsightsAction::Disable => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsAction::DISABLE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsAction, +) -> aws_sdk_dynamodb::types::ContributorInsightsAction { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsAction::ENABLE {} => aws_sdk_dynamodb::types::ContributorInsightsAction::Enable, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsAction::DISABLE {} => aws_sdk_dynamodb::types::ContributorInsightsAction::Disable, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs new file mode 100644 index 000000000..360f086d4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ContributorInsightsStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ContributorInsightsStatus::Enabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::ENABLING {}, +aws_sdk_dynamodb::types::ContributorInsightsStatus::Enabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::ENABLED {}, +aws_sdk_dynamodb::types::ContributorInsightsStatus::Disabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::DISABLING {}, +aws_sdk_dynamodb::types::ContributorInsightsStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::DISABLED {}, +aws_sdk_dynamodb::types::ContributorInsightsStatus::Failed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::FAILED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus, +) -> aws_sdk_dynamodb::types::ContributorInsightsStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::ENABLING {} => aws_sdk_dynamodb::types::ContributorInsightsStatus::Enabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::ENABLED {} => aws_sdk_dynamodb::types::ContributorInsightsStatus::Enabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::DISABLING {} => aws_sdk_dynamodb::types::ContributorInsightsStatus::Disabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::DISABLED {} => aws_sdk_dynamodb::types::ContributorInsightsStatus::Disabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsStatus::FAILED {} => aws_sdk_dynamodb::types::ContributorInsightsStatus::Failed, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs new file mode 100644 index 000000000..3d9176658 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ContributorInsightsSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsSummary::ContributorInsightsSummary { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ContributorInsightsStatus: ::std::rc::Rc::new(match &value.contributor_insights_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ContributorInsightsSummary, + >, +) -> aws_sdk_dynamodb::types::ContributorInsightsSummary { + aws_sdk_dynamodb::types::ContributorInsightsSummary::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_contributor_insights_status(match &**dafny_value.ContributorInsightsStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs new file mode 100644 index 000000000..7fc73f4ba --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::create_backup::CreateBackupError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::BackupInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::ContinuousBackupsUnavailableException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::continuous_backups_unavailable_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::TableInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_backup::CreateBackupError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_backup_request; + + pub mod _create_backup_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_request.rs new file mode 100644 index 000000000..c7b38dbce --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_backup::CreateBackupInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupInput::CreateBackupInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + BackupName: crate::standard_library_conversions::ostring_to_dafny(&value.backup_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupInput, + > +) -> aws_sdk_dynamodb::operation::create_backup::CreateBackupInput { + aws_sdk_dynamodb::operation::create_backup::CreateBackupInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_backup_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_response.rs new file mode 100644 index 000000000..147dc1909 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_backup::CreateBackupOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupOutput::CreateBackupOutput { + BackupDetails: ::std::rc::Rc::new(match &value.backup_details { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_details::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateBackupOutput, + > +) -> aws_sdk_dynamodb::operation::create_backup::CreateBackupOutput { + aws_sdk_dynamodb::operation::create_backup::CreateBackupOutput::builder() + .set_backup_details(match (*dafny_value.BackupDetails()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::backup_details::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_secondary_index_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_secondary_index_action.rs new file mode 100644 index 000000000..5e0125402 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_secondary_index_action.rs @@ -0,0 +1,59 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::CreateGlobalSecondaryIndexAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + Projection: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(&value.projection.clone().unwrap()) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalSecondaryIndexAction, + >, +) -> aws_sdk_dynamodb::types::CreateGlobalSecondaryIndexAction { + aws_sdk_dynamodb::types::CreateGlobalSecondaryIndexAction::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_projection(Some( crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(dafny_value.Projection().clone()) + )) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs new file mode 100644 index 000000000..97fb17be7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError::GlobalTableAlreadyExistsException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_already_exists_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_global_table_request; + + pub mod _create_global_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_request.rs new file mode 100644 index 000000000..6cd162a83 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_request.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableInput::CreateGlobalTableInput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name) .Extract(), + ReplicationGroup: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.replication_group.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica::to_dafny(e) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableInput, + > +) -> aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableInput { + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableInput::builder() + .set_global_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GlobalTableName()) )) + .set_replication_group(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.ReplicationGroup(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_response.rs new file mode 100644 index 000000000..f5fdabbf0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableOutput::CreateGlobalTableOutput { + GlobalTableDescription: ::std::rc::Rc::new(match &value.global_table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateGlobalTableOutput, + > +) -> aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableOutput { + aws_sdk_dynamodb::operation::create_global_table::CreateGlobalTableOutput::builder() + .set_global_table_description(match (*dafny_value.GlobalTableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs new file mode 100644 index 000000000..cfbc465a0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::CreateReplicaAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateReplicaAction::CreateReplicaAction { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateReplicaAction, + >, +) -> aws_sdk_dynamodb::types::CreateReplicaAction { + aws_sdk_dynamodb::types::CreateReplicaAction::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replication_group_member_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replication_group_member_action.rs new file mode 100644 index 000000000..16cf13f0b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replication_group_member_action.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::CreateReplicationGroupMemberAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + KMSMasterKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_master_key_id), + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableClassOverride: ::std::rc::Rc::new(match &value.table_class_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateReplicationGroupMemberAction, + >, +) -> aws_sdk_dynamodb::types::CreateReplicationGroupMemberAction { + aws_sdk_dynamodb::types::CreateReplicationGroupMemberAction::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .set_kms_master_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KMSMasterKeyId().clone())) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_class_override(match &**dafny_value.TableClassOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs new file mode 100644 index 000000000..8f8109b3a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::create_table::CreateTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::create_table::CreateTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_table::CreateTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_table::CreateTableError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::create_table::CreateTableError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_table_request; + + pub mod _create_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_request.rs new file mode 100644 index 000000000..84754ae8c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_request.rs @@ -0,0 +1,179 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_table::CreateTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableInput::CreateTableInput { + AttributeDefinitions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.attribute_definitions.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::to_dafny(e) +, +) +, + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + LocalSecondaryIndexes: ::std::rc::Rc::new(match &value.local_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + BillingMode: ::std::rc::Rc::new(match &value.billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + StreamSpecification: ::std::rc::Rc::new(match &value.stream_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSESpecification: ::std::rc::Rc::new(match &value.sse_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Tags: ::std::rc::Rc::new(match &value.tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableClass: ::std::rc::Rc::new(match &value.table_class { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DeletionProtectionEnabled: crate::standard_library_conversions::obool_to_dafny(&value.deletion_protection_enabled), + ResourcePolicy: crate::standard_library_conversions::ostring_to_dafny(&value.resource_policy), + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableInput, + > +) -> aws_sdk_dynamodb::operation::create_table::CreateTableInput { + aws_sdk_dynamodb::operation::create_table::CreateTableInput::builder() + .set_attribute_definitions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.AttributeDefinitions(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::from_dafny(e.clone()) +, +) + )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_local_secondary_indexes(match (*dafny_value.LocalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_billing_mode(match &**dafny_value.BillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_stream_specification(match (*dafny_value.StreamSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_specification(match (*dafny_value.SSESpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_tags(match (*dafny_value.Tags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_class(match &**dafny_value.TableClass() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .set_deletion_protection_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.DeletionProtectionEnabled().clone())) + .set_resource_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ResourcePolicy().clone())) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_response.rs new file mode 100644 index 000000000..a28099c9f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::create_table::CreateTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableOutput::CreateTableOutput { + TableDescription: ::std::rc::Rc::new(match &value.table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CreateTableOutput, + > +) -> aws_sdk_dynamodb::operation::create_table::CreateTableOutput { + aws_sdk_dynamodb::operation::create_table::CreateTableOutput::builder() + .set_table_description(match (*dafny_value.TableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs new file mode 100644 index 000000000..f5358d460 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs @@ -0,0 +1,42 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::CsvOptions, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CsvOptions::CsvOptions { + Delimiter: crate::standard_library_conversions::ostring_to_dafny(&value.delimiter), + HeaderList: ::std::rc::Rc::new(match &value.header_list { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::CsvOptions, + >, +) -> aws_sdk_dynamodb::types::CsvOptions { + aws_sdk_dynamodb::types::CsvOptions::builder() + .set_delimiter(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Delimiter().clone())) + .set_header_list(match (*dafny_value.HeaderList()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs new file mode 100644 index 000000000..18b1385ab --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs @@ -0,0 +1,95 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Delete, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Delete::Delete { + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnValuesOnConditionCheckFailure: ::std::rc::Rc::new(match &value.return_values_on_condition_check_failure { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Delete, + >, +) -> aws_sdk_dynamodb::types::Delete { + aws_sdk_dynamodb::types::Delete::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_values_on_condition_check_failure(match &**dafny_value.ReturnValuesOnConditionCheckFailure() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs new file mode 100644 index 000000000..703fcd26a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError::BackupInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError::BackupNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_backup_request; + + pub mod _delete_backup_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_request.rs new file mode 100644 index 000000000..eafc8d39d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_backup::DeleteBackupInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupInput::DeleteBackupInput { + BackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.backup_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupInput, + > +) -> aws_sdk_dynamodb::operation::delete_backup::DeleteBackupInput { + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupInput::builder() + .set_backup_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_response.rs new file mode 100644 index 000000000..85da3f8f6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_backup::DeleteBackupOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupOutput::DeleteBackupOutput { + BackupDescription: ::std::rc::Rc::new(match &value.backup_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteBackupOutput, + > +) -> aws_sdk_dynamodb::operation::delete_backup::DeleteBackupOutput { + aws_sdk_dynamodb::operation::delete_backup::DeleteBackupOutput::builder() + .set_backup_description(match (*dafny_value.BackupDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::backup_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_global_secondary_index_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_global_secondary_index_action.rs new file mode 100644 index 000000000..f1708e4cf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_global_secondary_index_action.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::DeleteGlobalSecondaryIndexAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteGlobalSecondaryIndexAction::DeleteGlobalSecondaryIndexAction { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteGlobalSecondaryIndexAction, + >, +) -> aws_sdk_dynamodb::types::DeleteGlobalSecondaryIndexAction { + aws_sdk_dynamodb::types::DeleteGlobalSecondaryIndexAction::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs new file mode 100644 index 000000000..e680ab5cc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::delete_item::DeleteItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::ConditionalCheckFailedException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::conditional_check_failed_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::ItemCollectionSizeLimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_item::DeleteItemError::TransactionConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_conflict_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_item_request; + + pub mod _delete_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_request.rs new file mode 100644 index 000000000..4f11ff70f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_request.rs @@ -0,0 +1,156 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_item::DeleteItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemInput::DeleteItemInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + Expected: +::std::rc::Rc::new(match &value.expected { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConditionalOperator: ::std::rc::Rc::new(match &value.conditional_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnValues: ::std::rc::Rc::new(match &value.return_values { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_value::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnItemCollectionMetrics: ::std::rc::Rc::new(match &value.return_item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemInput, + > +) -> aws_sdk_dynamodb::operation::delete_item::DeleteItemInput { + aws_sdk_dynamodb::operation::delete_item::DeleteItemInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_expected(match (*dafny_value.Expected()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_conditional_operator(match &**dafny_value.ConditionalOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value) + ), + _ => None, +} +) + .set_return_values(match &**dafny_value.ReturnValues() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_value::from_dafny(value) + ), + _ => None, +} +) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_return_item_collection_metrics(match &**dafny_value.ReturnItemCollectionMetrics() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::from_dafny(value) + ), + _ => None, +} +) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_response.rs new file mode 100644 index 000000000..6fdad0f5e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_response.rs @@ -0,0 +1,69 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_item::DeleteItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemOutput::DeleteItemOutput { + Attributes: +::std::rc::Rc::new(match &value.attributes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ItemCollectionMetrics: ::std::rc::Rc::new(match &value.item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemOutput, + > +) -> aws_sdk_dynamodb::operation::delete_item::DeleteItemOutput { + aws_sdk_dynamodb::operation::delete_item::DeleteItemOutput::builder() + .set_attributes(match (*dafny_value.Attributes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .set_item_collection_metrics(match (*dafny_value.ItemCollectionMetrics()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs new file mode 100644 index 000000000..13a08fabe --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::DeleteReplicaAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteReplicaAction::DeleteReplicaAction { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteReplicaAction, + >, +) -> aws_sdk_dynamodb::types::DeleteReplicaAction { + aws_sdk_dynamodb::types::DeleteReplicaAction::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replication_group_member_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replication_group_member_action.rs new file mode 100644 index 000000000..5a4cc8f05 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replication_group_member_action.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::DeleteReplicationGroupMemberAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteReplicationGroupMemberAction::DeleteReplicationGroupMemberAction { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteReplicationGroupMemberAction, + >, +) -> aws_sdk_dynamodb::types::DeleteReplicationGroupMemberAction { + aws_sdk_dynamodb::types::DeleteReplicationGroupMemberAction::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs new file mode 100644 index 000000000..0ea1ba497 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::DeleteRequest, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteRequest::DeleteRequest { + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteRequest, + >, +) -> aws_sdk_dynamodb::types::DeleteRequest { + aws_sdk_dynamodb::types::DeleteRequest::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs new file mode 100644 index 000000000..1765a93af --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::PolicyNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::policy_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_resource_policy_request; + + pub mod _delete_resource_policy_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_request.rs new file mode 100644 index 000000000..95412ef28 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyInput::DeleteResourcePolicyInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + ExpectedRevisionId: crate::standard_library_conversions::ostring_to_dafny(&value.expected_revision_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyInput, + > +) -> aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyInput { + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .set_expected_revision_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExpectedRevisionId().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_response.rs new file mode 100644 index 000000000..c48b038f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyOutput::DeleteResourcePolicyOutput { + RevisionId: crate::standard_library_conversions::ostring_to_dafny(&value.revision_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteResourcePolicyOutput, + > +) -> aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyOutput { + aws_sdk_dynamodb::operation::delete_resource_policy::DeleteResourcePolicyOutput::builder() + .set_revision_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RevisionId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs new file mode 100644 index 000000000..a36472923 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::delete_table::DeleteTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::delete_table::DeleteTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_table::DeleteTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_table::DeleteTableError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_table::DeleteTableError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::delete_table::DeleteTableError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_table_request; + + pub mod _delete_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_request.rs new file mode 100644 index 000000000..448b5de54 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_table::DeleteTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableInput::DeleteTableInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableInput, + > +) -> aws_sdk_dynamodb::operation::delete_table::DeleteTableInput { + aws_sdk_dynamodb::operation::delete_table::DeleteTableInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_response.rs new file mode 100644 index 000000000..ec94ac94a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::delete_table::DeleteTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableOutput::DeleteTableOutput { + TableDescription: ::std::rc::Rc::new(match &value.table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteTableOutput, + > +) -> aws_sdk_dynamodb::operation::delete_table::DeleteTableOutput { + aws_sdk_dynamodb::operation::delete_table::DeleteTableOutput::builder() + .set_table_description(match (*dafny_value.TableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs new file mode 100644 index 000000000..62714bde3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupError::BackupNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_backup_request; + + pub mod _describe_backup_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_request.rs new file mode 100644 index 000000000..25da37ae9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_backup::DescribeBackupInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupInput::DescribeBackupInput { + BackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.backup_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupInput, + > +) -> aws_sdk_dynamodb::operation::describe_backup::DescribeBackupInput { + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupInput::builder() + .set_backup_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_response.rs new file mode 100644 index 000000000..3540f6fdd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_backup::DescribeBackupOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupOutput::DescribeBackupOutput { + BackupDescription: ::std::rc::Rc::new(match &value.backup_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeBackupOutput, + > +) -> aws_sdk_dynamodb::operation::describe_backup::DescribeBackupOutput { + aws_sdk_dynamodb::operation::describe_backup::DescribeBackupOutput::builder() + .set_backup_description(match (*dafny_value.BackupDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::backup_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs new file mode 100644 index 000000000..6494116cc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_continuous_backups_request; + + pub mod _describe_continuous_backups_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_request.rs new file mode 100644 index 000000000..2a4c5070a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsInput::DescribeContinuousBackupsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsInput, + > +) -> aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsInput { + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_response.rs new file mode 100644 index 000000000..925912994 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsOutput::DescribeContinuousBackupsOutput { + ContinuousBackupsDescription: ::std::rc::Rc::new(match &value.continuous_backups_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContinuousBackupsOutput, + > +) -> aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsOutput { + aws_sdk_dynamodb::operation::describe_continuous_backups::DescribeContinuousBackupsOutput::builder() + .set_continuous_backups_description(match (*dafny_value.ContinuousBackupsDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs new file mode 100644 index 000000000..df3d14a6e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_contributor_insights_request; + + pub mod _describe_contributor_insights_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_request.rs new file mode 100644 index 000000000..1c4dc21a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsInput::DescribeContributorInsightsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsInput, + > +) -> aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsInput { + aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_response.rs new file mode 100644 index 000000000..596b9e1e7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_response.rs @@ -0,0 +1,71 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsOutput::DescribeContributorInsightsOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ContributorInsightsRuleList: ::std::rc::Rc::new(match &value.contributor_insights_rule_list { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ContributorInsightsStatus: ::std::rc::Rc::new(match &value.contributor_insights_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LastUpdateDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_update_date_time), + FailureException: ::std::rc::Rc::new(match &value.failure_exception { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::failure_exception::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeContributorInsightsOutput, + > +) -> aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsOutput { + aws_sdk_dynamodb::operation::describe_contributor_insights::DescribeContributorInsightsOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_contributor_insights_rule_list(match (*dafny_value.ContributorInsightsRuleList()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_contributor_insights_status(match &**dafny_value.ContributorInsightsStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::from_dafny(value) + ), + _ => None, +} +) + .set_last_update_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastUpdateDateTime().clone())) + .set_failure_exception(match (*dafny_value.FailureException()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::failure_exception::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs new file mode 100644 index 000000000..e2187582a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_endpoints_request; + + pub mod _describe_endpoints_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_request.rs new file mode 100644 index 000000000..5b62acf5b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsRequest::DescribeEndpointsRequest { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsRequest, + > +) -> aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsInput { + aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsInput::builder() + + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_response.rs new file mode 100644 index 000000000..f43101fbc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_response.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsResponse::DescribeEndpointsResponse { + Endpoints: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.endpoints, + |e| crate::deps::com_amazonaws_dynamodb::conversions::endpoint::to_dafny(e) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeEndpointsResponse, + > +) -> aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsOutput { + aws_sdk_dynamodb::operation::describe_endpoints::DescribeEndpointsOutput::builder() + .set_endpoints(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Endpoints(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::endpoint::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs new file mode 100644 index 000000000..5af7a8ce7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_export::DescribeExportError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_export::DescribeExportError::ExportNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::export_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_export::DescribeExportError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_export::DescribeExportError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_export_request; + + pub mod _describe_export_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_request.rs new file mode 100644 index 000000000..0aa9b57d1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_export::DescribeExportInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportInput::DescribeExportInput { + ExportArn: crate::standard_library_conversions::ostring_to_dafny(&value.export_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportInput, + > +) -> aws_sdk_dynamodb::operation::describe_export::DescribeExportInput { + aws_sdk_dynamodb::operation::describe_export::DescribeExportInput::builder() + .set_export_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ExportArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_response.rs new file mode 100644 index 000000000..69cbd9b55 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_export::DescribeExportOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportOutput::DescribeExportOutput { + ExportDescription: ::std::rc::Rc::new(match &value.export_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeExportOutput, + > +) -> aws_sdk_dynamodb::operation::describe_export::DescribeExportOutput { + aws_sdk_dynamodb::operation::describe_export::DescribeExportOutput::builder() + .set_export_description(match (*dafny_value.ExportDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::export_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs new file mode 100644 index 000000000..c0f1b8575 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableError::GlobalTableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_global_table_request; + + pub mod _describe_global_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_request.rs new file mode 100644 index 000000000..0915e78aa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableInput::DescribeGlobalTableInput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableInput, + > +) -> aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableInput { + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableInput::builder() + .set_global_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GlobalTableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_response.rs new file mode 100644 index 000000000..c06b6d557 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableOutput::DescribeGlobalTableOutput { + GlobalTableDescription: ::std::rc::Rc::new(match &value.global_table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableOutput, + > +) -> aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableOutput { + aws_sdk_dynamodb::operation::describe_global_table::DescribeGlobalTableOutput::builder() + .set_global_table_description(match (*dafny_value.GlobalTableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs new file mode 100644 index 000000000..32365c2a5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::GlobalTableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_global_table_settings_request; + + pub mod _describe_global_table_settings_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_request.rs new file mode 100644 index 000000000..8be4182cb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsInput::DescribeGlobalTableSettingsInput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsInput, + > +) -> aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput { + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput::builder() + .set_global_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GlobalTableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_response.rs new file mode 100644 index 000000000..68d9280a7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name), + ReplicaSettings: ::std::rc::Rc::new(match &value.replica_settings { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeGlobalTableSettingsOutput, + > +) -> aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput { + aws_sdk_dynamodb::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput::builder() + .set_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableName().clone())) + .set_replica_settings(match (*dafny_value.ReplicaSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs new file mode 100644 index 000000000..5cd5786ad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_import::DescribeImportError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_import::DescribeImportError::ImportNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::import_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_import_request; + + pub mod _describe_import_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_request.rs new file mode 100644 index 000000000..3dc2d2098 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_import::DescribeImportInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportInput::DescribeImportInput { + ImportArn: crate::standard_library_conversions::ostring_to_dafny(&value.import_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportInput, + > +) -> aws_sdk_dynamodb::operation::describe_import::DescribeImportInput { + aws_sdk_dynamodb::operation::describe_import::DescribeImportInput::builder() + .set_import_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ImportArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_response.rs new file mode 100644 index 000000000..91e2129f0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_import::DescribeImportOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportOutput::DescribeImportOutput { + ImportTableDescription: crate::deps::com_amazonaws_dynamodb::conversions::import_table_description::to_dafny(&value.import_table_description.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeImportOutput, + > +) -> aws_sdk_dynamodb::operation::describe_import::DescribeImportOutput { + aws_sdk_dynamodb::operation::describe_import::DescribeImportOutput::builder() + .set_import_table_description(Some( crate::deps::com_amazonaws_dynamodb::conversions::import_table_description::from_dafny(dafny_value.ImportTableDescription().clone()) + )) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs new file mode 100644 index 000000000..886273ace --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_kinesis_streaming_destination_request; + + pub mod _describe_kinesis_streaming_destination_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_request.rs new file mode 100644 index 000000000..2ffa3ef3d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationInput::DescribeKinesisStreamingDestinationInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationInput, + > +) -> aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput { + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_response.rs new file mode 100644 index 000000000..e2e9adf96 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + KinesisDataStreamDestinations: ::std::rc::Rc::new(match &value.kinesis_data_stream_destinations { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::kinesis_data_stream_destination::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeKinesisStreamingDestinationOutput, + > +) -> aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput { + aws_sdk_dynamodb::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_kinesis_data_stream_destinations(match (*dafny_value.KinesisDataStreamDestinations()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::kinesis_data_stream_destination::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs new file mode 100644 index 000000000..27c7aa723 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_limits_request; + + pub mod _describe_limits_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_request.rs new file mode 100644 index 000000000..37c4dde91 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsInput::DescribeLimitsInput { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsInput, + > +) -> aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsInput { + aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsInput::builder() + + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_response.rs new file mode 100644 index 000000000..dc570fc1f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_response.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsOutput::DescribeLimitsOutput { + AccountMaxReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.account_max_read_capacity_units), + AccountMaxWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.account_max_write_capacity_units), + TableMaxReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.table_max_read_capacity_units), + TableMaxWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.table_max_write_capacity_units), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeLimitsOutput, + > +) -> aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsOutput { + aws_sdk_dynamodb::operation::describe_limits::DescribeLimitsOutput::builder() + .set_account_max_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.AccountMaxReadCapacityUnits().clone())) + .set_account_max_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.AccountMaxWriteCapacityUnits().clone())) + .set_table_max_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.TableMaxReadCapacityUnits().clone())) + .set_table_max_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.TableMaxWriteCapacityUnits().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs new file mode 100644 index 000000000..bbc02f9a9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_table::DescribeTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_table::DescribeTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_table::DescribeTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_table::DescribeTableError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_table_request; + + pub mod _describe_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_request.rs new file mode 100644 index 000000000..b4b45e88c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_table::DescribeTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableInput::DescribeTableInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableInput, + > +) -> aws_sdk_dynamodb::operation::describe_table::DescribeTableInput { + aws_sdk_dynamodb::operation::describe_table::DescribeTableInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_response.rs new file mode 100644 index 000000000..8f3dddba9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_table::DescribeTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableOutput::DescribeTableOutput { + Table: ::std::rc::Rc::new(match &value.table { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableOutput, + > +) -> aws_sdk_dynamodb::operation::describe_table::DescribeTableOutput { + aws_sdk_dynamodb::operation::describe_table::DescribeTableOutput::builder() + .set_table(match (*dafny_value.Table()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling.rs new file mode 100644 index 000000000..f0b68f71b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_table_replica_auto_scaling_request; + + pub mod _describe_table_replica_auto_scaling_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_request.rs new file mode 100644 index 000000000..b9b556b71 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingInput::DescribeTableReplicaAutoScalingInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingInput, + > +) -> aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput { + aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_response.rs new file mode 100644 index 000000000..08a5afab4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingOutput::DescribeTableReplicaAutoScalingOutput { + TableAutoScalingDescription: ::std::rc::Rc::new(match &value.table_auto_scaling_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_auto_scaling_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTableReplicaAutoScalingOutput, + > +) -> aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput { + aws_sdk_dynamodb::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput::builder() + .set_table_auto_scaling_description(match (*dafny_value.TableAutoScalingDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_auto_scaling_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs new file mode 100644 index 000000000..7ba2fc208 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_time_to_live_request; + + pub mod _describe_time_to_live_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_request.rs new file mode 100644 index 000000000..66f0e1bb8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveInput::DescribeTimeToLiveInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveInput, + > +) -> aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveInput { + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_response.rs new file mode 100644 index 000000000..78ec78b4c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveOutput::DescribeTimeToLiveOutput { + TimeToLiveDescription: ::std::rc::Rc::new(match &value.time_to_live_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DescribeTimeToLiveOutput, + > +) -> aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveOutput { + aws_sdk_dynamodb::operation::describe_time_to_live::DescribeTimeToLiveOutput::builder() + .set_time_to_live_description(match (*dafny_value.TimeToLiveDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs new file mode 100644 index 000000000..53288c3fa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::DestinationStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::DestinationStatus::Enabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ENABLING {}, +aws_sdk_dynamodb::types::DestinationStatus::Active => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ACTIVE {}, +aws_sdk_dynamodb::types::DestinationStatus::Disabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::DISABLING {}, +aws_sdk_dynamodb::types::DestinationStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::DISABLED {}, +aws_sdk_dynamodb::types::DestinationStatus::EnableFailed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ENABLE_FAILED {}, +aws_sdk_dynamodb::types::DestinationStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::UPDATING {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus, +) -> aws_sdk_dynamodb::types::DestinationStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ENABLING {} => aws_sdk_dynamodb::types::DestinationStatus::Enabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ACTIVE {} => aws_sdk_dynamodb::types::DestinationStatus::Active, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::DISABLING {} => aws_sdk_dynamodb::types::DestinationStatus::Disabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::DISABLED {} => aws_sdk_dynamodb::types::DestinationStatus::Disabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::ENABLE_FAILED {} => aws_sdk_dynamodb::types::DestinationStatus::EnableFailed, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DestinationStatus::UPDATING {} => aws_sdk_dynamodb::types::DestinationStatus::Updating, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs new file mode 100644 index 000000000..5a2f9cf59 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _disable_kinesis_streaming_destination_request; + + pub mod _disable_kinesis_streaming_destination_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_request.rs new file mode 100644 index 000000000..c5628cc45 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_request.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn) .Extract(), + EnableKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.enable_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationInput, + > +) -> aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput { + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_stream_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.StreamArn()) )) + .set_enable_kinesis_streaming_configuration(match (*dafny_value.EnableKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_response.rs new file mode 100644 index 000000000..ef22f91e1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_response.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn), + DestinationStatus: ::std::rc::Rc::new(match &value.destination_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::destination_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + EnableKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.enable_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::DisableKinesisStreamingDestinationOutput, + > +) -> aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput { + aws_sdk_dynamodb::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_stream_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.StreamArn().clone())) + .set_destination_status(match &**dafny_value.DestinationStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::destination_status::from_dafny(value) + ), + _ => None, +} +) + .set_enable_kinesis_streaming_configuration(match (*dafny_value.EnableKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs new file mode 100644 index 000000000..bfec2234b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::EnableKinesisStreamingConfiguration, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingConfiguration::EnableKinesisStreamingConfiguration { + ApproximateCreationDateTimePrecision: ::std::rc::Rc::new(match &value.approximate_creation_date_time_precision { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingConfiguration, + >, +) -> aws_sdk_dynamodb::types::EnableKinesisStreamingConfiguration { + aws_sdk_dynamodb::types::EnableKinesisStreamingConfiguration::builder() + .set_approximate_creation_date_time_precision(match &**dafny_value.ApproximateCreationDateTimePrecision() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs new file mode 100644 index 000000000..f5bbdcc98 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _enable_kinesis_streaming_destination_request; + + pub mod _enable_kinesis_streaming_destination_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_request.rs new file mode 100644 index 000000000..75d7247d8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_request.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn) .Extract(), + EnableKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.enable_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationInput, + > +) -> aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput { + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_stream_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.StreamArn()) )) + .set_enable_kinesis_streaming_configuration(match (*dafny_value.EnableKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_response.rs new file mode 100644 index 000000000..228e71a6a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_response.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn), + DestinationStatus: ::std::rc::Rc::new(match &value.destination_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::destination_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + EnableKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.enable_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::EnableKinesisStreamingDestinationOutput, + > +) -> aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput { + aws_sdk_dynamodb::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_stream_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.StreamArn().clone())) + .set_destination_status(match &**dafny_value.DestinationStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::destination_status::from_dafny(value) + ), + _ => None, +} +) + .set_enable_kinesis_streaming_configuration(match (*dafny_value.EnableKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::enable_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs new file mode 100644 index 000000000..0d33c9f4f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Endpoint, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Endpoint::Endpoint { + Address: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.address), + CachePeriodInMinutes: value.cache_period_in_minutes, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Endpoint, + >, +) -> aws_sdk_dynamodb::types::Endpoint { + aws_sdk_dynamodb::types::Endpoint::builder() + .set_address(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Address()) )) + .set_cache_period_in_minutes(Some( dafny_value.CachePeriodInMinutes() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs new file mode 100644 index 000000000..17450bcf7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs @@ -0,0 +1,396 @@ +// 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 mod backup_in_use_exception; + + pub mod backup_not_found_exception; + + pub mod conditional_check_failed_exception; + + pub mod continuous_backups_unavailable_exception; + + pub mod duplicate_item_exception; + + pub mod export_conflict_exception; + + pub mod export_not_found_exception; + + pub mod global_table_already_exists_exception; + + pub mod global_table_not_found_exception; + + pub mod idempotent_parameter_mismatch_exception; + + pub mod import_conflict_exception; + + pub mod import_not_found_exception; + + pub mod index_not_found_exception; + + pub mod internal_server_error; + + pub mod invalid_endpoint_exception; + + pub mod invalid_export_time_exception; + + pub mod invalid_restore_time_exception; + + pub mod item_collection_size_limit_exceeded_exception; + + pub mod limit_exceeded_exception; + + pub mod point_in_time_recovery_unavailable_exception; + + pub mod policy_not_found_exception; + + pub mod provisioned_throughput_exceeded_exception; + + pub mod replica_already_exists_exception; + + pub mod replica_not_found_exception; + + pub mod request_limit_exceeded; + + pub mod resource_in_use_exception; + + pub mod resource_not_found_exception; + + pub mod table_already_exists_exception; + + pub mod table_in_use_exception; + + pub mod table_not_found_exception; + + pub mod transaction_canceled_exception; + + pub mod transaction_conflict_exception; + + pub mod transaction_in_progress_exception; + /// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::deps::com_amazonaws_dynamodb::types::error::Error, +) -> ::std::rc::Rc { + match value { + crate::deps::com_amazonaws_dynamodb::types::error::Error::BackupInUseException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::BackupNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ConditionalCheckFailedException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::conditional_check_failed_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ContinuousBackupsUnavailableException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::continuous_backups_unavailable_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::DuplicateItemException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::duplicate_item_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ExportConflictException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::export_conflict_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ExportNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::export_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::GlobalTableAlreadyExistsException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_already_exists_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::GlobalTableNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::IdempotentParameterMismatchException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::idempotent_parameter_mismatch_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ImportConflictException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::import_conflict_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ImportNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::import_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::IndexNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::index_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::InternalServerError { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidEndpointException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidExportTimeException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_export_time_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidRestoreTimeException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_restore_time_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ItemCollectionSizeLimitExceededException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::LimitExceededException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::PointInTimeRecoveryUnavailableException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::point_in_time_recovery_unavailable_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::PolicyNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::policy_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ProvisionedThroughputExceededException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ReplicaAlreadyExistsException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::replica_already_exists_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ReplicaNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::replica_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::RequestLimitExceeded { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ResourceInUseException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::ResourceNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TableAlreadyExistsException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_already_exists_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TableInUseException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TableNotFoundException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionCanceledException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_canceled_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionConflictException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_conflict_exception::to_dafny(error), +crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionInProgressException { error } => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_in_progress_exception::to_dafny(error), + crate::deps::com_amazonaws_dynamodb::types::error::Error::Opaque { obj } => + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }), + crate::deps::com_amazonaws_dynamodb::types::error::Error::OpaqueWithText { obj, objMessage } => + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }), + } +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error, + >, +) -> crate::deps::com_amazonaws_dynamodb::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::BackupInUseException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::BackupInUseException { + error: aws_sdk_dynamodb::types::error::BackupInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::BackupNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::BackupNotFoundException { + error: aws_sdk_dynamodb::types::error::BackupNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ConditionalCheckFailedException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ConditionalCheckFailedException { + error: aws_sdk_dynamodb::types::error::ConditionalCheckFailedException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ContinuousBackupsUnavailableException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ContinuousBackupsUnavailableException { + error: aws_sdk_dynamodb::types::error::ContinuousBackupsUnavailableException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::DuplicateItemException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::DuplicateItemException { + error: aws_sdk_dynamodb::types::error::DuplicateItemException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ExportConflictException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ExportConflictException { + error: aws_sdk_dynamodb::types::error::ExportConflictException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ExportNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ExportNotFoundException { + error: aws_sdk_dynamodb::types::error::ExportNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::GlobalTableAlreadyExistsException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::GlobalTableAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::GlobalTableAlreadyExistsException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::GlobalTableNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::GlobalTableNotFoundException { + error: aws_sdk_dynamodb::types::error::GlobalTableNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::IdempotentParameterMismatchException { Message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::IdempotentParameterMismatchException { + error: aws_sdk_dynamodb::types::error::IdempotentParameterMismatchException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(Message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ImportConflictException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ImportConflictException { + error: aws_sdk_dynamodb::types::error::ImportConflictException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ImportNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ImportNotFoundException { + error: aws_sdk_dynamodb::types::error::ImportNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::IndexNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::IndexNotFoundException { + error: aws_sdk_dynamodb::types::error::IndexNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InternalServerError { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::InternalServerError { + error: aws_sdk_dynamodb::types::error::InternalServerError::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidEndpointException { Message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidEndpointException { + error: aws_sdk_dynamodb::types::error::InvalidEndpointException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(Message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidExportTimeException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidExportTimeException { + error: aws_sdk_dynamodb::types::error::InvalidExportTimeException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidRestoreTimeException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::InvalidRestoreTimeException { + error: aws_sdk_dynamodb::types::error::InvalidRestoreTimeException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ItemCollectionSizeLimitExceededException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ItemCollectionSizeLimitExceededException { + error: aws_sdk_dynamodb::types::error::ItemCollectionSizeLimitExceededException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::LimitExceededException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::LimitExceededException { + error: aws_sdk_dynamodb::types::error::LimitExceededException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::PointInTimeRecoveryUnavailableException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::PointInTimeRecoveryUnavailableException { + error: aws_sdk_dynamodb::types::error::PointInTimeRecoveryUnavailableException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::PolicyNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::PolicyNotFoundException { + error: aws_sdk_dynamodb::types::error::PolicyNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ProvisionedThroughputExceededException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ProvisionedThroughputExceededException { + error: aws_sdk_dynamodb::types::error::ProvisionedThroughputExceededException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ReplicaAlreadyExistsException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ReplicaAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::ReplicaAlreadyExistsException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ReplicaNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ReplicaNotFoundException { + error: aws_sdk_dynamodb::types::error::ReplicaNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::RequestLimitExceeded { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::RequestLimitExceeded { + error: aws_sdk_dynamodb::types::error::RequestLimitExceeded::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ResourceInUseException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ResourceInUseException { + error: aws_sdk_dynamodb::types::error::ResourceInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ResourceNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::ResourceNotFoundException { + error: aws_sdk_dynamodb::types::error::ResourceNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableAlreadyExistsException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TableAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::TableAlreadyExistsException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableInUseException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TableInUseException { + error: aws_sdk_dynamodb::types::error::TableInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableNotFoundException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TableNotFoundException { + error: aws_sdk_dynamodb::types::error::TableNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionCanceledException { Message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionCanceledException { + error: aws_sdk_dynamodb::types::error::TransactionCanceledException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(Message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionConflictException { message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionConflictException { + error: aws_sdk_dynamodb::types::error::TransactionConflictException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionInProgressException { Message, .. } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::TransactionInProgressException { + error: aws_sdk_dynamodb::types::error::TransactionInProgressException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(Message.clone())) + .build() + }, + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::Opaque { obj } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + crate::deps::com_amazonaws_dynamodb::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + }, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_in_use_exception.rs new file mode 100644 index 000000000..6281c3753 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::BackupInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::BackupInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_not_found_exception.rs new file mode 100644 index 000000000..7a88f5d06 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::BackupNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::BackupNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/conditional_check_failed_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/conditional_check_failed_exception.rs new file mode 100644 index 000000000..dc580e8a2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/conditional_check_failed_exception.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ConditionalCheckFailedException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ConditionalCheckFailedException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + Item: +::std::rc::Rc::new(match &value.item { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/continuous_backups_unavailable_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/continuous_backups_unavailable_exception.rs new file mode 100644 index 000000000..c13de5fba --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/continuous_backups_unavailable_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ContinuousBackupsUnavailableException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ContinuousBackupsUnavailableException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs new file mode 100644 index 000000000..c1783796f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::DuplicateItemException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::DuplicateItemException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs new file mode 100644 index 000000000..b795996fa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ExportConflictException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ExportConflictException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_not_found_exception.rs new file mode 100644 index 000000000..c7492a3ad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ExportNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ExportNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_already_exists_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_already_exists_exception.rs new file mode 100644 index 000000000..41dd285ae --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_already_exists_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::GlobalTableAlreadyExistsException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::GlobalTableAlreadyExistsException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_not_found_exception.rs new file mode 100644 index 000000000..a37921883 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::GlobalTableNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::GlobalTableNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/idempotent_parameter_mismatch_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/idempotent_parameter_mismatch_exception.rs new file mode 100644 index 000000000..870de4f3f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/idempotent_parameter_mismatch_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::IdempotentParameterMismatchException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::IdempotentParameterMismatchException { + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs new file mode 100644 index 000000000..122c1568d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ImportConflictException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ImportConflictException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_not_found_exception.rs new file mode 100644 index 000000000..2f688744a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ImportNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ImportNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/index_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/index_not_found_exception.rs new file mode 100644 index 000000000..ae396b263 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/index_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::IndexNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::IndexNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs new file mode 100644 index 000000000..a3816ac79 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::InternalServerError, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InternalServerError { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs new file mode 100644 index 000000000..a96d93843 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::InvalidEndpointException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidEndpointException { + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_export_time_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_export_time_exception.rs new file mode 100644 index 000000000..edb0519be --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_export_time_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::InvalidExportTimeException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidExportTimeException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_restore_time_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_restore_time_exception.rs new file mode 100644 index 000000000..bb59a698e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_restore_time_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::InvalidRestoreTimeException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::InvalidRestoreTimeException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/item_collection_size_limit_exceeded_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/item_collection_size_limit_exceeded_exception.rs new file mode 100644 index 000000000..867f55c57 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/item_collection_size_limit_exceeded_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ItemCollectionSizeLimitExceededException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ItemCollectionSizeLimitExceededException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs new file mode 100644 index 000000000..ee15bff66 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::LimitExceededException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::LimitExceededException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/point_in_time_recovery_unavailable_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/point_in_time_recovery_unavailable_exception.rs new file mode 100644 index 000000000..76b0f0d13 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/point_in_time_recovery_unavailable_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::PointInTimeRecoveryUnavailableException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::PointInTimeRecoveryUnavailableException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/policy_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/policy_not_found_exception.rs new file mode 100644 index 000000000..6673102c2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/policy_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::PolicyNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::PolicyNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/provisioned_throughput_exceeded_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/provisioned_throughput_exceeded_exception.rs new file mode 100644 index 000000000..bc2a2a249 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/provisioned_throughput_exceeded_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ProvisionedThroughputExceededException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ProvisionedThroughputExceededException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_already_exists_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_already_exists_exception.rs new file mode 100644 index 000000000..b84a15ba1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_already_exists_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ReplicaAlreadyExistsException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ReplicaAlreadyExistsException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_not_found_exception.rs new file mode 100644 index 000000000..46f28aff0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ReplicaNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ReplicaNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs new file mode 100644 index 000000000..f3e140f33 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::RequestLimitExceeded, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::RequestLimitExceeded { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_in_use_exception.rs new file mode 100644 index 000000000..d1380a0c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ResourceInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ResourceInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_not_found_exception.rs new file mode 100644 index 000000000..01f18020d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::ResourceNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::ResourceNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_already_exists_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_already_exists_exception.rs new file mode 100644 index 000000000..5db04ad71 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_already_exists_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TableAlreadyExistsException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableAlreadyExistsException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_in_use_exception.rs new file mode 100644 index 000000000..5197f544d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TableInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_not_found_exception.rs new file mode 100644 index 000000000..17798f992 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TableNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TableNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs new file mode 100644 index 000000000..c1a1cf71a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TransactionCanceledException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionCanceledException { + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + CancellationReasons: ::std::rc::Rc::new(match &value.cancellation_reasons { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::cancellation_reason::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs new file mode 100644 index 000000000..28376e335 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TransactionConflictException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionConflictException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_in_progress_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_in_progress_exception.rs new file mode 100644 index 000000000..753ada5f9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_in_progress_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_dynamodb::types::error::TransactionInProgressException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Error::TransactionInProgressException { + Message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs new file mode 100644 index 000000000..67e798166 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::ConditionalCheckFailedException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::conditional_check_failed_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::DuplicateItemException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::duplicate_item_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::ItemCollectionSizeLimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementError::TransactionConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_conflict_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _execute_statement_request; + + pub mod _execute_statement_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_request.rs new file mode 100644 index 000000000..d7ca59021 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_request.rs @@ -0,0 +1,63 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementInput::ExecuteStatementInput { + Statement: crate::standard_library_conversions::ostring_to_dafny(&value.statement) .Extract(), + Parameters: ::std::rc::Rc::new(match &value.parameters { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementInput, + > +) -> aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementInput { + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementInput::builder() + .set_statement(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Statement()) )) + .set_parameters(match (*dafny_value.Parameters()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_response.rs new file mode 100644 index 000000000..f0db6132e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_response.rs @@ -0,0 +1,89 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementOutput::ExecuteStatementOutput { + Items: ::std::rc::Rc::new(match &value.items { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&e.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LastEvaluatedKey: +::std::rc::Rc::new(match &value.last_evaluated_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementOutput, + > +) -> aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementOutput { + aws_sdk_dynamodb::operation::execute_statement::ExecuteStatementOutput::builder() + .set_items(match (*dafny_value.Items()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&e, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +, + ) + ), + _ => None +} +) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .set_last_evaluated_key(match (*dafny_value.LastEvaluatedKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs new file mode 100644 index 000000000..4e90435cb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::IdempotentParameterMismatchException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::idempotent_parameter_mismatch_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::TransactionCanceledException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_canceled_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionError::TransactionInProgressException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_in_progress_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _execute_transaction_request; + + pub mod _execute_transaction_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_request.rs new file mode 100644 index 000000000..68b8a6412 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_request.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionInput::ExecuteTransactionInput { + TransactStatements: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.transact_statements.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::parameterized_statement::to_dafny(e) +, +) +, + ClientRequestToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_request_token), + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionInput, + > +) -> aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionInput { + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionInput::builder() + .set_transact_statements(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.TransactStatements(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::parameterized_statement::from_dafny(e.clone()) +, +) + )) + .set_client_request_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientRequestToken().clone())) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_response.rs new file mode 100644 index 000000000..21bbe3556 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_response.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionOutput::ExecuteTransactionOutput { + Responses: ::std::rc::Rc::new(match &value.responses { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::item_response::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionOutput, + > +) -> aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionOutput { + aws_sdk_dynamodb::operation::execute_transaction::ExecuteTransactionOutput::builder() + .set_responses(match (*dafny_value.Responses()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::item_response::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs new file mode 100644 index 000000000..6d34597d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs @@ -0,0 +1,67 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ExpectedAttributeValue, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExpectedAttributeValue::ExpectedAttributeValue { + Value: ::std::rc::Rc::new(match &value.value { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Exists: crate::standard_library_conversions::obool_to_dafny(&value.exists), + ComparisonOperator: ::std::rc::Rc::new(match &value.comparison_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::comparison_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + AttributeValueList: ::std::rc::Rc::new(match &value.attribute_value_list { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExpectedAttributeValue, + >, +) -> aws_sdk_dynamodb::types::ExpectedAttributeValue { + aws_sdk_dynamodb::types::ExpectedAttributeValue::builder() + .set_value(match (*dafny_value.Value()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(value.clone())), + _ => None, +} +) + .set_exists(crate::standard_library_conversions::obool_from_dafny(dafny_value.Exists().clone())) + .set_comparison_operator(match &**dafny_value.ComparisonOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::comparison_operator::from_dafny(value) + ), + _ => None, +} +) + .set_attribute_value_list(match (*dafny_value.AttributeValueList()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs new file mode 100644 index 000000000..ab8a5956b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs @@ -0,0 +1,112 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ExportDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportDescription::ExportDescription { + ExportArn: crate::standard_library_conversions::ostring_to_dafny(&value.export_arn), + ExportStatus: ::std::rc::Rc::new(match &value.export_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + StartTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.start_time), + EndTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.end_time), + ExportManifest: crate::standard_library_conversions::ostring_to_dafny(&value.export_manifest), + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + TableId: crate::standard_library_conversions::ostring_to_dafny(&value.table_id), + ExportTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.export_time), + ClientToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_token), + S3Bucket: crate::standard_library_conversions::ostring_to_dafny(&value.s3_bucket), + S3BucketOwner: crate::standard_library_conversions::ostring_to_dafny(&value.s3_bucket_owner), + S3Prefix: crate::standard_library_conversions::ostring_to_dafny(&value.s3_prefix), + S3SseAlgorithm: ::std::rc::Rc::new(match &value.s3_sse_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::s3_sse_algorithm::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + S3SseKmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.s3_sse_kms_key_id), + FailureCode: crate::standard_library_conversions::ostring_to_dafny(&value.failure_code), + FailureMessage: crate::standard_library_conversions::ostring_to_dafny(&value.failure_message), + ExportFormat: ::std::rc::Rc::new(match &value.export_format { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_format::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + BilledSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.billed_size_bytes), + ItemCount: crate::standard_library_conversions::olong_to_dafny(&value.item_count), + ExportType: ::std::rc::Rc::new(match &value.export_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + IncrementalExportSpecification: ::std::rc::Rc::new(match &value.incremental_export_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::incremental_export_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportDescription, + >, +) -> aws_sdk_dynamodb::types::ExportDescription { + aws_sdk_dynamodb::types::ExportDescription::builder() + .set_export_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExportArn().clone())) + .set_export_status(match &**dafny_value.ExportStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_status::from_dafny(value) + ), + _ => None, +} +) + .set_start_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.StartTime().clone())) + .set_end_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.EndTime().clone())) + .set_export_manifest(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExportManifest().clone())) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_table_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableId().clone())) + .set_export_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ExportTime().clone())) + .set_client_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientToken().clone())) + .set_s3_bucket(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3Bucket().clone())) + .set_s3_bucket_owner(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3BucketOwner().clone())) + .set_s3_prefix(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3Prefix().clone())) + .set_s3_sse_algorithm(match &**dafny_value.S3SseAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::s3_sse_algorithm::from_dafny(value) + ), + _ => None, +} +) + .set_s3_sse_kms_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3SseKmsKeyId().clone())) + .set_failure_code(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FailureCode().clone())) + .set_failure_message(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FailureMessage().clone())) + .set_export_format(match &**dafny_value.ExportFormat() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_format::from_dafny(value) + ), + _ => None, +} +) + .set_billed_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.BilledSizeBytes().clone())) + .set_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ItemCount().clone())) + .set_export_type(match &**dafny_value.ExportType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_type::from_dafny(value) + ), + _ => None, +} +) + .set_incremental_export_specification(match (*dafny_value.IncrementalExportSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::incremental_export_specification::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs new file mode 100644 index 000000000..b11826b94 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ExportFormat, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ExportFormat::DynamodbJson => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportFormat::DYNAMODB_JSON {}, +aws_sdk_dynamodb::types::ExportFormat::Ion => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportFormat::ION {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportFormat, +) -> aws_sdk_dynamodb::types::ExportFormat { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportFormat::DYNAMODB_JSON {} => aws_sdk_dynamodb::types::ExportFormat::DynamodbJson, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportFormat::ION {} => aws_sdk_dynamodb::types::ExportFormat::Ion, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs new file mode 100644 index 000000000..563108871 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ExportStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ExportStatus::InProgress => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::IN_PROGRESS {}, +aws_sdk_dynamodb::types::ExportStatus::Completed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::COMPLETED {}, +aws_sdk_dynamodb::types::ExportStatus::Failed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::FAILED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus, +) -> aws_sdk_dynamodb::types::ExportStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::IN_PROGRESS {} => aws_sdk_dynamodb::types::ExportStatus::InProgress, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::COMPLETED {} => aws_sdk_dynamodb::types::ExportStatus::Completed, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportStatus::FAILED {} => aws_sdk_dynamodb::types::ExportStatus::Failed, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs new file mode 100644 index 000000000..facc7ed66 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ExportSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportSummary::ExportSummary { + ExportArn: crate::standard_library_conversions::ostring_to_dafny(&value.export_arn), + ExportStatus: ::std::rc::Rc::new(match &value.export_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ExportType: ::std::rc::Rc::new(match &value.export_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportSummary, + >, +) -> aws_sdk_dynamodb::types::ExportSummary { + aws_sdk_dynamodb::types::ExportSummary::builder() + .set_export_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExportArn().clone())) + .set_export_status(match &**dafny_value.ExportStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_status::from_dafny(value) + ), + _ => None, +} +) + .set_export_type(match &**dafny_value.ExportType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_type::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time.rs new file mode 100644 index 000000000..4ff958417 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::ExportConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::export_conflict_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::InvalidExportTimeException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_export_time_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::PointInTimeRecoveryUnavailableException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::point_in_time_recovery_unavailable_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _export_table_to_point_in_time_request; + + pub mod _export_table_to_point_in_time_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_request.rs new file mode 100644 index 000000000..b0bb05488 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_request.rs @@ -0,0 +1,83 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeInput::ExportTableToPointInTimeInput { + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn) .Extract(), + ExportTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.export_time), + ClientToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_token), + S3Bucket: crate::standard_library_conversions::ostring_to_dafny(&value.s3_bucket) .Extract(), + S3BucketOwner: crate::standard_library_conversions::ostring_to_dafny(&value.s3_bucket_owner), + S3Prefix: crate::standard_library_conversions::ostring_to_dafny(&value.s3_prefix), + S3SseAlgorithm: ::std::rc::Rc::new(match &value.s3_sse_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::s3_sse_algorithm::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + S3SseKmsKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.s3_sse_kms_key_id), + ExportFormat: ::std::rc::Rc::new(match &value.export_format { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_format::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ExportType: ::std::rc::Rc::new(match &value.export_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + IncrementalExportSpecification: ::std::rc::Rc::new(match &value.incremental_export_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::incremental_export_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeInput, + > +) -> aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeInput { + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeInput::builder() + .set_table_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableArn()) )) + .set_export_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ExportTime().clone())) + .set_client_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientToken().clone())) + .set_s3_bucket(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.S3Bucket()) )) + .set_s3_bucket_owner(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3BucketOwner().clone())) + .set_s3_prefix(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3Prefix().clone())) + .set_s3_sse_algorithm(match &**dafny_value.S3SseAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::s3_sse_algorithm::from_dafny(value) + ), + _ => None, +} +) + .set_s3_sse_kms_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3SseKmsKeyId().clone())) + .set_export_format(match &**dafny_value.ExportFormat() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_format::from_dafny(value) + ), + _ => None, +} +) + .set_export_type(match &**dafny_value.ExportType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_type::from_dafny(value) + ), + _ => None, +} +) + .set_incremental_export_specification(match (*dafny_value.IncrementalExportSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::incremental_export_specification::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_response.rs new file mode 100644 index 000000000..541ef2f5c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeOutput::ExportTableToPointInTimeOutput { + ExportDescription: ::std::rc::Rc::new(match &value.export_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportTableToPointInTimeOutput, + > +) -> aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput { + aws_sdk_dynamodb::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput::builder() + .set_export_description(match (*dafny_value.ExportDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::export_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs new file mode 100644 index 000000000..39063076c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ExportType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ExportType::FullExport => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportType::FULL_EXPORT {}, +aws_sdk_dynamodb::types::ExportType::IncrementalExport => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportType::INCREMENTAL_EXPORT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportType, +) -> aws_sdk_dynamodb::types::ExportType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportType::FULL_EXPORT {} => aws_sdk_dynamodb::types::ExportType::FullExport, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportType::INCREMENTAL_EXPORT {} => aws_sdk_dynamodb::types::ExportType::IncrementalExport, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs new file mode 100644 index 000000000..b0ea372be --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ExportViewType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ExportViewType::NewImage => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportViewType::NEW_IMAGE {}, +aws_sdk_dynamodb::types::ExportViewType::NewAndOldImages => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportViewType::NEW_AND_OLD_IMAGES {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportViewType, +) -> aws_sdk_dynamodb::types::ExportViewType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportViewType::NEW_IMAGE {} => aws_sdk_dynamodb::types::ExportViewType::NewImage, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ExportViewType::NEW_AND_OLD_IMAGES {} => aws_sdk_dynamodb::types::ExportViewType::NewAndOldImages, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs new file mode 100644 index 000000000..5da1c85a7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::FailureException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::FailureException::FailureException { + ExceptionName: crate::standard_library_conversions::ostring_to_dafny(&value.exception_name), + ExceptionDescription: crate::standard_library_conversions::ostring_to_dafny(&value.exception_description), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::FailureException, + >, +) -> aws_sdk_dynamodb::types::FailureException { + aws_sdk_dynamodb::types::FailureException::builder() + .set_exception_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExceptionName().clone())) + .set_exception_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExceptionDescription().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs new file mode 100644 index 000000000..fef8977e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs @@ -0,0 +1,59 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Get, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Get::Get { + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Get, + >, +) -> aws_sdk_dynamodb::types::Get { + aws_sdk_dynamodb::types::Get::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs new file mode 100644 index 000000000..d9d77a837 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::get_item::GetItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::get_item::GetItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_item::GetItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_item::GetItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_item::GetItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_item::GetItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_item_request; + + pub mod _get_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_request.rs new file mode 100644 index 000000000..79cf30fe4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_request.rs @@ -0,0 +1,93 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::get_item::GetItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemInput::GetItemInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + AttributesToGet: ::std::rc::Rc::new(match &value.attributes_to_get { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemInput, + > +) -> aws_sdk_dynamodb::operation::get_item::GetItemInput { + aws_sdk_dynamodb::operation::get_item::GetItemInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_attributes_to_get(match (*dafny_value.AttributesToGet()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_response.rs new file mode 100644 index 000000000..35e5926c9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_response.rs @@ -0,0 +1,58 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::get_item::GetItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemOutput::GetItemOutput { + Item: +::std::rc::Rc::new(match &value.item { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemOutput, + > +) -> aws_sdk_dynamodb::operation::get_item::GetItemOutput { + aws_sdk_dynamodb::operation::get_item::GetItemOutput::builder() + .set_item(match (*dafny_value.Item()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs new file mode 100644 index 000000000..13d5b51e4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyError::PolicyNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::policy_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_resource_policy_request; + + pub mod _get_resource_policy_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_request.rs new file mode 100644 index 000000000..02c946d6d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyInput::GetResourcePolicyInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyInput, + > +) -> aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyInput { + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_response.rs new file mode 100644 index 000000000..f45837df7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyOutput::GetResourcePolicyOutput { + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy), + RevisionId: crate::standard_library_conversions::ostring_to_dafny(&value.revision_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GetResourcePolicyOutput, + > +) -> aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyOutput { + aws_sdk_dynamodb::operation::get_resource_policy::GetResourcePolicyOutput::builder() + .set_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Policy().clone())) + .set_revision_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RevisionId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs new file mode 100644 index 000000000..c30a817b2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs @@ -0,0 +1,59 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalSecondaryIndex, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndex::GlobalSecondaryIndex { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + Projection: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(&value.projection.clone().unwrap()) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndex, + >, +) -> aws_sdk_dynamodb::types::GlobalSecondaryIndex { + aws_sdk_dynamodb::types::GlobalSecondaryIndex::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_projection(Some( crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(dafny_value.Projection().clone()) + )) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_auto_scaling_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_auto_scaling_update.rs new file mode 100644 index 000000000..a092411b3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_auto_scaling_update.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalSecondaryIndexAutoScalingUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ProvisionedWriteCapacityAutoScalingUpdate: ::std::rc::Rc::new(match &value.provisioned_write_capacity_auto_scaling_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexAutoScalingUpdate, + >, +) -> aws_sdk_dynamodb::types::GlobalSecondaryIndexAutoScalingUpdate { + aws_sdk_dynamodb::types::GlobalSecondaryIndexAutoScalingUpdate::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_provisioned_write_capacity_auto_scaling_update(match (*dafny_value.ProvisionedWriteCapacityAutoScalingUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs new file mode 100644 index 000000000..ed1ffbfd5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs @@ -0,0 +1,97 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalSecondaryIndexDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + KeySchema: ::std::rc::Rc::new(match &value.key_schema { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Projection: ::std::rc::Rc::new(match &value.projection { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + IndexStatus: ::std::rc::Rc::new(match &value.index_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::index_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Backfilling: crate::standard_library_conversions::obool_to_dafny(&value.backfilling), + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + IndexSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.index_size_bytes), + ItemCount: crate::standard_library_conversions::olong_to_dafny(&value.item_count), + IndexArn: crate::standard_library_conversions::ostring_to_dafny(&value.index_arn), + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexDescription, + >, +) -> aws_sdk_dynamodb::types::GlobalSecondaryIndexDescription { + aws_sdk_dynamodb::types::GlobalSecondaryIndexDescription::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_key_schema(match (*dafny_value.KeySchema()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_projection(match (*dafny_value.Projection()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(value.clone())), + _ => None, +} +) + .set_index_status(match &**dafny_value.IndexStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::index_status::from_dafny(value) + ), + _ => None, +} +) + .set_backfilling(crate::standard_library_conversions::obool_from_dafny(dafny_value.Backfilling().clone())) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_description::from_dafny(value.clone())), + _ => None, +} +) + .set_index_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.IndexSizeBytes().clone())) + .set_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ItemCount().clone())) + .set_index_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexArn().clone())) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs new file mode 100644 index 000000000..9d89e817d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalSecondaryIndexInfo, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + KeySchema: ::std::rc::Rc::new(match &value.key_schema { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Projection: ::std::rc::Rc::new(match &value.projection { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexInfo, + >, +) -> aws_sdk_dynamodb::types::GlobalSecondaryIndexInfo { + aws_sdk_dynamodb::types::GlobalSecondaryIndexInfo::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_key_schema(match (*dafny_value.KeySchema()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_projection(match (*dafny_value.Projection()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(value.clone())), + _ => None, +} +) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs new file mode 100644 index 000000000..d532e03e8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalSecondaryIndexUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate { + Update: ::std::rc::Rc::new(match &value.update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::update_global_secondary_index_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Create: ::std::rc::Rc::new(match &value.create { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::create_global_secondary_index_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Delete: ::std::rc::Rc::new(match &value.delete { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::delete_global_secondary_index_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalSecondaryIndexUpdate, + >, +) -> aws_sdk_dynamodb::types::GlobalSecondaryIndexUpdate { + aws_sdk_dynamodb::types::GlobalSecondaryIndexUpdate::builder() + .set_update(match (*dafny_value.Update()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::update_global_secondary_index_action::from_dafny(value.clone())), + _ => None, +} +) + .set_create(match (*dafny_value.Create()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::create_global_secondary_index_action::from_dafny(value.clone())), + _ => None, +} +) + .set_delete(match (*dafny_value.Delete()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::delete_global_secondary_index_action::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs new file mode 100644 index 000000000..3d96ab990 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalTable, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTable::GlobalTable { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name), + ReplicationGroup: ::std::rc::Rc::new(match &value.replication_group { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTable, + >, +) -> aws_sdk_dynamodb::types::GlobalTable { + aws_sdk_dynamodb::types::GlobalTable::builder() + .set_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableName().clone())) + .set_replication_group(match (*dafny_value.ReplicationGroup()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs new file mode 100644 index 000000000..72d718c60 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs @@ -0,0 +1,60 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalTableDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableDescription::GlobalTableDescription { + ReplicationGroup: ::std::rc::Rc::new(match &value.replication_group { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GlobalTableArn: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_arn), + CreationDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date_time), + GlobalTableStatus: ::std::rc::Rc::new(match &value.global_table_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::global_table_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableDescription, + >, +) -> aws_sdk_dynamodb::types::GlobalTableDescription { + aws_sdk_dynamodb::types::GlobalTableDescription::builder() + .set_replication_group(match (*dafny_value.ReplicationGroup()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_global_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableArn().clone())) + .set_creation_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDateTime().clone())) + .set_global_table_status(match &**dafny_value.GlobalTableStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::global_table_status::from_dafny(value) + ), + _ => None, +} +) + .set_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableName().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_global_secondary_index_settings_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_global_secondary_index_settings_update.rs new file mode 100644 index 000000000..59fb7115c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_global_secondary_index_settings_update.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::GlobalTableGlobalSecondaryIndexSettingsUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + ProvisionedWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.provisioned_write_capacity_units), + ProvisionedWriteCapacityAutoScalingSettingsUpdate: ::std::rc::Rc::new(match &value.provisioned_write_capacity_auto_scaling_settings_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableGlobalSecondaryIndexSettingsUpdate, + >, +) -> aws_sdk_dynamodb::types::GlobalTableGlobalSecondaryIndexSettingsUpdate { + aws_sdk_dynamodb::types::GlobalTableGlobalSecondaryIndexSettingsUpdate::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_provisioned_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProvisionedWriteCapacityUnits().clone())) + .set_provisioned_write_capacity_auto_scaling_settings_update(match (*dafny_value.ProvisionedWriteCapacityAutoScalingSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs new file mode 100644 index 000000000..632a61104 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::GlobalTableStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::GlobalTableStatus::Creating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::CREATING {}, +aws_sdk_dynamodb::types::GlobalTableStatus::Active => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::ACTIVE {}, +aws_sdk_dynamodb::types::GlobalTableStatus::Deleting => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::DELETING {}, +aws_sdk_dynamodb::types::GlobalTableStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::UPDATING {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus, +) -> aws_sdk_dynamodb::types::GlobalTableStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::CREATING {} => aws_sdk_dynamodb::types::GlobalTableStatus::Creating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::ACTIVE {} => aws_sdk_dynamodb::types::GlobalTableStatus::Active, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::DELETING {} => aws_sdk_dynamodb::types::GlobalTableStatus::Deleting, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::GlobalTableStatus::UPDATING {} => aws_sdk_dynamodb::types::GlobalTableStatus::Updating, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs new file mode 100644 index 000000000..a0373b8d4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ImportStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ImportStatus::InProgress => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::IN_PROGRESS {}, +aws_sdk_dynamodb::types::ImportStatus::Completed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::COMPLETED {}, +aws_sdk_dynamodb::types::ImportStatus::Cancelling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::CANCELLING {}, +aws_sdk_dynamodb::types::ImportStatus::Cancelled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::CANCELLED {}, +aws_sdk_dynamodb::types::ImportStatus::Failed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::FAILED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus, +) -> aws_sdk_dynamodb::types::ImportStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::IN_PROGRESS {} => aws_sdk_dynamodb::types::ImportStatus::InProgress, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::COMPLETED {} => aws_sdk_dynamodb::types::ImportStatus::Completed, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::CANCELLING {} => aws_sdk_dynamodb::types::ImportStatus::Cancelling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::CANCELLED {} => aws_sdk_dynamodb::types::ImportStatus::Cancelled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportStatus::FAILED {} => aws_sdk_dynamodb::types::ImportStatus::Failed, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs new file mode 100644 index 000000000..30c510473 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs @@ -0,0 +1,66 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ImportSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportSummary::ImportSummary { + ImportArn: crate::standard_library_conversions::ostring_to_dafny(&value.import_arn), + ImportStatus: ::std::rc::Rc::new(match &value.import_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::import_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + S3BucketSource: ::std::rc::Rc::new(match &value.s3_bucket_source { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CloudWatchLogGroupArn: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_watch_log_group_arn), + InputFormat: ::std::rc::Rc::new(match &value.input_format { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_format::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + StartTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.start_time), + EndTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.end_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportSummary, + >, +) -> aws_sdk_dynamodb::types::ImportSummary { + aws_sdk_dynamodb::types::ImportSummary::builder() + .set_import_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ImportArn().clone())) + .set_import_status(match &**dafny_value.ImportStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::import_status::from_dafny(value) + ), + _ => None, +} +) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_s3_bucket_source(match (*dafny_value.S3BucketSource()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::from_dafny(value.clone())), + _ => None, +} +) + .set_cloud_watch_log_group_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudWatchLogGroupArn().clone())) + .set_input_format(match &**dafny_value.InputFormat() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::input_format::from_dafny(value) + ), + _ => None, +} +) + .set_start_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.StartTime().clone())) + .set_end_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.EndTime().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs new file mode 100644 index 000000000..3699c845e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::import_table::ImportTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::import_table::ImportTableError::ImportConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::import_conflict_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::import_table::ImportTableError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::import_table::ImportTableError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _import_table_request; + + pub mod _import_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_request.rs new file mode 100644 index 000000000..d050352a3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_request.rs @@ -0,0 +1,57 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::import_table::ImportTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableInput::ImportTableInput { + ClientToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_token), + S3BucketSource: crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::to_dafny(&value.s3_bucket_source.clone().unwrap()) +, + InputFormat: crate::deps::com_amazonaws_dynamodb::conversions::input_format::to_dafny(value.input_format.clone().unwrap()), + InputFormatOptions: ::std::rc::Rc::new(match &value.input_format_options { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_format_options::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + InputCompressionType: ::std::rc::Rc::new(match &value.input_compression_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_compression_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableCreationParameters: crate::deps::com_amazonaws_dynamodb::conversions::table_creation_parameters::to_dafny(&value.table_creation_parameters.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableInput, + > +) -> aws_sdk_dynamodb::operation::import_table::ImportTableInput { + aws_sdk_dynamodb::operation::import_table::ImportTableInput::builder() + .set_client_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientToken().clone())) + .set_s3_bucket_source(Some( crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::from_dafny(dafny_value.S3BucketSource().clone()) + )) + .set_input_format(Some( crate::deps::com_amazonaws_dynamodb::conversions::input_format::from_dafny(dafny_value.InputFormat()) )) + .set_input_format_options(match (*dafny_value.InputFormatOptions()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::input_format_options::from_dafny(value.clone())), + _ => None, +} +) + .set_input_compression_type(match &**dafny_value.InputCompressionType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::input_compression_type::from_dafny(value) + ), + _ => None, +} +) + .set_table_creation_parameters(Some( crate::deps::com_amazonaws_dynamodb::conversions::table_creation_parameters::from_dafny(dafny_value.TableCreationParameters().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_response.rs new file mode 100644 index 000000000..6724bcc21 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::import_table::ImportTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableOutput::ImportTableOutput { + ImportTableDescription: crate::deps::com_amazonaws_dynamodb::conversions::import_table_description::to_dafny(&value.import_table_description.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableOutput, + > +) -> aws_sdk_dynamodb::operation::import_table::ImportTableOutput { + aws_sdk_dynamodb::operation::import_table::ImportTableOutput::builder() + .set_import_table_description(Some( crate::deps::com_amazonaws_dynamodb::conversions::import_table_description::from_dafny(dafny_value.ImportTableDescription().clone()) + )) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs new file mode 100644 index 000000000..813477e93 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs @@ -0,0 +1,116 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ImportTableDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableDescription::ImportTableDescription { + ImportArn: crate::standard_library_conversions::ostring_to_dafny(&value.import_arn), + ImportStatus: ::std::rc::Rc::new(match &value.import_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::import_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + TableId: crate::standard_library_conversions::ostring_to_dafny(&value.table_id), + ClientToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_token), + S3BucketSource: ::std::rc::Rc::new(match &value.s3_bucket_source { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ErrorCount: crate::standard_library_conversions::olong_to_dafny(&Some(value.error_count)), + CloudWatchLogGroupArn: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_watch_log_group_arn), + InputFormat: ::std::rc::Rc::new(match &value.input_format { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_format::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + InputFormatOptions: ::std::rc::Rc::new(match &value.input_format_options { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_format_options::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + InputCompressionType: ::std::rc::Rc::new(match &value.input_compression_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::input_compression_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableCreationParameters: ::std::rc::Rc::new(match &value.table_creation_parameters { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_creation_parameters::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + StartTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.start_time), + EndTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.end_time), + ProcessedSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.processed_size_bytes), + ProcessedItemCount: crate::standard_library_conversions::olong_to_dafny(&Some(value.processed_item_count)), + ImportedItemCount: crate::standard_library_conversions::olong_to_dafny(&Some(value.imported_item_count)), + FailureCode: crate::standard_library_conversions::ostring_to_dafny(&value.failure_code), + FailureMessage: crate::standard_library_conversions::ostring_to_dafny(&value.failure_message), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ImportTableDescription, + >, +) -> aws_sdk_dynamodb::types::ImportTableDescription { + aws_sdk_dynamodb::types::ImportTableDescription::builder() + .set_import_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ImportArn().clone())) + .set_import_status(match &**dafny_value.ImportStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::import_status::from_dafny(value) + ), + _ => None, +} +) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_table_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableId().clone())) + .set_client_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientToken().clone())) + .set_s3_bucket_source(match (*dafny_value.S3BucketSource()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::s3_bucket_source::from_dafny(value.clone())), + _ => None, +} +) + .set_error_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ErrorCount().clone())) + .set_cloud_watch_log_group_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudWatchLogGroupArn().clone())) + .set_input_format(match &**dafny_value.InputFormat() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::input_format::from_dafny(value) + ), + _ => None, +} +) + .set_input_format_options(match (*dafny_value.InputFormatOptions()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::input_format_options::from_dafny(value.clone())), + _ => None, +} +) + .set_input_compression_type(match &**dafny_value.InputCompressionType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::input_compression_type::from_dafny(value) + ), + _ => None, +} +) + .set_table_creation_parameters(match (*dafny_value.TableCreationParameters()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_creation_parameters::from_dafny(value.clone())), + _ => None, +} +) + .set_start_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.StartTime().clone())) + .set_end_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.EndTime().clone())) + .set_processed_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProcessedSizeBytes().clone())) + .set_processed_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProcessedItemCount().clone())) + .set_imported_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ImportedItemCount().clone())) + .set_failure_code(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FailureCode().clone())) + .set_failure_message(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FailureMessage().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs new file mode 100644 index 000000000..4e54f629c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::IncrementalExportSpecification, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IncrementalExportSpecification::IncrementalExportSpecification { + ExportFromTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.export_from_time), + ExportToTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.export_to_time), + ExportViewType: ::std::rc::Rc::new(match &value.export_view_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::export_view_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IncrementalExportSpecification, + >, +) -> aws_sdk_dynamodb::types::IncrementalExportSpecification { + aws_sdk_dynamodb::types::IncrementalExportSpecification::builder() + .set_export_from_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ExportFromTime().clone())) + .set_export_to_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ExportToTime().clone())) + .set_export_view_type(match &**dafny_value.ExportViewType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::export_view_type::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs new file mode 100644 index 000000000..df88cdcb2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::IndexStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::IndexStatus::Creating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::CREATING {}, +aws_sdk_dynamodb::types::IndexStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::UPDATING {}, +aws_sdk_dynamodb::types::IndexStatus::Deleting => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::DELETING {}, +aws_sdk_dynamodb::types::IndexStatus::Active => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::ACTIVE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus, +) -> aws_sdk_dynamodb::types::IndexStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::CREATING {} => aws_sdk_dynamodb::types::IndexStatus::Creating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::UPDATING {} => aws_sdk_dynamodb::types::IndexStatus::Updating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::DELETING {} => aws_sdk_dynamodb::types::IndexStatus::Deleting, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::IndexStatus::ACTIVE {} => aws_sdk_dynamodb::types::IndexStatus::Active, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs new file mode 100644 index 000000000..57f33b428 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::InputCompressionType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::InputCompressionType::Gzip => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::GZIP {}, +aws_sdk_dynamodb::types::InputCompressionType::Zstd => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::ZSTD {}, +aws_sdk_dynamodb::types::InputCompressionType::None => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::NONE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType, +) -> aws_sdk_dynamodb::types::InputCompressionType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::GZIP {} => aws_sdk_dynamodb::types::InputCompressionType::Gzip, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::ZSTD {} => aws_sdk_dynamodb::types::InputCompressionType::Zstd, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputCompressionType::NONE {} => aws_sdk_dynamodb::types::InputCompressionType::None, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs new file mode 100644 index 000000000..af98c314e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::InputFormat, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::InputFormat::DynamodbJson => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::DYNAMODB_JSON {}, +aws_sdk_dynamodb::types::InputFormat::Ion => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::ION {}, +aws_sdk_dynamodb::types::InputFormat::Csv => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::CSV {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat, +) -> aws_sdk_dynamodb::types::InputFormat { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::DYNAMODB_JSON {} => aws_sdk_dynamodb::types::InputFormat::DynamodbJson, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::ION {} => aws_sdk_dynamodb::types::InputFormat::Ion, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormat::CSV {} => aws_sdk_dynamodb::types::InputFormat::Csv, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs new file mode 100644 index 000000000..b74562f67 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::InputFormatOptions, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormatOptions::InputFormatOptions { + Csv: ::std::rc::Rc::new(match &value.csv { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::csv_options::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::InputFormatOptions, + >, +) -> aws_sdk_dynamodb::types::InputFormatOptions { + aws_sdk_dynamodb::types::InputFormatOptions::builder() + .set_csv(match (*dafny_value.Csv()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::csv_options::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs new file mode 100644 index 000000000..3be139281 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs @@ -0,0 +1,64 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ItemCollectionMetrics, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ItemCollectionMetrics::ItemCollectionMetrics { + ItemCollectionKey: +::std::rc::Rc::new(match &value.item_collection_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SizeEstimateRangeGB: ::std::rc::Rc::new(match &value.size_estimate_range_gb { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::standard_library_conversions::double_to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ItemCollectionMetrics, + >, +) -> aws_sdk_dynamodb::types::ItemCollectionMetrics { + aws_sdk_dynamodb::types::ItemCollectionMetrics::builder() + .set_item_collection_key(match (*dafny_value.ItemCollectionKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_size_estimate_range_gb(match (*dafny_value.SizeEstimateRangeGB()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::Sequence| crate::standard_library_conversions::double_from_dafny(&e.clone()), + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs new file mode 100644 index 000000000..c7ef4d668 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ItemResponse, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ItemResponse::ItemResponse { + Item: +::std::rc::Rc::new(match &value.item { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ItemResponse, + >, +) -> aws_sdk_dynamodb::types::ItemResponse { + aws_sdk_dynamodb::types::ItemResponse::builder() + .set_item(match (*dafny_value.Item()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs new file mode 100644 index 000000000..8fb2d2fb7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::KeySchemaElement, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchemaElement::KeySchemaElement { + AttributeName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.attribute_name), + KeyType: crate::deps::com_amazonaws_dynamodb::conversions::key_type::to_dafny(value.key_type.clone()), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchemaElement, + >, +) -> aws_sdk_dynamodb::types::KeySchemaElement { + aws_sdk_dynamodb::types::KeySchemaElement::builder() + .set_attribute_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AttributeName()) )) + .set_key_type(Some( crate::deps::com_amazonaws_dynamodb::conversions::key_type::from_dafny(dafny_value.KeyType()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs new file mode 100644 index 000000000..ea86df5b0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::KeyType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::KeyType::Hash => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyType::HASH {}, +aws_sdk_dynamodb::types::KeyType::Range => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyType::RANGE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyType, +) -> aws_sdk_dynamodb::types::KeyType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyType::HASH {} => aws_sdk_dynamodb::types::KeyType::Hash, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyType::RANGE {} => aws_sdk_dynamodb::types::KeyType::Range, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs new file mode 100644 index 000000000..6932febce --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs @@ -0,0 +1,84 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::KeysAndAttributes, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeysAndAttributes::KeysAndAttributes { + Keys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.keys, + |e| ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&e.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, +) +, + AttributesToGet: ::std::rc::Rc::new(match &value.attributes_to_get { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KeysAndAttributes, + >, +) -> aws_sdk_dynamodb::types::KeysAndAttributes { + aws_sdk_dynamodb::types::KeysAndAttributes::builder() + .set_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Keys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&e, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +, +) + )) + .set_attributes_to_get(match (*dafny_value.AttributesToGet()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs new file mode 100644 index 000000000..e070e97aa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::KinesisDataStreamDestination, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KinesisDataStreamDestination::KinesisDataStreamDestination { + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn), + DestinationStatus: ::std::rc::Rc::new(match &value.destination_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::destination_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DestinationStatusDescription: crate::standard_library_conversions::ostring_to_dafny(&value.destination_status_description), + ApproximateCreationDateTimePrecision: ::std::rc::Rc::new(match &value.approximate_creation_date_time_precision { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::KinesisDataStreamDestination, + >, +) -> aws_sdk_dynamodb::types::KinesisDataStreamDestination { + aws_sdk_dynamodb::types::KinesisDataStreamDestination::builder() + .set_stream_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.StreamArn().clone())) + .set_destination_status(match &**dafny_value.DestinationStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::destination_status::from_dafny(value) + ), + _ => None, +} +) + .set_destination_status_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.DestinationStatusDescription().clone())) + .set_approximate_creation_date_time_precision(match &**dafny_value.ApproximateCreationDateTimePrecision() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs new file mode 100644 index 000000000..f2cc2c548 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_backups::ListBackupsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_backups::ListBackupsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_backups::ListBackupsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_backups_request; + + pub mod _list_backups_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_request.rs new file mode 100644 index 000000000..9f1d0aa8e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_request.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_backups::ListBackupsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsInput::ListBackupsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + TimeRangeLowerBound: crate::standard_library_conversions::otimestamp_to_dafny(&value.time_range_lower_bound), + TimeRangeUpperBound: crate::standard_library_conversions::otimestamp_to_dafny(&value.time_range_upper_bound), + ExclusiveStartBackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.exclusive_start_backup_arn), + BackupType: ::std::rc::Rc::new(match &value.backup_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::backup_type_filter::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsInput, + > +) -> aws_sdk_dynamodb::operation::list_backups::ListBackupsInput { + aws_sdk_dynamodb::operation::list_backups::ListBackupsInput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_time_range_lower_bound(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.TimeRangeLowerBound().clone())) + .set_time_range_upper_bound(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.TimeRangeUpperBound().clone())) + .set_exclusive_start_backup_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExclusiveStartBackupArn().clone())) + .set_backup_type(match &**dafny_value.BackupType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::backup_type_filter::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_response.rs new file mode 100644 index 000000000..6d5138f7d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_backups::ListBackupsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsOutput::ListBackupsOutput { + BackupSummaries: ::std::rc::Rc::new(match &value.backup_summaries { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::backup_summary::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + LastEvaluatedBackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.last_evaluated_backup_arn), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListBackupsOutput, + > +) -> aws_sdk_dynamodb::operation::list_backups::ListBackupsOutput { + aws_sdk_dynamodb::operation::list_backups::ListBackupsOutput::builder() + .set_backup_summaries(match (*dafny_value.BackupSummaries()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::backup_summary::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_last_evaluated_backup_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.LastEvaluatedBackupArn().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs new file mode 100644 index 000000000..472edcb87 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_contributor_insights_request; + + pub mod _list_contributor_insights_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_request.rs new file mode 100644 index 000000000..286573b40 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsInput::ListContributorInsightsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + MaxResults: crate::standard_library_conversions::oint_to_dafny(value.max_results), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsInput, + > +) -> aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsInput { + aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsInput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .set_max_results(crate::standard_library_conversions::oint_from_dafny(dafny_value.MaxResults().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_response.rs new file mode 100644 index 000000000..2effb5ebe --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsOutput::ListContributorInsightsOutput { + ContributorInsightsSummaries: ::std::rc::Rc::new(match &value.contributor_insights_summaries { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_summary::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListContributorInsightsOutput, + > +) -> aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsOutput { + aws_sdk_dynamodb::operation::list_contributor_insights::ListContributorInsightsOutput::builder() + .set_contributor_insights_summaries(match (*dafny_value.ContributorInsightsSummaries()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_summary::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs new file mode 100644 index 000000000..f48c1b12e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_exports::ListExportsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_exports::ListExportsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_exports::ListExportsError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_exports_request; + + pub mod _list_exports_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_request.rs new file mode 100644 index 000000000..3bfd44be5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_exports::ListExportsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsInput::ListExportsInput { + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + MaxResults: crate::standard_library_conversions::oint_to_dafny(value.max_results), + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsInput, + > +) -> aws_sdk_dynamodb::operation::list_exports::ListExportsInput { + aws_sdk_dynamodb::operation::list_exports::ListExportsInput::builder() + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_max_results(crate::standard_library_conversions::oint_from_dafny(dafny_value.MaxResults().clone())) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_response.rs new file mode 100644 index 000000000..c668c6869 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_exports::ListExportsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsOutput::ListExportsOutput { + ExportSummaries: ::std::rc::Rc::new(match &value.export_summaries { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::export_summary::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListExportsOutput, + > +) -> aws_sdk_dynamodb::operation::list_exports::ListExportsOutput { + aws_sdk_dynamodb::operation::list_exports::ListExportsOutput::builder() + .set_export_summaries(match (*dafny_value.ExportSummaries()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::export_summary::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs new file mode 100644 index 000000000..d3ffce053 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_global_tables_request; + + pub mod _list_global_tables_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_request.rs new file mode 100644 index 000000000..fce19f38a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesInput::ListGlobalTablesInput { + ExclusiveStartGlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.exclusive_start_global_table_name), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + RegionName: crate::standard_library_conversions::ostring_to_dafny(&value.region_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesInput, + > +) -> aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesInput { + aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesInput::builder() + .set_exclusive_start_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExclusiveStartGlobalTableName().clone())) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_region_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RegionName().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_response.rs new file mode 100644 index 000000000..06c2dd5e8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesOutput::ListGlobalTablesOutput { + GlobalTables: ::std::rc::Rc::new(match &value.global_tables { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_table::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + LastEvaluatedGlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.last_evaluated_global_table_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListGlobalTablesOutput, + > +) -> aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesOutput { + aws_sdk_dynamodb::operation::list_global_tables::ListGlobalTablesOutput::builder() + .set_global_tables(match (*dafny_value.GlobalTables()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_table::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_last_evaluated_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.LastEvaluatedGlobalTableName().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs new file mode 100644 index 000000000..3861ccf0f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_imports::ListImportsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_imports::ListImportsError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_imports_request; + + pub mod _list_imports_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_request.rs new file mode 100644 index 000000000..c279e4016 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_imports::ListImportsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsInput::ListImportsInput { + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + PageSize: crate::standard_library_conversions::oint_to_dafny(value.page_size), + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsInput, + > +) -> aws_sdk_dynamodb::operation::list_imports::ListImportsInput { + aws_sdk_dynamodb::operation::list_imports::ListImportsInput::builder() + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_page_size(crate::standard_library_conversions::oint_from_dafny(dafny_value.PageSize().clone())) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_response.rs new file mode 100644 index 000000000..95ab44f40 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_imports::ListImportsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsOutput::ListImportsOutput { + ImportSummaryList: ::std::rc::Rc::new(match &value.import_summary_list { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::import_summary::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListImportsOutput, + > +) -> aws_sdk_dynamodb::operation::list_imports::ListImportsOutput { + aws_sdk_dynamodb::operation::list_imports::ListImportsOutput::builder() + .set_import_summary_list(match (*dafny_value.ImportSummaryList()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::import_summary::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs new file mode 100644 index 000000000..382ab1e24 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_tables::ListTablesError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_tables::ListTablesError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_tables::ListTablesError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_tables_request; + + pub mod _list_tables_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_request.rs new file mode 100644 index 000000000..4fab0fd2f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_tables::ListTablesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesInput::ListTablesInput { + ExclusiveStartTableName: crate::standard_library_conversions::ostring_to_dafny(&value.exclusive_start_table_name), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesInput, + > +) -> aws_sdk_dynamodb::operation::list_tables::ListTablesInput { + aws_sdk_dynamodb::operation::list_tables::ListTablesInput::builder() + .set_exclusive_start_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExclusiveStartTableName().clone())) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_response.rs new file mode 100644 index 000000000..506a60476 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_response.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_tables::ListTablesOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesOutput::ListTablesOutput { + TableNames: ::std::rc::Rc::new(match &value.table_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + LastEvaluatedTableName: crate::standard_library_conversions::ostring_to_dafny(&value.last_evaluated_table_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTablesOutput, + > +) -> aws_sdk_dynamodb::operation::list_tables::ListTablesOutput { + aws_sdk_dynamodb::operation::list_tables::ListTablesOutput::builder() + .set_table_names(match (*dafny_value.TableNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_last_evaluated_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.LastEvaluatedTableName().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs new file mode 100644 index 000000000..237ce7f1f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_tags_of_resource_request; + + pub mod _list_tags_of_resource_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_request.rs new file mode 100644 index 000000000..1c1041d93 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceInput::ListTagsOfResourceInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceInput, + > +) -> aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceInput { + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_response.rs new file mode 100644 index 000000000..4b7e03968 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceOutput::ListTagsOfResourceOutput { + Tags: ::std::rc::Rc::new(match &value.tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextToken: crate::standard_library_conversions::ostring_to_dafny(&value.next_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ListTagsOfResourceOutput, + > +) -> aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceOutput { + aws_sdk_dynamodb::operation::list_tags_of_resource::ListTagsOfResourceOutput::builder() + .set_tags(match (*dafny_value.Tags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextToken().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs new file mode 100644 index 000000000..8a9851932 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::LocalSecondaryIndex, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndex::LocalSecondaryIndex { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + Projection: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(&value.projection.clone().unwrap()) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndex, + >, +) -> aws_sdk_dynamodb::types::LocalSecondaryIndex { + aws_sdk_dynamodb::types::LocalSecondaryIndex::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_projection(Some( crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(dafny_value.Projection().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs new file mode 100644 index 000000000..bad83c18a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::LocalSecondaryIndexDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndexDescription::LocalSecondaryIndexDescription { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + KeySchema: ::std::rc::Rc::new(match &value.key_schema { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Projection: ::std::rc::Rc::new(match &value.projection { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + IndexSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.index_size_bytes), + ItemCount: crate::standard_library_conversions::olong_to_dafny(&value.item_count), + IndexArn: crate::standard_library_conversions::ostring_to_dafny(&value.index_arn), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndexDescription, + >, +) -> aws_sdk_dynamodb::types::LocalSecondaryIndexDescription { + aws_sdk_dynamodb::types::LocalSecondaryIndexDescription::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_key_schema(match (*dafny_value.KeySchema()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_projection(match (*dafny_value.Projection()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(value.clone())), + _ => None, +} +) + .set_index_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.IndexSizeBytes().clone())) + .set_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ItemCount().clone())) + .set_index_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexArn().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs new file mode 100644 index 000000000..a49ef07f9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs @@ -0,0 +1,55 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::LocalSecondaryIndexInfo, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndexInfo::LocalSecondaryIndexInfo { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + KeySchema: ::std::rc::Rc::new(match &value.key_schema { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Projection: ::std::rc::Rc::new(match &value.projection { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::projection::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::LocalSecondaryIndexInfo, + >, +) -> aws_sdk_dynamodb::types::LocalSecondaryIndexInfo { + aws_sdk_dynamodb::types::LocalSecondaryIndexInfo::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_key_schema(match (*dafny_value.KeySchema()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_projection(match (*dafny_value.Projection()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::projection::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs new file mode 100644 index 000000000..affc15bb1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::OnDemandThroughput, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::OnDemandThroughput::OnDemandThroughput { + MaxReadRequestUnits: crate::standard_library_conversions::olong_to_dafny(&value.max_read_request_units), + MaxWriteRequestUnits: crate::standard_library_conversions::olong_to_dafny(&value.max_write_request_units), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::OnDemandThroughput, + >, +) -> aws_sdk_dynamodb::types::OnDemandThroughput { + aws_sdk_dynamodb::types::OnDemandThroughput::builder() + .set_max_read_request_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MaxReadRequestUnits().clone())) + .set_max_write_request_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MaxWriteRequestUnits().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs new file mode 100644 index 000000000..abad93cd4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::OnDemandThroughputOverride, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::OnDemandThroughputOverride::OnDemandThroughputOverride { + MaxReadRequestUnits: crate::standard_library_conversions::olong_to_dafny(&value.max_read_request_units), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::OnDemandThroughputOverride, + >, +) -> aws_sdk_dynamodb::types::OnDemandThroughputOverride { + aws_sdk_dynamodb::types::OnDemandThroughputOverride::builder() + .set_max_read_request_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.MaxReadRequestUnits().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs new file mode 100644 index 000000000..d18ee2b90 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ParameterizedStatement, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ParameterizedStatement::ParameterizedStatement { + Statement: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.statement), + Parameters: ::std::rc::Rc::new(match &value.parameters { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ParameterizedStatement, + >, +) -> aws_sdk_dynamodb::types::ParameterizedStatement { + aws_sdk_dynamodb::types::ParameterizedStatement::builder() + .set_statement(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Statement()) )) + .set_parameters(match (*dafny_value.Parameters()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_description.rs new file mode 100644 index 000000000..d26c64954 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_description.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::PointInTimeRecoveryDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryDescription::PointInTimeRecoveryDescription { + PointInTimeRecoveryStatus: ::std::rc::Rc::new(match &value.point_in_time_recovery_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + EarliestRestorableDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.earliest_restorable_date_time), + LatestRestorableDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.latest_restorable_date_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryDescription, + >, +) -> aws_sdk_dynamodb::types::PointInTimeRecoveryDescription { + aws_sdk_dynamodb::types::PointInTimeRecoveryDescription::builder() + .set_point_in_time_recovery_status(match &**dafny_value.PointInTimeRecoveryStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_status::from_dafny(value) + ), + _ => None, +} +) + .set_earliest_restorable_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.EarliestRestorableDateTime().clone())) + .set_latest_restorable_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LatestRestorableDateTime().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_specification.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_specification.rs new file mode 100644 index 000000000..d79e68e5f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_specification.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::PointInTimeRecoverySpecification, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoverySpecification::PointInTimeRecoverySpecification { + PointInTimeRecoveryEnabled: value.point_in_time_recovery_enabled.clone(), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoverySpecification, + >, +) -> aws_sdk_dynamodb::types::PointInTimeRecoverySpecification { + aws_sdk_dynamodb::types::PointInTimeRecoverySpecification::builder() + .set_point_in_time_recovery_enabled(Some( dafny_value.PointInTimeRecoveryEnabled() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_status.rs new file mode 100644 index 000000000..081d470a8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_status.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::PointInTimeRecoveryStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::PointInTimeRecoveryStatus::Enabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryStatus::ENABLED {}, +aws_sdk_dynamodb::types::PointInTimeRecoveryStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryStatus::DISABLED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryStatus, +) -> aws_sdk_dynamodb::types::PointInTimeRecoveryStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryStatus::ENABLED {} => aws_sdk_dynamodb::types::PointInTimeRecoveryStatus::Enabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PointInTimeRecoveryStatus::DISABLED {} => aws_sdk_dynamodb::types::PointInTimeRecoveryStatus::Disabled, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs new file mode 100644 index 000000000..a0a3f9a26 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs @@ -0,0 +1,52 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Projection, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Projection::Projection { + ProjectionType: ::std::rc::Rc::new(match &value.projection_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::projection_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + NonKeyAttributes: ::std::rc::Rc::new(match &value.non_key_attributes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Projection, + >, +) -> aws_sdk_dynamodb::types::Projection { + aws_sdk_dynamodb::types::Projection::builder() + .set_projection_type(match &**dafny_value.ProjectionType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::projection_type::from_dafny(value) + ), + _ => None, +} +) + .set_non_key_attributes(match (*dafny_value.NonKeyAttributes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs new file mode 100644 index 000000000..28b89124f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ProjectionType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ProjectionType::All => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::ALL {}, +aws_sdk_dynamodb::types::ProjectionType::KeysOnly => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::KEYS_ONLY {}, +aws_sdk_dynamodb::types::ProjectionType::Include => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::INCLUDE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType, +) -> aws_sdk_dynamodb::types::ProjectionType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::ALL {} => aws_sdk_dynamodb::types::ProjectionType::All, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::KEYS_ONLY {} => aws_sdk_dynamodb::types::ProjectionType::KeysOnly, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProjectionType::INCLUDE {} => aws_sdk_dynamodb::types::ProjectionType::Include, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs new file mode 100644 index 000000000..f5090829c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ProvisionedThroughput, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughput::ProvisionedThroughput { + ReadCapacityUnits: value.read_capacity_units, + WriteCapacityUnits: value.write_capacity_units, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughput, + >, +) -> aws_sdk_dynamodb::types::ProvisionedThroughput { + aws_sdk_dynamodb::types::ProvisionedThroughput::builder() + .set_read_capacity_units(Some( dafny_value.ReadCapacityUnits() .clone() )) + .set_write_capacity_units(Some( dafny_value.WriteCapacityUnits() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs new file mode 100644 index 000000000..bbac7e6fe --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ProvisionedThroughputDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughputDescription::ProvisionedThroughputDescription { + LastIncreaseDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_increase_date_time), + LastDecreaseDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_decrease_date_time), + NumberOfDecreasesToday: crate::standard_library_conversions::olong_to_dafny(&value.number_of_decreases_today), + ReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.read_capacity_units), + WriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.write_capacity_units), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughputDescription, + >, +) -> aws_sdk_dynamodb::types::ProvisionedThroughputDescription { + aws_sdk_dynamodb::types::ProvisionedThroughputDescription::builder() + .set_last_increase_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastIncreaseDateTime().clone())) + .set_last_decrease_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastDecreaseDateTime().clone())) + .set_number_of_decreases_today(crate::standard_library_conversions::olong_from_dafny(dafny_value.NumberOfDecreasesToday().clone())) + .set_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ReadCapacityUnits().clone())) + .set_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.WriteCapacityUnits().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs new file mode 100644 index 000000000..da4165734 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ProvisionedThroughputOverride, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughputOverride::ProvisionedThroughputOverride { + ReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.read_capacity_units), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ProvisionedThroughputOverride, + >, +) -> aws_sdk_dynamodb::types::ProvisionedThroughputOverride { + aws_sdk_dynamodb::types::ProvisionedThroughputOverride::builder() + .set_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ReadCapacityUnits().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs new file mode 100644 index 000000000..14cdec509 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs @@ -0,0 +1,95 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Put, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Put::Put { + Item: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.item.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnValuesOnConditionCheckFailure: ::std::rc::Rc::new(match &value.return_values_on_condition_check_failure { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Put, + >, +) -> aws_sdk_dynamodb::types::Put { + aws_sdk_dynamodb::types::Put::builder() + .set_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Item(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_values_on_condition_check_failure(match &**dafny_value.ReturnValuesOnConditionCheckFailure() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs new file mode 100644 index 000000000..63379554a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::put_item::PutItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::put_item::PutItemError::ConditionalCheckFailedException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::conditional_check_failed_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::ItemCollectionSizeLimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_item::PutItemError::TransactionConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_conflict_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _put_item_request; + + pub mod _put_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_request.rs new file mode 100644 index 000000000..d45d54776 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_request.rs @@ -0,0 +1,156 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::put_item::PutItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemInput::PutItemInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + Item: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.item.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + Expected: +::std::rc::Rc::new(match &value.expected { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnValues: ::std::rc::Rc::new(match &value.return_values { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_value::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnItemCollectionMetrics: ::std::rc::Rc::new(match &value.return_item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ConditionalOperator: ::std::rc::Rc::new(match &value.conditional_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemInput, + > +) -> aws_sdk_dynamodb::operation::put_item::PutItemInput { + aws_sdk_dynamodb::operation::put_item::PutItemInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Item(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_expected(match (*dafny_value.Expected()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_values(match &**dafny_value.ReturnValues() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_value::from_dafny(value) + ), + _ => None, +} +) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_return_item_collection_metrics(match &**dafny_value.ReturnItemCollectionMetrics() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::from_dafny(value) + ), + _ => None, +} +) + .set_conditional_operator(match &**dafny_value.ConditionalOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value) + ), + _ => None, +} +) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_response.rs new file mode 100644 index 000000000..687d199dc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_response.rs @@ -0,0 +1,69 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::put_item::PutItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemOutput::PutItemOutput { + Attributes: +::std::rc::Rc::new(match &value.attributes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ItemCollectionMetrics: ::std::rc::Rc::new(match &value.item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemOutput, + > +) -> aws_sdk_dynamodb::operation::put_item::PutItemOutput { + aws_sdk_dynamodb::operation::put_item::PutItemOutput::builder() + .set_attributes(match (*dafny_value.Attributes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .set_item_collection_metrics(match (*dafny_value.ItemCollectionMetrics()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs new file mode 100644 index 000000000..cbb029ec2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::PutRequest, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutRequest::PutRequest { + Item: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.item.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutRequest, + >, +) -> aws_sdk_dynamodb::types::PutRequest { + aws_sdk_dynamodb::types::PutRequest::builder() + .set_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Item(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs new file mode 100644 index 000000000..0b1309706 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::PolicyNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::policy_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _put_resource_policy_request; + + pub mod _put_resource_policy_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_request.rs new file mode 100644 index 000000000..d0f9e49c9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_request.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyInput::PutResourcePolicyInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy) .Extract(), + ExpectedRevisionId: crate::standard_library_conversions::ostring_to_dafny(&value.expected_revision_id), + ConfirmRemoveSelfResourceAccess: crate::standard_library_conversions::obool_to_dafny(&value.confirm_remove_self_resource_access), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyInput, + > +) -> aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyInput { + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .set_policy(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Policy()) )) + .set_expected_revision_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ExpectedRevisionId().clone())) + .set_confirm_remove_self_resource_access(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConfirmRemoveSelfResourceAccess().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_response.rs new file mode 100644 index 000000000..8f47c4802 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyOutput::PutResourcePolicyOutput { + RevisionId: crate::standard_library_conversions::ostring_to_dafny(&value.revision_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::PutResourcePolicyOutput, + > +) -> aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyOutput { + aws_sdk_dynamodb::operation::put_resource_policy::PutResourcePolicyOutput::builder() + .set_revision_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RevisionId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs new file mode 100644 index 000000000..77293dd16 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::query::QueryError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::query::QueryError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::query::QueryError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::query::QueryError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::query::QueryError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::query::QueryError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _query_request; + + pub mod _query_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs new file mode 100644 index 000000000..c6d820158 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs @@ -0,0 +1,211 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::query::QueryInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput::QueryInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + Select: ::std::rc::Rc::new(match &value.select { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::select::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + AttributesToGet: ::std::rc::Rc::new(match &value.attributes_to_get { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + KeyConditions: +::std::rc::Rc::new(match &value.key_conditions { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::condition::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + QueryFilter: +::std::rc::Rc::new(match &value.query_filter { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::condition::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConditionalOperator: ::std::rc::Rc::new(match &value.conditional_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ScanIndexForward: crate::standard_library_conversions::obool_to_dafny(&value.scan_index_forward), + ExclusiveStartKey: +::std::rc::Rc::new(match &value.exclusive_start_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression), + FilterExpression: crate::standard_library_conversions::ostring_to_dafny(&value.filter_expression), + KeyConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.key_condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput, + > +) -> aws_sdk_dynamodb::operation::query::QueryInput { + aws_sdk_dynamodb::operation::query::QueryInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_select(match &**dafny_value.Select() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::select::from_dafny(value) + ), + _ => None, +} +) + .set_attributes_to_get(match (*dafny_value.AttributesToGet()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .set_key_conditions(match (*dafny_value.KeyConditions()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::condition::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_query_filter(match (*dafny_value.QueryFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::condition::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_conditional_operator(match &**dafny_value.ConditionalOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value) + ), + _ => None, +} +) + .set_scan_index_forward(crate::standard_library_conversions::obool_from_dafny(dafny_value.ScanIndexForward().clone())) + .set_exclusive_start_key(match (*dafny_value.ExclusiveStartKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone())) + .set_filter_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FilterExpression().clone())) + .set_key_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs new file mode 100644 index 000000000..c2a15cafb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs @@ -0,0 +1,91 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::query::QueryOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryOutput::QueryOutput { + Items: ::std::rc::Rc::new(match &value.items { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&e.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Count: crate::standard_library_conversions::oint_to_dafny(Some(value.count)), + ScannedCount: crate::standard_library_conversions::oint_to_dafny(Some(value.scanned_count)), + LastEvaluatedKey: +::std::rc::Rc::new(match &value.last_evaluated_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryOutput, + > +) -> aws_sdk_dynamodb::operation::query::QueryOutput { + aws_sdk_dynamodb::operation::query::QueryOutput::builder() + .set_items(match (*dafny_value.Items()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&e, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +, + ) + ), + _ => None +} +) + .set_count(crate::standard_library_conversions::oint_from_dafny(dafny_value.Count().clone())) + .set_scanned_count(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScannedCount().clone())) + .set_last_evaluated_key(match (*dafny_value.LastEvaluatedKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs new file mode 100644 index 000000000..8dff008be --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Replica, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Replica::Replica { + RegionName: crate::standard_library_conversions::ostring_to_dafny(&value.region_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Replica, + >, +) -> aws_sdk_dynamodb::types::Replica { + aws_sdk_dynamodb::types::Replica::builder() + .set_region_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RegionName().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs new file mode 100644 index 000000000..99369e969 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaAutoScalingDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaAutoScalingDescription::ReplicaAutoScalingDescription { + RegionName: crate::standard_library_conversions::ostring_to_dafny(&value.region_name), + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_auto_scaling_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaProvisionedReadCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.replica_provisioned_read_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaProvisionedWriteCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.replica_provisioned_write_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaStatus: ::std::rc::Rc::new(match &value.replica_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::replica_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaAutoScalingDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaAutoScalingDescription { + aws_sdk_dynamodb::types::ReplicaAutoScalingDescription::builder() + .set_region_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RegionName().clone())) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_auto_scaling_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_provisioned_read_capacity_auto_scaling_settings(match (*dafny_value.ReplicaProvisionedReadCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_provisioned_write_capacity_auto_scaling_settings(match (*dafny_value.ReplicaProvisionedWriteCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_status(match &**dafny_value.ReplicaStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::replica_status::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs new file mode 100644 index 000000000..723de2e58 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs @@ -0,0 +1,55 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaAutoScalingUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + ReplicaGlobalSecondaryIndexUpdates: ::std::rc::Rc::new(match &value.replica_global_secondary_index_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_auto_scaling_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaProvisionedReadCapacityAutoScalingUpdate: ::std::rc::Rc::new(match &value.replica_provisioned_read_capacity_auto_scaling_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaAutoScalingUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicaAutoScalingUpdate { + aws_sdk_dynamodb::types::ReplicaAutoScalingUpdate::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .set_replica_global_secondary_index_updates(match (*dafny_value.ReplicaGlobalSecondaryIndexUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_auto_scaling_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_provisioned_read_capacity_auto_scaling_update(match (*dafny_value.ReplicaProvisionedReadCapacityAutoScalingUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs new file mode 100644 index 000000000..cc2408106 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs @@ -0,0 +1,97 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaDescription::ReplicaDescription { + RegionName: crate::standard_library_conversions::ostring_to_dafny(&value.region_name), + ReplicaStatus: ::std::rc::Rc::new(match &value.replica_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::replica_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaStatusDescription: crate::standard_library_conversions::ostring_to_dafny(&value.replica_status_description), + ReplicaStatusPercentProgress: crate::standard_library_conversions::ostring_to_dafny(&value.replica_status_percent_progress), + KMSMasterKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_master_key_id), + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaInaccessibleDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.replica_inaccessible_date_time), + ReplicaTableClassSummary: ::std::rc::Rc::new(match &value.replica_table_class_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaDescription { + aws_sdk_dynamodb::types::ReplicaDescription::builder() + .set_region_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RegionName().clone())) + .set_replica_status(match &**dafny_value.ReplicaStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::replica_status::from_dafny(value) + ), + _ => None, +} +) + .set_replica_status_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ReplicaStatusDescription().clone())) + .set_replica_status_percent_progress(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ReplicaStatusPercentProgress().clone())) + .set_kms_master_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KMSMasterKeyId().clone())) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_inaccessible_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ReplicaInaccessibleDateTime().clone())) + .set_replica_table_class_summary(match (*dafny_value.ReplicaTableClassSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs new file mode 100644 index 000000000..c7e6c1330 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndex, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndex, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndex { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndex::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_description.rs new file mode 100644 index 000000000..3ab2b4a65 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_description.rs @@ -0,0 +1,57 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + IndexStatus: ::std::rc::Rc::new(match &value.index_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::index_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedReadCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.provisioned_read_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedWriteCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.provisioned_write_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexAutoScalingDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingDescription { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingDescription::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_index_status(match &**dafny_value.IndexStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::index_status::from_dafny(value) + ), + _ => None, +} +) + .set_provisioned_read_capacity_auto_scaling_settings(match (*dafny_value.ProvisionedReadCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_provisioned_write_capacity_auto_scaling_settings(match (*dafny_value.ProvisionedWriteCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_update.rs new file mode 100644 index 000000000..e5cc89d3c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_update.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ProvisionedReadCapacityAutoScalingUpdate: ::std::rc::Rc::new(match &value.provisioned_read_capacity_auto_scaling_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexAutoScalingUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingUpdate { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexAutoScalingUpdate::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_provisioned_read_capacity_auto_scaling_update(match (*dafny_value.ProvisionedReadCapacityAutoScalingUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_description.rs new file mode 100644 index 000000000..c3ccd6850 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_description.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription { + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexDescription { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexDescription::builder() + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_description.rs new file mode 100644 index 000000000..7bcf99030 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_description.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + IndexStatus: ::std::rc::Rc::new(match &value.index_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::index_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.provisioned_read_capacity_units), + ProvisionedReadCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.provisioned_read_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.provisioned_write_capacity_units), + ProvisionedWriteCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.provisioned_write_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexSettingsDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsDescription { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsDescription::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_index_status(match &**dafny_value.IndexStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::index_status::from_dafny(value) + ), + _ => None, +} +) + .set_provisioned_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProvisionedReadCapacityUnits().clone())) + .set_provisioned_read_capacity_auto_scaling_settings(match (*dafny_value.ProvisionedReadCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_provisioned_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProvisionedWriteCapacityUnits().clone())) + .set_provisioned_write_capacity_auto_scaling_settings(match (*dafny_value.ProvisionedWriteCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_update.rs new file mode 100644 index 000000000..bf257f62c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_update.rs @@ -0,0 +1,36 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + ProvisionedReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.provisioned_read_capacity_units), + ProvisionedReadCapacityAutoScalingSettingsUpdate: ::std::rc::Rc::new(match &value.provisioned_read_capacity_auto_scaling_settings_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaGlobalSecondaryIndexSettingsUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsUpdate { + aws_sdk_dynamodb::types::ReplicaGlobalSecondaryIndexSettingsUpdate::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_provisioned_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ProvisionedReadCapacityUnits().clone())) + .set_provisioned_read_capacity_auto_scaling_settings_update(match (*dafny_value.ProvisionedReadCapacityAutoScalingSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs new file mode 100644 index 000000000..de28bd0b0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs @@ -0,0 +1,104 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaSettingsDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaSettingsDescription::ReplicaSettingsDescription { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + ReplicaStatus: ::std::rc::Rc::new(match &value.replica_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::replica_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaBillingModeSummary: ::std::rc::Rc::new(match &value.replica_billing_mode_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaProvisionedReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.replica_provisioned_read_capacity_units), + ReplicaProvisionedReadCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.replica_provisioned_read_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaProvisionedWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.replica_provisioned_write_capacity_units), + ReplicaProvisionedWriteCapacityAutoScalingSettings: ::std::rc::Rc::new(match &value.replica_provisioned_write_capacity_auto_scaling_settings { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaGlobalSecondaryIndexSettings: ::std::rc::Rc::new(match &value.replica_global_secondary_index_settings { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_settings_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaTableClassSummary: ::std::rc::Rc::new(match &value.replica_table_class_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaSettingsDescription, + >, +) -> aws_sdk_dynamodb::types::ReplicaSettingsDescription { + aws_sdk_dynamodb::types::ReplicaSettingsDescription::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .set_replica_status(match &**dafny_value.ReplicaStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::replica_status::from_dafny(value) + ), + _ => None, +} +) + .set_replica_billing_mode_summary(match (*dafny_value.ReplicaBillingModeSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::billing_mode_summary::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_provisioned_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ReplicaProvisionedReadCapacityUnits().clone())) + .set_replica_provisioned_read_capacity_auto_scaling_settings(match (*dafny_value.ReplicaProvisionedReadCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_provisioned_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ReplicaProvisionedWriteCapacityUnits().clone())) + .set_replica_provisioned_write_capacity_auto_scaling_settings(match (*dafny_value.ReplicaProvisionedWriteCapacityAutoScalingSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_description::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_global_secondary_index_settings(match (*dafny_value.ReplicaGlobalSecondaryIndexSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_settings_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_table_class_summary(match (*dafny_value.ReplicaTableClassSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs new file mode 100644 index 000000000..ce6e3bf8d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs @@ -0,0 +1,69 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaSettingsUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaSettingsUpdate::ReplicaSettingsUpdate { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + ReplicaProvisionedReadCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.replica_provisioned_read_capacity_units), + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: ::std::rc::Rc::new(match &value.replica_provisioned_read_capacity_auto_scaling_settings_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaGlobalSecondaryIndexSettingsUpdate: ::std::rc::Rc::new(match &value.replica_global_secondary_index_settings_update { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_settings_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaTableClass: ::std::rc::Rc::new(match &value.replica_table_class { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaSettingsUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicaSettingsUpdate { + aws_sdk_dynamodb::types::ReplicaSettingsUpdate::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .set_replica_provisioned_read_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.ReplicaProvisionedReadCapacityUnits().clone())) + .set_replica_provisioned_read_capacity_auto_scaling_settings_update(match (*dafny_value.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_global_secondary_index_settings_update(match (*dafny_value.ReplicaGlobalSecondaryIndexSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index_settings_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_table_class(match &**dafny_value.ReplicaTableClass() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs new file mode 100644 index 000000000..fd626473a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ReplicaStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ReplicaStatus::Creating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::CREATING {}, +aws_sdk_dynamodb::types::ReplicaStatus::CreationFailed => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::CREATION_FAILED {}, +aws_sdk_dynamodb::types::ReplicaStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::UPDATING {}, +aws_sdk_dynamodb::types::ReplicaStatus::Deleting => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::DELETING {}, +aws_sdk_dynamodb::types::ReplicaStatus::Active => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::ACTIVE {}, +aws_sdk_dynamodb::types::ReplicaStatus::RegionDisabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::REGION_DISABLED {}, +aws_sdk_dynamodb::types::ReplicaStatus::InaccessibleEncryptionCredentials => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus, +) -> aws_sdk_dynamodb::types::ReplicaStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::CREATING {} => aws_sdk_dynamodb::types::ReplicaStatus::Creating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::CREATION_FAILED {} => aws_sdk_dynamodb::types::ReplicaStatus::CreationFailed, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::UPDATING {} => aws_sdk_dynamodb::types::ReplicaStatus::Updating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::DELETING {} => aws_sdk_dynamodb::types::ReplicaStatus::Deleting, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::ACTIVE {} => aws_sdk_dynamodb::types::ReplicaStatus::Active, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::REGION_DISABLED {} => aws_sdk_dynamodb::types::ReplicaStatus::RegionDisabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS {} => aws_sdk_dynamodb::types::ReplicaStatus::InaccessibleEncryptionCredentials, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs new file mode 100644 index 000000000..a768a899b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicaUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaUpdate::ReplicaUpdate { + Create: ::std::rc::Rc::new(match &value.create { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::create_replica_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Delete: ::std::rc::Rc::new(match &value.delete { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::delete_replica_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicaUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicaUpdate { + aws_sdk_dynamodb::types::ReplicaUpdate::builder() + .set_create(match (*dafny_value.Create()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::create_replica_action::from_dafny(value.clone())), + _ => None, +} +) + .set_delete(match (*dafny_value.Delete()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::delete_replica_action::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs new file mode 100644 index 000000000..d2d134b4e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs @@ -0,0 +1,54 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::ReplicationGroupUpdate, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicationGroupUpdate::ReplicationGroupUpdate { + Create: ::std::rc::Rc::new(match &value.create { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::create_replication_group_member_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Update: ::std::rc::Rc::new(match &value.update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::update_replication_group_member_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Delete: ::std::rc::Rc::new(match &value.delete { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::delete_replication_group_member_action::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReplicationGroupUpdate, + >, +) -> aws_sdk_dynamodb::types::ReplicationGroupUpdate { + aws_sdk_dynamodb::types::ReplicationGroupUpdate::builder() + .set_create(match (*dafny_value.Create()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::create_replication_group_member_action::from_dafny(value.clone())), + _ => None, +} +) + .set_update(match (*dafny_value.Update()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::update_replication_group_member_action::from_dafny(value.clone())), + _ => None, +} +) + .set_delete(match (*dafny_value.Delete()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::delete_replication_group_member_action::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs new file mode 100644 index 000000000..f5e889989 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::RestoreSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreSummary::RestoreSummary { + SourceBackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.source_backup_arn), + SourceTableArn: crate::standard_library_conversions::ostring_to_dafny(&value.source_table_arn), + RestoreDateTime: crate::standard_library_conversions::timestamp_to_dafny(&value.restore_date_time), + RestoreInProgress: value.restore_in_progress.clone(), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreSummary, + >, +) -> aws_sdk_dynamodb::types::RestoreSummary { + aws_sdk_dynamodb::types::RestoreSummary::builder() + .set_source_backup_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceBackupArn().clone())) + .set_source_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceTableArn().clone())) + .set_restore_date_time(Some(crate::standard_library_conversions::timestamp_from_dafny(dafny_value.RestoreDateTime().clone()))) + .set_restore_in_progress(Some( dafny_value.RestoreInProgress() .clone() )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs new file mode 100644 index 000000000..5e8fee784 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::BackupInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::BackupNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::backup_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::TableAlreadyExistsException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_already_exists_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupError::TableInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_in_use_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _restore_table_from_backup_request; + + pub mod _restore_table_from_backup_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_request.rs new file mode 100644 index 000000000..54469be7d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_request.rs @@ -0,0 +1,113 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupInput::RestoreTableFromBackupInput { + TargetTableName: crate::standard_library_conversions::ostring_to_dafny(&value.target_table_name) .Extract(), + BackupArn: crate::standard_library_conversions::ostring_to_dafny(&value.backup_arn) .Extract(), + BillingModeOverride: ::std::rc::Rc::new(match &value.billing_mode_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexOverride: ::std::rc::Rc::new(match &value.global_secondary_index_override { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + LocalSecondaryIndexOverride: ::std::rc::Rc::new(match &value.local_secondary_index_override { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSESpecificationOverride: ::std::rc::Rc::new(match &value.sse_specification_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupInput, + > +) -> aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupInput { + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupInput::builder() + .set_target_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TargetTableName()) )) + .set_backup_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.BackupArn()) )) + .set_billing_mode_override(match &**dafny_value.BillingModeOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_global_secondary_index_override(match (*dafny_value.GlobalSecondaryIndexOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_local_secondary_index_override(match (*dafny_value.LocalSecondaryIndexOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_specification_override(match (*dafny_value.SSESpecificationOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_response.rs new file mode 100644 index 000000000..63ba16c64 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupOutput::RestoreTableFromBackupOutput { + TableDescription: ::std::rc::Rc::new(match &value.table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableFromBackupOutput, + > +) -> aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupOutput { + aws_sdk_dynamodb::operation::restore_table_from_backup::RestoreTableFromBackupOutput::builder() + .set_table_description(match (*dafny_value.TableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time.rs new file mode 100644 index 000000000..7c28af331 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::InvalidRestoreTimeException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_restore_time_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::PointInTimeRecoveryUnavailableException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::point_in_time_recovery_unavailable_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::TableAlreadyExistsException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_already_exists_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::TableInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _restore_table_to_point_in_time_request; + + pub mod _restore_table_to_point_in_time_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_request.rs new file mode 100644 index 000000000..e0621b5be --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_request.rs @@ -0,0 +1,119 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput { + SourceTableArn: crate::standard_library_conversions::ostring_to_dafny(&value.source_table_arn), + SourceTableName: crate::standard_library_conversions::ostring_to_dafny(&value.source_table_name), + TargetTableName: crate::standard_library_conversions::ostring_to_dafny(&value.target_table_name) .Extract(), + UseLatestRestorableTime: crate::standard_library_conversions::obool_to_dafny(&value.use_latest_restorable_time), + RestoreDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.restore_date_time), + BillingModeOverride: ::std::rc::Rc::new(match &value.billing_mode_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexOverride: ::std::rc::Rc::new(match &value.global_secondary_index_override { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + LocalSecondaryIndexOverride: ::std::rc::Rc::new(match &value.local_secondary_index_override { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSESpecificationOverride: ::std::rc::Rc::new(match &value.sse_specification_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeInput, + > +) -> aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeInput { + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeInput::builder() + .set_source_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceTableArn().clone())) + .set_source_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceTableName().clone())) + .set_target_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TargetTableName()) )) + .set_use_latest_restorable_time(crate::standard_library_conversions::obool_from_dafny(dafny_value.UseLatestRestorableTime().clone())) + .set_restore_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.RestoreDateTime().clone())) + .set_billing_mode_override(match &**dafny_value.BillingModeOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_global_secondary_index_override(match (*dafny_value.GlobalSecondaryIndexOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_local_secondary_index_override(match (*dafny_value.LocalSecondaryIndexOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_specification_override(match (*dafny_value.SSESpecificationOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_response.rs new file mode 100644 index 000000000..f5a83b889 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeOutput::RestoreTableToPointInTimeOutput { + TableDescription: ::std::rc::Rc::new(match &value.table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::RestoreTableToPointInTimeOutput, + > +) -> aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeOutput { + aws_sdk_dynamodb::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeOutput::builder() + .set_table_description(match (*dafny_value.TableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs new file mode 100644 index 000000000..b2526611f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ReturnConsumedCapacity, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ReturnConsumedCapacity::Indexes => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::INDEXES {}, +aws_sdk_dynamodb::types::ReturnConsumedCapacity::Total => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::TOTAL {}, +aws_sdk_dynamodb::types::ReturnConsumedCapacity::None => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::NONE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity, +) -> aws_sdk_dynamodb::types::ReturnConsumedCapacity { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::INDEXES {} => aws_sdk_dynamodb::types::ReturnConsumedCapacity::Indexes, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::TOTAL {} => aws_sdk_dynamodb::types::ReturnConsumedCapacity::Total, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnConsumedCapacity::NONE {} => aws_sdk_dynamodb::types::ReturnConsumedCapacity::None, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs new file mode 100644 index 000000000..685738730 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ReturnItemCollectionMetrics, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ReturnItemCollectionMetrics::Size => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnItemCollectionMetrics::SIZE {}, +aws_sdk_dynamodb::types::ReturnItemCollectionMetrics::None => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnItemCollectionMetrics::NONE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnItemCollectionMetrics, +) -> aws_sdk_dynamodb::types::ReturnItemCollectionMetrics { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnItemCollectionMetrics::SIZE {} => aws_sdk_dynamodb::types::ReturnItemCollectionMetrics::Size, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnItemCollectionMetrics::NONE {} => aws_sdk_dynamodb::types::ReturnItemCollectionMetrics::None, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs new file mode 100644 index 000000000..df8085df3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ReturnValue, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ReturnValue::None => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::NONE {}, +aws_sdk_dynamodb::types::ReturnValue::AllOld => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::ALL_OLD {}, +aws_sdk_dynamodb::types::ReturnValue::UpdatedOld => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::UPDATED_OLD {}, +aws_sdk_dynamodb::types::ReturnValue::AllNew => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::ALL_NEW {}, +aws_sdk_dynamodb::types::ReturnValue::UpdatedNew => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::UPDATED_NEW {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue, +) -> aws_sdk_dynamodb::types::ReturnValue { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::NONE {} => aws_sdk_dynamodb::types::ReturnValue::None, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::ALL_OLD {} => aws_sdk_dynamodb::types::ReturnValue::AllOld, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::UPDATED_OLD {} => aws_sdk_dynamodb::types::ReturnValue::UpdatedOld, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::ALL_NEW {} => aws_sdk_dynamodb::types::ReturnValue::AllNew, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValue::UPDATED_NEW {} => aws_sdk_dynamodb::types::ReturnValue::UpdatedNew, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_values_on_condition_check_failure.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_values_on_condition_check_failure.rs new file mode 100644 index 000000000..7d3380d94 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/return_values_on_condition_check_failure.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure::AllOld => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValuesOnConditionCheckFailure::ALL_OLD {}, +aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure::None => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValuesOnConditionCheckFailure::NONE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValuesOnConditionCheckFailure, +) -> aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValuesOnConditionCheckFailure::ALL_OLD {} => aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure::AllOld, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ReturnValuesOnConditionCheckFailure::NONE {} => aws_sdk_dynamodb::types::ReturnValuesOnConditionCheckFailure::None, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs new file mode 100644 index 000000000..d7540376d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::S3BucketSource, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3BucketSource::S3BucketSource { + S3BucketOwner: crate::standard_library_conversions::ostring_to_dafny(&value.s3_bucket_owner), + S3Bucket: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.s3_bucket), + S3KeyPrefix: crate::standard_library_conversions::ostring_to_dafny(&value.s3_key_prefix), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3BucketSource, + >, +) -> aws_sdk_dynamodb::types::S3BucketSource { + aws_sdk_dynamodb::types::S3BucketSource::builder() + .set_s3_bucket_owner(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3BucketOwner().clone())) + .set_s3_bucket(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.S3Bucket()) )) + .set_s3_key_prefix(crate::standard_library_conversions::ostring_from_dafny(dafny_value.S3KeyPrefix().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs new file mode 100644 index 000000000..5e7e786e1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::S3SseAlgorithm, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::S3SseAlgorithm::Aes256 => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3SseAlgorithm::AES256 {}, +aws_sdk_dynamodb::types::S3SseAlgorithm::Kms => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3SseAlgorithm::KMS {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3SseAlgorithm, +) -> aws_sdk_dynamodb::types::S3SseAlgorithm { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3SseAlgorithm::AES256 {} => aws_sdk_dynamodb::types::S3SseAlgorithm::Aes256, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::S3SseAlgorithm::KMS {} => aws_sdk_dynamodb::types::S3SseAlgorithm::Kms, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs new file mode 100644 index 000000000..f921f603f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::ScalarAttributeType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::ScalarAttributeType::S => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::S {}, +aws_sdk_dynamodb::types::ScalarAttributeType::N => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::N {}, +aws_sdk_dynamodb::types::ScalarAttributeType::B => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::B {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType, +) -> aws_sdk_dynamodb::types::ScalarAttributeType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::S {} => aws_sdk_dynamodb::types::ScalarAttributeType::S, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::N {} => aws_sdk_dynamodb::types::ScalarAttributeType::N, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScalarAttributeType::B {} => aws_sdk_dynamodb::types::ScalarAttributeType::B, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs new file mode 100644 index 000000000..f3cdc3a94 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::scan::ScanError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::scan::ScanError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::scan::ScanError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::scan::ScanError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::scan::ScanError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::scan::ScanError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _scan_request; + + pub mod _scan_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs new file mode 100644 index 000000000..45fa03a39 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs @@ -0,0 +1,187 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::scan::ScanInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanInput::ScanInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + AttributesToGet: ::std::rc::Rc::new(match &value.attributes_to_get { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Select: ::std::rc::Rc::new(match &value.select { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::select::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ScanFilter: +::std::rc::Rc::new(match &value.scan_filter { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::condition::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConditionalOperator: ::std::rc::Rc::new(match &value.conditional_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ExclusiveStartKey: +::std::rc::Rc::new(match &value.exclusive_start_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TotalSegments: crate::standard_library_conversions::oint_to_dafny(value.total_segments), + Segment: crate::standard_library_conversions::oint_to_dafny(value.segment), + ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression), + FilterExpression: crate::standard_library_conversions::ostring_to_dafny(&value.filter_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanInput, + > +) -> aws_sdk_dynamodb::operation::scan::ScanInput { + aws_sdk_dynamodb::operation::scan::ScanInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_attributes_to_get(match (*dafny_value.AttributesToGet()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_select(match &**dafny_value.Select() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::select::from_dafny(value) + ), + _ => None, +} +) + .set_scan_filter(match (*dafny_value.ScanFilter()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::condition::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_conditional_operator(match &**dafny_value.ConditionalOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value) + ), + _ => None, +} +) + .set_exclusive_start_key(match (*dafny_value.ExclusiveStartKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_total_segments(crate::standard_library_conversions::oint_from_dafny(dafny_value.TotalSegments().clone())) + .set_segment(crate::standard_library_conversions::oint_from_dafny(dafny_value.Segment().clone())) + .set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone())) + .set_filter_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FilterExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs new file mode 100644 index 000000000..230f7d3a9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs @@ -0,0 +1,91 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::scan::ScanOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanOutput::ScanOutput { + Items: ::std::rc::Rc::new(match &value.items { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&e.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Count: crate::standard_library_conversions::oint_to_dafny(Some(value.count)), + ScannedCount: crate::standard_library_conversions::oint_to_dafny(Some(value.scanned_count)), + LastEvaluatedKey: +::std::rc::Rc::new(match &value.last_evaluated_key { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanOutput, + > +) -> aws_sdk_dynamodb::operation::scan::ScanOutput { + aws_sdk_dynamodb::operation::scan::ScanOutput::builder() + .set_items(match (*dafny_value.Items()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnyMap<::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>, ::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&e, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) +, + ) + ), + _ => None +} +) + .set_count(crate::standard_library_conversions::oint_from_dafny(dafny_value.Count().clone())) + .set_scanned_count(crate::standard_library_conversions::oint_from_dafny(dafny_value.ScannedCount().clone())) + .set_last_evaluated_key(match (*dafny_value.LastEvaluatedKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs new file mode 100644 index 000000000..c52b7a634 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::Select, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::Select::AllAttributes => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::ALL_ATTRIBUTES {}, +aws_sdk_dynamodb::types::Select::AllProjectedAttributes => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::ALL_PROJECTED_ATTRIBUTES {}, +aws_sdk_dynamodb::types::Select::SpecificAttributes => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::SPECIFIC_ATTRIBUTES {}, +aws_sdk_dynamodb::types::Select::Count => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::COUNT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select, +) -> aws_sdk_dynamodb::types::Select { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::ALL_ATTRIBUTES {} => aws_sdk_dynamodb::types::Select::AllAttributes, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::ALL_PROJECTED_ATTRIBUTES {} => aws_sdk_dynamodb::types::Select::AllProjectedAttributes, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::SPECIFIC_ATTRIBUTES {} => aws_sdk_dynamodb::types::Select::SpecificAttributes, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Select::COUNT {} => aws_sdk_dynamodb::types::Select::Count, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs new file mode 100644 index 000000000..fc765d35d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::SourceTableDetails, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SourceTableDetails::SourceTableDetails { + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + TableId: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_id), + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + TableSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.table_size_bytes), + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + TableCreationDateTime: crate::standard_library_conversions::timestamp_to_dafny(&value.table_creation_date_time), + ProvisionedThroughput: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(&value.provisioned_throughput.clone().unwrap()) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ItemCount: crate::standard_library_conversions::olong_to_dafny(&value.item_count), + BillingMode: ::std::rc::Rc::new(match &value.billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SourceTableDetails, + >, +) -> aws_sdk_dynamodb::types::SourceTableDetails { + aws_sdk_dynamodb::types::SourceTableDetails::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_table_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableId()) )) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_table_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.TableSizeBytes().clone())) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_table_creation_date_time(Some(crate::standard_library_conversions::timestamp_from_dafny(dafny_value.TableCreationDateTime().clone()))) + .set_provisioned_throughput(Some( crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(dafny_value.ProvisionedThroughput().clone()) + )) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ItemCount().clone())) + .set_billing_mode(match &**dafny_value.BillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs new file mode 100644 index 000000000..6ea2fcd5a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs @@ -0,0 +1,96 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::SourceTableFeatureDetails, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SourceTableFeatureDetails::SourceTableFeatureDetails { + LocalSecondaryIndexes: ::std::rc::Rc::new(match &value.local_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index_info::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_info::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + StreamDescription: ::std::rc::Rc::new(match &value.stream_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TimeToLiveDescription: ::std::rc::Rc::new(match &value.time_to_live_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSEDescription: ::std::rc::Rc::new(match &value.sse_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SourceTableFeatureDetails, + >, +) -> aws_sdk_dynamodb::types::SourceTableFeatureDetails { + aws_sdk_dynamodb::types::SourceTableFeatureDetails::builder() + .set_local_secondary_indexes(match (*dafny_value.LocalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index_info::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_info::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_stream_description(match (*dafny_value.StreamDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_time_to_live_description(match (*dafny_value.TimeToLiveDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_description::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_description(match (*dafny_value.SSEDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs new file mode 100644 index 000000000..3ee81984f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::SseDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEDescription::SSEDescription { + Status: ::std::rc::Rc::new(match &value.status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSEType: ::std::rc::Rc::new(match &value.sse_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KMSMasterKeyArn: crate::standard_library_conversions::ostring_to_dafny(&value.kms_master_key_arn), + InaccessibleEncryptionDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.inaccessible_encryption_date_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEDescription, + >, +) -> aws_sdk_dynamodb::types::SseDescription { + aws_sdk_dynamodb::types::SseDescription::builder() + .set_status(match &**dafny_value.Status() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::sse_status::from_dafny(value) + ), + _ => None, +} +) + .set_sse_type(match &**dafny_value.SSEType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::sse_type::from_dafny(value) + ), + _ => None, +} +) + .set_kms_master_key_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KMSMasterKeyArn().clone())) + .set_inaccessible_encryption_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.InaccessibleEncryptionDateTime().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs new file mode 100644 index 000000000..dfeefcd02 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::SseSpecification, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSESpecification::SSESpecification { + Enabled: crate::standard_library_conversions::obool_to_dafny(&value.enabled), + SSEType: ::std::rc::Rc::new(match &value.sse_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KMSMasterKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_master_key_id), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSESpecification, + >, +) -> aws_sdk_dynamodb::types::SseSpecification { + aws_sdk_dynamodb::types::SseSpecification::builder() + .set_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.Enabled().clone())) + .set_sse_type(match &**dafny_value.SSEType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::sse_type::from_dafny(value) + ), + _ => None, +} +) + .set_kms_master_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KMSMasterKeyId().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs new file mode 100644 index 000000000..a4f20bf1c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::SseStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::SseStatus::Enabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::ENABLING {}, +aws_sdk_dynamodb::types::SseStatus::Enabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::ENABLED {}, +aws_sdk_dynamodb::types::SseStatus::Disabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::DISABLING {}, +aws_sdk_dynamodb::types::SseStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::DISABLED {}, +aws_sdk_dynamodb::types::SseStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::UPDATING {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus, +) -> aws_sdk_dynamodb::types::SseStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::ENABLING {} => aws_sdk_dynamodb::types::SseStatus::Enabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::ENABLED {} => aws_sdk_dynamodb::types::SseStatus::Enabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::DISABLING {} => aws_sdk_dynamodb::types::SseStatus::Disabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::DISABLED {} => aws_sdk_dynamodb::types::SseStatus::Disabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEStatus::UPDATING {} => aws_sdk_dynamodb::types::SseStatus::Updating, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs new file mode 100644 index 000000000..56f69062b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::SseType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::SseType::Aes256 => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEType::AES256 {}, +aws_sdk_dynamodb::types::SseType::Kms => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEType::KMS {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEType, +) -> aws_sdk_dynamodb::types::SseType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEType::AES256 {} => aws_sdk_dynamodb::types::SseType::Aes256, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::SSEType::KMS {} => aws_sdk_dynamodb::types::SseType::Kms, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs new file mode 100644 index 000000000..84ff9d829 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::StreamSpecification, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamSpecification::StreamSpecification { + StreamEnabled: value.stream_enabled.clone(), + StreamViewType: ::std::rc::Rc::new(match &value.stream_view_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::stream_view_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamSpecification, + >, +) -> aws_sdk_dynamodb::types::StreamSpecification { + aws_sdk_dynamodb::types::StreamSpecification::builder() + .set_stream_enabled(Some( dafny_value.StreamEnabled() .clone() )) + .set_stream_view_type(match &**dafny_value.StreamViewType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::stream_view_type::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs new file mode 100644 index 000000000..718b38e76 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::StreamViewType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::StreamViewType::NewImage => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::NEW_IMAGE {}, +aws_sdk_dynamodb::types::StreamViewType::OldImage => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::OLD_IMAGE {}, +aws_sdk_dynamodb::types::StreamViewType::NewAndOldImages => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::NEW_AND_OLD_IMAGES {}, +aws_sdk_dynamodb::types::StreamViewType::KeysOnly => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::KEYS_ONLY {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType, +) -> aws_sdk_dynamodb::types::StreamViewType { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::NEW_IMAGE {} => aws_sdk_dynamodb::types::StreamViewType::NewImage, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::OLD_IMAGE {} => aws_sdk_dynamodb::types::StreamViewType::OldImage, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::NEW_AND_OLD_IMAGES {} => aws_sdk_dynamodb::types::StreamViewType::NewAndOldImages, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::StreamViewType::KEYS_ONLY {} => aws_sdk_dynamodb::types::StreamViewType::KeysOnly, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs new file mode 100644 index 000000000..7f9fb1d81 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs @@ -0,0 +1,56 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TableAutoScalingDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableAutoScalingDescription::TableAutoScalingDescription { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + TableStatus: ::std::rc::Rc::new(match &value.table_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Replicas: ::std::rc::Rc::new(match &value.replicas { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_auto_scaling_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableAutoScalingDescription, + >, +) -> aws_sdk_dynamodb::types::TableAutoScalingDescription { + aws_sdk_dynamodb::types::TableAutoScalingDescription::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_table_status(match &**dafny_value.TableStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_status::from_dafny(value) + ), + _ => None, +} +) + .set_replicas(match (*dafny_value.Replicas()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_auto_scaling_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs new file mode 100644 index 000000000..f0a717fc9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::TableClass, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::TableClass::Standard => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClass::STANDARD {}, +aws_sdk_dynamodb::types::TableClass::StandardInfrequentAccess => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClass::STANDARD_INFREQUENT_ACCESS {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClass, +) -> aws_sdk_dynamodb::types::TableClass { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClass::STANDARD {} => aws_sdk_dynamodb::types::TableClass::Standard, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClass::STANDARD_INFREQUENT_ACCESS {} => aws_sdk_dynamodb::types::TableClass::StandardInfrequentAccess, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs new file mode 100644 index 000000000..1476090aa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TableClassSummary, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClassSummary::TableClassSummary { + TableClass: ::std::rc::Rc::new(match &value.table_class { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LastUpdateDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_update_date_time), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableClassSummary, + >, +) -> aws_sdk_dynamodb::types::TableClassSummary { + aws_sdk_dynamodb::types::TableClassSummary::builder() + .set_table_class(match &**dafny_value.TableClass() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .set_last_update_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastUpdateDateTime().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs new file mode 100644 index 000000000..83e098825 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs @@ -0,0 +1,109 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TableCreationParameters, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableCreationParameters::TableCreationParameters { + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + AttributeDefinitions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.attribute_definitions, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::to_dafny(e) +, +) +, + KeySchema: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key_schema, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, +) +, + BillingMode: ::std::rc::Rc::new(match &value.billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSESpecification: ::std::rc::Rc::new(match &value.sse_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableCreationParameters, + >, +) -> aws_sdk_dynamodb::types::TableCreationParameters { + aws_sdk_dynamodb::types::TableCreationParameters::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_attribute_definitions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.AttributeDefinitions(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::from_dafny(e.clone()) +, +) + )) + .set_key_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.KeySchema(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, +) + )) + .set_billing_mode(match &**dafny_value.BillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_specification(match (*dafny_value.SSESpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs new file mode 100644 index 000000000..96e1eb5e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs @@ -0,0 +1,246 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TableDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableDescription::TableDescription { + AttributeDefinitions: ::std::rc::Rc::new(match &value.attribute_definitions { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + KeySchema: ::std::rc::Rc::new(match &value.key_schema { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableStatus: ::std::rc::Rc::new(match &value.table_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CreationDateTime: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date_time), + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableSizeBytes: crate::standard_library_conversions::olong_to_dafny(&value.table_size_bytes), + ItemCount: crate::standard_library_conversions::olong_to_dafny(&value.item_count), + TableArn: crate::standard_library_conversions::ostring_to_dafny(&value.table_arn), + TableId: crate::standard_library_conversions::ostring_to_dafny(&value.table_id), + BillingModeSummary: ::std::rc::Rc::new(match &value.billing_mode_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LocalSecondaryIndexes: ::std::rc::Rc::new(match &value.local_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + StreamSpecification: ::std::rc::Rc::new(match &value.stream_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + LatestStreamLabel: crate::standard_library_conversions::ostring_to_dafny(&value.latest_stream_label), + LatestStreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.latest_stream_arn), + GlobalTableVersion: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_version), + Replicas: ::std::rc::Rc::new(match &value.replicas { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + RestoreSummary: ::std::rc::Rc::new(match &value.restore_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::restore_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSEDescription: ::std::rc::Rc::new(match &value.sse_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ArchivalSummary: ::std::rc::Rc::new(match &value.archival_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::archival_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + TableClassSummary: ::std::rc::Rc::new(match &value.table_class_summary { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DeletionProtectionEnabled: crate::standard_library_conversions::obool_to_dafny(&value.deletion_protection_enabled), + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableDescription, + >, +) -> aws_sdk_dynamodb::types::TableDescription { + aws_sdk_dynamodb::types::TableDescription::builder() + .set_attribute_definitions(match (*dafny_value.AttributeDefinitions()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_key_schema(match (*dafny_value.KeySchema()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::key_schema_element::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_status(match &**dafny_value.TableStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_status::from_dafny(value) + ), + _ => None, +} +) + .set_creation_date_time(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDateTime().clone())) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_description::from_dafny(value.clone())), + _ => None, +} +) + .set_table_size_bytes(crate::standard_library_conversions::olong_from_dafny(dafny_value.TableSizeBytes().clone())) + .set_item_count(crate::standard_library_conversions::olong_from_dafny(dafny_value.ItemCount().clone())) + .set_table_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableArn().clone())) + .set_table_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableId().clone())) + .set_billing_mode_summary(match (*dafny_value.BillingModeSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::billing_mode_summary::from_dafny(value.clone())), + _ => None, +} +) + .set_local_secondary_indexes(match (*dafny_value.LocalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::local_secondary_index_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_stream_specification(match (*dafny_value.StreamSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_latest_stream_label(crate::standard_library_conversions::ostring_from_dafny(dafny_value.LatestStreamLabel().clone())) + .set_latest_stream_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.LatestStreamArn().clone())) + .set_global_table_version(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableVersion().clone())) + .set_replicas(match (*dafny_value.Replicas()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_restore_summary(match (*dafny_value.RestoreSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::restore_summary::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_description(match (*dafny_value.SSEDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_description::from_dafny(value.clone())), + _ => None, +} +) + .set_archival_summary(match (*dafny_value.ArchivalSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::archival_summary::from_dafny(value.clone())), + _ => None, +} +) + .set_table_class_summary(match (*dafny_value.TableClassSummary()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_class_summary::from_dafny(value.clone())), + _ => None, +} +) + .set_deletion_protection_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.DeletionProtectionEnabled().clone())) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs new file mode 100644 index 000000000..e996bc880 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::TableStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::TableStatus::Creating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::CREATING {}, +aws_sdk_dynamodb::types::TableStatus::Updating => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::UPDATING {}, +aws_sdk_dynamodb::types::TableStatus::Deleting => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::DELETING {}, +aws_sdk_dynamodb::types::TableStatus::Active => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ACTIVE {}, +aws_sdk_dynamodb::types::TableStatus::InaccessibleEncryptionCredentials => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS {}, +aws_sdk_dynamodb::types::TableStatus::Archiving => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ARCHIVING {}, +aws_sdk_dynamodb::types::TableStatus::Archived => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ARCHIVED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus, +) -> aws_sdk_dynamodb::types::TableStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::CREATING {} => aws_sdk_dynamodb::types::TableStatus::Creating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::UPDATING {} => aws_sdk_dynamodb::types::TableStatus::Updating, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::DELETING {} => aws_sdk_dynamodb::types::TableStatus::Deleting, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ACTIVE {} => aws_sdk_dynamodb::types::TableStatus::Active, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS {} => aws_sdk_dynamodb::types::TableStatus::InaccessibleEncryptionCredentials, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ARCHIVING {} => aws_sdk_dynamodb::types::TableStatus::Archiving, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TableStatus::ARCHIVED {} => aws_sdk_dynamodb::types::TableStatus::Archived, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs new file mode 100644 index 000000000..0cbbd267a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Tag, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Tag::Tag { + Key: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.key), + Value: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.value), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Tag, + >, +) -> aws_sdk_dynamodb::types::Tag { + aws_sdk_dynamodb::types::Tag::builder() + .set_key(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Key()) )) + .set_value(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Value()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs new file mode 100644 index 000000000..f8ae7eb2f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::tag_resource::TagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::tag_resource::TagResourceError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::tag_resource::TagResourceError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::tag_resource::TagResourceError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::tag_resource::TagResourceError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::tag_resource::TagResourceError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _tag_resource_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource/_tag_resource_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource/_tag_resource_request.rs new file mode 100644 index 000000000..c86bfb7d9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource/_tag_resource_request.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::tag_resource::TagResourceInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TagResourceInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TagResourceInput::TagResourceInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + Tags: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.tags.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::tag::to_dafny(e) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TagResourceInput, + > +) -> aws_sdk_dynamodb::operation::tag_resource::TagResourceInput { + aws_sdk_dynamodb::operation::tag_resource::TagResourceInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .set_tags(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Tags(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::tag::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs new file mode 100644 index 000000000..adc162858 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TimeToLiveDescription, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveDescription::TimeToLiveDescription { + TimeToLiveStatus: ::std::rc::Rc::new(match &value.time_to_live_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + AttributeName: crate::standard_library_conversions::ostring_to_dafny(&value.attribute_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveDescription, + >, +) -> aws_sdk_dynamodb::types::TimeToLiveDescription { + aws_sdk_dynamodb::types::TimeToLiveDescription::builder() + .set_time_to_live_status(match &**dafny_value.TimeToLiveStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_status::from_dafny(value) + ), + _ => None, +} +) + .set_attribute_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AttributeName().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs new file mode 100644 index 000000000..65ffe79ce --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TimeToLiveSpecification, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveSpecification::TimeToLiveSpecification { + Enabled: value.enabled.clone(), + AttributeName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.attribute_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveSpecification, + >, +) -> aws_sdk_dynamodb::types::TimeToLiveSpecification { + aws_sdk_dynamodb::types::TimeToLiveSpecification::builder() + .set_enabled(Some( dafny_value.Enabled() .clone() )) + .set_attribute_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AttributeName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs new file mode 100644 index 000000000..349a7fc89 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_dynamodb::types::TimeToLiveStatus, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_dynamodb::types::TimeToLiveStatus::Enabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::ENABLING {}, +aws_sdk_dynamodb::types::TimeToLiveStatus::Disabling => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::DISABLING {}, +aws_sdk_dynamodb::types::TimeToLiveStatus::Enabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::ENABLED {}, +aws_sdk_dynamodb::types::TimeToLiveStatus::Disabled => crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::DISABLED {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus, +) -> aws_sdk_dynamodb::types::TimeToLiveStatus { + match dafny_value { + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::ENABLING {} => aws_sdk_dynamodb::types::TimeToLiveStatus::Enabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::DISABLING {} => aws_sdk_dynamodb::types::TimeToLiveStatus::Disabling, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::ENABLED {} => aws_sdk_dynamodb::types::TimeToLiveStatus::Enabled, +crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TimeToLiveStatus::DISABLED {} => aws_sdk_dynamodb::types::TimeToLiveStatus::Disabled, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs new file mode 100644 index 000000000..90e660ec1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TransactGetItem, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItem::TransactGetItem { + Get: crate::deps::com_amazonaws_dynamodb::conversions::get::to_dafny(&value.get.clone().unwrap()) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItem, + >, +) -> aws_sdk_dynamodb::types::TransactGetItem { + aws_sdk_dynamodb::types::TransactGetItem::builder() + .set_get(Some( crate::deps::com_amazonaws_dynamodb::conversions::get::from_dafny(dafny_value.Get().clone()) + )) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs new file mode 100644 index 000000000..d2d27aa54 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsError::TransactionCanceledException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_canceled_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _transact_get_items_request; + + pub mod _transact_get_items_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_request.rs new file mode 100644 index 000000000..796f9f66c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_request.rs @@ -0,0 +1,44 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsInput::TransactGetItemsInput { + TransactItems: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.transact_items.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::transact_get_item::to_dafny(e) +, +) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsInput, + > +) -> aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsInput { + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsInput::builder() + .set_transact_items(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.TransactItems(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::transact_get_item::from_dafny(e.clone()) +, +) + )) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_response.rs new file mode 100644 index 000000000..4ff3c5704 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_response.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsOutput::TransactGetItemsOutput { + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Responses: ::std::rc::Rc::new(match &value.responses { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::item_response::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsOutput, + > +) -> aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsOutput { + aws_sdk_dynamodb::operation::transact_get_items::TransactGetItemsOutput::builder() + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_responses(match (*dafny_value.Responses()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::item_response::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs new file mode 100644 index 000000000..9044e38e0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::TransactWriteItem, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItem::TransactWriteItem { + ConditionCheck: ::std::rc::Rc::new(match &value.condition_check { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::condition_check::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Put: ::std::rc::Rc::new(match &value.put { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::put::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Delete: ::std::rc::Rc::new(match &value.delete { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::delete::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Update: ::std::rc::Rc::new(match &value.update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItem, + >, +) -> aws_sdk_dynamodb::types::TransactWriteItem { + aws_sdk_dynamodb::types::TransactWriteItem::builder() + .set_condition_check(match (*dafny_value.ConditionCheck()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::condition_check::from_dafny(value.clone())), + _ => None, +} +) + .set_put(match (*dafny_value.Put()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::put::from_dafny(value.clone())), + _ => None, +} +) + .set_delete(match (*dafny_value.Delete()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::delete::from_dafny(value.clone())), + _ => None, +} +) + .set_update(match (*dafny_value.Update()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::update::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs new file mode 100644 index 000000000..2def39272 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::IdempotentParameterMismatchException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::idempotent_parameter_mismatch_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::TransactionCanceledException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_canceled_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsError::TransactionInProgressException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_in_progress_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _transact_write_items_request; + + pub mod _transact_write_items_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_request.rs new file mode 100644 index 000000000..3bf4f4523 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_request.rs @@ -0,0 +1,58 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsInput::TransactWriteItemsInput { + TransactItems: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.transact_items.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::transact_write_item::to_dafny(e) +, +) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnItemCollectionMetrics: ::std::rc::Rc::new(match &value.return_item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ClientRequestToken: crate::standard_library_conversions::ostring_to_dafny(&value.client_request_token), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsInput, + > +) -> aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsInput { + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsInput::builder() + .set_transact_items(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.TransactItems(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::transact_write_item::from_dafny(e.clone()) +, +) + )) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_return_item_collection_metrics(match &**dafny_value.ReturnItemCollectionMetrics() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::from_dafny(value) + ), + _ => None, +} +) + .set_client_request_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ClientRequestToken().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_response.rs new file mode 100644 index 000000000..dff1b68fb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_response.rs @@ -0,0 +1,74 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsOutput::TransactWriteItemsOutput { + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ItemCollectionMetrics: +::std::rc::Rc::new(match &value.item_collection_metrics { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&v, + |e| crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::to_dafny(e) +, +) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsOutput, + > +) -> aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsOutput { + aws_sdk_dynamodb::operation::transact_write_items::TransactWriteItemsOutput::builder() + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_item_collection_metrics(match (*dafny_value.ItemCollectionMetrics()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::std::rc::Rc>| ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(v, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::from_dafny(e.clone()) +, +) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs new file mode 100644 index 000000000..fccbc5404 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::untag_resource::UntagResourceError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _untag_resource_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource/_untag_resource_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource/_untag_resource_request.rs new file mode 100644 index 000000000..86cc70853 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource/_untag_resource_request.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::untag_resource::UntagResourceInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UntagResourceInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UntagResourceInput::UntagResourceInput { + ResourceArn: crate::standard_library_conversions::ostring_to_dafny(&value.resource_arn) .Extract(), + TagKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.tag_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UntagResourceInput, + > +) -> aws_sdk_dynamodb::operation::untag_resource::UntagResourceInput { + aws_sdk_dynamodb::operation::untag_resource::UntagResourceInput::builder() + .set_resource_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ResourceArn()) )) + .set_tag_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.TagKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs new file mode 100644 index 000000000..aaa712472 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs @@ -0,0 +1,97 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::Update, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Update::Update { + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + UpdateExpression: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.update_expression), + TableName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.table_name), + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReturnValuesOnConditionCheckFailure: ::std::rc::Rc::new(match &value.return_values_on_condition_check_failure { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Update, + >, +) -> aws_sdk_dynamodb::types::Update { + aws_sdk_dynamodb::types::Update::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_update_expression(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.UpdateExpression()) )) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_return_values_on_condition_check_failure(match &**dafny_value.ReturnValuesOnConditionCheckFailure() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_values_on_condition_check_failure::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs new file mode 100644 index 000000000..04367ae61 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsError::ContinuousBackupsUnavailableException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::continuous_backups_unavailable_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_continuous_backups_request; + + pub mod _update_continuous_backups_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_request.rs new file mode 100644 index 000000000..ae112280a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsInput::UpdateContinuousBackupsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + PointInTimeRecoverySpecification: crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_specification::to_dafny(&value.point_in_time_recovery_specification.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsInput, + > +) -> aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsInput { + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_point_in_time_recovery_specification(Some( crate::deps::com_amazonaws_dynamodb::conversions::point_in_time_recovery_specification::from_dafny(dafny_value.PointInTimeRecoverySpecification().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_response.rs new file mode 100644 index 000000000..32b3d8ec3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsOutput::UpdateContinuousBackupsOutput { + ContinuousBackupsDescription: ::std::rc::Rc::new(match &value.continuous_backups_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContinuousBackupsOutput, + > +) -> aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsOutput { + aws_sdk_dynamodb::operation::update_continuous_backups::UpdateContinuousBackupsOutput::builder() + .set_continuous_backups_description(match (*dafny_value.ContinuousBackupsDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::continuous_backups_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs new file mode 100644 index 000000000..830a8f9b1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_contributor_insights_request; + + pub mod _update_contributor_insights_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_request.rs new file mode 100644 index 000000000..4e0e737ad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsInput::UpdateContributorInsightsInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ContributorInsightsAction: crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_action::to_dafny(value.contributor_insights_action.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsInput, + > +) -> aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsInput { + aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_contributor_insights_action(Some( crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_action::from_dafny(dafny_value.ContributorInsightsAction()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_response.rs new file mode 100644 index 000000000..7dadb9a4a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsOutput::UpdateContributorInsightsOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name), + ContributorInsightsStatus: ::std::rc::Rc::new(match &value.contributor_insights_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateContributorInsightsOutput, + > +) -> aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsOutput { + aws_sdk_dynamodb::operation::update_contributor_insights::UpdateContributorInsightsOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone())) + .set_contributor_insights_status(match &**dafny_value.ContributorInsightsStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::contributor_insights_status::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_secondary_index_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_secondary_index_action.rs new file mode 100644 index 000000000..4c26d4fba --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_secondary_index_action.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::UpdateGlobalSecondaryIndexAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalSecondaryIndexAction::UpdateGlobalSecondaryIndexAction { + IndexName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.index_name), + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalSecondaryIndexAction, + >, +) -> aws_sdk_dynamodb::types::UpdateGlobalSecondaryIndexAction { + aws_sdk_dynamodb::types::UpdateGlobalSecondaryIndexAction::builder() + .set_index_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.IndexName()) )) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs new file mode 100644 index 000000000..1ebe829d3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::GlobalTableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::ReplicaAlreadyExistsException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::replica_already_exists_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::ReplicaNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::replica_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableError::TableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::table_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_global_table_request; + + pub mod _update_global_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_request.rs new file mode 100644 index 000000000..ea4c455e4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_request.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableInput::UpdateGlobalTableInput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name) .Extract(), + ReplicaUpdates: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.replica_updates.clone().unwrap(), + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_update::to_dafny(e) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableInput, + > +) -> aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableInput { + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableInput::builder() + .set_global_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GlobalTableName()) )) + .set_replica_updates(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.ReplicaUpdates(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_update::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_response.rs new file mode 100644 index 000000000..f7c30532a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableOutput::UpdateGlobalTableOutput { + GlobalTableDescription: ::std::rc::Rc::new(match &value.global_table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableOutput, + > +) -> aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableOutput { + aws_sdk_dynamodb::operation::update_global_table::UpdateGlobalTableOutput::builder() + .set_global_table_description(match (*dafny_value.GlobalTableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::global_table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs new file mode 100644 index 000000000..2e3ee86d7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::GlobalTableNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::global_table_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::IndexNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::index_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::ReplicaNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::replica_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_global_table_settings_request; + + pub mod _update_global_table_settings_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_request.rs new file mode 100644 index 000000000..a488ccbbf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_request.rs @@ -0,0 +1,91 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsInput::UpdateGlobalTableSettingsInput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name) .Extract(), + GlobalTableBillingMode: ::std::rc::Rc::new(match &value.global_table_billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalTableProvisionedWriteCapacityUnits: crate::standard_library_conversions::olong_to_dafny(&value.global_table_provisioned_write_capacity_units), + GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: ::std::rc::Rc::new(match &value.global_table_provisioned_write_capacity_auto_scaling_settings_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalTableGlobalSecondaryIndexSettingsUpdate: ::std::rc::Rc::new(match &value.global_table_global_secondary_index_settings_update { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_table_global_secondary_index_settings_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ReplicaSettingsUpdate: ::std::rc::Rc::new(match &value.replica_settings_update { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsInput, + > +) -> aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsInput { + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsInput::builder() + .set_global_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GlobalTableName()) )) + .set_global_table_billing_mode(match &**dafny_value.GlobalTableBillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_global_table_provisioned_write_capacity_units(crate::standard_library_conversions::olong_from_dafny(dafny_value.GlobalTableProvisionedWriteCapacityUnits().clone())) + .set_global_table_provisioned_write_capacity_auto_scaling_settings_update(match (*dafny_value.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .set_global_table_global_secondary_index_settings_update(match (*dafny_value.GlobalTableGlobalSecondaryIndexSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_table_global_secondary_index_settings_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_replica_settings_update(match (*dafny_value.ReplicaSettingsUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_response.rs new file mode 100644 index 000000000..70725f767 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsOutput::UpdateGlobalTableSettingsOutput { + GlobalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.global_table_name), + ReplicaSettings: ::std::rc::Rc::new(match &value.replica_settings { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_description::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateGlobalTableSettingsOutput, + > +) -> aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput { + aws_sdk_dynamodb::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput::builder() + .set_global_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GlobalTableName().clone())) + .set_replica_settings(match (*dafny_value.ReplicaSettings()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_settings_description::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs new file mode 100644 index 000000000..90d7ebe39 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_item::UpdateItemError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_item::UpdateItemError::ConditionalCheckFailedException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::conditional_check_failed_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::ItemCollectionSizeLimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::item_collection_size_limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::ProvisionedThroughputExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::provisioned_throughput_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::RequestLimitExceeded(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::request_limit_exceeded::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_item::UpdateItemError::TransactionConflictException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::transaction_conflict_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_item_request; + + pub mod _update_item_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_request.rs new file mode 100644 index 000000000..ece3e5c66 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_request.rs @@ -0,0 +1,182 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_item::UpdateItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemInput::UpdateItemInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + Key: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.key.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, +) +, + AttributeUpdates: +::std::rc::Rc::new(match &value.attribute_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value_update::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Expected: +::std::rc::Rc::new(match &value.expected { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConditionalOperator: ::std::rc::Rc::new(match &value.conditional_operator { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnValues: ::std::rc::Rc::new(match &value.return_values { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_value::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnConsumedCapacity: ::std::rc::Rc::new(match &value.return_consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReturnItemCollectionMetrics: ::std::rc::Rc::new(match &value.return_item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + UpdateExpression: crate::standard_library_conversions::ostring_to_dafny(&value.update_expression), + ConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.condition_expression), + ExpressionAttributeNames: +::std::rc::Rc::new(match &value.expression_attribute_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ExpressionAttributeValues: +::std::rc::Rc::new(match &value.expression_attribute_values { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemInput, + > +) -> aws_sdk_dynamodb::operation::update_item::UpdateItemInput { + aws_sdk_dynamodb::operation::update_item::UpdateItemInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.Key(), + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, +) + )) + .set_attribute_updates(match (*dafny_value.AttributeUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value_update::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_expected(match (*dafny_value.Expected()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::expected_attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_conditional_operator(match &**dafny_value.ConditionalOperator() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value) + ), + _ => None, +} +) + .set_return_values(match &**dafny_value.ReturnValues() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_value::from_dafny(value) + ), + _ => None, +} +) + .set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value) + ), + _ => None, +} +) + .set_return_item_collection_metrics(match &**dafny_value.ReturnItemCollectionMetrics() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::return_item_collection_metrics::from_dafny(value) + ), + _ => None, +} +) + .set_update_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.UpdateExpression().clone())) + .set_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ConditionExpression().clone())) + .set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_response.rs new file mode 100644 index 000000000..45717aad9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_response.rs @@ -0,0 +1,69 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_item::UpdateItemOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemOutput::UpdateItemOutput { + Attributes: +::std::rc::Rc::new(match &value.attributes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + ConsumedCapacity: ::std::rc::Rc::new(match &value.consumed_capacity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ItemCollectionMetrics: ::std::rc::Rc::new(match &value.item_collection_metrics { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemOutput, + > +) -> aws_sdk_dynamodb::operation::update_item::UpdateItemOutput { + aws_sdk_dynamodb::operation::update_item::UpdateItemOutput::builder() + .set_attributes(match (*dafny_value.Attributes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone()) +, + ) + ), + _ => None +} +) + .set_consumed_capacity(match (*dafny_value.ConsumedCapacity()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::consumed_capacity::from_dafny(value.clone())), + _ => None, +} +) + .set_item_collection_metrics(match (*dafny_value.ItemCollectionMetrics()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::item_collection_metrics::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs new file mode 100644 index 000000000..09664b40a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::UpdateKinesisStreamingConfiguration, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingConfiguration::UpdateKinesisStreamingConfiguration { + ApproximateCreationDateTimePrecision: ::std::rc::Rc::new(match &value.approximate_creation_date_time_precision { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingConfiguration, + >, +) -> aws_sdk_dynamodb::types::UpdateKinesisStreamingConfiguration { + aws_sdk_dynamodb::types::UpdateKinesisStreamingConfiguration::builder() + .set_approximate_creation_date_time_precision(match &**dafny_value.ApproximateCreationDateTimePrecision() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::approximate_creation_date_time_precision::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs new file mode 100644 index 000000000..ffcebb92a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_kinesis_streaming_destination_request; + + pub mod _update_kinesis_streaming_destination_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_request.rs new file mode 100644 index 000000000..4c01c31b8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_request.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationInput::UpdateKinesisStreamingDestinationInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn) .Extract(), + UpdateKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.update_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationInput, + > +) -> aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationInput { + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_stream_arn(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.StreamArn()) )) + .set_update_kinesis_streaming_configuration(match (*dafny_value.UpdateKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_response.rs new file mode 100644 index 000000000..74d77fd99 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_response.rs @@ -0,0 +1,50 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationOutput::UpdateKinesisStreamingDestinationOutput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name), + StreamArn: crate::standard_library_conversions::ostring_to_dafny(&value.stream_arn), + DestinationStatus: ::std::rc::Rc::new(match &value.destination_status { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::destination_status::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + UpdateKinesisStreamingConfiguration: ::std::rc::Rc::new(match &value.update_kinesis_streaming_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateKinesisStreamingDestinationOutput, + > +) -> aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationOutput { + aws_sdk_dynamodb::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationOutput::builder() + .set_table_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TableName().clone())) + .set_stream_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.StreamArn().clone())) + .set_destination_status(match &**dafny_value.DestinationStatus() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::destination_status::from_dafny(value) + ), + _ => None, +} +) + .set_update_kinesis_streaming_configuration(match (*dafny_value.UpdateKinesisStreamingConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::update_kinesis_streaming_configuration::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_replication_group_member_action.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_replication_group_member_action.rs new file mode 100644 index 000000000..2dbeafdc9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_replication_group_member_action.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::UpdateReplicationGroupMemberAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateReplicationGroupMemberAction::UpdateReplicationGroupMemberAction { + RegionName: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.region_name), + KMSMasterKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.kms_master_key_id), + ProvisionedThroughputOverride: ::std::rc::Rc::new(match &value.provisioned_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + OnDemandThroughputOverride: ::std::rc::Rc::new(match &value.on_demand_throughput_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexes: ::std::rc::Rc::new(match &value.global_secondary_indexes { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableClassOverride: ::std::rc::Rc::new(match &value.table_class_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateReplicationGroupMemberAction, + >, +) -> aws_sdk_dynamodb::types::UpdateReplicationGroupMemberAction { + aws_sdk_dynamodb::types::UpdateReplicationGroupMemberAction::builder() + .set_region_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RegionName()) )) + .set_kms_master_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KMSMasterKeyId().clone())) + .set_provisioned_throughput_override(match (*dafny_value.ProvisionedThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_on_demand_throughput_override(match (*dafny_value.OnDemandThroughputOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput_override::from_dafny(value.clone())), + _ => None, +} +) + .set_global_secondary_indexes(match (*dafny_value.GlobalSecondaryIndexes()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_global_secondary_index::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_class_override(match &**dafny_value.TableClassOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs new file mode 100644 index 000000000..80d226a91 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_table::UpdateTableError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_table::UpdateTableError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table::UpdateTableError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table::UpdateTableError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table::UpdateTableError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table::UpdateTableError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_table_request; + + pub mod _update_table_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_request.rs new file mode 100644 index 000000000..fb5293a29 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_request.rs @@ -0,0 +1,157 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_table::UpdateTableInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableInput::UpdateTableInput { + AttributeDefinitions: ::std::rc::Rc::new(match &value.attribute_definitions { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + BillingMode: ::std::rc::Rc::new(match &value.billing_mode { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ProvisionedThroughput: ::std::rc::Rc::new(match &value.provisioned_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GlobalSecondaryIndexUpdates: ::std::rc::Rc::new(match &value.global_secondary_index_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + StreamSpecification: ::std::rc::Rc::new(match &value.stream_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + SSESpecification: ::std::rc::Rc::new(match &value.sse_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaUpdates: ::std::rc::Rc::new(match &value.replica_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replication_group_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableClass: ::std::rc::Rc::new(match &value.table_class { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_class::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DeletionProtectionEnabled: crate::standard_library_conversions::obool_to_dafny(&value.deletion_protection_enabled), + OnDemandThroughput: ::std::rc::Rc::new(match &value.on_demand_throughput { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableInput, + > +) -> aws_sdk_dynamodb::operation::update_table::UpdateTableInput { + aws_sdk_dynamodb::operation::update_table::UpdateTableInput::builder() + .set_attribute_definitions(match (*dafny_value.AttributeDefinitions()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::attribute_definition::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_billing_mode(match &**dafny_value.BillingMode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::billing_mode::from_dafny(value) + ), + _ => None, +} +) + .set_provisioned_throughput(match (*dafny_value.ProvisionedThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::provisioned_throughput::from_dafny(value.clone())), + _ => None, +} +) + .set_global_secondary_index_updates(match (*dafny_value.GlobalSecondaryIndexUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_stream_specification(match (*dafny_value.StreamSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::stream_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_sse_specification(match (*dafny_value.SSESpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::sse_specification::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_updates(match (*dafny_value.ReplicaUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replication_group_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_class(match &**dafny_value.TableClass() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_dynamodb::conversions::table_class::from_dafny(value) + ), + _ => None, +} +) + .set_deletion_protection_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.DeletionProtectionEnabled().clone())) + .set_on_demand_throughput(match (*dafny_value.OnDemandThroughput()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::on_demand_throughput::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_response.rs new file mode 100644 index 000000000..df7d751bc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_table::UpdateTableOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableOutput::UpdateTableOutput { + TableDescription: ::std::rc::Rc::new(match &value.table_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableOutput, + > +) -> aws_sdk_dynamodb::operation::update_table::UpdateTableOutput { + aws_sdk_dynamodb::operation::update_table::UpdateTableOutput::builder() + .set_table_description(match (*dafny_value.TableDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling.rs new file mode 100644 index 000000000..8a9e794ad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_table_replica_auto_scaling_request; + + pub mod _update_table_replica_auto_scaling_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_request.rs new file mode 100644 index 000000000..74bce7fdd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_request.rs @@ -0,0 +1,77 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingInput::UpdateTableReplicaAutoScalingInput { + GlobalSecondaryIndexUpdates: ::std::rc::Rc::new(match &value.global_secondary_index_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_auto_scaling_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + ProvisionedWriteCapacityAutoScalingUpdate: ::std::rc::Rc::new(match &value.provisioned_write_capacity_auto_scaling_update { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaUpdates: ::std::rc::Rc::new(match &value.replica_updates { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_dynamodb::conversions::replica_auto_scaling_update::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingInput, + > +) -> aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingInput { + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingInput::builder() + .set_global_secondary_index_updates(match (*dafny_value.GlobalSecondaryIndexUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::global_secondary_index_auto_scaling_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_provisioned_write_capacity_auto_scaling_update(match (*dafny_value.ProvisionedWriteCapacityAutoScalingUpdate()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::auto_scaling_settings_update::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_updates(match (*dafny_value.ReplicaUpdates()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_dynamodb::conversions::replica_auto_scaling_update::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_response.rs new file mode 100644 index 000000000..b0681b21d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingOutput::UpdateTableReplicaAutoScalingOutput { + TableAutoScalingDescription: ::std::rc::Rc::new(match &value.table_auto_scaling_description { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::table_auto_scaling_description::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTableReplicaAutoScalingOutput, + > +) -> aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput { + aws_sdk_dynamodb::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput::builder() + .set_table_auto_scaling_description(match (*dafny_value.TableAutoScalingDescription()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::table_auto_scaling_description::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs new file mode 100644 index 000000000..316311e69 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_dynamodb::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError::InternalServerError(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::internal_server_error::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError::InvalidEndpointException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::invalid_endpoint_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError::LimitExceededException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError::ResourceInUseException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_in_use_exception::to_dafny(e.clone()), + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveError::ResourceNotFoundException(e) => + crate::deps::com_amazonaws_dynamodb::conversions::error::resource_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_dynamodb::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_time_to_live_request; + + pub mod _update_time_to_live_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_request.rs new file mode 100644 index 000000000..508002efd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveInput::UpdateTimeToLiveInput { + TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + TimeToLiveSpecification: crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_specification::to_dafny(&value.time_to_live_specification.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveInput, + > +) -> aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveInput { + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) )) + .set_time_to_live_specification(Some( crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_specification::from_dafny(dafny_value.TimeToLiveSpecification().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_response.rs new file mode 100644 index 000000000..2572202c3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveOutput::UpdateTimeToLiveOutput { + TimeToLiveSpecification: ::std::rc::Rc::new(match &value.time_to_live_specification { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_specification::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateTimeToLiveOutput, + > +) -> aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveOutput { + aws_sdk_dynamodb::operation::update_time_to_live::UpdateTimeToLiveOutput::builder() + .set_time_to_live_specification(match (*dafny_value.TimeToLiveSpecification()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::time_to_live_specification::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs new file mode 100644 index 000000000..41e630b69 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_dynamodb::types::WriteRequest, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::WriteRequest::WriteRequest { + PutRequest: ::std::rc::Rc::new(match &value.put_request { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::put_request::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DeleteRequest: ::std::rc::Rc::new(match &value.delete_request { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::delete_request::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::WriteRequest, + >, +) -> aws_sdk_dynamodb::types::WriteRequest { + aws_sdk_dynamodb::types::WriteRequest::builder() + .set_put_request(match (*dafny_value.PutRequest()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::put_request::from_dafny(value.clone())), + _ => None, +} +) + .set_delete_request(match (*dafny_value.DeleteRequest()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_dynamodb::conversions::delete_request::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types.rs new file mode 100644 index 000000000..3b699f571 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types.rs @@ -0,0 +1,4 @@ +// 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 mod error; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types/error.rs b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types/error.rs new file mode 100644 index 000000000..73499b828 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_dynamodb/types/error.rs @@ -0,0 +1,154 @@ +// 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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + BackupInUseException { + error: aws_sdk_dynamodb::types::error::BackupInUseException, +}, + +BackupNotFoundException { + error: aws_sdk_dynamodb::types::error::BackupNotFoundException, +}, + +ConditionalCheckFailedException { + error: aws_sdk_dynamodb::types::error::ConditionalCheckFailedException, +}, + +ContinuousBackupsUnavailableException { + error: aws_sdk_dynamodb::types::error::ContinuousBackupsUnavailableException, +}, + +DuplicateItemException { + error: aws_sdk_dynamodb::types::error::DuplicateItemException, +}, + +ExportConflictException { + error: aws_sdk_dynamodb::types::error::ExportConflictException, +}, + +ExportNotFoundException { + error: aws_sdk_dynamodb::types::error::ExportNotFoundException, +}, + +GlobalTableAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::GlobalTableAlreadyExistsException, +}, + +GlobalTableNotFoundException { + error: aws_sdk_dynamodb::types::error::GlobalTableNotFoundException, +}, + +IdempotentParameterMismatchException { + error: aws_sdk_dynamodb::types::error::IdempotentParameterMismatchException, +}, + +ImportConflictException { + error: aws_sdk_dynamodb::types::error::ImportConflictException, +}, + +ImportNotFoundException { + error: aws_sdk_dynamodb::types::error::ImportNotFoundException, +}, + +IndexNotFoundException { + error: aws_sdk_dynamodb::types::error::IndexNotFoundException, +}, + +InternalServerError { + error: aws_sdk_dynamodb::types::error::InternalServerError, +}, + +InvalidEndpointException { + error: aws_sdk_dynamodb::types::error::InvalidEndpointException, +}, + +InvalidExportTimeException { + error: aws_sdk_dynamodb::types::error::InvalidExportTimeException, +}, + +InvalidRestoreTimeException { + error: aws_sdk_dynamodb::types::error::InvalidRestoreTimeException, +}, + +ItemCollectionSizeLimitExceededException { + error: aws_sdk_dynamodb::types::error::ItemCollectionSizeLimitExceededException, +}, + +LimitExceededException { + error: aws_sdk_dynamodb::types::error::LimitExceededException, +}, + +PointInTimeRecoveryUnavailableException { + error: aws_sdk_dynamodb::types::error::PointInTimeRecoveryUnavailableException, +}, + +PolicyNotFoundException { + error: aws_sdk_dynamodb::types::error::PolicyNotFoundException, +}, + +ProvisionedThroughputExceededException { + error: aws_sdk_dynamodb::types::error::ProvisionedThroughputExceededException, +}, + +ReplicaAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::ReplicaAlreadyExistsException, +}, + +ReplicaNotFoundException { + error: aws_sdk_dynamodb::types::error::ReplicaNotFoundException, +}, + +RequestLimitExceeded { + error: aws_sdk_dynamodb::types::error::RequestLimitExceeded, +}, + +ResourceInUseException { + error: aws_sdk_dynamodb::types::error::ResourceInUseException, +}, + +ResourceNotFoundException { + error: aws_sdk_dynamodb::types::error::ResourceNotFoundException, +}, + +TableAlreadyExistsException { + error: aws_sdk_dynamodb::types::error::TableAlreadyExistsException, +}, + +TableInUseException { + error: aws_sdk_dynamodb::types::error::TableInUseException, +}, + +TableNotFoundException { + error: aws_sdk_dynamodb::types::error::TableNotFoundException, +}, + +TransactionCanceledException { + error: aws_sdk_dynamodb::types::error::TransactionCanceledException, +}, + +TransactionConflictException { + error: aws_sdk_dynamodb::types::error::TransactionConflictException, +}, + +TransactionInProgressException { + error: aws_sdk_dynamodb::types::error::TransactionInProgressException, +}, + Opaque { + obj: ::dafny_runtime::Object, + }, + OpaqueWithText { + obj: ::dafny_runtime::Object, + objMessage: ::std::string::String, + }, +} + +impl ::std::cmp::Eq for Error {} + +impl ::std::fmt::Display for Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "{:?}", self) + } +} + +impl ::std::error::Error for Error {} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms.rs new file mode 100644 index 000000000..ea19ab7eb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms.rs @@ -0,0 +1,6 @@ +// 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 mod client; +pub mod conversions; +pub mod types; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/client.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/client.rs new file mode 100644 index 000000000..76c1384c9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/client.rs @@ -0,0 +1,1177 @@ +// 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. +use std::sync::LazyLock; +use crate::deps::com_amazonaws_kms::conversions; + +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct Client { + pub inner: aws_sdk_kms::Client +} + +impl ::std::cmp::PartialEq for Client { + fn eq(&self, other: &Self) -> bool { + false + } +} + +impl ::std::convert::Into for aws_sdk_kms::Client { + fn into(self) -> Client { + Client { inner: self } + } +} + +/// A runtime for executing operations on the asynchronous client in a blocking manner. +/// Necessary because Dafny only generates synchronous code. +static dafny_tokio_runtime: LazyLock = LazyLock::new(|| { + tokio::runtime::Builder::new_multi_thread() + .enable_all() + .build() + .unwrap() +}); + +impl dafny_runtime::UpcastObject for Client { + ::dafny_runtime::UpcastObjectFn!(dyn::std::any::Any); +} + +impl dafny_runtime::UpcastObject for Client { + ::dafny_runtime::UpcastObjectFn!(dyn crate::r#software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient); +} + +impl crate::r#software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient + for Client { + fn CancelKeyDeletion(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::cancel_key_deletion::_cancel_key_deletion_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.cancel_key_deletion() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::cancel_key_deletion::_cancel_key_deletion_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::cancel_key_deletion::to_dafny_error) +} + fn ConnectCustomKeyStore(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::connect_custom_key_store::_connect_custom_key_store_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.connect_custom_key_store() + .set_custom_key_store_id(inner_input.custom_key_store_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::connect_custom_key_store::_connect_custom_key_store_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::connect_custom_key_store::to_dafny_error) +} + fn CreateAlias(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::create_alias::_create_alias_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_alias() + .set_alias_name(inner_input.alias_name) +.set_target_key_id(inner_input.target_key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::create_alias::to_dafny_error) +} + fn CreateCustomKeyStore(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::create_custom_key_store::_create_custom_key_store_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_custom_key_store() + .set_custom_key_store_name(inner_input.custom_key_store_name) +.set_cloud_hsm_cluster_id(inner_input.cloud_hsm_cluster_id) +.set_trust_anchor_certificate(inner_input.trust_anchor_certificate) +.set_key_store_password(inner_input.key_store_password) +.set_custom_key_store_type(inner_input.custom_key_store_type) +.set_xks_proxy_uri_endpoint(inner_input.xks_proxy_uri_endpoint) +.set_xks_proxy_uri_path(inner_input.xks_proxy_uri_path) +.set_xks_proxy_vpc_endpoint_service_name(inner_input.xks_proxy_vpc_endpoint_service_name) +.set_xks_proxy_authentication_credential(inner_input.xks_proxy_authentication_credential) +.set_xks_proxy_connectivity(inner_input.xks_proxy_connectivity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::create_custom_key_store::_create_custom_key_store_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::create_custom_key_store::to_dafny_error) +} + fn CreateGrant(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::create_grant::_create_grant_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_grant() + .set_key_id(inner_input.key_id) +.set_grantee_principal(inner_input.grantee_principal) +.set_retiring_principal(inner_input.retiring_principal) +.set_operations(inner_input.operations) +.set_constraints(inner_input.constraints) +.set_grant_tokens(inner_input.grant_tokens) +.set_name(inner_input.name) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::create_grant::_create_grant_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::create_grant::to_dafny_error) +} + fn CreateKey(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::create_key::_create_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.create_key() + .set_policy(inner_input.policy) +.set_description(inner_input.description) +.set_key_usage(inner_input.key_usage) +.set_customer_master_key_spec(inner_input.customer_master_key_spec) +.set_key_spec(inner_input.key_spec) +.set_origin(inner_input.origin) +.set_custom_key_store_id(inner_input.custom_key_store_id) +.set_bypass_policy_lockout_safety_check(inner_input.bypass_policy_lockout_safety_check) +.set_tags(inner_input.tags) +.set_multi_region(inner_input.multi_region) +.set_xks_key_id(inner_input.xks_key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::create_key::_create_key_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::create_key::to_dafny_error) +} + fn Decrypt(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::decrypt::_decrypt_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.decrypt() + .set_ciphertext_blob(inner_input.ciphertext_blob) +.set_encryption_context(inner_input.encryption_context) +.set_grant_tokens(inner_input.grant_tokens) +.set_key_id(inner_input.key_id) +.set_encryption_algorithm(inner_input.encryption_algorithm) +.set_recipient(inner_input.recipient) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::decrypt::_decrypt_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::decrypt::to_dafny_error) +} + fn DeleteAlias(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::delete_alias::_delete_alias_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_alias() + .set_alias_name(inner_input.alias_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::delete_alias::to_dafny_error) +} + fn DeleteCustomKeyStore(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::delete_custom_key_store::_delete_custom_key_store_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_custom_key_store() + .set_custom_key_store_id(inner_input.custom_key_store_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::delete_custom_key_store::_delete_custom_key_store_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::delete_custom_key_store::to_dafny_error) +} + fn DeleteImportedKeyMaterial(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::delete_imported_key_material::_delete_imported_key_material_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.delete_imported_key_material() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::delete_imported_key_material::to_dafny_error) +} + fn DeriveSharedSecret(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::derive_shared_secret::_derive_shared_secret_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.derive_shared_secret() + .set_key_id(inner_input.key_id) +.set_key_agreement_algorithm(inner_input.key_agreement_algorithm) +.set_public_key(inner_input.public_key) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) +.set_recipient(inner_input.recipient) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::derive_shared_secret::_derive_shared_secret_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::derive_shared_secret::to_dafny_error) +} + fn DescribeCustomKeyStores(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::describe_custom_key_stores::_describe_custom_key_stores_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_custom_key_stores() + .set_custom_key_store_id(inner_input.custom_key_store_id) +.set_custom_key_store_name(inner_input.custom_key_store_name) +.set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::describe_custom_key_stores::_describe_custom_key_stores_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::describe_custom_key_stores::to_dafny_error) +} + fn DescribeKey(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::describe_key::_describe_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.describe_key() + .set_key_id(inner_input.key_id) +.set_grant_tokens(inner_input.grant_tokens) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::describe_key::_describe_key_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::describe_key::to_dafny_error) +} + fn DisableKey(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::disable_key::_disable_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.disable_key() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::disable_key::to_dafny_error) +} + fn DisableKeyRotation(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::disable_key_rotation::_disable_key_rotation_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.disable_key_rotation() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::disable_key_rotation::to_dafny_error) +} + fn DisconnectCustomKeyStore(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::disconnect_custom_key_store::_disconnect_custom_key_store_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.disconnect_custom_key_store() + .set_custom_key_store_id(inner_input.custom_key_store_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::disconnect_custom_key_store::_disconnect_custom_key_store_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::disconnect_custom_key_store::to_dafny_error) +} + fn EnableKey(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::enable_key::_enable_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.enable_key() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::enable_key::to_dafny_error) +} + fn EnableKeyRotation(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::enable_key_rotation::_enable_key_rotation_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.enable_key_rotation() + .set_key_id(inner_input.key_id) +.set_rotation_period_in_days(inner_input.rotation_period_in_days) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::enable_key_rotation::to_dafny_error) +} + fn Encrypt(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::encrypt::_encrypt_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.encrypt() + .set_key_id(inner_input.key_id) +.set_plaintext(inner_input.plaintext) +.set_encryption_context(inner_input.encryption_context) +.set_grant_tokens(inner_input.grant_tokens) +.set_encryption_algorithm(inner_input.encryption_algorithm) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::encrypt::_encrypt_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::encrypt::to_dafny_error) +} + fn GenerateDataKey(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_data_key::_generate_data_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_data_key() + .set_key_id(inner_input.key_id) +.set_encryption_context(inner_input.encryption_context) +.set_number_of_bytes(inner_input.number_of_bytes) +.set_key_spec(inner_input.key_spec) +.set_grant_tokens(inner_input.grant_tokens) +.set_recipient(inner_input.recipient) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_data_key::_generate_data_key_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_data_key::to_dafny_error) +} + fn GenerateDataKeyPair(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair::_generate_data_key_pair_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_data_key_pair() + .set_encryption_context(inner_input.encryption_context) +.set_key_id(inner_input.key_id) +.set_key_pair_spec(inner_input.key_pair_spec) +.set_grant_tokens(inner_input.grant_tokens) +.set_recipient(inner_input.recipient) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair::_generate_data_key_pair_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair::to_dafny_error) +} + fn GenerateDataKeyPairWithoutPlaintext(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair_without_plaintext::_generate_data_key_pair_without_plaintext_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_data_key_pair_without_plaintext() + .set_encryption_context(inner_input.encryption_context) +.set_key_id(inner_input.key_id) +.set_key_pair_spec(inner_input.key_pair_spec) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair_without_plaintext::_generate_data_key_pair_without_plaintext_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_pair_without_plaintext::to_dafny_error) +} + fn GenerateDataKeyWithoutPlaintext(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_data_key_without_plaintext::_generate_data_key_without_plaintext_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_data_key_without_plaintext() + .set_key_id(inner_input.key_id) +.set_encryption_context(inner_input.encryption_context) +.set_key_spec(inner_input.key_spec) +.set_number_of_bytes(inner_input.number_of_bytes) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_without_plaintext::_generate_data_key_without_plaintext_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_data_key_without_plaintext::to_dafny_error) +} + fn GenerateMac(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_mac::_generate_mac_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_mac() + .set_message(inner_input.message) +.set_key_id(inner_input.key_id) +.set_mac_algorithm(inner_input.mac_algorithm) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_mac::_generate_mac_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_mac::to_dafny_error) +} + fn GenerateRandom(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::generate_random::_generate_random_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.generate_random() + .set_number_of_bytes(inner_input.number_of_bytes) +.set_custom_key_store_id(inner_input.custom_key_store_id) +.set_recipient(inner_input.recipient) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::generate_random::_generate_random_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::generate_random::to_dafny_error) +} + fn GetKeyPolicy(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::get_key_policy::_get_key_policy_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_key_policy() + .set_key_id(inner_input.key_id) +.set_policy_name(inner_input.policy_name) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::get_key_policy::_get_key_policy_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::get_key_policy::to_dafny_error) +} + fn GetKeyRotationStatus(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::get_key_rotation_status::_get_key_rotation_status_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_key_rotation_status() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::get_key_rotation_status::_get_key_rotation_status_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::get_key_rotation_status::to_dafny_error) +} + fn GetParametersForImport(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::get_parameters_for_import::_get_parameters_for_import_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_parameters_for_import() + .set_key_id(inner_input.key_id) +.set_wrapping_algorithm(inner_input.wrapping_algorithm) +.set_wrapping_key_spec(inner_input.wrapping_key_spec) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::get_parameters_for_import::_get_parameters_for_import_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::get_parameters_for_import::to_dafny_error) +} + fn GetPublicKey(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::get_public_key::_get_public_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.get_public_key() + .set_key_id(inner_input.key_id) +.set_grant_tokens(inner_input.grant_tokens) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::get_public_key::_get_public_key_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::get_public_key::to_dafny_error) +} + fn ImportKeyMaterial(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::import_key_material::_import_key_material_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.import_key_material() + .set_key_id(inner_input.key_id) +.set_import_token(inner_input.import_token) +.set_encrypted_key_material(inner_input.encrypted_key_material) +.set_valid_to(inner_input.valid_to) +.set_expiration_model(inner_input.expiration_model) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::import_key_material::_import_key_material_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::import_key_material::to_dafny_error) +} + fn ListAliases(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_aliases::_list_aliases_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_aliases() + .set_key_id(inner_input.key_id) +.set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_aliases::_list_aliases_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_aliases::to_dafny_error) +} + fn ListGrants(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_grants::_list_grants_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_grants() + .set_limit(inner_input.limit) +.set_marker(inner_input.marker) +.set_key_id(inner_input.key_id) +.set_grant_id(inner_input.grant_id) +.set_grantee_principal(inner_input.grantee_principal) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_grants::_list_grants_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_grants::to_dafny_error) +} + fn ListKeyPolicies(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_key_policies::_list_key_policies_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_key_policies() + .set_key_id(inner_input.key_id) +.set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_key_policies::_list_key_policies_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_key_policies::to_dafny_error) +} + fn ListKeyRotations(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_key_rotations::_list_key_rotations_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_key_rotations() + .set_key_id(inner_input.key_id) +.set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_key_rotations::_list_key_rotations_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_key_rotations::to_dafny_error) +} + fn ListKeys(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_keys::_list_keys_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_keys() + .set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_keys::_list_keys_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_keys::to_dafny_error) +} + fn ListResourceTags(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::list_resource_tags::_list_resource_tags_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.list_resource_tags() + .set_key_id(inner_input.key_id) +.set_limit(inner_input.limit) +.set_marker(inner_input.marker) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::list_resource_tags::_list_resource_tags_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::list_resource_tags::to_dafny_error) +} + fn PutKeyPolicy(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::put_key_policy::_put_key_policy_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.put_key_policy() + .set_key_id(inner_input.key_id) +.set_policy_name(inner_input.policy_name) +.set_policy(inner_input.policy) +.set_bypass_policy_lockout_safety_check(inner_input.bypass_policy_lockout_safety_check) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::put_key_policy::to_dafny_error) +} + fn ReEncrypt(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::re_encrypt::_re_encrypt_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.re_encrypt() + .set_ciphertext_blob(inner_input.ciphertext_blob) +.set_source_encryption_context(inner_input.source_encryption_context) +.set_source_key_id(inner_input.source_key_id) +.set_destination_key_id(inner_input.destination_key_id) +.set_destination_encryption_context(inner_input.destination_encryption_context) +.set_source_encryption_algorithm(inner_input.source_encryption_algorithm) +.set_destination_encryption_algorithm(inner_input.destination_encryption_algorithm) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::re_encrypt::_re_encrypt_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::re_encrypt::to_dafny_error) +} + fn ReplicateKey(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::replicate_key::_replicate_key_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.replicate_key() + .set_key_id(inner_input.key_id) +.set_replica_region(inner_input.replica_region) +.set_policy(inner_input.policy) +.set_bypass_policy_lockout_safety_check(inner_input.bypass_policy_lockout_safety_check) +.set_description(inner_input.description) +.set_tags(inner_input.tags) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::replicate_key::_replicate_key_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::replicate_key::to_dafny_error) +} + fn RetireGrant(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::retire_grant::_retire_grant_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.retire_grant() + .set_grant_token(inner_input.grant_token) +.set_key_id(inner_input.key_id) +.set_grant_id(inner_input.grant_id) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::retire_grant::to_dafny_error) +} + fn RevokeGrant(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::revoke_grant::_revoke_grant_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.revoke_grant() + .set_key_id(inner_input.key_id) +.set_grant_id(inner_input.grant_id) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::revoke_grant::to_dafny_error) +} + fn RotateKeyOnDemand(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::rotate_key_on_demand::_rotate_key_on_demand_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.rotate_key_on_demand() + .set_key_id(inner_input.key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::rotate_key_on_demand::_rotate_key_on_demand_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::rotate_key_on_demand::to_dafny_error) +} + fn ScheduleKeyDeletion(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::schedule_key_deletion::_schedule_key_deletion_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.schedule_key_deletion() + .set_key_id(inner_input.key_id) +.set_pending_window_in_days(inner_input.pending_window_in_days) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::schedule_key_deletion::_schedule_key_deletion_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::schedule_key_deletion::to_dafny_error) +} + fn Sign(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::sign::_sign_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.sign() + .set_key_id(inner_input.key_id) +.set_message(inner_input.message) +.set_message_type(inner_input.message_type) +.set_grant_tokens(inner_input.grant_tokens) +.set_signing_algorithm(inner_input.signing_algorithm) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::sign::_sign_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::sign::to_dafny_error) +} + fn TagResource(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::tag_resource::_tag_resource_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.tag_resource() + .set_key_id(inner_input.key_id) +.set_tags(inner_input.tags) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::tag_resource::to_dafny_error) +} + fn UntagResource(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::untag_resource::_untag_resource_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.untag_resource() + .set_key_id(inner_input.key_id) +.set_tag_keys(inner_input.tag_keys) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::untag_resource::to_dafny_error) +} + fn UpdateAlias(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::update_alias::_update_alias_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_alias() + .set_alias_name(inner_input.alias_name) +.set_target_key_id(inner_input.target_key_id) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::update_alias::to_dafny_error) +} + fn UpdateCustomKeyStore(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::update_custom_key_store::_update_custom_key_store_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_custom_key_store() + .set_custom_key_store_id(inner_input.custom_key_store_id) +.set_new_custom_key_store_name(inner_input.new_custom_key_store_name) +.set_key_store_password(inner_input.key_store_password) +.set_cloud_hsm_cluster_id(inner_input.cloud_hsm_cluster_id) +.set_xks_proxy_uri_endpoint(inner_input.xks_proxy_uri_endpoint) +.set_xks_proxy_uri_path(inner_input.xks_proxy_uri_path) +.set_xks_proxy_vpc_endpoint_service_name(inner_input.xks_proxy_vpc_endpoint_service_name) +.set_xks_proxy_authentication_credential(inner_input.xks_proxy_authentication_credential) +.set_xks_proxy_connectivity(inner_input.xks_proxy_connectivity) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::update_custom_key_store::_update_custom_key_store_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::update_custom_key_store::to_dafny_error) +} + fn UpdateKeyDescription(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::update_key_description::_update_key_description_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_key_description() + .set_key_id(inner_input.key_id) +.set_description(inner_input.description) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::update_key_description::to_dafny_error) +} + fn UpdatePrimaryRegion(&self, input: &std::rc::Rc) + -> std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::update_primary_region::_update_primary_region_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.update_primary_region() + .set_key_id(inner_input.key_id) +.set_primary_region(inner_input.primary_region) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + |x| (), + crate::deps::com_amazonaws_kms::conversions::update_primary_region::to_dafny_error) +} + fn Verify(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::verify::_verify_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.verify() + .set_key_id(inner_input.key_id) +.set_message(inner_input.message) +.set_message_type(inner_input.message_type) +.set_signature(inner_input.signature) +.set_signing_algorithm(inner_input.signing_algorithm) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::verify::_verify_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::verify::to_dafny_error) +} + fn VerifyMac(&self, input: &std::rc::Rc) + -> std::rc::Rc, + std::rc::Rc + > +> { + let inner_input = crate::deps::com_amazonaws_kms::conversions::verify_mac::_verify_mac_request::from_dafny(input.clone()); + let native_result = tokio::task::block_in_place(|| { + dafny_tokio_runtime.block_on(async { + self.inner.verify_mac() + .set_message(inner_input.message) +.set_key_id(inner_input.key_id) +.set_mac_algorithm(inner_input.mac_algorithm) +.set_mac(inner_input.mac) +.set_grant_tokens(inner_input.grant_tokens) +.set_dry_run(inner_input.dry_run) + .send() + .await + }) + }); + crate::standard_library_conversions::result_to_dafny(&native_result, + crate::deps::com_amazonaws_kms::conversions::verify_mac::_verify_mac_response::to_dafny, + crate::deps::com_amazonaws_kms::conversions::verify_mac::to_dafny_error) +} +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions.rs new file mode 100644 index 000000000..5896aa200 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions.rs @@ -0,0 +1,186 @@ +// 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 mod algorithm_spec; + + pub mod alias_list_entry; + + pub mod cancel_key_deletion; + + pub mod client; + + pub mod connect_custom_key_store; + + pub mod connection_error_code_type; + + pub mod connection_state_type; + + pub mod create_alias; + + pub mod create_custom_key_store; + + pub mod create_grant; + + pub mod create_key; + + pub mod custom_key_store_type; + + pub mod custom_key_stores_list_entry; + + pub mod customer_master_key_spec; + + pub mod data_key_pair_spec; + + pub mod data_key_spec; + + pub mod decrypt; + + pub mod delete_alias; + + pub mod delete_custom_key_store; + + pub mod delete_imported_key_material; + + pub mod derive_shared_secret; + + pub mod describe_custom_key_stores; + + pub mod describe_key; + + pub mod disable_key; + + pub mod disable_key_rotation; + + pub mod disconnect_custom_key_store; + + pub mod enable_key; + + pub mod enable_key_rotation; + + pub mod encrypt; + + pub mod encryption_algorithm_spec; + + pub mod error; + + pub mod expiration_model_type; + + pub mod generate_data_key; + + pub mod generate_data_key_pair; + + pub mod generate_data_key_pair_without_plaintext; + + pub mod generate_data_key_without_plaintext; + + pub mod generate_mac; + + pub mod generate_random; + + pub mod get_key_policy; + + pub mod get_key_rotation_status; + + pub mod get_parameters_for_import; + + pub mod get_public_key; + + pub mod grant_constraints; + + pub mod grant_list_entry; + + pub mod grant_operation; + + pub mod import_key_material; + + pub mod key_agreement_algorithm_spec; + + pub mod key_encryption_mechanism; + + pub mod key_list_entry; + + pub mod key_manager_type; + + pub mod key_metadata; + + pub mod key_spec; + + pub mod key_state; + + pub mod key_usage_type; + + pub mod list_aliases; + + pub mod list_grants; + + pub mod list_key_policies; + + pub mod list_key_rotations; + + pub mod list_keys; + + pub mod list_resource_tags; + + pub mod mac_algorithm_spec; + + pub mod message_type; + + pub mod multi_region_configuration; + + pub mod multi_region_key; + + pub mod multi_region_key_type; + + pub mod origin_type; + + pub mod put_key_policy; + + pub mod re_encrypt; + + pub mod recipient_info; + + pub mod replicate_key; + + pub mod retire_grant; + + pub mod revoke_grant; + + pub mod rotate_key_on_demand; + + pub mod rotation_type; + + pub mod rotations_list_entry; + + pub mod schedule_key_deletion; + + pub mod sign; + + pub mod signing_algorithm_spec; + + pub mod tag; + + pub mod tag_resource; + + pub mod untag_resource; + + pub mod update_alias; + + pub mod update_custom_key_store; + + pub mod update_key_description; + + pub mod update_primary_region; + + pub mod verify; + + pub mod verify_mac; + + pub mod wrapping_key_spec; + + pub mod xks_key_configuration_type; + + pub mod xks_proxy_authentication_credential_type; + + pub mod xks_proxy_configuration_type; + + pub mod xks_proxy_connectivity_type; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs new file mode 100644 index 000000000..df6f811c7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::AlgorithmSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::AlgorithmSpec::RsaesPkcs1V15 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_PKCS1_V1_5 {}, +aws_sdk_kms::types::AlgorithmSpec::RsaesOaepSha1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_OAEP_SHA_1 {}, +aws_sdk_kms::types::AlgorithmSpec::RsaesOaepSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_OAEP_SHA_256 {}, +aws_sdk_kms::types::AlgorithmSpec::RsaAesKeyWrapSha1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSA_AES_KEY_WRAP_SHA_1 {}, +aws_sdk_kms::types::AlgorithmSpec::RsaAesKeyWrapSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSA_AES_KEY_WRAP_SHA_256 {}, +aws_sdk_kms::types::AlgorithmSpec::Sm2Pke => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::SM2PKE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec, +) -> aws_sdk_kms::types::AlgorithmSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_PKCS1_V1_5 {} => aws_sdk_kms::types::AlgorithmSpec::RsaesPkcs1V15, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_OAEP_SHA_1 {} => aws_sdk_kms::types::AlgorithmSpec::RsaesOaepSha1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSAES_OAEP_SHA_256 {} => aws_sdk_kms::types::AlgorithmSpec::RsaesOaepSha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSA_AES_KEY_WRAP_SHA_1 {} => aws_sdk_kms::types::AlgorithmSpec::RsaAesKeyWrapSha1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::RSA_AES_KEY_WRAP_SHA_256 {} => aws_sdk_kms::types::AlgorithmSpec::RsaAesKeyWrapSha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AlgorithmSpec::SM2PKE {} => aws_sdk_kms::types::AlgorithmSpec::Sm2Pke, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs new file mode 100644 index 000000000..9fdd3c218 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::AliasListEntry, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AliasListEntry::AliasListEntry { + AliasName: crate::standard_library_conversions::ostring_to_dafny(&value.alias_name), + AliasArn: crate::standard_library_conversions::ostring_to_dafny(&value.alias_arn), + TargetKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.target_key_id), + CreationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date), + LastUpdatedDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.last_updated_date), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::AliasListEntry, + >, +) -> aws_sdk_kms::types::AliasListEntry { + aws_sdk_kms::types::AliasListEntry::builder() + .set_alias_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AliasName().clone())) + .set_alias_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AliasArn().clone())) + .set_target_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TargetKeyId().clone())) + .set_creation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDate().clone())) + .set_last_updated_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.LastUpdatedDate().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs new file mode 100644 index 000000000..9edcbd515 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _cancel_key_deletion_request; + + pub mod _cancel_key_deletion_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_request.rs new file mode 100644 index 000000000..4ed628ada --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionRequest::CancelKeyDeletionRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionRequest, + > +) -> aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionInput { + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_response.rs new file mode 100644 index 000000000..31de448b4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionResponse::CancelKeyDeletionResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CancelKeyDeletionResponse, + > +) -> aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionOutput { + aws_sdk_kms::operation::cancel_key_deletion::CancelKeyDeletionOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/client.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/client.rs new file mode 100644 index 000000000..01e4d6c5a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/client.rs @@ -0,0 +1,38 @@ +// 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. +// 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. +#[allow(dead_code)] + +use std::any::Any; + +pub fn to_dafny( + value: &crate::deps::com_amazonaws_kms::client::Client, +) -> + ::dafny_runtime::Object +{ + let x: std::rc::Rc = std::rc::Rc::new(value.clone()); + let y = x as std::rc::Rc; + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::rc_struct_to_dafny_class(y) + } +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient + >, +) -> crate::deps::com_amazonaws_kms::client::Client { + let as_boxed_any = dafny_runtime::cast_any_object!(dafny_value); + if (dafny_runtime::is_object!(as_boxed_any, crate::deps::com_amazonaws_kms::client::Client)) { + let as_boxed_client = ::dafny_runtime::object::downcast::(as_boxed_any); + unsafe { + ::dafny_runtime::dafny_runtime_conversions::object::dafny_class_to_rc_struct(as_boxed_client).as_ref().clone() + } + } else { + panic!("Unexpected implementation of Dafny client interface"); + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs new file mode 100644 index 000000000..0e87350da --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError::CloudHsmClusterNotActiveException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_active_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _connect_custom_key_store_request; + + pub mod _connect_custom_key_store_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_request.rs new file mode 100644 index 000000000..4bd333c06 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreRequest::ConnectCustomKeyStoreRequest { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreRequest, + > +) -> aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreInput { + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreInput::builder() + .set_custom_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.CustomKeyStoreId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_response.rs new file mode 100644 index 000000000..83df3ebd2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreResponse::ConnectCustomKeyStoreResponse { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectCustomKeyStoreResponse, + > +) -> aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreOutput { + aws_sdk_kms::operation::connect_custom_key_store::ConnectCustomKeyStoreOutput::builder() + + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs new file mode 100644 index 000000000..7b4ff2fb4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs @@ -0,0 +1,55 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::ConnectionErrorCodeType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::ConnectionErrorCodeType::InvalidCredentials => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INVALID_CREDENTIALS {}, +aws_sdk_kms::types::ConnectionErrorCodeType::ClusterNotFound => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::CLUSTER_NOT_FOUND {}, +aws_sdk_kms::types::ConnectionErrorCodeType::NetworkErrors => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::NETWORK_ERRORS {}, +aws_sdk_kms::types::ConnectionErrorCodeType::InternalError => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INTERNAL_ERROR {}, +aws_sdk_kms::types::ConnectionErrorCodeType::InsufficientCloudhsmHsms => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INSUFFICIENT_CLOUDHSM_HSMS {}, +aws_sdk_kms::types::ConnectionErrorCodeType::UserLockedOut => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_LOCKED_OUT {}, +aws_sdk_kms::types::ConnectionErrorCodeType::UserNotFound => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_NOT_FOUND {}, +aws_sdk_kms::types::ConnectionErrorCodeType::UserLoggedIn => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_LOGGED_IN {}, +aws_sdk_kms::types::ConnectionErrorCodeType::SubnetNotFound => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::SUBNET_NOT_FOUND {}, +aws_sdk_kms::types::ConnectionErrorCodeType::InsufficientFreeAddressesInSubnet => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyAccessDenied => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_ACCESS_DENIED {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyNotReachable => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_NOT_REACHABLE {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksVpcEndpointServiceNotFound => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidResponse => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_RESPONSE {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidConfiguration => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_CONFIGURATION {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksVpcEndpointServiceInvalidConfiguration => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyTimedOut => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_TIMED_OUT {}, +aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidTlsConfiguration => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_TLS_CONFIGURATION {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType, +) -> aws_sdk_kms::types::ConnectionErrorCodeType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INVALID_CREDENTIALS {} => aws_sdk_kms::types::ConnectionErrorCodeType::InvalidCredentials, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::CLUSTER_NOT_FOUND {} => aws_sdk_kms::types::ConnectionErrorCodeType::ClusterNotFound, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::NETWORK_ERRORS {} => aws_sdk_kms::types::ConnectionErrorCodeType::NetworkErrors, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INTERNAL_ERROR {} => aws_sdk_kms::types::ConnectionErrorCodeType::InternalError, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INSUFFICIENT_CLOUDHSM_HSMS {} => aws_sdk_kms::types::ConnectionErrorCodeType::InsufficientCloudhsmHsms, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_LOCKED_OUT {} => aws_sdk_kms::types::ConnectionErrorCodeType::UserLockedOut, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_NOT_FOUND {} => aws_sdk_kms::types::ConnectionErrorCodeType::UserNotFound, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::USER_LOGGED_IN {} => aws_sdk_kms::types::ConnectionErrorCodeType::UserLoggedIn, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::SUBNET_NOT_FOUND {} => aws_sdk_kms::types::ConnectionErrorCodeType::SubnetNotFound, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET {} => aws_sdk_kms::types::ConnectionErrorCodeType::InsufficientFreeAddressesInSubnet, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_ACCESS_DENIED {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyAccessDenied, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_NOT_REACHABLE {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyNotReachable, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksVpcEndpointServiceNotFound, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_RESPONSE {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidResponse, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_CONFIGURATION {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidConfiguration, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksVpcEndpointServiceInvalidConfiguration, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_TIMED_OUT {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyTimedOut, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionErrorCodeType::XKS_PROXY_INVALID_TLS_CONFIGURATION {} => aws_sdk_kms::types::ConnectionErrorCodeType::XksProxyInvalidTlsConfiguration, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs new file mode 100644 index 000000000..b640f8aa0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs @@ -0,0 +1,29 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::ConnectionStateType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::ConnectionStateType::Connected => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::CONNECTED {}, +aws_sdk_kms::types::ConnectionStateType::Connecting => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::CONNECTING {}, +aws_sdk_kms::types::ConnectionStateType::Failed => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::FAILED {}, +aws_sdk_kms::types::ConnectionStateType::Disconnected => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::DISCONNECTED {}, +aws_sdk_kms::types::ConnectionStateType::Disconnecting => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::DISCONNECTING {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType, +) -> aws_sdk_kms::types::ConnectionStateType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::CONNECTED {} => aws_sdk_kms::types::ConnectionStateType::Connected, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::CONNECTING {} => aws_sdk_kms::types::ConnectionStateType::Connecting, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::FAILED {} => aws_sdk_kms::types::ConnectionStateType::Failed, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::DISCONNECTED {} => aws_sdk_kms::types::ConnectionStateType::Disconnected, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ConnectionStateType::DISCONNECTING {} => aws_sdk_kms::types::ConnectionStateType::Disconnecting, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs new file mode 100644 index 000000000..01383a4a0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::create_alias::CreateAliasError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::create_alias::CreateAliasError::AlreadyExistsException(e) => + crate::deps::com_amazonaws_kms::conversions::error::already_exists_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::InvalidAliasNameException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_alias_name_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_alias::CreateAliasError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_alias_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias/_create_alias_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias/_create_alias_request.rs new file mode 100644 index 000000000..69caabd71 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_alias/_create_alias_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_alias::CreateAliasInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateAliasRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateAliasRequest::CreateAliasRequest { + AliasName: crate::standard_library_conversions::ostring_to_dafny(&value.alias_name) .Extract(), + TargetKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.target_key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateAliasRequest, + > +) -> aws_sdk_kms::operation::create_alias::CreateAliasInput { + aws_sdk_kms::operation::create_alias::CreateAliasInput::builder() + .set_alias_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AliasName()) )) + .set_target_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TargetKeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs new file mode 100644 index 000000000..11658fb33 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterNotActiveException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_active_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::CustomKeyStoreNameInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_name_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::IncorrectTrustAnchorException(e) => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_trust_anchor_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyIncorrectAuthenticationCredentialException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_incorrect_authentication_credential_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyInvalidResponseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_response_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriEndpointInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_endpoint_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriUnreachableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_unreachable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_custom_key_store_request; + + pub mod _create_custom_key_store_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_request.rs new file mode 100644 index 000000000..c8c7c7e31 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_request.rs @@ -0,0 +1,71 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreRequest::CreateCustomKeyStoreRequest { + CustomKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_name) .Extract(), + CloudHsmClusterId: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_hsm_cluster_id), + TrustAnchorCertificate: crate::standard_library_conversions::ostring_to_dafny(&value.trust_anchor_certificate), + KeyStorePassword: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_password), + CustomKeyStoreType: ::std::rc::Rc::new(match &value.custom_key_store_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::custom_key_store_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + XksProxyUriEndpoint: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_uri_endpoint), + XksProxyUriPath: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_uri_path), + XksProxyVpcEndpointServiceName: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_vpc_endpoint_service_name), + XksProxyAuthenticationCredential: ::std::rc::Rc::new(match &value.xks_proxy_authentication_credential { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_authentication_credential_type::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + XksProxyConnectivity: ::std::rc::Rc::new(match &value.xks_proxy_connectivity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreRequest, + > +) -> aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreInput { + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreInput::builder() + .set_custom_key_store_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.CustomKeyStoreName()) )) + .set_cloud_hsm_cluster_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudHsmClusterId().clone())) + .set_trust_anchor_certificate(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TrustAnchorCertificate().clone())) + .set_key_store_password(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyStorePassword().clone())) + .set_custom_key_store_type(match &**dafny_value.CustomKeyStoreType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::custom_key_store_type::from_dafny(value) + ), + _ => None, +} +) + .set_xks_proxy_uri_endpoint(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyUriEndpoint().clone())) + .set_xks_proxy_uri_path(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyUriPath().clone())) + .set_xks_proxy_vpc_endpoint_service_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyVpcEndpointServiceName().clone())) + .set_xks_proxy_authentication_credential(match (*dafny_value.XksProxyAuthenticationCredential()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::xks_proxy_authentication_credential_type::from_dafny(value.clone())), + _ => None, +} +) + .set_xks_proxy_connectivity(match &**dafny_value.XksProxyConnectivity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_response.rs new file mode 100644 index 000000000..947049ab3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreResponse::CreateCustomKeyStoreResponse { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateCustomKeyStoreResponse, + > +) -> aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreOutput { + aws_sdk_kms::operation::create_custom_key_store::CreateCustomKeyStoreOutput::builder() + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs new file mode 100644 index 000000000..ef1feffc0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::create_grant::CreateGrantError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::create_grant::CreateGrantError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_grant::CreateGrantError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_grant_request; + + pub mod _create_grant_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_request.rs new file mode 100644 index 000000000..044df902d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_request.rs @@ -0,0 +1,70 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_grant::CreateGrantInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantRequest::CreateGrantRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + GranteePrincipal: crate::standard_library_conversions::ostring_to_dafny(&value.grantee_principal) .Extract(), + RetiringPrincipal: crate::standard_library_conversions::ostring_to_dafny(&value.retiring_principal), + Operations: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.operations.clone().unwrap(), + |e| crate::deps::com_amazonaws_kms::conversions::grant_operation::to_dafny(e.clone()), +) +, + Constraints: ::std::rc::Rc::new(match &value.constraints { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::grant_constraints::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Name: crate::standard_library_conversions::ostring_to_dafny(&value.name), + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantRequest, + > +) -> aws_sdk_kms::operation::create_grant::CreateGrantInput { + aws_sdk_kms::operation::create_grant::CreateGrantInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_grantee_principal(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GranteePrincipal()) )) + .set_retiring_principal(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RetiringPrincipal().clone())) + .set_operations(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Operations(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::grant_operation::from_dafny(e), +) + )) + .set_constraints(match (*dafny_value.Constraints()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::grant_constraints::from_dafny(value.clone())), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Name().clone())) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_response.rs new file mode 100644 index 000000000..9f288b05f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_grant::CreateGrantOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantResponse::CreateGrantResponse { + GrantToken: crate::standard_library_conversions::ostring_to_dafny(&value.grant_token), + GrantId: crate::standard_library_conversions::ostring_to_dafny(&value.grant_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateGrantResponse, + > +) -> aws_sdk_kms::operation::create_grant::CreateGrantOutput { + aws_sdk_kms::operation::create_grant::CreateGrantOutput::builder() + .set_grant_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantToken().clone())) + .set_grant_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs new file mode 100644 index 000000000..d1b6476dd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs @@ -0,0 +1,53 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::create_key::CreateKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::create_key::CreateKeyError::CloudHsmClusterInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::MalformedPolicyDocumentException(e) => + crate::deps::com_amazonaws_kms::conversions::error::malformed_policy_document_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::TagException(e) => + crate::deps::com_amazonaws_kms::conversions::error::tag_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::XksKeyAlreadyInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_already_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::XksKeyInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::create_key::CreateKeyError::XksKeyNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _create_key_request; + + pub mod _create_key_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_request.rs new file mode 100644 index 000000000..250c90e84 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_request.rs @@ -0,0 +1,103 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_key::CreateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyRequest::CreateKeyRequest { + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy), + Description: crate::standard_library_conversions::ostring_to_dafny(&value.description), + KeyUsage: ::std::rc::Rc::new(match &value.key_usage { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_usage_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CustomerMasterKeySpec: ::std::rc::Rc::new(match &value.customer_master_key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeySpec: ::std::rc::Rc::new(match &value.key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Origin: ::std::rc::Rc::new(match &value.origin { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::origin_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + BypassPolicyLockoutSafetyCheck: crate::standard_library_conversions::obool_to_dafny(&value.bypass_policy_lockout_safety_check), + Tags: ::std::rc::Rc::new(match &value.tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + MultiRegion: crate::standard_library_conversions::obool_to_dafny(&value.multi_region), + XksKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.xks_key_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyRequest, + > +) -> aws_sdk_kms::operation::create_key::CreateKeyInput { + aws_sdk_kms::operation::create_key::CreateKeyInput::builder() + .set_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Policy().clone())) + .set_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Description().clone())) + .set_key_usage(match &**dafny_value.KeyUsage() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_usage_type::from_dafny(value) + ), + _ => None, +} +) + .set_customer_master_key_spec(match &**dafny_value.CustomerMasterKeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_spec(match &**dafny_value.KeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_origin(match &**dafny_value.Origin() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::origin_type::from_dafny(value) + ), + _ => None, +} +) + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .set_bypass_policy_lockout_safety_check(crate::standard_library_conversions::obool_from_dafny(dafny_value.BypassPolicyLockoutSafetyCheck().clone())) + .set_tags(match (*dafny_value.Tags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_multi_region(crate::standard_library_conversions::obool_from_dafny(dafny_value.MultiRegion().clone())) + .set_xks_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksKeyId().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_response.rs new file mode 100644 index 000000000..7c03614f6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::create_key::CreateKeyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyResponse::CreateKeyResponse { + KeyMetadata: ::std::rc::Rc::new(match &value.key_metadata { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_metadata::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CreateKeyResponse, + > +) -> aws_sdk_kms::operation::create_key::CreateKeyOutput { + aws_sdk_kms::operation::create_key::CreateKeyOutput::builder() + .set_key_metadata(match (*dafny_value.KeyMetadata()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::key_metadata::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs new file mode 100644 index 000000000..3d5196b56 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::CustomKeyStoreType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::CustomKeyStoreType::AwsCloudhsm => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoreType::AWS_CLOUDHSM {}, +aws_sdk_kms::types::CustomKeyStoreType::ExternalKeyStore => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoreType::EXTERNAL_KEY_STORE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoreType, +) -> aws_sdk_kms::types::CustomKeyStoreType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoreType::AWS_CLOUDHSM {} => aws_sdk_kms::types::CustomKeyStoreType::AwsCloudhsm, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoreType::EXTERNAL_KEY_STORE {} => aws_sdk_kms::types::CustomKeyStoreType::ExternalKeyStore, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_stores_list_entry.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_stores_list_entry.rs new file mode 100644 index 000000000..120c98f55 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/custom_key_stores_list_entry.rs @@ -0,0 +1,78 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::CustomKeyStoresListEntry, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoresListEntry::CustomKeyStoresListEntry { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + CustomKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_name), + CloudHsmClusterId: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_hsm_cluster_id), + TrustAnchorCertificate: crate::standard_library_conversions::ostring_to_dafny(&value.trust_anchor_certificate), + ConnectionState: ::std::rc::Rc::new(match &value.connection_state { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::connection_state_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ConnectionErrorCode: ::std::rc::Rc::new(match &value.connection_error_code { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::connection_error_code_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CreationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date), + CustomKeyStoreType: ::std::rc::Rc::new(match &value.custom_key_store_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::custom_key_store_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + XksProxyConfiguration: ::std::rc::Rc::new(match &value.xks_proxy_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_configuration_type::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomKeyStoresListEntry, + >, +) -> aws_sdk_kms::types::CustomKeyStoresListEntry { + aws_sdk_kms::types::CustomKeyStoresListEntry::builder() + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .set_custom_key_store_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreName().clone())) + .set_cloud_hsm_cluster_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudHsmClusterId().clone())) + .set_trust_anchor_certificate(crate::standard_library_conversions::ostring_from_dafny(dafny_value.TrustAnchorCertificate().clone())) + .set_connection_state(match &**dafny_value.ConnectionState() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::connection_state_type::from_dafny(value) + ), + _ => None, +} +) + .set_connection_error_code(match &**dafny_value.ConnectionErrorCode() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::connection_error_code_type::from_dafny(value) + ), + _ => None, +} +) + .set_creation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDate().clone())) + .set_custom_key_store_type(match &**dafny_value.CustomKeyStoreType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::custom_key_store_type::from_dafny(value) + ), + _ => None, +} +) + .set_xks_proxy_configuration(match (*dafny_value.XksProxyConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::xks_proxy_configuration_type::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs new file mode 100644 index 000000000..d00e07390 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::CustomerMasterKeySpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::CustomerMasterKeySpec::Rsa2048 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_2048 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Rsa3072 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_3072 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Rsa4096 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_4096 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P256 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P384 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP521 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P521 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::EccSecgP256K1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_SECG_P256K1 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::SymmetricDefault => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::SYMMETRIC_DEFAULT {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Hmac224 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_224 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Hmac256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_256 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Hmac384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_384 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Hmac512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_512 {}, +aws_sdk_kms::types::CustomerMasterKeySpec::Sm2 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::SM2 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec, +) -> aws_sdk_kms::types::CustomerMasterKeySpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_2048 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Rsa2048, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_3072 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Rsa3072, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::RSA_4096 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Rsa4096, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P256 {} => aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P384 {} => aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_NIST_P521 {} => aws_sdk_kms::types::CustomerMasterKeySpec::EccNistP521, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::ECC_SECG_P256K1 {} => aws_sdk_kms::types::CustomerMasterKeySpec::EccSecgP256K1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::SYMMETRIC_DEFAULT {} => aws_sdk_kms::types::CustomerMasterKeySpec::SymmetricDefault, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_224 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Hmac224, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_256 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Hmac256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_384 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Hmac384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::HMAC_512 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Hmac512, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::CustomerMasterKeySpec::SM2 {} => aws_sdk_kms::types::CustomerMasterKeySpec::Sm2, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs new file mode 100644 index 000000000..cd2726064 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::DataKeyPairSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::DataKeyPairSpec::Rsa2048 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_2048 {}, +aws_sdk_kms::types::DataKeyPairSpec::Rsa3072 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_3072 {}, +aws_sdk_kms::types::DataKeyPairSpec::Rsa4096 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_4096 {}, +aws_sdk_kms::types::DataKeyPairSpec::EccNistP256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P256 {}, +aws_sdk_kms::types::DataKeyPairSpec::EccNistP384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P384 {}, +aws_sdk_kms::types::DataKeyPairSpec::EccNistP521 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P521 {}, +aws_sdk_kms::types::DataKeyPairSpec::EccSecgP256K1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_SECG_P256K1 {}, +aws_sdk_kms::types::DataKeyPairSpec::Sm2 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::SM2 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec, +) -> aws_sdk_kms::types::DataKeyPairSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_2048 {} => aws_sdk_kms::types::DataKeyPairSpec::Rsa2048, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_3072 {} => aws_sdk_kms::types::DataKeyPairSpec::Rsa3072, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::RSA_4096 {} => aws_sdk_kms::types::DataKeyPairSpec::Rsa4096, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P256 {} => aws_sdk_kms::types::DataKeyPairSpec::EccNistP256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P384 {} => aws_sdk_kms::types::DataKeyPairSpec::EccNistP384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_NIST_P521 {} => aws_sdk_kms::types::DataKeyPairSpec::EccNistP521, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::ECC_SECG_P256K1 {} => aws_sdk_kms::types::DataKeyPairSpec::EccSecgP256K1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeyPairSpec::SM2 {} => aws_sdk_kms::types::DataKeyPairSpec::Sm2, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs new file mode 100644 index 000000000..f26b83c13 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::DataKeySpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::DataKeySpec::Aes256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeySpec::AES_256 {}, +aws_sdk_kms::types::DataKeySpec::Aes128 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeySpec::AES_128 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeySpec, +) -> aws_sdk_kms::types::DataKeySpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeySpec::AES_256 {} => aws_sdk_kms::types::DataKeySpec::Aes256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DataKeySpec::AES_128 {} => aws_sdk_kms::types::DataKeySpec::Aes128, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs new file mode 100644 index 000000000..a295de458 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::decrypt::DecryptError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::decrypt::DecryptError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::IncorrectKeyException(e) => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_key_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::InvalidCiphertextException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_ciphertext_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::decrypt::DecryptError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _decrypt_request; + + pub mod _decrypt_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs new file mode 100644 index 000000000..fc1d3d213 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs @@ -0,0 +1,92 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::decrypt::DecryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptRequest::DecryptRequest { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob).Extract(), + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + EncryptionAlgorithm: ::std::rc::Rc::new(match &value.encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Recipient: ::std::rc::Rc::new(match &value.recipient { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::recipient_info::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptRequest, + > +) -> aws_sdk_kms::operation::decrypt::DecryptInput { + aws_sdk_kms::operation::decrypt::DecryptInput::builder() + .set_ciphertext_blob(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.CiphertextBlob().clone()))) + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_encryption_algorithm(match &**dafny_value.EncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_recipient(match (*dafny_value.Recipient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::recipient_info::from_dafny(value.clone())), + _ => None, +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs new file mode 100644 index 000000000..81f4f92eb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::decrypt::DecryptOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptResponse::DecryptResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + Plaintext: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext), + EncryptionAlgorithm: ::std::rc::Rc::new(match &value.encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CiphertextForRecipient: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_for_recipient), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DecryptResponse, + > +) -> aws_sdk_kms::operation::decrypt::DecryptOutput { + aws_sdk_kms::operation::decrypt::DecryptOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_plaintext(crate::standard_library_conversions::oblob_from_dafny(dafny_value.Plaintext().clone())) + .set_encryption_algorithm(match &**dafny_value.EncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_ciphertext_for_recipient(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextForRecipient().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs new file mode 100644 index 000000000..f2b71aa78 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::delete_alias::DeleteAliasError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::delete_alias::DeleteAliasError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_alias::DeleteAliasError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_alias::DeleteAliasError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_alias::DeleteAliasError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_alias_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias/_delete_alias_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias/_delete_alias_request.rs new file mode 100644 index 000000000..6e98e0dad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_alias/_delete_alias_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::delete_alias::DeleteAliasInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteAliasRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteAliasRequest::DeleteAliasRequest { + AliasName: crate::standard_library_conversions::ostring_to_dafny(&value.alias_name) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteAliasRequest, + > +) -> aws_sdk_kms::operation::delete_alias::DeleteAliasInput { + aws_sdk_kms::operation::delete_alias::DeleteAliasInput::builder() + .set_alias_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AliasName()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs new file mode 100644 index 000000000..5f51f2a04 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreHasCmKsException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_has_cmks_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_custom_key_store_request; + + pub mod _delete_custom_key_store_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_request.rs new file mode 100644 index 000000000..fa0969464 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreRequest::DeleteCustomKeyStoreRequest { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreRequest, + > +) -> aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreInput { + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreInput::builder() + .set_custom_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.CustomKeyStoreId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_response.rs new file mode 100644 index 000000000..304d46ab3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreResponse::DeleteCustomKeyStoreResponse { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteCustomKeyStoreResponse, + > +) -> aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput { + aws_sdk_kms::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput::builder() + + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs new file mode 100644 index 000000000..37241b0e3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _delete_imported_key_material_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material/_delete_imported_key_material_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material/_delete_imported_key_material_request.rs new file mode 100644 index 000000000..30fe636ca --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material/_delete_imported_key_material_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteImportedKeyMaterialRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteImportedKeyMaterialRequest::DeleteImportedKeyMaterialRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeleteImportedKeyMaterialRequest, + > +) -> aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput { + aws_sdk_kms::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs new file mode 100644 index 000000000..ad4386c24 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _derive_shared_secret_request; + + pub mod _derive_shared_secret_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_request.rs new file mode 100644 index 000000000..a5ac3ad0f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_request.rs @@ -0,0 +1,60 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretRequest::DeriveSharedSecretRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + KeyAgreementAlgorithm: crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::to_dafny(value.key_agreement_algorithm.clone().unwrap()), + PublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key).Extract(), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + Recipient: ::std::rc::Rc::new(match &value.recipient { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::recipient_info::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretRequest, + > +) -> aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretInput { + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_key_agreement_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::from_dafny(dafny_value.KeyAgreementAlgorithm()) )) + .set_public_key(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.PublicKey().clone()))) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .set_recipient(match (*dafny_value.Recipient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::recipient_info::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_response.rs new file mode 100644 index 000000000..fefe2c8a6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_response.rs @@ -0,0 +1,53 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretResponse::DeriveSharedSecretResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + SharedSecret: crate::standard_library_conversions::oblob_to_dafny(&value.shared_secret), + CiphertextForRecipient: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_for_recipient), + KeyAgreementAlgorithm: ::std::rc::Rc::new(match &value.key_agreement_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeyOrigin: ::std::rc::Rc::new(match &value.key_origin { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::origin_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DeriveSharedSecretResponse, + > +) -> aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretOutput { + aws_sdk_kms::operation::derive_shared_secret::DeriveSharedSecretOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_shared_secret(crate::standard_library_conversions::oblob_from_dafny(dafny_value.SharedSecret().clone())) + .set_ciphertext_for_recipient(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextForRecipient().clone())) + .set_key_agreement_algorithm(match &**dafny_value.KeyAgreementAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_origin(match &**dafny_value.KeyOrigin() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::origin_type::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs new file mode 100644 index 000000000..8fd4a74f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_custom_key_stores_request; + + pub mod _describe_custom_key_stores_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_request.rs new file mode 100644 index 000000000..2887b3f31 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_request.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresRequest::DescribeCustomKeyStoresRequest { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + CustomKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_name), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresRequest, + > +) -> aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresInput { + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresInput::builder() + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .set_custom_key_store_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreName().clone())) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_response.rs new file mode 100644 index 000000000..c57246fe7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresResponse::DescribeCustomKeyStoresResponse { + CustomKeyStores: ::std::rc::Rc::new(match &value.custom_key_stores { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::custom_key_stores_list_entry::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeCustomKeyStoresResponse, + > +) -> aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresOutput { + aws_sdk_kms::operation::describe_custom_key_stores::DescribeCustomKeyStoresOutput::builder() + .set_custom_key_stores(match (*dafny_value.CustomKeyStores()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::custom_key_stores_list_entry::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs new file mode 100644 index 000000000..394ffa83a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::describe_key::DescribeKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::describe_key::DescribeKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::describe_key::DescribeKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::describe_key::DescribeKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::describe_key::DescribeKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _describe_key_request; + + pub mod _describe_key_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_request.rs new file mode 100644 index 000000000..2a2a67234 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_request.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::describe_key::DescribeKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyRequest::DescribeKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyRequest, + > +) -> aws_sdk_kms::operation::describe_key::DescribeKeyInput { + aws_sdk_kms::operation::describe_key::DescribeKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_response.rs new file mode 100644 index 000000000..6d15c7ce0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_response.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::describe_key::DescribeKeyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyResponse::DescribeKeyResponse { + KeyMetadata: ::std::rc::Rc::new(match &value.key_metadata { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_metadata::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DescribeKeyResponse, + > +) -> aws_sdk_kms::operation::describe_key::DescribeKeyOutput { + aws_sdk_kms::operation::describe_key::DescribeKeyOutput::builder() + .set_key_metadata(match (*dafny_value.KeyMetadata()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::key_metadata::from_dafny(value.clone())), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs new file mode 100644 index 000000000..aed6d1341 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::disable_key::DisableKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::disable_key::DisableKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key::DisableKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key::DisableKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key::DisableKeyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key::DisableKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _disable_key_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key/_disable_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key/_disable_key_request.rs new file mode 100644 index 000000000..4bdb30c6d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key/_disable_key_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::disable_key::DisableKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRequest::DisableKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRequest, + > +) -> aws_sdk_kms::operation::disable_key::DisableKeyInput { + aws_sdk_kms::operation::disable_key::DisableKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs new file mode 100644 index 000000000..bd188a1a0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _disable_key_rotation_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation/_disable_key_rotation_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation/_disable_key_rotation_request.rs new file mode 100644 index 000000000..c1f650a91 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation/_disable_key_rotation_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRotationRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRotationRequest::DisableKeyRotationRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisableKeyRotationRequest, + > +) -> aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationInput { + aws_sdk_kms::operation::disable_key_rotation::DisableKeyRotationInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs new file mode 100644 index 000000000..b94fd563e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _disconnect_custom_key_store_request; + + pub mod _disconnect_custom_key_store_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_request.rs new file mode 100644 index 000000000..61cf1da42 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreRequest::DisconnectCustomKeyStoreRequest { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreRequest, + > +) -> aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput { + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput::builder() + .set_custom_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.CustomKeyStoreId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_response.rs new file mode 100644 index 000000000..4db22e22b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreResponse::DisconnectCustomKeyStoreResponse { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::DisconnectCustomKeyStoreResponse, + > +) -> aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput { + aws_sdk_kms::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput::builder() + + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs new file mode 100644 index 000000000..d01651ac1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::enable_key::EnableKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::enable_key::EnableKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key::EnableKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key::EnableKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key::EnableKeyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key::EnableKeyError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key::EnableKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _enable_key_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key/_enable_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key/_enable_key_request.rs new file mode 100644 index 000000000..ddb49eaa4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key/_enable_key_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::enable_key::EnableKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRequest::EnableKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRequest, + > +) -> aws_sdk_kms::operation::enable_key::EnableKeyInput { + aws_sdk_kms::operation::enable_key::EnableKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs new file mode 100644 index 000000000..7a94b52ba --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _enable_key_rotation_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation/_enable_key_rotation_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation/_enable_key_rotation_request.rs new file mode 100644 index 000000000..3ee6106b8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation/_enable_key_rotation_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRotationRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRotationRequest::EnableKeyRotationRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + RotationPeriodInDays: crate::standard_library_conversions::oint_to_dafny(value.rotation_period_in_days), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EnableKeyRotationRequest, + > +) -> aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationInput { + aws_sdk_kms::operation::enable_key_rotation::EnableKeyRotationInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_rotation_period_in_days(crate::standard_library_conversions::oint_from_dafny(dafny_value.RotationPeriodInDays().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs new file mode 100644 index 000000000..a199794ee --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::encrypt::EncryptError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::encrypt::EncryptError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::encrypt::EncryptError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _encrypt_request; + + pub mod _encrypt_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs new file mode 100644 index 000000000..8bb7ea79f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs @@ -0,0 +1,81 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::encrypt::EncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptRequest::EncryptRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Plaintext: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext).Extract(), + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + EncryptionAlgorithm: ::std::rc::Rc::new(match &value.encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptRequest, + > +) -> aws_sdk_kms::operation::encrypt::EncryptInput { + aws_sdk_kms::operation::encrypt::EncryptInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_plaintext(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Plaintext().clone()))) + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_encryption_algorithm(match &**dafny_value.EncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs new file mode 100644 index 000000000..88dd60282 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::encrypt::EncryptOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptResponse::EncryptResponse { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + EncryptionAlgorithm: ::std::rc::Rc::new(match &value.encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptResponse, + > +) -> aws_sdk_kms::operation::encrypt::EncryptOutput { + aws_sdk_kms::operation::encrypt::EncryptOutput::builder() + .set_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextBlob().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_encryption_algorithm(match &**dafny_value.EncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs new file mode 100644 index 000000000..af802a8f4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::EncryptionAlgorithmSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::EncryptionAlgorithmSpec::SymmetricDefault => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::SYMMETRIC_DEFAULT {}, +aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::RSAES_OAEP_SHA_1 {}, +aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::RSAES_OAEP_SHA_256 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec, +) -> aws_sdk_kms::types::EncryptionAlgorithmSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::SYMMETRIC_DEFAULT {} => aws_sdk_kms::types::EncryptionAlgorithmSpec::SymmetricDefault, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::RSAES_OAEP_SHA_1 {} => aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec::RSAES_OAEP_SHA_256 {} => aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha256, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error.rs new file mode 100644 index 000000000..df206938d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error.rs @@ -0,0 +1,546 @@ +// 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 mod already_exists_exception; + + pub mod cloud_hsm_cluster_in_use_exception; + + pub mod cloud_hsm_cluster_invalid_configuration_exception; + + pub mod cloud_hsm_cluster_not_active_exception; + + pub mod cloud_hsm_cluster_not_found_exception; + + pub mod cloud_hsm_cluster_not_related_exception; + + pub mod conflict_exception; + + pub mod custom_key_store_has_cmks_exception; + + pub mod custom_key_store_invalid_state_exception; + + pub mod custom_key_store_name_in_use_exception; + + pub mod custom_key_store_not_found_exception; + + pub mod dependency_timeout_exception; + + pub mod disabled_exception; + + pub mod dry_run_operation_exception; + + pub mod expired_import_token_exception; + + pub mod incorrect_key_exception; + + pub mod incorrect_key_material_exception; + + pub mod incorrect_trust_anchor_exception; + + pub mod invalid_alias_name_exception; + + pub mod invalid_arn_exception; + + pub mod invalid_ciphertext_exception; + + pub mod invalid_grant_id_exception; + + pub mod invalid_grant_token_exception; + + pub mod invalid_import_token_exception; + + pub mod invalid_key_usage_exception; + + pub mod invalid_marker_exception; + + pub mod key_unavailable_exception; + + pub mod kms_internal_exception; + + pub mod kms_invalid_mac_exception; + + pub mod kms_invalid_signature_exception; + + pub mod kms_invalid_state_exception; + + pub mod limit_exceeded_exception; + + pub mod malformed_policy_document_exception; + + pub mod not_found_exception; + + pub mod tag_exception; + + pub mod unsupported_operation_exception; + + pub mod xks_key_already_in_use_exception; + + pub mod xks_key_invalid_configuration_exception; + + pub mod xks_key_not_found_exception; + + pub mod xks_proxy_incorrect_authentication_credential_exception; + + pub mod xks_proxy_invalid_configuration_exception; + + pub mod xks_proxy_invalid_response_exception; + + pub mod xks_proxy_uri_endpoint_in_use_exception; + + pub mod xks_proxy_uri_in_use_exception; + + pub mod xks_proxy_uri_unreachable_exception; + + pub mod xks_proxy_vpc_endpoint_service_in_use_exception; + + pub mod xks_proxy_vpc_endpoint_service_invalid_configuration_exception; + + pub mod xks_proxy_vpc_endpoint_service_not_found_exception; + /// Wraps up an arbitrary Rust Error value as a Dafny Error +pub fn to_opaque_error(value: String) -> + ::std::rc::Rc +{ + let error_msg = value.clone(); + let error_msg = ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&error_msg); + let error_obj: ::dafny_runtime::Object = ::dafny_runtime::Object(Some( + ::std::rc::Rc::new(::std::cell::UnsafeCell::new(value)), + )); + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::OpaqueWithText { + obj: error_obj, + objMessage: error_msg + }, + ) +} + +/// Wraps up an arbitrary Rust Error value as a Dafny Result.Failure +pub fn to_opaque_error_result(value: String) -> + ::std::rc::Rc< + crate::_Wrappers_Compile::Result< + T, + ::std::rc::Rc + > + > +{ + ::std::rc::Rc::new(crate::_Wrappers_Compile::Result::Failure { + error: to_opaque_error(value), + }) +} +pub fn to_dafny( + value: crate::deps::com_amazonaws_kms::types::error::Error, +) -> ::std::rc::Rc { + match value { + crate::deps::com_amazonaws_kms::types::error::Error::AlreadyExistsException { error } => + crate::deps::com_amazonaws_kms::conversions::error::already_exists_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterInvalidConfigurationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_invalid_configuration_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotActiveException { error } => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_active_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotFoundException { error } => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotRelatedException { error } => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_related_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::ConflictException { error } => + crate::deps::com_amazonaws_kms::conversions::error::conflict_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreHasCmKsException { error } => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_has_cmks_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreInvalidStateException { error } => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreNameInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_name_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreNotFoundException { error } => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::DependencyTimeoutException { error } => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::DisabledException { error } => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::DryRunOperationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::ExpiredImportTokenException { error } => + crate::deps::com_amazonaws_kms::conversions::error::expired_import_token_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::IncorrectKeyException { error } => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_key_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::IncorrectKeyMaterialException { error } => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_key_material_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::IncorrectTrustAnchorException { error } => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_trust_anchor_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidAliasNameException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_alias_name_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidArnException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidCiphertextException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_ciphertext_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidGrantIdException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_id_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidGrantTokenException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidImportTokenException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_import_token_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidKeyUsageException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::InvalidMarkerException { error } => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::KeyUnavailableException { error } => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::KmsInternalException { error } => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidMacException { error } => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_mac_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidSignatureException { error } => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_signature_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidStateException { error } => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::LimitExceededException { error } => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::MalformedPolicyDocumentException { error } => + crate::deps::com_amazonaws_kms::conversions::error::malformed_policy_document_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::NotFoundException { error } => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::TagException { error } => + crate::deps::com_amazonaws_kms::conversions::error::tag_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::UnsupportedOperationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksKeyAlreadyInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_already_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksKeyInvalidConfigurationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_invalid_configuration_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksKeyNotFoundException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_key_not_found_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyIncorrectAuthenticationCredentialException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_incorrect_authentication_credential_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyInvalidConfigurationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_configuration_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyInvalidResponseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_response_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriEndpointInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_endpoint_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriUnreachableException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_unreachable_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceInUseException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_in_use_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceInvalidConfigurationException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_invalid_configuration_exception::to_dafny(error), +crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceNotFoundException { error } => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_not_found_exception::to_dafny(error), + crate::deps::com_amazonaws_kms::types::error::Error::Opaque { obj } => + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }), + crate::deps::com_amazonaws_kms::types::error::Error::OpaqueWithText { obj, objMessage } => + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::OpaqueWithText { + obj: ::dafny_runtime::Object(obj.0), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&objMessage), + }), + } +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error, + >, +) -> crate::deps::com_amazonaws_kms::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::AlreadyExistsException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::AlreadyExistsException { + error: aws_sdk_kms::types::error::AlreadyExistsException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterInUseException { + error: aws_sdk_kms::types::error::CloudHsmClusterInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterInvalidConfigurationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterInvalidConfigurationException { + error: aws_sdk_kms::types::error::CloudHsmClusterInvalidConfigurationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotActiveException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotActiveException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotActiveException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotFoundException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotFoundException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotRelatedException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CloudHsmClusterNotRelatedException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotRelatedException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::ConflictException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::ConflictException { + error: aws_sdk_kms::types::error::ConflictException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreHasCMKsException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreHasCmKsException { + error: aws_sdk_kms::types::error::CustomKeyStoreHasCmKsException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreInvalidStateException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreInvalidStateException { + error: aws_sdk_kms::types::error::CustomKeyStoreInvalidStateException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreNameInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreNameInUseException { + error: aws_sdk_kms::types::error::CustomKeyStoreNameInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreNotFoundException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::CustomKeyStoreNotFoundException { + error: aws_sdk_kms::types::error::CustomKeyStoreNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DependencyTimeoutException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::DependencyTimeoutException { + error: aws_sdk_kms::types::error::DependencyTimeoutException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DisabledException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::DisabledException { + error: aws_sdk_kms::types::error::DisabledException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DryRunOperationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::DryRunOperationException { + error: aws_sdk_kms::types::error::DryRunOperationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::ExpiredImportTokenException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::ExpiredImportTokenException { + error: aws_sdk_kms::types::error::ExpiredImportTokenException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectKeyException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::IncorrectKeyException { + error: aws_sdk_kms::types::error::IncorrectKeyException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectKeyMaterialException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::IncorrectKeyMaterialException { + error: aws_sdk_kms::types::error::IncorrectKeyMaterialException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectTrustAnchorException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::IncorrectTrustAnchorException { + error: aws_sdk_kms::types::error::IncorrectTrustAnchorException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidAliasNameException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidAliasNameException { + error: aws_sdk_kms::types::error::InvalidAliasNameException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidArnException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidArnException { + error: aws_sdk_kms::types::error::InvalidArnException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidCiphertextException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidCiphertextException { + error: aws_sdk_kms::types::error::InvalidCiphertextException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidGrantIdException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidGrantIdException { + error: aws_sdk_kms::types::error::InvalidGrantIdException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidGrantTokenException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidGrantTokenException { + error: aws_sdk_kms::types::error::InvalidGrantTokenException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidImportTokenException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidImportTokenException { + error: aws_sdk_kms::types::error::InvalidImportTokenException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidKeyUsageException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidKeyUsageException { + error: aws_sdk_kms::types::error::InvalidKeyUsageException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidMarkerException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::InvalidMarkerException { + error: aws_sdk_kms::types::error::InvalidMarkerException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KeyUnavailableException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::KeyUnavailableException { + error: aws_sdk_kms::types::error::KeyUnavailableException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInternalException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::KmsInternalException { + error: aws_sdk_kms::types::error::KmsInternalException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidMacException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidMacException { + error: aws_sdk_kms::types::error::KmsInvalidMacException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidSignatureException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidSignatureException { + error: aws_sdk_kms::types::error::KmsInvalidSignatureException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidStateException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::KmsInvalidStateException { + error: aws_sdk_kms::types::error::KmsInvalidStateException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::LimitExceededException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::LimitExceededException { + error: aws_sdk_kms::types::error::LimitExceededException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::MalformedPolicyDocumentException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::MalformedPolicyDocumentException { + error: aws_sdk_kms::types::error::MalformedPolicyDocumentException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::NotFoundException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::NotFoundException { + error: aws_sdk_kms::types::error::NotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::TagException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::TagException { + error: aws_sdk_kms::types::error::TagException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::UnsupportedOperationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::UnsupportedOperationException { + error: aws_sdk_kms::types::error::UnsupportedOperationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyAlreadyInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksKeyAlreadyInUseException { + error: aws_sdk_kms::types::error::XksKeyAlreadyInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyInvalidConfigurationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksKeyInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksKeyInvalidConfigurationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyNotFoundException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksKeyNotFoundException { + error: aws_sdk_kms::types::error::XksKeyNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyIncorrectAuthenticationCredentialException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyIncorrectAuthenticationCredentialException { + error: aws_sdk_kms::types::error::XksProxyIncorrectAuthenticationCredentialException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyInvalidConfigurationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksProxyInvalidConfigurationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyInvalidResponseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyInvalidResponseException { + error: aws_sdk_kms::types::error::XksProxyInvalidResponseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriEndpointInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriEndpointInUseException { + error: aws_sdk_kms::types::error::XksProxyUriEndpointInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriInUseException { + error: aws_sdk_kms::types::error::XksProxyUriInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriUnreachableException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyUriUnreachableException { + error: aws_sdk_kms::types::error::XksProxyUriUnreachableException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceInUseException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceInUseException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInUseException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceInvalidConfigurationException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceNotFoundException { message, .. } => + crate::deps::com_amazonaws_kms::types::error::Error::XksProxyVpcEndpointServiceNotFoundException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceNotFoundException::builder() + .set_message(crate::standard_library_conversions::ostring_from_dafny(message.clone())) + .build() + }, + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::Opaque { obj } => + crate::deps::com_amazonaws_kms::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + crate::deps::com_amazonaws_kms::types::error::Error::OpaqueWithText { + obj: obj.clone(), + objMessage: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&objMessage), + }, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs new file mode 100644 index 000000000..321291f5e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::AlreadyExistsException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::AlreadyExistsException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_in_use_exception.rs new file mode 100644 index 000000000..94b40d900 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CloudHsmClusterInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_invalid_configuration_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_invalid_configuration_exception.rs new file mode 100644 index 000000000..de5b12b77 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_invalid_configuration_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CloudHsmClusterInvalidConfigurationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterInvalidConfigurationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_active_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_active_exception.rs new file mode 100644 index 000000000..c77eeb82f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_active_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CloudHsmClusterNotActiveException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotActiveException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_found_exception.rs new file mode 100644 index 000000000..216016e47 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CloudHsmClusterNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_related_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_related_exception.rs new file mode 100644 index 000000000..b7c15d711 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_related_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CloudHsmClusterNotRelatedException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CloudHsmClusterNotRelatedException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs new file mode 100644 index 000000000..ccabd8933 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::ConflictException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::ConflictException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_has_cmks_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_has_cmks_exception.rs new file mode 100644 index 000000000..bac4c159e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_has_cmks_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CustomKeyStoreHasCmKsException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreHasCMKsException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_invalid_state_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_invalid_state_exception.rs new file mode 100644 index 000000000..5a115e220 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_invalid_state_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CustomKeyStoreInvalidStateException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreInvalidStateException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_name_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_name_in_use_exception.rs new file mode 100644 index 000000000..4b9e27bb7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_name_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CustomKeyStoreNameInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreNameInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_not_found_exception.rs new file mode 100644 index 000000000..a0c3c24cc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::CustomKeyStoreNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::CustomKeyStoreNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs new file mode 100644 index 000000000..cdf27efe1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::DependencyTimeoutException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DependencyTimeoutException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs new file mode 100644 index 000000000..e0349cce5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::DisabledException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DisabledException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dry_run_operation_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dry_run_operation_exception.rs new file mode 100644 index 000000000..ead5d5f28 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/dry_run_operation_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::DryRunOperationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::DryRunOperationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/expired_import_token_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/expired_import_token_exception.rs new file mode 100644 index 000000000..e31562d2c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/expired_import_token_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::ExpiredImportTokenException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::ExpiredImportTokenException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs new file mode 100644 index 000000000..081c111ee --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::IncorrectKeyException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectKeyException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_material_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_material_exception.rs new file mode 100644 index 000000000..b19eebab9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_material_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::IncorrectKeyMaterialException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectKeyMaterialException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_trust_anchor_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_trust_anchor_exception.rs new file mode 100644 index 000000000..689e86c8f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_trust_anchor_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::IncorrectTrustAnchorException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::IncorrectTrustAnchorException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_alias_name_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_alias_name_exception.rs new file mode 100644 index 000000000..00f3e0ab7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_alias_name_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidAliasNameException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidAliasNameException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs new file mode 100644 index 000000000..ff03c1b2b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidArnException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidArnException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs new file mode 100644 index 000000000..af0615254 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidCiphertextException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidCiphertextException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_id_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_id_exception.rs new file mode 100644 index 000000000..c3b4d75bf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_id_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidGrantIdException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidGrantIdException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_token_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_token_exception.rs new file mode 100644 index 000000000..65e592592 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_token_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidGrantTokenException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidGrantTokenException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_import_token_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_import_token_exception.rs new file mode 100644 index 000000000..a62176399 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_import_token_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidImportTokenException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidImportTokenException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_key_usage_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_key_usage_exception.rs new file mode 100644 index 000000000..c992973d1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_key_usage_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidKeyUsageException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidKeyUsageException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs new file mode 100644 index 000000000..3283970aa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::InvalidMarkerException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::InvalidMarkerException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs new file mode 100644 index 000000000..5b9d52a4f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::KeyUnavailableException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KeyUnavailableException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs new file mode 100644 index 000000000..fae7573f9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::KmsInternalException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInternalException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_mac_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_mac_exception.rs new file mode 100644 index 000000000..11677fe1e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_mac_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::KmsInvalidMacException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidMacException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_signature_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_signature_exception.rs new file mode 100644 index 000000000..2be4dbf16 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_signature_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::KmsInvalidSignatureException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidSignatureException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_state_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_state_exception.rs new file mode 100644 index 000000000..5e63d1f6e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_state_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::KmsInvalidStateException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::KMSInvalidStateException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs new file mode 100644 index 000000000..570989ad5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::LimitExceededException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::LimitExceededException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/malformed_policy_document_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/malformed_policy_document_exception.rs new file mode 100644 index 000000000..4bcae6cf9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/malformed_policy_document_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::MalformedPolicyDocumentException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::MalformedPolicyDocumentException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs new file mode 100644 index 000000000..d5cf1dfc3 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::NotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::NotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs new file mode 100644 index 000000000..7ca252883 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::TagException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::TagException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs new file mode 100644 index 000000000..32ebc9435 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::UnsupportedOperationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::UnsupportedOperationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_already_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_already_in_use_exception.rs new file mode 100644 index 000000000..b7cf88f13 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_already_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksKeyAlreadyInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyAlreadyInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_invalid_configuration_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_invalid_configuration_exception.rs new file mode 100644 index 000000000..53626b251 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_invalid_configuration_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksKeyInvalidConfigurationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyInvalidConfigurationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_not_found_exception.rs new file mode 100644 index 000000000..bdccc18ff --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksKeyNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksKeyNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_incorrect_authentication_credential_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_incorrect_authentication_credential_exception.rs new file mode 100644 index 000000000..dc7f8612b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_incorrect_authentication_credential_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyIncorrectAuthenticationCredentialException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyIncorrectAuthenticationCredentialException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_configuration_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_configuration_exception.rs new file mode 100644 index 000000000..ae78cdda6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_configuration_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyInvalidConfigurationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyInvalidConfigurationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_response_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_response_exception.rs new file mode 100644 index 000000000..952fa4a69 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_response_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyInvalidResponseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyInvalidResponseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_endpoint_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_endpoint_in_use_exception.rs new file mode 100644 index 000000000..de7296d8a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_endpoint_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyUriEndpointInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriEndpointInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_in_use_exception.rs new file mode 100644 index 000000000..28f8c5ab5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyUriInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_unreachable_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_unreachable_exception.rs new file mode 100644 index 000000000..feeb64d57 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_unreachable_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyUriUnreachableException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyUriUnreachableException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_in_use_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_in_use_exception.rs new file mode 100644 index 000000000..0991ac9a1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_in_use_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInUseException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceInUseException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_invalid_configuration_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_invalid_configuration_exception.rs new file mode 100644 index 000000000..814f4cb76 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_invalid_configuration_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceInvalidConfigurationException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_not_found_exception.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_not_found_exception.rs new file mode 100644 index 000000000..40b598ff4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_not_found_exception.rs @@ -0,0 +1,13 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceNotFoundException, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Error::XksProxyVpcEndpointServiceNotFoundException { + message: crate::standard_library_conversions::ostring_to_dafny(&value.message), + } + ) +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs new file mode 100644 index 000000000..5e671bac6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::ExpirationModelType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::ExpirationModelType::KeyMaterialExpires => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ExpirationModelType::KEY_MATERIAL_EXPIRES {}, +aws_sdk_kms::types::ExpirationModelType::KeyMaterialDoesNotExpire => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ExpirationModelType::KEY_MATERIAL_DOES_NOT_EXPIRE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ExpirationModelType, +) -> aws_sdk_kms::types::ExpirationModelType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ExpirationModelType::KEY_MATERIAL_EXPIRES {} => aws_sdk_kms::types::ExpirationModelType::KeyMaterialExpires, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ExpirationModelType::KEY_MATERIAL_DOES_NOT_EXPIRE {} => aws_sdk_kms::types::ExpirationModelType::KeyMaterialDoesNotExpire, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs new file mode 100644 index 000000000..c46078506 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_data_key_request; + + pub mod _generate_data_key_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_request.rs new file mode 100644 index 000000000..d7f232aaf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_request.rs @@ -0,0 +1,92 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key::GenerateDataKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyRequest::GenerateDataKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NumberOfBytes: crate::standard_library_conversions::oint_to_dafny(value.number_of_bytes), + KeySpec: ::std::rc::Rc::new(match &value.key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::data_key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Recipient: ::std::rc::Rc::new(match &value.recipient { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::recipient_info::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyRequest, + > +) -> aws_sdk_kms::operation::generate_data_key::GenerateDataKeyInput { + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_number_of_bytes(crate::standard_library_conversions::oint_from_dafny(dafny_value.NumberOfBytes().clone())) + .set_key_spec(match &**dafny_value.KeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::data_key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_recipient(match (*dafny_value.Recipient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::recipient_info::from_dafny(value.clone())), + _ => None, +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_response.rs new file mode 100644 index 000000000..bdd632322 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_response.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key::GenerateDataKeyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyResponse::GenerateDataKeyResponse { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob), + Plaintext: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + CiphertextForRecipient: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_for_recipient), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyResponse, + > +) -> aws_sdk_kms::operation::generate_data_key::GenerateDataKeyOutput { + aws_sdk_kms::operation::generate_data_key::GenerateDataKeyOutput::builder() + .set_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextBlob().clone())) + .set_plaintext(crate::standard_library_conversions::oblob_from_dafny(dafny_value.Plaintext().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_ciphertext_for_recipient(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextForRecipient().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs new file mode 100644 index 000000000..426c42178 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_data_key_pair_request; + + pub mod _generate_data_key_pair_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_request.rs new file mode 100644 index 000000000..977ff78ab --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_request.rs @@ -0,0 +1,80 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairRequest::GenerateDataKeyPairRequest { + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + KeyPairSpec: crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::to_dafny(value.key_pair_spec.clone().unwrap()), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Recipient: ::std::rc::Rc::new(match &value.recipient { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::recipient_info::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairRequest, + > +) -> aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairInput { + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairInput::builder() + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_key_pair_spec(Some( crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::from_dafny(dafny_value.KeyPairSpec()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_recipient(match (*dafny_value.Recipient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::recipient_info::from_dafny(value.clone())), + _ => None, +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_response.rs new file mode 100644 index 000000000..f6ccb08a8 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_response.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairResponse::GenerateDataKeyPairResponse { + PrivateKeyCiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.private_key_ciphertext_blob), + PrivateKeyPlaintext: crate::standard_library_conversions::oblob_to_dafny(&value.private_key_plaintext), + PublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + KeyPairSpec: ::std::rc::Rc::new(match &value.key_pair_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CiphertextForRecipient: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_for_recipient), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairResponse, + > +) -> aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairOutput { + aws_sdk_kms::operation::generate_data_key_pair::GenerateDataKeyPairOutput::builder() + .set_private_key_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PrivateKeyCiphertextBlob().clone())) + .set_private_key_plaintext(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PrivateKeyPlaintext().clone())) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PublicKey().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_key_pair_spec(match &**dafny_value.KeyPairSpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::from_dafny(value) + ), + _ => None, +} +) + .set_ciphertext_for_recipient(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextForRecipient().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext.rs new file mode 100644 index 000000000..afec62790 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_data_key_pair_without_plaintext_request; + + pub mod _generate_data_key_pair_without_plaintext_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_request.rs new file mode 100644 index 000000000..f2932bd59 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_request.rs @@ -0,0 +1,69 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextRequest::GenerateDataKeyPairWithoutPlaintextRequest { + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + KeyPairSpec: crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::to_dafny(value.key_pair_spec.clone().unwrap()), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextRequest, + > +) -> aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextInput { + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextInput::builder() + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_key_pair_spec(Some( crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::from_dafny(dafny_value.KeyPairSpec()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_response.rs new file mode 100644 index 000000000..a2b6c21ad --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_response.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextResponse::GenerateDataKeyPairWithoutPlaintextResponse { + PrivateKeyCiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.private_key_ciphertext_blob), + PublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + KeyPairSpec: ::std::rc::Rc::new(match &value.key_pair_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyPairWithoutPlaintextResponse, + > +) -> aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextOutput { + aws_sdk_kms::operation::generate_data_key_pair_without_plaintext::GenerateDataKeyPairWithoutPlaintextOutput::builder() + .set_private_key_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PrivateKeyCiphertextBlob().clone())) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PublicKey().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_key_pair_spec(match &**dafny_value.KeyPairSpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::data_key_pair_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext.rs new file mode 100644 index 000000000..967606c4c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_data_key_without_plaintext_request; + + pub mod _generate_data_key_without_plaintext_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_request.rs new file mode 100644 index 000000000..6439e8349 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_request.rs @@ -0,0 +1,81 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextRequest::GenerateDataKeyWithoutPlaintextRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + EncryptionContext: +::std::rc::Rc::new(match &value.encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeySpec: ::std::rc::Rc::new(match &value.key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::data_key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + NumberOfBytes: crate::standard_library_conversions::oint_to_dafny(value.number_of_bytes), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextRequest, + > +) -> aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextInput { + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_encryption_context(match (*dafny_value.EncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_key_spec(match &**dafny_value.KeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::data_key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_number_of_bytes(crate::standard_library_conversions::oint_from_dafny(dafny_value.NumberOfBytes().clone())) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_response.rs new file mode 100644 index 000000000..821f0b031 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextResponse::GenerateDataKeyWithoutPlaintextResponse { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateDataKeyWithoutPlaintextResponse, + > +) -> aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextOutput { + aws_sdk_kms::operation::generate_data_key_without_plaintext::GenerateDataKeyWithoutPlaintextOutput::builder() + .set_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextBlob().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs new file mode 100644 index 000000000..286db3f8b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_mac::GenerateMacError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_mac::GenerateMacError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_mac::GenerateMacError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_mac_request; + + pub mod _generate_mac_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_request.rs new file mode 100644 index 000000000..f5dda65b6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_request.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_mac::GenerateMacInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacRequest::GenerateMacRequest { + Message: crate::standard_library_conversions::oblob_to_dafny(&value.message).Extract(), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + MacAlgorithm: crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::to_dafny(value.mac_algorithm.clone().unwrap()), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacRequest, + > +) -> aws_sdk_kms::operation::generate_mac::GenerateMacInput { + aws_sdk_kms::operation::generate_mac::GenerateMacInput::builder() + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Message().clone()))) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_mac_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::from_dafny(dafny_value.MacAlgorithm()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_response.rs new file mode 100644 index 000000000..cc3a9f474 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_mac::GenerateMacOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacResponse::GenerateMacResponse { + Mac: crate::standard_library_conversions::oblob_to_dafny(&value.mac), + MacAlgorithm: ::std::rc::Rc::new(match &value.mac_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateMacResponse, + > +) -> aws_sdk_kms::operation::generate_mac::GenerateMacOutput { + aws_sdk_kms::operation::generate_mac::GenerateMacOutput::builder() + .set_mac(crate::standard_library_conversions::oblob_from_dafny(dafny_value.Mac().clone())) + .set_mac_algorithm(match &**dafny_value.MacAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs new file mode 100644 index 000000000..4dc3e6b58 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::generate_random::GenerateRandomError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::generate_random::GenerateRandomError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_random::GenerateRandomError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_random::GenerateRandomError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_random::GenerateRandomError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::generate_random::GenerateRandomError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _generate_random_request; + + pub mod _generate_random_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_request.rs new file mode 100644 index 000000000..376c49c8e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_request.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_random::GenerateRandomInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomRequest::GenerateRandomRequest { + NumberOfBytes: crate::standard_library_conversions::oint_to_dafny(value.number_of_bytes), + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + Recipient: ::std::rc::Rc::new(match &value.recipient { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::recipient_info::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomRequest, + > +) -> aws_sdk_kms::operation::generate_random::GenerateRandomInput { + aws_sdk_kms::operation::generate_random::GenerateRandomInput::builder() + .set_number_of_bytes(crate::standard_library_conversions::oint_from_dafny(dafny_value.NumberOfBytes().clone())) + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .set_recipient(match (*dafny_value.Recipient()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::recipient_info::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_response.rs new file mode 100644 index 000000000..8f175516b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::generate_random::GenerateRandomOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomResponse::GenerateRandomResponse { + Plaintext: crate::standard_library_conversions::oblob_to_dafny(&value.plaintext), + CiphertextForRecipient: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_for_recipient), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GenerateRandomResponse, + > +) -> aws_sdk_kms::operation::generate_random::GenerateRandomOutput { + aws_sdk_kms::operation::generate_random::GenerateRandomOutput::builder() + .set_plaintext(crate::standard_library_conversions::oblob_from_dafny(dafny_value.Plaintext().clone())) + .set_ciphertext_for_recipient(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextForRecipient().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs new file mode 100644 index 000000000..5f0eaa606 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_key_policy_request; + + pub mod _get_key_policy_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_request.rs new file mode 100644 index 000000000..0daa77faf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_key_policy::GetKeyPolicyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyRequest::GetKeyPolicyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + PolicyName: crate::standard_library_conversions::ostring_to_dafny(&value.policy_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyRequest, + > +) -> aws_sdk_kms::operation::get_key_policy::GetKeyPolicyInput { + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_policy_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.PolicyName().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_response.rs new file mode 100644 index 000000000..924fb2c96 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_response.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_key_policy::GetKeyPolicyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyResponse::GetKeyPolicyResponse { + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy), + PolicyName: crate::standard_library_conversions::ostring_to_dafny(&value.policy_name), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyPolicyResponse, + > +) -> aws_sdk_kms::operation::get_key_policy::GetKeyPolicyOutput { + aws_sdk_kms::operation::get_key_policy::GetKeyPolicyOutput::builder() + .set_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Policy().clone())) + .set_policy_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.PolicyName().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs new file mode 100644 index 000000000..212961635 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_key_rotation_status_request; + + pub mod _get_key_rotation_status_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_request.rs new file mode 100644 index 000000000..277e16fdc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusRequest::GetKeyRotationStatusRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusRequest, + > +) -> aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusInput { + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_response.rs new file mode 100644 index 000000000..626ea7c26 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_response.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusResponse::GetKeyRotationStatusResponse { + KeyRotationEnabled: crate::standard_library_conversions::obool_to_dafny(&Some(value.key_rotation_enabled)), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + RotationPeriodInDays: crate::standard_library_conversions::oint_to_dafny(value.rotation_period_in_days), + NextRotationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.next_rotation_date), + OnDemandRotationStartDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.on_demand_rotation_start_date), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetKeyRotationStatusResponse, + > +) -> aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusOutput { + aws_sdk_kms::operation::get_key_rotation_status::GetKeyRotationStatusOutput::builder() + .set_key_rotation_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.KeyRotationEnabled().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_rotation_period_in_days(crate::standard_library_conversions::oint_from_dafny(dafny_value.RotationPeriodInDays().clone())) + .set_next_rotation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.NextRotationDate().clone())) + .set_on_demand_rotation_start_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.OnDemandRotationStartDate().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs new file mode 100644 index 000000000..6d8912dde --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_parameters_for_import_request; + + pub mod _get_parameters_for_import_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_request.rs new file mode 100644 index 000000000..fd84608b2 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportRequest::GetParametersForImportRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + WrappingAlgorithm: crate::deps::com_amazonaws_kms::conversions::algorithm_spec::to_dafny(value.wrapping_algorithm.clone().unwrap()), + WrappingKeySpec: crate::deps::com_amazonaws_kms::conversions::wrapping_key_spec::to_dafny(value.wrapping_key_spec.clone().unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportRequest, + > +) -> aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportInput { + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_wrapping_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::algorithm_spec::from_dafny(dafny_value.WrappingAlgorithm()) )) + .set_wrapping_key_spec(Some( crate::deps::com_amazonaws_kms::conversions::wrapping_key_spec::from_dafny(dafny_value.WrappingKeySpec()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_response.rs new file mode 100644 index 000000000..871ef4534 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_response.rs @@ -0,0 +1,31 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportResponse::GetParametersForImportResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + ImportToken: crate::standard_library_conversions::oblob_to_dafny(&value.import_token), + PublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + ParametersValidTo: crate::standard_library_conversions::otimestamp_to_dafny(&value.parameters_valid_to), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetParametersForImportResponse, + > +) -> aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportOutput { + aws_sdk_kms::operation::get_parameters_for_import::GetParametersForImportOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_import_token(crate::standard_library_conversions::oblob_from_dafny(dafny_value.ImportToken().clone())) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PublicKey().clone())) + .set_parameters_valid_to(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ParametersValidTo().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs new file mode 100644 index 000000000..d67348c1e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::get_public_key::GetPublicKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::get_public_key::GetPublicKeyError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _get_public_key_request; + + pub mod _get_public_key_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_request.rs new file mode 100644 index 000000000..b81021170 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_request.rs @@ -0,0 +1,43 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_public_key::GetPublicKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyRequest::GetPublicKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyRequest, + > +) -> aws_sdk_kms::operation::get_public_key::GetPublicKeyInput { + aws_sdk_kms::operation::get_public_key::GetPublicKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_response.rs new file mode 100644 index 000000000..2953dacbd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_response.rs @@ -0,0 +1,120 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::get_public_key::GetPublicKeyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyResponse::GetPublicKeyResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + PublicKey: crate::standard_library_conversions::oblob_to_dafny(&value.public_key), + CustomerMasterKeySpec: ::std::rc::Rc::new(match &value.customer_master_key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeySpec: ::std::rc::Rc::new(match &value.key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeyUsage: ::std::rc::Rc::new(match &value.key_usage { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_usage_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + EncryptionAlgorithms: ::std::rc::Rc::new(match &value.encryption_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SigningAlgorithms: ::std::rc::Rc::new(match &value.signing_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeyAgreementAlgorithms: ::std::rc::Rc::new(match &value.key_agreement_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GetPublicKeyResponse, + > +) -> aws_sdk_kms::operation::get_public_key::GetPublicKeyOutput { + aws_sdk_kms::operation::get_public_key::GetPublicKeyOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_public_key(crate::standard_library_conversions::oblob_from_dafny(dafny_value.PublicKey().clone())) + .set_customer_master_key_spec(match &**dafny_value.CustomerMasterKeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_spec(match &**dafny_value.KeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_usage(match &**dafny_value.KeyUsage() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_usage_type::from_dafny(value) + ), + _ => None, +} +) + .set_encryption_algorithms(match (*dafny_value.EncryptionAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_signing_algorithms(match (*dafny_value.SigningAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_key_agreement_algorithms(match (*dafny_value.KeyAgreementAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs new file mode 100644 index 000000000..035eefa8a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::GrantConstraints, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantConstraints::GrantConstraints { + EncryptionContextSubset: +::std::rc::Rc::new(match &value.encryption_context_subset { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + EncryptionContextEquals: +::std::rc::Rc::new(match &value.encryption_context_equals { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantConstraints, + >, +) -> aws_sdk_kms::types::GrantConstraints { + aws_sdk_kms::types::GrantConstraints::builder() + .set_encryption_context_subset(match (*dafny_value.EncryptionContextSubset()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_encryption_context_equals(match (*dafny_value.EncryptionContextEquals()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs new file mode 100644 index 000000000..03a67a18a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::GrantListEntry, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantListEntry::GrantListEntry { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + GrantId: crate::standard_library_conversions::ostring_to_dafny(&value.grant_id), + Name: crate::standard_library_conversions::ostring_to_dafny(&value.name), + CreationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date), + GranteePrincipal: crate::standard_library_conversions::ostring_to_dafny(&value.grantee_principal), + RetiringPrincipal: crate::standard_library_conversions::ostring_to_dafny(&value.retiring_principal), + IssuingAccount: crate::standard_library_conversions::ostring_to_dafny(&value.issuing_account), + Operations: ::std::rc::Rc::new(match &value.operations { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::grant_operation::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + Constraints: ::std::rc::Rc::new(match &value.constraints { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::grant_constraints::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantListEntry, + >, +) -> aws_sdk_kms::types::GrantListEntry { + aws_sdk_kms::types::GrantListEntry::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_grant_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantId().clone())) + .set_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Name().clone())) + .set_creation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDate().clone())) + .set_grantee_principal(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GranteePrincipal().clone())) + .set_retiring_principal(crate::standard_library_conversions::ostring_from_dafny(dafny_value.RetiringPrincipal().clone())) + .set_issuing_account(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IssuingAccount().clone())) + .set_operations(match (*dafny_value.Operations()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::grant_operation::from_dafny(e), + ) + ), + _ => None +} +) + .set_constraints(match (*dafny_value.Constraints()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::grant_constraints::from_dafny(value.clone())), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs new file mode 100644 index 000000000..4ea909ccf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs @@ -0,0 +1,53 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::GrantOperation, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::GrantOperation::Decrypt => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Decrypt {}, +aws_sdk_kms::types::GrantOperation::Encrypt => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Encrypt {}, +aws_sdk_kms::types::GrantOperation::GenerateDataKey => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKey {}, +aws_sdk_kms::types::GrantOperation::GenerateDataKeyWithoutPlaintext => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyWithoutPlaintext {}, +aws_sdk_kms::types::GrantOperation::ReEncryptFrom => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::ReEncryptFrom {}, +aws_sdk_kms::types::GrantOperation::ReEncryptTo => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::ReEncryptTo {}, +aws_sdk_kms::types::GrantOperation::Sign => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Sign {}, +aws_sdk_kms::types::GrantOperation::Verify => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Verify {}, +aws_sdk_kms::types::GrantOperation::GetPublicKey => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GetPublicKey {}, +aws_sdk_kms::types::GrantOperation::CreateGrant => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::CreateGrant {}, +aws_sdk_kms::types::GrantOperation::RetireGrant => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::RetireGrant {}, +aws_sdk_kms::types::GrantOperation::DescribeKey => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::DescribeKey {}, +aws_sdk_kms::types::GrantOperation::GenerateDataKeyPair => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyPair {}, +aws_sdk_kms::types::GrantOperation::GenerateDataKeyPairWithoutPlaintext => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyPairWithoutPlaintext {}, +aws_sdk_kms::types::GrantOperation::GenerateMac => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateMac {}, +aws_sdk_kms::types::GrantOperation::VerifyMac => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::VerifyMac {}, +aws_sdk_kms::types::GrantOperation::DeriveSharedSecret => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::DeriveSharedSecret {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation, +) -> aws_sdk_kms::types::GrantOperation { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Decrypt {} => aws_sdk_kms::types::GrantOperation::Decrypt, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Encrypt {} => aws_sdk_kms::types::GrantOperation::Encrypt, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKey {} => aws_sdk_kms::types::GrantOperation::GenerateDataKey, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyWithoutPlaintext {} => aws_sdk_kms::types::GrantOperation::GenerateDataKeyWithoutPlaintext, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::ReEncryptFrom {} => aws_sdk_kms::types::GrantOperation::ReEncryptFrom, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::ReEncryptTo {} => aws_sdk_kms::types::GrantOperation::ReEncryptTo, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Sign {} => aws_sdk_kms::types::GrantOperation::Sign, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::Verify {} => aws_sdk_kms::types::GrantOperation::Verify, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GetPublicKey {} => aws_sdk_kms::types::GrantOperation::GetPublicKey, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::CreateGrant {} => aws_sdk_kms::types::GrantOperation::CreateGrant, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::RetireGrant {} => aws_sdk_kms::types::GrantOperation::RetireGrant, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::DescribeKey {} => aws_sdk_kms::types::GrantOperation::DescribeKey, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyPair {} => aws_sdk_kms::types::GrantOperation::GenerateDataKeyPair, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateDataKeyPairWithoutPlaintext {} => aws_sdk_kms::types::GrantOperation::GenerateDataKeyPairWithoutPlaintext, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::GenerateMac {} => aws_sdk_kms::types::GrantOperation::GenerateMac, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::VerifyMac {} => aws_sdk_kms::types::GrantOperation::VerifyMac, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::GrantOperation::DeriveSharedSecret {} => aws_sdk_kms::types::GrantOperation::DeriveSharedSecret, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs new file mode 100644 index 000000000..a1296a4ca --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::ExpiredImportTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::expired_import_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::IncorrectKeyMaterialException(e) => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_key_material_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::InvalidCiphertextException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_ciphertext_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::InvalidImportTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_import_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _import_key_material_request; + + pub mod _import_key_material_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_request.rs new file mode 100644 index 000000000..f3bb06096 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_request.rs @@ -0,0 +1,42 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::import_key_material::ImportKeyMaterialInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialRequest::ImportKeyMaterialRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + ImportToken: crate::standard_library_conversions::oblob_to_dafny(&value.import_token).Extract(), + EncryptedKeyMaterial: crate::standard_library_conversions::oblob_to_dafny(&value.encrypted_key_material).Extract(), + ValidTo: crate::standard_library_conversions::otimestamp_to_dafny(&value.valid_to), + ExpirationModel: ::std::rc::Rc::new(match &value.expiration_model { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::expiration_model_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialRequest, + > +) -> aws_sdk_kms::operation::import_key_material::ImportKeyMaterialInput { + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_import_token(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.ImportToken().clone()))) + .set_encrypted_key_material(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.EncryptedKeyMaterial().clone()))) + .set_valid_to(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ValidTo().clone())) + .set_expiration_model(match &**dafny_value.ExpirationModel() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::expiration_model_type::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_response.rs new file mode 100644 index 000000000..24608dae1 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::import_key_material::ImportKeyMaterialOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialResponse::ImportKeyMaterialResponse { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ImportKeyMaterialResponse, + > +) -> aws_sdk_kms::operation::import_key_material::ImportKeyMaterialOutput { + aws_sdk_kms::operation::import_key_material::ImportKeyMaterialOutput::builder() + + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs new file mode 100644 index 000000000..1693266ff --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs @@ -0,0 +1,21 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeyAgreementAlgorithmSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeyAgreementAlgorithmSpec::Ecdh => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyAgreementAlgorithmSpec::ECDH {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyAgreementAlgorithmSpec, +) -> aws_sdk_kms::types::KeyAgreementAlgorithmSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyAgreementAlgorithmSpec::ECDH {} => aws_sdk_kms::types::KeyAgreementAlgorithmSpec::Ecdh, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs new file mode 100644 index 000000000..80c4b4d9b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs @@ -0,0 +1,21 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeyEncryptionMechanism, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeyEncryptionMechanism::RsaesOaepSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyEncryptionMechanism::RSAES_OAEP_SHA_256 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyEncryptionMechanism, +) -> aws_sdk_kms::types::KeyEncryptionMechanism { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyEncryptionMechanism::RSAES_OAEP_SHA_256 {} => aws_sdk_kms::types::KeyEncryptionMechanism::RsaesOaepSha256, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs new file mode 100644 index 000000000..3cf21af3d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::KeyListEntry, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyListEntry::KeyListEntry { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + KeyArn: crate::standard_library_conversions::ostring_to_dafny(&value.key_arn), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyListEntry, + >, +) -> aws_sdk_kms::types::KeyListEntry { + aws_sdk_kms::types::KeyListEntry::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_key_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyArn().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs new file mode 100644 index 000000000..59667f764 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeyManagerType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeyManagerType::Aws => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyManagerType::AWS {}, +aws_sdk_kms::types::KeyManagerType::Customer => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyManagerType::CUSTOMER {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyManagerType, +) -> aws_sdk_kms::types::KeyManagerType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyManagerType::AWS {} => aws_sdk_kms::types::KeyManagerType::Aws, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyManagerType::CUSTOMER {} => aws_sdk_kms::types::KeyManagerType::Customer, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs new file mode 100644 index 000000000..ce5ae5107 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs @@ -0,0 +1,227 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::KeyMetadata, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyMetadata::KeyMetadata { + AWSAccountId: crate::standard_library_conversions::ostring_to_dafny(&value.aws_account_id), + KeyId: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.key_id), + Arn: crate::standard_library_conversions::ostring_to_dafny(&value.arn), + CreationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.creation_date), + Enabled: crate::standard_library_conversions::obool_to_dafny(&Some(value.enabled)), + Description: crate::standard_library_conversions::ostring_to_dafny(&value.description), + KeyUsage: ::std::rc::Rc::new(match &value.key_usage { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_usage_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeyState: ::std::rc::Rc::new(match &value.key_state { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_state::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DeletionDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.deletion_date), + ValidTo: crate::standard_library_conversions::otimestamp_to_dafny(&value.valid_to), + Origin: ::std::rc::Rc::new(match &value.origin { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::origin_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id), + CloudHsmClusterId: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_hsm_cluster_id), + ExpirationModel: ::std::rc::Rc::new(match &value.expiration_model { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::expiration_model_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeyManager: ::std::rc::Rc::new(match &value.key_manager { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_manager_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + CustomerMasterKeySpec: ::std::rc::Rc::new(match &value.customer_master_key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + KeySpec: ::std::rc::Rc::new(match &value.key_spec { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + EncryptionAlgorithms: ::std::rc::Rc::new(match &value.encryption_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SigningAlgorithms: ::std::rc::Rc::new(match &value.signing_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + KeyAgreementAlgorithms: ::std::rc::Rc::new(match &value.key_agreement_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + MultiRegion: crate::standard_library_conversions::obool_to_dafny(&value.multi_region), + MultiRegionConfiguration: ::std::rc::Rc::new(match &value.multi_region_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::multi_region_configuration::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + PendingDeletionWindowInDays: crate::standard_library_conversions::oint_to_dafny(value.pending_deletion_window_in_days), + MacAlgorithms: ::std::rc::Rc::new(match &value.mac_algorithms { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::to_dafny(e.clone()), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + XksKeyConfiguration: ::std::rc::Rc::new(match &value.xks_key_configuration { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_key_configuration_type::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyMetadata, + >, +) -> aws_sdk_kms::types::KeyMetadata { + aws_sdk_kms::types::KeyMetadata::builder() + .set_aws_account_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AWSAccountId().clone())) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Arn().clone())) + .set_creation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.CreationDate().clone())) + .set_enabled(crate::standard_library_conversions::obool_from_dafny(dafny_value.Enabled().clone())) + .set_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Description().clone())) + .set_key_usage(match &**dafny_value.KeyUsage() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_usage_type::from_dafny(value) + ), + _ => None, +} +) + .set_key_state(match &**dafny_value.KeyState() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_state::from_dafny(value) + ), + _ => None, +} +) + .set_deletion_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.DeletionDate().clone())) + .set_valid_to(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.ValidTo().clone())) + .set_origin(match &**dafny_value.Origin() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::origin_type::from_dafny(value) + ), + _ => None, +} +) + .set_custom_key_store_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CustomKeyStoreId().clone())) + .set_cloud_hsm_cluster_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudHsmClusterId().clone())) + .set_expiration_model(match &**dafny_value.ExpirationModel() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::expiration_model_type::from_dafny(value) + ), + _ => None, +} +) + .set_key_manager(match &**dafny_value.KeyManager() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_manager_type::from_dafny(value) + ), + _ => None, +} +) + .set_customer_master_key_spec(match &**dafny_value.CustomerMasterKeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::customer_master_key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_key_spec(match &**dafny_value.KeySpec() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_spec::from_dafny(value) + ), + _ => None, +} +) + .set_encryption_algorithms(match (*dafny_value.EncryptionAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_signing_algorithms(match (*dafny_value.SigningAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_key_agreement_algorithms(match (*dafny_value.KeyAgreementAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::key_agreement_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_multi_region(crate::standard_library_conversions::obool_from_dafny(dafny_value.MultiRegion().clone())) + .set_multi_region_configuration(match (*dafny_value.MultiRegionConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::multi_region_configuration::from_dafny(value.clone())), + _ => None, +} +) + .set_pending_deletion_window_in_days(crate::standard_library_conversions::oint_from_dafny(dafny_value.PendingDeletionWindowInDays().clone())) + .set_mac_algorithms(match (*dafny_value.MacAlgorithms()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::from_dafny(e), + ) + ), + _ => None +} +) + .set_xks_key_configuration(match (*dafny_value.XksKeyConfiguration()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::xks_key_configuration_type::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs new file mode 100644 index 000000000..14c6136fc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeySpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeySpec::Rsa2048 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_2048 {}, +aws_sdk_kms::types::KeySpec::Rsa3072 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_3072 {}, +aws_sdk_kms::types::KeySpec::Rsa4096 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_4096 {}, +aws_sdk_kms::types::KeySpec::EccNistP256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P256 {}, +aws_sdk_kms::types::KeySpec::EccNistP384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P384 {}, +aws_sdk_kms::types::KeySpec::EccNistP521 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P521 {}, +aws_sdk_kms::types::KeySpec::EccSecgP256K1 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_SECG_P256K1 {}, +aws_sdk_kms::types::KeySpec::SymmetricDefault => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::SYMMETRIC_DEFAULT {}, +aws_sdk_kms::types::KeySpec::Hmac224 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_224 {}, +aws_sdk_kms::types::KeySpec::Hmac256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_256 {}, +aws_sdk_kms::types::KeySpec::Hmac384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_384 {}, +aws_sdk_kms::types::KeySpec::Hmac512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_512 {}, +aws_sdk_kms::types::KeySpec::Sm2 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::SM2 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec, +) -> aws_sdk_kms::types::KeySpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_2048 {} => aws_sdk_kms::types::KeySpec::Rsa2048, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_3072 {} => aws_sdk_kms::types::KeySpec::Rsa3072, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::RSA_4096 {} => aws_sdk_kms::types::KeySpec::Rsa4096, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P256 {} => aws_sdk_kms::types::KeySpec::EccNistP256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P384 {} => aws_sdk_kms::types::KeySpec::EccNistP384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_NIST_P521 {} => aws_sdk_kms::types::KeySpec::EccNistP521, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::ECC_SECG_P256K1 {} => aws_sdk_kms::types::KeySpec::EccSecgP256K1, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::SYMMETRIC_DEFAULT {} => aws_sdk_kms::types::KeySpec::SymmetricDefault, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_224 {} => aws_sdk_kms::types::KeySpec::Hmac224, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_256 {} => aws_sdk_kms::types::KeySpec::Hmac256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_384 {} => aws_sdk_kms::types::KeySpec::Hmac384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::HMAC_512 {} => aws_sdk_kms::types::KeySpec::Hmac512, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeySpec::SM2 {} => aws_sdk_kms::types::KeySpec::Sm2, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs new file mode 100644 index 000000000..d76b30c18 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeyState, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeyState::Creating => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Creating {}, +aws_sdk_kms::types::KeyState::Enabled => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Enabled {}, +aws_sdk_kms::types::KeyState::Disabled => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Disabled {}, +aws_sdk_kms::types::KeyState::PendingDeletion => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingDeletion {}, +aws_sdk_kms::types::KeyState::PendingImport => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingImport {}, +aws_sdk_kms::types::KeyState::PendingReplicaDeletion => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingReplicaDeletion {}, +aws_sdk_kms::types::KeyState::Unavailable => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Unavailable {}, +aws_sdk_kms::types::KeyState::Updating => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Updating {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState, +) -> aws_sdk_kms::types::KeyState { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Creating {} => aws_sdk_kms::types::KeyState::Creating, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Enabled {} => aws_sdk_kms::types::KeyState::Enabled, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Disabled {} => aws_sdk_kms::types::KeyState::Disabled, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingDeletion {} => aws_sdk_kms::types::KeyState::PendingDeletion, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingImport {} => aws_sdk_kms::types::KeyState::PendingImport, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::PendingReplicaDeletion {} => aws_sdk_kms::types::KeyState::PendingReplicaDeletion, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Unavailable {} => aws_sdk_kms::types::KeyState::Unavailable, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyState::Updating {} => aws_sdk_kms::types::KeyState::Updating, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs new file mode 100644 index 000000000..8d2db6b3c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::KeyUsageType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::KeyUsageType::SignVerify => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::SIGN_VERIFY {}, +aws_sdk_kms::types::KeyUsageType::EncryptDecrypt => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::ENCRYPT_DECRYPT {}, +aws_sdk_kms::types::KeyUsageType::GenerateVerifyMac => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::GENERATE_VERIFY_MAC {}, +aws_sdk_kms::types::KeyUsageType::KeyAgreement => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::KEY_AGREEMENT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType, +) -> aws_sdk_kms::types::KeyUsageType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::SIGN_VERIFY {} => aws_sdk_kms::types::KeyUsageType::SignVerify, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::ENCRYPT_DECRYPT {} => aws_sdk_kms::types::KeyUsageType::EncryptDecrypt, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::GENERATE_VERIFY_MAC {} => aws_sdk_kms::types::KeyUsageType::GenerateVerifyMac, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::KeyUsageType::KEY_AGREEMENT {} => aws_sdk_kms::types::KeyUsageType::KeyAgreement, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs new file mode 100644 index 000000000..b36008dce --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_aliases::ListAliasesError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_aliases::ListAliasesError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_aliases::ListAliasesError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_aliases::ListAliasesError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_aliases::ListAliasesError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_aliases::ListAliasesError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_aliases_request; + + pub mod _list_aliases_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_request.rs new file mode 100644 index 000000000..bc0bcd265 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_aliases::ListAliasesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesRequest::ListAliasesRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesRequest, + > +) -> aws_sdk_kms::operation::list_aliases::ListAliasesInput { + aws_sdk_kms::operation::list_aliases::ListAliasesInput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_response.rs new file mode 100644 index 000000000..600e333e6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_aliases::ListAliasesOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesResponse::ListAliasesResponse { + Aliases: ::std::rc::Rc::new(match &value.aliases { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::alias_list_entry::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListAliasesResponse, + > +) -> aws_sdk_kms::operation::list_aliases::ListAliasesOutput { + aws_sdk_kms::operation::list_aliases::ListAliasesOutput::builder() + .set_aliases(match (*dafny_value.Aliases()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::alias_list_entry::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs new file mode 100644 index 000000000..58e520b07 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_grants::ListGrantsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_grants::ListGrantsError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::InvalidGrantIdException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_id_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_grants::ListGrantsError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_grants_request; + + pub mod _list_grants_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_request.rs new file mode 100644 index 000000000..fb277464b --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_request.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_grants::ListGrantsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsRequest::ListGrantsRequest { + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + GrantId: crate::standard_library_conversions::ostring_to_dafny(&value.grant_id), + GranteePrincipal: crate::standard_library_conversions::ostring_to_dafny(&value.grantee_principal), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsRequest, + > +) -> aws_sdk_kms::operation::list_grants::ListGrantsInput { + aws_sdk_kms::operation::list_grants::ListGrantsInput::builder() + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_grant_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantId().clone())) + .set_grantee_principal(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GranteePrincipal().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_response.rs new file mode 100644 index 000000000..f62bb8607 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_grants::ListGrantsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsResponse::ListGrantsResponse { + Grants: ::std::rc::Rc::new(match &value.grants { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::grant_list_entry::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListGrantsResponse, + > +) -> aws_sdk_kms::operation::list_grants::ListGrantsOutput { + aws_sdk_kms::operation::list_grants::ListGrantsOutput::builder() + .set_grants(match (*dafny_value.Grants()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::grant_list_entry::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs new file mode 100644 index 000000000..6957fd658 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_key_policies_request; + + pub mod _list_key_policies_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_request.rs new file mode 100644 index 000000000..728ebcbd7 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesRequest::ListKeyPoliciesRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesRequest, + > +) -> aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesInput { + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_response.rs new file mode 100644 index 000000000..9bf99a961 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_response.rs @@ -0,0 +1,46 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesResponse::ListKeyPoliciesResponse { + PolicyNames: ::std::rc::Rc::new(match &value.policy_names { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyPoliciesResponse, + > +) -> aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesOutput { + aws_sdk_kms::operation::list_key_policies::ListKeyPoliciesOutput::builder() + .set_policy_names(match (*dafny_value.PolicyNames()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs new file mode 100644 index 000000000..8af250c9f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_key_rotations_request; + + pub mod _list_key_rotations_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_request.rs new file mode 100644 index 000000000..b9f3fc0d5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsRequest::ListKeyRotationsRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsRequest, + > +) -> aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsInput { + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_response.rs new file mode 100644 index 000000000..1f43156fa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsResponse::ListKeyRotationsResponse { + Rotations: ::std::rc::Rc::new(match &value.rotations { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::rotations_list_entry::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeyRotationsResponse, + > +) -> aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsOutput { + aws_sdk_kms::operation::list_key_rotations::ListKeyRotationsOutput::builder() + .set_rotations(match (*dafny_value.Rotations()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::rotations_list_entry::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs new file mode 100644 index 000000000..30d118f9a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs @@ -0,0 +1,33 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_keys::ListKeysError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_keys::ListKeysError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_keys::ListKeysError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_keys::ListKeysError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_keys_request; + + pub mod _list_keys_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_request.rs new file mode 100644 index 000000000..ade1ca35a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_keys::ListKeysInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysRequest::ListKeysRequest { + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysRequest, + > +) -> aws_sdk_kms::operation::list_keys::ListKeysInput { + aws_sdk_kms::operation::list_keys::ListKeysInput::builder() + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_response.rs new file mode 100644 index 000000000..853b5a3a0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_keys::ListKeysOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysResponse::ListKeysResponse { + Keys: ::std::rc::Rc::new(match &value.keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::key_list_entry::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListKeysResponse, + > +) -> aws_sdk_kms::operation::list_keys::ListKeysOutput { + aws_sdk_kms::operation::list_keys::ListKeysOutput::builder() + .set_keys(match (*dafny_value.Keys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::key_list_entry::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs new file mode 100644 index 000000000..a12ce1099 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsError::InvalidMarkerException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_marker_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _list_resource_tags_request; + + pub mod _list_resource_tags_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_request.rs new file mode 100644 index 000000000..f81edd4ea --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_resource_tags::ListResourceTagsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsRequest::ListResourceTagsRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Limit: crate::standard_library_conversions::oint_to_dafny(value.limit), + Marker: crate::standard_library_conversions::ostring_to_dafny(&value.marker), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsRequest, + > +) -> aws_sdk_kms::operation::list_resource_tags::ListResourceTagsInput { + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone())) + .set_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Marker().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_response.rs new file mode 100644 index 000000000..7b11d2494 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_response.rs @@ -0,0 +1,48 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::list_resource_tags::ListResourceTagsOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsResponse::ListResourceTagsResponse { + Tags: ::std::rc::Rc::new(match &value.tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + NextMarker: crate::standard_library_conversions::ostring_to_dafny(&value.next_marker), + Truncated: crate::standard_library_conversions::obool_to_dafny(&Some(value.truncated)), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ListResourceTagsResponse, + > +) -> aws_sdk_kms::operation::list_resource_tags::ListResourceTagsOutput { + aws_sdk_kms::operation::list_resource_tags::ListResourceTagsOutput::builder() + .set_tags(match (*dafny_value.Tags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_next_marker(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NextMarker().clone())) + .set_truncated(crate::standard_library_conversions::obool_from_dafny(dafny_value.Truncated().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs new file mode 100644 index 000000000..78db597bb --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::MacAlgorithmSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::MacAlgorithmSpec::HmacSha224 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_224 {}, +aws_sdk_kms::types::MacAlgorithmSpec::HmacSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_256 {}, +aws_sdk_kms::types::MacAlgorithmSpec::HmacSha384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_384 {}, +aws_sdk_kms::types::MacAlgorithmSpec::HmacSha512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_512 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec, +) -> aws_sdk_kms::types::MacAlgorithmSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_224 {} => aws_sdk_kms::types::MacAlgorithmSpec::HmacSha224, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_256 {} => aws_sdk_kms::types::MacAlgorithmSpec::HmacSha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_384 {} => aws_sdk_kms::types::MacAlgorithmSpec::HmacSha384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MacAlgorithmSpec::HMAC_SHA_512 {} => aws_sdk_kms::types::MacAlgorithmSpec::HmacSha512, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs new file mode 100644 index 000000000..adbdbf236 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::MessageType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::MessageType::Raw => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MessageType::RAW {}, +aws_sdk_kms::types::MessageType::Digest => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MessageType::DIGEST {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MessageType, +) -> aws_sdk_kms::types::MessageType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MessageType::RAW {} => aws_sdk_kms::types::MessageType::Raw, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MessageType::DIGEST {} => aws_sdk_kms::types::MessageType::Digest, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs new file mode 100644 index 000000000..da6dcc87d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs @@ -0,0 +1,65 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::MultiRegionConfiguration, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionConfiguration::MultiRegionConfiguration { + MultiRegionKeyType: ::std::rc::Rc::new(match &value.multi_region_key_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::multi_region_key_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + PrimaryKey: ::std::rc::Rc::new(match &value.primary_key { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::multi_region_key::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaKeys: ::std::rc::Rc::new(match &value.replica_keys { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::multi_region_key::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionConfiguration, + >, +) -> aws_sdk_kms::types::MultiRegionConfiguration { + aws_sdk_kms::types::MultiRegionConfiguration::builder() + .set_multi_region_key_type(match &**dafny_value.MultiRegionKeyType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::multi_region_key_type::from_dafny(value) + ), + _ => None, +} +) + .set_primary_key(match (*dafny_value.PrimaryKey()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::multi_region_key::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_keys(match (*dafny_value.ReplicaKeys()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::multi_region_key::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs new file mode 100644 index 000000000..28033f3be --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::MultiRegionKey, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKey::MultiRegionKey { + Arn: crate::standard_library_conversions::ostring_to_dafny(&value.arn), + Region: crate::standard_library_conversions::ostring_to_dafny(&value.region), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKey, + >, +) -> aws_sdk_kms::types::MultiRegionKey { + aws_sdk_kms::types::MultiRegionKey::builder() + .set_arn(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Arn().clone())) + .set_region(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Region().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs new file mode 100644 index 000000000..e35f0d68a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::MultiRegionKeyType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::MultiRegionKeyType::Primary => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKeyType::PRIMARY {}, +aws_sdk_kms::types::MultiRegionKeyType::Replica => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKeyType::REPLICA {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKeyType, +) -> aws_sdk_kms::types::MultiRegionKeyType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKeyType::PRIMARY {} => aws_sdk_kms::types::MultiRegionKeyType::Primary, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::MultiRegionKeyType::REPLICA {} => aws_sdk_kms::types::MultiRegionKeyType::Replica, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs new file mode 100644 index 000000000..8878e10fa --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::OriginType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::OriginType::AwsKms => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::AWS_KMS {}, +aws_sdk_kms::types::OriginType::External => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::EXTERNAL {}, +aws_sdk_kms::types::OriginType::AwsCloudhsm => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::AWS_CLOUDHSM {}, +aws_sdk_kms::types::OriginType::ExternalKeyStore => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::EXTERNAL_KEY_STORE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType, +) -> aws_sdk_kms::types::OriginType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::AWS_KMS {} => aws_sdk_kms::types::OriginType::AwsKms, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::EXTERNAL {} => aws_sdk_kms::types::OriginType::External, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::AWS_CLOUDHSM {} => aws_sdk_kms::types::OriginType::AwsCloudhsm, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::OriginType::EXTERNAL_KEY_STORE {} => aws_sdk_kms::types::OriginType::ExternalKeyStore, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs new file mode 100644 index 000000000..3814d7976 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::MalformedPolicyDocumentException(e) => + crate::deps::com_amazonaws_kms::conversions::error::malformed_policy_document_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _put_key_policy_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy/_put_key_policy_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy/_put_key_policy_request.rs new file mode 100644 index 000000000..fc5f9117e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy/_put_key_policy_request.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::put_key_policy::PutKeyPolicyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::PutKeyPolicyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::PutKeyPolicyRequest::PutKeyPolicyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + PolicyName: crate::standard_library_conversions::ostring_to_dafny(&value.policy_name), + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy) .Extract(), + BypassPolicyLockoutSafetyCheck: crate::standard_library_conversions::obool_to_dafny(&value.bypass_policy_lockout_safety_check), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::PutKeyPolicyRequest, + > +) -> aws_sdk_kms::operation::put_key_policy::PutKeyPolicyInput { + aws_sdk_kms::operation::put_key_policy::PutKeyPolicyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_policy_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.PolicyName().clone())) + .set_policy(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Policy()) )) + .set_bypass_policy_lockout_safety_check(crate::standard_library_conversions::obool_from_dafny(dafny_value.BypassPolicyLockoutSafetyCheck().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs new file mode 100644 index 000000000..ca76e917c --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs @@ -0,0 +1,49 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::re_encrypt::ReEncryptError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::re_encrypt::ReEncryptError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::IncorrectKeyException(e) => + crate::deps::com_amazonaws_kms::conversions::error::incorrect_key_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::InvalidCiphertextException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_ciphertext_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::re_encrypt::ReEncryptError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _re_encrypt_request; + + pub mod _re_encrypt_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_request.rs new file mode 100644 index 000000000..36c616653 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_request.rs @@ -0,0 +1,117 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::re_encrypt::ReEncryptInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptRequest::ReEncryptRequest { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob).Extract(), + SourceEncryptionContext: +::std::rc::Rc::new(match &value.source_encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SourceKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.source_key_id), + DestinationKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.destination_key_id) .Extract(), + DestinationEncryptionContext: +::std::rc::Rc::new(match &value.destination_encryption_context { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x, + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SourceEncryptionAlgorithm: ::std::rc::Rc::new(match &value.source_encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DestinationEncryptionAlgorithm: ::std::rc::Rc::new(match &value.destination_encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptRequest, + > +) -> aws_sdk_kms::operation::re_encrypt::ReEncryptInput { + aws_sdk_kms::operation::re_encrypt::ReEncryptInput::builder() + .set_ciphertext_blob(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.CiphertextBlob().clone()))) + .set_source_encryption_context(match (*dafny_value.SourceEncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_source_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceKeyId().clone())) + .set_destination_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.DestinationKeyId()) )) + .set_destination_encryption_context(match (*dafny_value.DestinationEncryptionContext()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value, + |k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k), + |v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v), + ) + ), + _ => None +} +) + .set_source_encryption_algorithm(match &**dafny_value.SourceEncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_destination_encryption_algorithm(match &**dafny_value.DestinationEncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_response.rs new file mode 100644 index 000000000..08b5edd44 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_response.rs @@ -0,0 +1,53 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::re_encrypt::ReEncryptOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptResponse::ReEncryptResponse { + CiphertextBlob: crate::standard_library_conversions::oblob_to_dafny(&value.ciphertext_blob), + SourceKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.source_key_id), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + SourceEncryptionAlgorithm: ::std::rc::Rc::new(match &value.source_encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + DestinationEncryptionAlgorithm: ::std::rc::Rc::new(match &value.destination_encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReEncryptResponse, + > +) -> aws_sdk_kms::operation::re_encrypt::ReEncryptOutput { + aws_sdk_kms::operation::re_encrypt::ReEncryptOutput::builder() + .set_ciphertext_blob(crate::standard_library_conversions::oblob_from_dafny(dafny_value.CiphertextBlob().clone())) + .set_source_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.SourceKeyId().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_source_encryption_algorithm(match &**dafny_value.SourceEncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .set_destination_encryption_algorithm(match &**dafny_value.DestinationEncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::encryption_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs new file mode 100644 index 000000000..32a25c9dd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::RecipientInfo, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RecipientInfo::RecipientInfo { + KeyEncryptionAlgorithm: ::std::rc::Rc::new(match &value.key_encryption_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_encryption_mechanism::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + AttestationDocument: crate::standard_library_conversions::oblob_to_dafny(&value.attestation_document), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RecipientInfo, + >, +) -> aws_sdk_kms::types::RecipientInfo { + aws_sdk_kms::types::RecipientInfo::builder() + .set_key_encryption_algorithm(match &**dafny_value.KeyEncryptionAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_encryption_mechanism::from_dafny(value) + ), + _ => None, +} +) + .set_attestation_document(crate::standard_library_conversions::oblob_from_dafny(dafny_value.AttestationDocument().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs new file mode 100644 index 000000000..7ed2cb089 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::replicate_key::ReplicateKeyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::AlreadyExistsException(e) => + crate::deps::com_amazonaws_kms::conversions::error::already_exists_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::MalformedPolicyDocumentException(e) => + crate::deps::com_amazonaws_kms::conversions::error::malformed_policy_document_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::TagException(e) => + crate::deps::com_amazonaws_kms::conversions::error::tag_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::replicate_key::ReplicateKeyError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _replicate_key_request; + + pub mod _replicate_key_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_request.rs new file mode 100644 index 000000000..70f0ff6c9 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_request.rs @@ -0,0 +1,53 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::replicate_key::ReplicateKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyRequest::ReplicateKeyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + ReplicaRegion: crate::standard_library_conversions::ostring_to_dafny(&value.replica_region) .Extract(), + Policy: crate::standard_library_conversions::ostring_to_dafny(&value.policy), + BypassPolicyLockoutSafetyCheck: crate::standard_library_conversions::obool_to_dafny(&value.bypass_policy_lockout_safety_check), + Description: crate::standard_library_conversions::ostring_to_dafny(&value.description), + Tags: ::std::rc::Rc::new(match &value.tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyRequest, + > +) -> aws_sdk_kms::operation::replicate_key::ReplicateKeyInput { + aws_sdk_kms::operation::replicate_key::ReplicateKeyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_replica_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.ReplicaRegion()) )) + .set_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Policy().clone())) + .set_bypass_policy_lockout_safety_check(crate::standard_library_conversions::obool_from_dafny(dafny_value.BypassPolicyLockoutSafetyCheck().clone())) + .set_description(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Description().clone())) + .set_tags(match (*dafny_value.Tags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_response.rs new file mode 100644 index 000000000..6e3c4e14d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_response.rs @@ -0,0 +1,57 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::replicate_key::ReplicateKeyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyResponse::ReplicateKeyResponse { + ReplicaKeyMetadata: ::std::rc::Rc::new(match &value.replica_key_metadata { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_metadata::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + ReplicaPolicy: crate::standard_library_conversions::ostring_to_dafny(&value.replica_policy), + ReplicaTags: ::std::rc::Rc::new(match &value.replica_tags { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::com_amazonaws_kms::conversions::tag::to_dafny(e) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ReplicateKeyResponse, + > +) -> aws_sdk_kms::operation::replicate_key::ReplicateKeyOutput { + aws_sdk_kms::operation::replicate_key::ReplicateKeyOutput::builder() + .set_replica_key_metadata(match (*dafny_value.ReplicaKeyMetadata()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::key_metadata::from_dafny(value.clone())), + _ => None, +} +) + .set_replica_policy(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ReplicaPolicy().clone())) + .set_replica_tags(match (*dafny_value.ReplicaTags()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::tag::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs new file mode 100644 index 000000000..155d9e305 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::retire_grant::RetireGrantError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::retire_grant::RetireGrantError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::InvalidGrantIdException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_id_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::retire_grant::RetireGrantError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _retire_grant_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant/_retire_grant_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant/_retire_grant_request.rs new file mode 100644 index 000000000..8a82e2e18 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/retire_grant/_retire_grant_request.rs @@ -0,0 +1,30 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::retire_grant::RetireGrantInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RetireGrantRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RetireGrantRequest::RetireGrantRequest { + GrantToken: crate::standard_library_conversions::ostring_to_dafny(&value.grant_token), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + GrantId: crate::standard_library_conversions::ostring_to_dafny(&value.grant_id), + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RetireGrantRequest, + > +) -> aws_sdk_kms::operation::retire_grant::RetireGrantInput { + aws_sdk_kms::operation::retire_grant::RetireGrantInput::builder() + .set_grant_token(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantToken().clone())) + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_grant_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.GrantId().clone())) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs new file mode 100644 index 000000000..1b0299a09 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::revoke_grant::RevokeGrantError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::InvalidGrantIdException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_id_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::revoke_grant::RevokeGrantError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _revoke_grant_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant/_revoke_grant_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant/_revoke_grant_request.rs new file mode 100644 index 000000000..2e415c719 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant/_revoke_grant_request.rs @@ -0,0 +1,28 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::revoke_grant::RevokeGrantInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RevokeGrantRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RevokeGrantRequest::RevokeGrantRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + GrantId: crate::standard_library_conversions::ostring_to_dafny(&value.grant_id) .Extract(), + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RevokeGrantRequest, + > +) -> aws_sdk_kms::operation::revoke_grant::RevokeGrantInput { + aws_sdk_kms::operation::revoke_grant::RevokeGrantInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_grant_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.GrantId()) )) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs new file mode 100644 index 000000000..719c723cd --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::ConflictException(e) => + crate::deps::com_amazonaws_kms::conversions::error::conflict_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _rotate_key_on_demand_request; + + pub mod _rotate_key_on_demand_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_request.rs new file mode 100644 index 000000000..f19281c48 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_request.rs @@ -0,0 +1,24 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandRequest::RotateKeyOnDemandRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandRequest, + > +) -> aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandInput { + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_response.rs new file mode 100644 index 000000000..84f433b4f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandResponse::RotateKeyOnDemandResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotateKeyOnDemandResponse, + > +) -> aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandOutput { + aws_sdk_kms::operation::rotate_key_on_demand::RotateKeyOnDemandOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs new file mode 100644 index 000000000..3e4bf8059 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::RotationType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::RotationType::Automatic => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationType::AUTOMATIC {}, +aws_sdk_kms::types::RotationType::OnDemand => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationType::ON_DEMAND {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationType, +) -> aws_sdk_kms::types::RotationType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationType::AUTOMATIC {} => aws_sdk_kms::types::RotationType::Automatic, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationType::ON_DEMAND {} => aws_sdk_kms::types::RotationType::OnDemand, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs new file mode 100644 index 000000000..07b7981fc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::RotationsListEntry, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationsListEntry::RotationsListEntry { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + RotationDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.rotation_date), + RotationType: ::std::rc::Rc::new(match &value.rotation_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::rotation_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RotationsListEntry, + >, +) -> aws_sdk_kms::types::RotationsListEntry { + aws_sdk_kms::types::RotationsListEntry::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_rotation_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.RotationDate().clone())) + .set_rotation_type(match &**dafny_value.RotationType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::rotation_type::from_dafny(value) + ), + _ => None, +} +) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs new file mode 100644 index 000000000..cd4724748 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _schedule_key_deletion_request; + + pub mod _schedule_key_deletion_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_request.rs new file mode 100644 index 000000000..66c5b844a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + PendingWindowInDays: crate::standard_library_conversions::oint_to_dafny(value.pending_window_in_days), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionRequest, + > +) -> aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionInput { + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_pending_window_in_days(crate::standard_library_conversions::oint_from_dafny(dafny_value.PendingWindowInDays().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_response.rs new file mode 100644 index 000000000..e236de381 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_response.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionResponse::ScheduleKeyDeletionResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + DeletionDate: crate::standard_library_conversions::otimestamp_to_dafny(&value.deletion_date), + KeyState: ::std::rc::Rc::new(match &value.key_state { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_state::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + PendingWindowInDays: crate::standard_library_conversions::oint_to_dafny(value.pending_window_in_days), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::ScheduleKeyDeletionResponse, + > +) -> aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionOutput { + aws_sdk_kms::operation::schedule_key_deletion::ScheduleKeyDeletionOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_deletion_date(crate::standard_library_conversions::otimestamp_from_dafny(dafny_value.DeletionDate().clone())) + .set_key_state(match &**dafny_value.KeyState() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::key_state::from_dafny(value) + ), + _ => None, +} +) + .set_pending_window_in_days(crate::standard_library_conversions::oint_from_dafny(dafny_value.PendingWindowInDays().clone())) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign.rs new file mode 100644 index 000000000..25f961568 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::sign::SignError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::sign::SignError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::sign::SignError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _sign_request; + + pub mod _sign_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs new file mode 100644 index 000000000..9e27f1110 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::sign::SignInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignRequest::SignRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Message: crate::standard_library_conversions::oblob_to_dafny(&value.message).Extract(), + MessageType: ::std::rc::Rc::new(match &value.message_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::message_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + SigningAlgorithm: crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(value.signing_algorithm.clone().unwrap()), + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignRequest, + > +) -> aws_sdk_kms::operation::sign::SignInput { + aws_sdk_kms::operation::sign::SignInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Message().clone()))) + .set_message_type(match &**dafny_value.MessageType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::message_type::from_dafny(value) + ), + _ => None, +} +) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_signing_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(dafny_value.SigningAlgorithm()) )) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs new file mode 100644 index 000000000..704c80309 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::sign::SignOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignResponse::SignResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + Signature: crate::standard_library_conversions::oblob_to_dafny(&value.signature), + SigningAlgorithm: ::std::rc::Rc::new(match &value.signing_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SignResponse, + > +) -> aws_sdk_kms::operation::sign::SignOutput { + aws_sdk_kms::operation::sign::SignOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_signature(crate::standard_library_conversions::oblob_from_dafny(dafny_value.Signature().clone())) + .set_signing_algorithm(match &**dafny_value.SigningAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs new file mode 100644 index 000000000..4fcc04f84 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::SigningAlgorithmSpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_256 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_384 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_512 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_256 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_384 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_512 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha256 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_256 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha384 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_384 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha512 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_512 {}, +aws_sdk_kms::types::SigningAlgorithmSpec::Sm2Dsa => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::SM2DSA {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec, +) -> aws_sdk_kms::types::SigningAlgorithmSpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_256 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_384 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PSS_SHA_512 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha512, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_256 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_384 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::RSASSA_PKCS1_V1_5_SHA_512 {} => aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPkcs1V15Sha512, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_256 {} => aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha256, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_384 {} => aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha384, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::ECDSA_SHA_512 {} => aws_sdk_kms::types::SigningAlgorithmSpec::EcdsaSha512, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::SigningAlgorithmSpec::SM2DSA {} => aws_sdk_kms::types::SigningAlgorithmSpec::Sm2Dsa, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag.rs new file mode 100644 index 000000000..a953e1f86 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::Tag, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Tag::Tag { + TagKey: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.tag_key), + TagValue: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.tag_value), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::Tag, + >, +) -> aws_sdk_kms::types::Tag { + aws_sdk_kms::types::Tag::builder() + .set_tag_key(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TagKey()) )) + .set_tag_value(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TagValue()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs new file mode 100644 index 000000000..18d2d3026 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::tag_resource::TagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::tag_resource::TagResourceError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::tag_resource::TagResourceError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::tag_resource::TagResourceError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::tag_resource::TagResourceError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::tag_resource::TagResourceError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::tag_resource::TagResourceError::TagException(e) => + crate::deps::com_amazonaws_kms::conversions::error::tag_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _tag_resource_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource/_tag_resource_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource/_tag_resource_request.rs new file mode 100644 index 000000000..a16b2cd4e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/tag_resource/_tag_resource_request.rs @@ -0,0 +1,34 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::tag_resource::TagResourceInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::TagResourceRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::TagResourceRequest::TagResourceRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Tags: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.tags.clone().unwrap(), + |e| crate::deps::com_amazonaws_kms::conversions::tag::to_dafny(e) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::TagResourceRequest, + > +) -> aws_sdk_kms::operation::tag_resource::TagResourceInput { + aws_sdk_kms::operation::tag_resource::TagResourceInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_tags(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.Tags(), + |e: &::std::rc::Rc| crate::deps::com_amazonaws_kms::conversions::tag::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs new file mode 100644 index 000000000..144986093 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::untag_resource::UntagResourceError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::untag_resource::UntagResourceError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::untag_resource::UntagResourceError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::untag_resource::UntagResourceError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::untag_resource::UntagResourceError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::untag_resource::UntagResourceError::TagException(e) => + crate::deps::com_amazonaws_kms::conversions::error::tag_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _untag_resource_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource/_untag_resource_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource/_untag_resource_request.rs new file mode 100644 index 000000000..9ff8af079 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/untag_resource/_untag_resource_request.rs @@ -0,0 +1,32 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::untag_resource::UntagResourceInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UntagResourceRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UntagResourceRequest::UntagResourceRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + TagKeys: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.tag_keys.clone().unwrap(), + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UntagResourceRequest, + > +) -> aws_sdk_kms::operation::untag_resource::UntagResourceInput { + aws_sdk_kms::operation::untag_resource::UntagResourceInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_tag_keys(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.TagKeys(), + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs new file mode 100644 index 000000000..3b5a2fad6 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::update_alias::UpdateAliasError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::update_alias::UpdateAliasError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_alias::UpdateAliasError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_alias::UpdateAliasError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_alias::UpdateAliasError::LimitExceededException(e) => + crate::deps::com_amazonaws_kms::conversions::error::limit_exceeded_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_alias::UpdateAliasError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_alias_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias/_update_alias_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias/_update_alias_request.rs new file mode 100644 index 000000000..116d1eecc --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_alias/_update_alias_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::update_alias::UpdateAliasInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateAliasRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateAliasRequest::UpdateAliasRequest { + AliasName: crate::standard_library_conversions::ostring_to_dafny(&value.alias_name) .Extract(), + TargetKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.target_key_id) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateAliasRequest, + > +) -> aws_sdk_kms::operation::update_alias::UpdateAliasInput { + aws_sdk_kms::operation::update_alias::UpdateAliasInput::builder() + .set_alias_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AliasName()) )) + .set_target_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TargetKeyId()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs new file mode 100644 index 000000000..def367548 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs @@ -0,0 +1,61 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotActiveException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_active_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotRelatedException(e) => + crate::deps::com_amazonaws_kms::conversions::error::cloud_hsm_cluster_not_related_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreNameInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_name_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::custom_key_store_not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyIncorrectAuthenticationCredentialException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_incorrect_authentication_credential_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyInvalidResponseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_invalid_response_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriEndpointInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_endpoint_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriUnreachableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_uri_unreachable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceInUseException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_in_use_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceInvalidConfigurationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_invalid_configuration_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceNotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::xks_proxy_vpc_endpoint_service_not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_custom_key_store_request; + + pub mod _update_custom_key_store_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_request.rs new file mode 100644 index 000000000..241902386 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_request.rs @@ -0,0 +1,59 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreRequest::UpdateCustomKeyStoreRequest { + CustomKeyStoreId: crate::standard_library_conversions::ostring_to_dafny(&value.custom_key_store_id) .Extract(), + NewCustomKeyStoreName: crate::standard_library_conversions::ostring_to_dafny(&value.new_custom_key_store_name), + KeyStorePassword: crate::standard_library_conversions::ostring_to_dafny(&value.key_store_password), + CloudHsmClusterId: crate::standard_library_conversions::ostring_to_dafny(&value.cloud_hsm_cluster_id), + XksProxyUriEndpoint: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_uri_endpoint), + XksProxyUriPath: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_uri_path), + XksProxyVpcEndpointServiceName: crate::standard_library_conversions::ostring_to_dafny(&value.xks_proxy_vpc_endpoint_service_name), + XksProxyAuthenticationCredential: ::std::rc::Rc::new(match &value.xks_proxy_authentication_credential { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_authentication_credential_type::to_dafny(x) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + XksProxyConnectivity: ::std::rc::Rc::new(match &value.xks_proxy_connectivity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreRequest, + > +) -> aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreInput { + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreInput::builder() + .set_custom_key_store_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.CustomKeyStoreId()) )) + .set_new_custom_key_store_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.NewCustomKeyStoreName().clone())) + .set_key_store_password(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyStorePassword().clone())) + .set_cloud_hsm_cluster_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.CloudHsmClusterId().clone())) + .set_xks_proxy_uri_endpoint(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyUriEndpoint().clone())) + .set_xks_proxy_uri_path(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyUriPath().clone())) + .set_xks_proxy_vpc_endpoint_service_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.XksProxyVpcEndpointServiceName().clone())) + .set_xks_proxy_authentication_credential(match (*dafny_value.XksProxyAuthenticationCredential()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::com_amazonaws_kms::conversions::xks_proxy_authentication_credential_type::from_dafny(value.clone())), + _ => None, +} +) + .set_xks_proxy_connectivity(match &**dafny_value.XksProxyConnectivity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_response.rs new file mode 100644 index 000000000..7e2784715 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_response.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreResponse::UpdateCustomKeyStoreResponse { + + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateCustomKeyStoreResponse, + > +) -> aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreOutput { + aws_sdk_kms::operation::update_custom_key_store::UpdateCustomKeyStoreOutput::builder() + + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs new file mode 100644 index 000000000..aec00f41d --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs @@ -0,0 +1,35 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_key_description_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description/_update_key_description_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description/_update_key_description_request.rs new file mode 100644 index 000000000..c35164e95 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_key_description/_update_key_description_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateKeyDescriptionRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateKeyDescriptionRequest::UpdateKeyDescriptionRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Description: crate::standard_library_conversions::ostring_to_dafny(&value.description) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdateKeyDescriptionRequest, + > +) -> aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionInput { + aws_sdk_kms::operation::update_key_description::UpdateKeyDescriptionInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_description(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.Description()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs new file mode 100644 index 000000000..69d1dda0e --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs @@ -0,0 +1,37 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::InvalidArnException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_arn_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionError::UnsupportedOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::unsupported_operation_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _update_primary_region_request; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region/_update_primary_region_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region/_update_primary_region_request.rs new file mode 100644 index 000000000..aa5707f2f --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region/_update_primary_region_request.rs @@ -0,0 +1,26 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdatePrimaryRegionRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdatePrimaryRegionRequest::UpdatePrimaryRegionRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + PrimaryRegion: crate::standard_library_conversions::ostring_to_dafny(&value.primary_region) .Extract(), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::UpdatePrimaryRegionRequest, + > +) -> aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionInput { + aws_sdk_kms::operation::update_primary_region::UpdatePrimaryRegionInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_primary_region(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.PrimaryRegion()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify.rs new file mode 100644 index 000000000..94be57576 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify.rs @@ -0,0 +1,47 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::verify::VerifyError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::verify::VerifyError::DependencyTimeoutException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dependency_timeout_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::KmsInvalidSignatureException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_signature_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify::VerifyError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _verify_request; + + pub mod _verify_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs new file mode 100644 index 000000000..ec4d3d576 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs @@ -0,0 +1,63 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::verify::VerifyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyRequest::VerifyRequest { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + Message: crate::standard_library_conversions::oblob_to_dafny(&value.message).Extract(), + MessageType: ::std::rc::Rc::new(match &value.message_type { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::message_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + Signature: crate::standard_library_conversions::oblob_to_dafny(&value.signature).Extract(), + SigningAlgorithm: crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(value.signing_algorithm.clone().unwrap()), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyRequest, + > +) -> aws_sdk_kms::operation::verify::VerifyInput { + aws_sdk_kms::operation::verify::VerifyInput::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Message().clone()))) + .set_message_type(match &**dafny_value.MessageType() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::message_type::from_dafny(value) + ), + _ => None, +} +) + .set_signature(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Signature().clone()))) + .set_signing_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(dafny_value.SigningAlgorithm()) )) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs new file mode 100644 index 000000000..35a5e0398 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::verify::VerifyOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyResponse::VerifyResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + SignatureValid: crate::standard_library_conversions::obool_to_dafny(&Some(value.signature_valid)), + SigningAlgorithm: ::std::rc::Rc::new(match &value.signing_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyResponse, + > +) -> aws_sdk_kms::operation::verify::VerifyOutput { + aws_sdk_kms::operation::verify::VerifyOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_signature_valid(crate::standard_library_conversions::obool_from_dafny(dafny_value.SignatureValid().clone())) + .set_signing_algorithm(match &**dafny_value.SigningAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::signing_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs new file mode 100644 index 000000000..465c0eebe --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs @@ -0,0 +1,45 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny_error( + value: &::aws_smithy_runtime_api::client::result::SdkError< + aws_sdk_kms::operation::verify_mac::VerifyMacError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, +) -> ::std::rc::Rc { + match value { + aws_sdk_kms::error::SdkError::ServiceError(service_error) => match service_error.err() { + aws_sdk_kms::operation::verify_mac::VerifyMacError::DisabledException(e) => + crate::deps::com_amazonaws_kms::conversions::error::disabled_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::DryRunOperationException(e) => + crate::deps::com_amazonaws_kms::conversions::error::dry_run_operation_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::InvalidGrantTokenException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_grant_token_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::InvalidKeyUsageException(e) => + crate::deps::com_amazonaws_kms::conversions::error::invalid_key_usage_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::KeyUnavailableException(e) => + crate::deps::com_amazonaws_kms::conversions::error::key_unavailable_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::KmsInternalException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_internal_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::KmsInvalidMacException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_mac_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::KmsInvalidStateException(e) => + crate::deps::com_amazonaws_kms::conversions::error::kms_invalid_state_exception::to_dafny(e.clone()), + aws_sdk_kms::operation::verify_mac::VerifyMacError::NotFoundException(e) => + crate::deps::com_amazonaws_kms::conversions::error::not_found_exception::to_dafny(e.clone()), + e => { + let msg = format!("{:?}", e); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + }, + _ => { + let msg = format!("{:?}", value); + crate::deps::com_amazonaws_kms::conversions::error::to_opaque_error(msg) + } + } +} + + pub mod _verify_mac_request; + + pub mod _verify_mac_response; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_request.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_request.rs new file mode 100644 index 000000000..76068c7f5 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_request.rs @@ -0,0 +1,51 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::verify_mac::VerifyMacInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacRequest, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacRequest::VerifyMacRequest { + Message: crate::standard_library_conversions::oblob_to_dafny(&value.message).Extract(), + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + MacAlgorithm: crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::to_dafny(value.mac_algorithm.clone().unwrap()), + Mac: crate::standard_library_conversions::oblob_to_dafny(&value.mac).Extract(), + GrantTokens: ::std::rc::Rc::new(match &value.grant_tokens { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e), + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + DryRun: crate::standard_library_conversions::obool_to_dafny(&value.dry_run), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacRequest, + > +) -> aws_sdk_kms::operation::verify_mac::VerifyMacInput { + aws_sdk_kms::operation::verify_mac::VerifyMacInput::builder() + .set_message(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Message().clone()))) + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.KeyId()) )) + .set_mac_algorithm(Some( crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::from_dafny(dafny_value.MacAlgorithm()) )) + .set_mac(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.Mac().clone()))) + .set_grant_tokens(match (*dafny_value.GrantTokens()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some( + ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value, + |e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e), + ) + ), + _ => None +} +) + .set_dry_run(crate::standard_library_conversions::obool_from_dafny(dafny_value.DryRun().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_response.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_response.rs new file mode 100644 index 000000000..5aa7abbf4 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_response.rs @@ -0,0 +1,39 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::operation::verify_mac::VerifyMacOutput +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacResponse, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacResponse::VerifyMacResponse { + KeyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id), + MacValid: crate::standard_library_conversions::obool_to_dafny(&Some(value.mac_valid)), + MacAlgorithm: ::std::rc::Rc::new(match &value.mac_algorithm { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::VerifyMacResponse, + > +) -> aws_sdk_kms::operation::verify_mac::VerifyMacOutput { + aws_sdk_kms::operation::verify_mac::VerifyMacOutput::builder() + .set_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyId().clone())) + .set_mac_valid(crate::standard_library_conversions::obool_from_dafny(dafny_value.MacValid().clone())) + .set_mac_algorithm(match &**dafny_value.MacAlgorithm() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::mac_algorithm_spec::from_dafny(value) + ), + _ => None, +} +) + .build() + + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs new file mode 100644 index 000000000..a805e0bd0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs @@ -0,0 +1,27 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::WrappingKeySpec, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::WrappingKeySpec::Rsa2048 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_2048 {}, +aws_sdk_kms::types::WrappingKeySpec::Rsa3072 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_3072 {}, +aws_sdk_kms::types::WrappingKeySpec::Rsa4096 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_4096 {}, +aws_sdk_kms::types::WrappingKeySpec::Sm2 => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::SM2 {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec, +) -> aws_sdk_kms::types::WrappingKeySpec { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_2048 {} => aws_sdk_kms::types::WrappingKeySpec::Rsa2048, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_3072 {} => aws_sdk_kms::types::WrappingKeySpec::Rsa3072, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::RSA_4096 {} => aws_sdk_kms::types::WrappingKeySpec::Rsa4096, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::WrappingKeySpec::SM2 {} => aws_sdk_kms::types::WrappingKeySpec::Sm2, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs new file mode 100644 index 000000000..f367c4b9a --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::XksKeyConfigurationType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksKeyConfigurationType::XksKeyConfigurationType { + Id: crate::standard_library_conversions::ostring_to_dafny(&value.id), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksKeyConfigurationType, + >, +) -> aws_sdk_kms::types::XksKeyConfigurationType { + aws_sdk_kms::types::XksKeyConfigurationType::builder() + .set_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.Id().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_authentication_credential_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_authentication_credential_type.rs new file mode 100644 index 000000000..92e7821cf --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_authentication_credential_type.rs @@ -0,0 +1,25 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::XksProxyAuthenticationCredentialType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyAuthenticationCredentialType::XksProxyAuthenticationCredentialType { + AccessKeyId: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.access_key_id), + RawSecretAccessKey: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&value.raw_secret_access_key), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyAuthenticationCredentialType, + >, +) -> aws_sdk_kms::types::XksProxyAuthenticationCredentialType { + aws_sdk_kms::types::XksProxyAuthenticationCredentialType::builder() + .set_access_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.AccessKeyId()) )) + .set_raw_secret_access_key(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.RawSecretAccessKey()) )) + .build() + .unwrap() +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs new file mode 100644 index 000000000..14932c103 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs @@ -0,0 +1,41 @@ +// 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. +#[allow(dead_code)] +pub fn to_dafny( + value: &aws_sdk_kms::types::XksProxyConfigurationType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new( + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConfigurationType::XksProxyConfigurationType { + Connectivity: ::std::rc::Rc::new(match &value.connectivity { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::to_dafny(x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + AccessKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.access_key_id), + UriEndpoint: crate::standard_library_conversions::ostring_to_dafny(&value.uri_endpoint), + UriPath: crate::standard_library_conversions::ostring_to_dafny(&value.uri_path), + VpcEndpointServiceName: crate::standard_library_conversions::ostring_to_dafny(&value.vpc_endpoint_service_name), + } + ) +} #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConfigurationType, + >, +) -> aws_sdk_kms::types::XksProxyConfigurationType { + aws_sdk_kms::types::XksProxyConfigurationType::builder() + .set_connectivity(match &**dafny_value.Connectivity() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::com_amazonaws_kms::conversions::xks_proxy_connectivity_type::from_dafny(value) + ), + _ => None, +} +) + .set_access_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.AccessKeyId().clone())) + .set_uri_endpoint(crate::standard_library_conversions::ostring_from_dafny(dafny_value.UriEndpoint().clone())) + .set_uri_path(crate::standard_library_conversions::ostring_from_dafny(dafny_value.UriPath().clone())) + .set_vpc_endpoint_service_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.VpcEndpointServiceName().clone())) + .build() + +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs new file mode 100644 index 000000000..effc597e0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs @@ -0,0 +1,23 @@ +// 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. +#[allow(dead_code)] + +pub fn to_dafny( + value: aws_sdk_kms::types::XksProxyConnectivityType, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + aws_sdk_kms::types::XksProxyConnectivityType::PublicEndpoint => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConnectivityType::PUBLIC_ENDPOINT {}, +aws_sdk_kms::types::XksProxyConnectivityType::VpcEndpointService => crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConnectivityType::VPC_ENDPOINT_SERVICE {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConnectivityType, +) -> aws_sdk_kms::types::XksProxyConnectivityType { + match dafny_value { + crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConnectivityType::PUBLIC_ENDPOINT {} => aws_sdk_kms::types::XksProxyConnectivityType::PublicEndpoint, +crate::r#software::amazon::cryptography::services::kms::internaldafny::types::XksProxyConnectivityType::VPC_ENDPOINT_SERVICE {} => aws_sdk_kms::types::XksProxyConnectivityType::VpcEndpointService, + } +} diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/types.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/types.rs new file mode 100644 index 000000000..3b699f571 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/types.rs @@ -0,0 +1,4 @@ +// 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 mod error; diff --git a/releases/rust/esdk/src/deps/com_amazonaws_kms/types/error.rs b/releases/rust/esdk/src/deps/com_amazonaws_kms/types/error.rs new file mode 100644 index 000000000..b2e572bb0 --- /dev/null +++ b/releases/rust/esdk/src/deps/com_amazonaws_kms/types/error.rs @@ -0,0 +1,214 @@ +// 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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + AlreadyExistsException { + error: aws_sdk_kms::types::error::AlreadyExistsException, +}, + +CloudHsmClusterInUseException { + error: aws_sdk_kms::types::error::CloudHsmClusterInUseException, +}, + +CloudHsmClusterInvalidConfigurationException { + error: aws_sdk_kms::types::error::CloudHsmClusterInvalidConfigurationException, +}, + +CloudHsmClusterNotActiveException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotActiveException, +}, + +CloudHsmClusterNotFoundException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotFoundException, +}, + +CloudHsmClusterNotRelatedException { + error: aws_sdk_kms::types::error::CloudHsmClusterNotRelatedException, +}, + +ConflictException { + error: aws_sdk_kms::types::error::ConflictException, +}, + +CustomKeyStoreHasCmKsException { + error: aws_sdk_kms::types::error::CustomKeyStoreHasCmKsException, +}, + +CustomKeyStoreInvalidStateException { + error: aws_sdk_kms::types::error::CustomKeyStoreInvalidStateException, +}, + +CustomKeyStoreNameInUseException { + error: aws_sdk_kms::types::error::CustomKeyStoreNameInUseException, +}, + +CustomKeyStoreNotFoundException { + error: aws_sdk_kms::types::error::CustomKeyStoreNotFoundException, +}, + +DependencyTimeoutException { + error: aws_sdk_kms::types::error::DependencyTimeoutException, +}, + +DisabledException { + error: aws_sdk_kms::types::error::DisabledException, +}, + +DryRunOperationException { + error: aws_sdk_kms::types::error::DryRunOperationException, +}, + +ExpiredImportTokenException { + error: aws_sdk_kms::types::error::ExpiredImportTokenException, +}, + +IncorrectKeyException { + error: aws_sdk_kms::types::error::IncorrectKeyException, +}, + +IncorrectKeyMaterialException { + error: aws_sdk_kms::types::error::IncorrectKeyMaterialException, +}, + +IncorrectTrustAnchorException { + error: aws_sdk_kms::types::error::IncorrectTrustAnchorException, +}, + +InvalidAliasNameException { + error: aws_sdk_kms::types::error::InvalidAliasNameException, +}, + +InvalidArnException { + error: aws_sdk_kms::types::error::InvalidArnException, +}, + +InvalidCiphertextException { + error: aws_sdk_kms::types::error::InvalidCiphertextException, +}, + +InvalidGrantIdException { + error: aws_sdk_kms::types::error::InvalidGrantIdException, +}, + +InvalidGrantTokenException { + error: aws_sdk_kms::types::error::InvalidGrantTokenException, +}, + +InvalidImportTokenException { + error: aws_sdk_kms::types::error::InvalidImportTokenException, +}, + +InvalidKeyUsageException { + error: aws_sdk_kms::types::error::InvalidKeyUsageException, +}, + +InvalidMarkerException { + error: aws_sdk_kms::types::error::InvalidMarkerException, +}, + +KeyUnavailableException { + error: aws_sdk_kms::types::error::KeyUnavailableException, +}, + +KmsInternalException { + error: aws_sdk_kms::types::error::KmsInternalException, +}, + +KmsInvalidMacException { + error: aws_sdk_kms::types::error::KmsInvalidMacException, +}, + +KmsInvalidSignatureException { + error: aws_sdk_kms::types::error::KmsInvalidSignatureException, +}, + +KmsInvalidStateException { + error: aws_sdk_kms::types::error::KmsInvalidStateException, +}, + +LimitExceededException { + error: aws_sdk_kms::types::error::LimitExceededException, +}, + +MalformedPolicyDocumentException { + error: aws_sdk_kms::types::error::MalformedPolicyDocumentException, +}, + +NotFoundException { + error: aws_sdk_kms::types::error::NotFoundException, +}, + +TagException { + error: aws_sdk_kms::types::error::TagException, +}, + +UnsupportedOperationException { + error: aws_sdk_kms::types::error::UnsupportedOperationException, +}, + +XksKeyAlreadyInUseException { + error: aws_sdk_kms::types::error::XksKeyAlreadyInUseException, +}, + +XksKeyInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksKeyInvalidConfigurationException, +}, + +XksKeyNotFoundException { + error: aws_sdk_kms::types::error::XksKeyNotFoundException, +}, + +XksProxyIncorrectAuthenticationCredentialException { + error: aws_sdk_kms::types::error::XksProxyIncorrectAuthenticationCredentialException, +}, + +XksProxyInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksProxyInvalidConfigurationException, +}, + +XksProxyInvalidResponseException { + error: aws_sdk_kms::types::error::XksProxyInvalidResponseException, +}, + +XksProxyUriEndpointInUseException { + error: aws_sdk_kms::types::error::XksProxyUriEndpointInUseException, +}, + +XksProxyUriInUseException { + error: aws_sdk_kms::types::error::XksProxyUriInUseException, +}, + +XksProxyUriUnreachableException { + error: aws_sdk_kms::types::error::XksProxyUriUnreachableException, +}, + +XksProxyVpcEndpointServiceInUseException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInUseException, +}, + +XksProxyVpcEndpointServiceInvalidConfigurationException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException, +}, + +XksProxyVpcEndpointServiceNotFoundException { + error: aws_sdk_kms::types::error::XksProxyVpcEndpointServiceNotFoundException, +}, + Opaque { + obj: ::dafny_runtime::Object, + }, + OpaqueWithText { + obj: ::dafny_runtime::Object, + objMessage: ::std::string::String, + }, +} + +impl ::std::cmp::Eq for Error {} + +impl ::std::fmt::Display for Error { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "{:?}", self) + } +} + +impl ::std::error::Error for Error {} diff --git a/releases/rust/esdk/src/digest.rs b/releases/rust/esdk/src/digest.rs new file mode 100644 index 000000000..f3a01ce67 --- /dev/null +++ b/releases/rust/esdk/src/digest.rs @@ -0,0 +1,34 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +use crate::*; +use aws_lc_rs::digest; +use software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm; + +impl crate::ExternDigest::_default { + #[allow(non_snake_case)] + pub fn Digest( + digest_algorithm: &::std::rc::Rc, + message: &::dafny_runtime::Sequence, + ) -> ::std::rc::Rc< + _Wrappers_Compile::Result< + ::dafny_runtime::Sequence, + ::std::rc::Rc, + >, + > { + let algorithm = match **digest_algorithm { + DigestAlgorithm::SHA_512 {} => &digest::SHA512, + DigestAlgorithm::SHA_384 {} => &digest::SHA384, + DigestAlgorithm::SHA_256 {} => &digest::SHA256, + }; + let message_vec: Vec = message.iter().collect(); + let result = digest::digest(algorithm, &message_vec); + ::std::rc::Rc::new(_Wrappers_Compile::Result::Success { + value: result.as_ref().iter().cloned().collect(), + }) + } +} diff --git a/releases/rust/esdk/src/ecdh.rs b/releases/rust/esdk/src/ecdh.rs new file mode 100644 index 000000000..15e179505 --- /dev/null +++ b/releases/rust/esdk/src/ecdh.rs @@ -0,0 +1,513 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] +#![allow(dead_code)] + +#[allow(non_snake_case)] +pub mod ECDH { + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use std::rc::Rc; + + fn error(s: &str) -> Rc { + Rc::new(DafnyError::AwsCryptographicPrimitivesError { + message: + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(s), + }) + } + + pub mod ECCUtils { + use crate::software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec; + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use crate::*; + use aws_lc_sys; + use std::rc::Rc; + + fn get_nid(x: &ECDHCurveSpec) -> i32 { + match x { + ECDHCurveSpec::ECC_NIST_P256 {} => aws_lc_sys::NID_X9_62_prime256v1, + ECDHCurveSpec::ECC_NIST_P384 {} => aws_lc_sys::NID_secp384r1, + ECDHCurveSpec::ECC_NIST_P521 {} => aws_lc_sys::NID_secp521r1, + ECDHCurveSpec::SM2 {} => panic!("No SM2 in Rust"), + } + } + // NID_secp224r1 (NIST P-224), + // NID_secp256k1 (SEC/ANSI P-256 K1) + + pub(crate) fn get_alg(x: &ECDHCurveSpec) -> &'static aws_lc_rs::agreement::Algorithm { + match x { + ECDHCurveSpec::ECC_NIST_P256 {} => &aws_lc_rs::agreement::ECDH_P256, + ECDHCurveSpec::ECC_NIST_P384 {} => &aws_lc_rs::agreement::ECDH_P384, + ECDHCurveSpec::ECC_NIST_P521 {} => &aws_lc_rs::agreement::ECDH_P521, + ECDHCurveSpec::SM2 {} => panic!("No SM2 in Rust"), + } + } + + use aws_lc_sys::CBB_finish; + use aws_lc_sys::CBB_init; + use aws_lc_sys::EC_GROUP_get_curve_name; + use aws_lc_sys::EC_GROUP_new_by_curve_name; + use aws_lc_sys::EC_KEY_get0_group; + use aws_lc_sys::EC_KEY_get0_public_key; + use aws_lc_sys::EC_KEY_new_by_curve_name; + use aws_lc_sys::EC_KEY_set_public_key; + use aws_lc_sys::EC_POINT_free; + use aws_lc_sys::EC_POINT_new; + use aws_lc_sys::EC_POINT_oct2point; + use aws_lc_sys::EC_POINT_point2oct; + use aws_lc_sys::EVP_PKEY_assign_EC_KEY; + use aws_lc_sys::EVP_PKEY_free; + use aws_lc_sys::EVP_PKEY_get0_EC_KEY; + use aws_lc_sys::EVP_PKEY_new; + use aws_lc_sys::EVP_PKEY_size; + use aws_lc_sys::EVP_marshal_public_key; + use aws_lc_sys::EVP_parse_public_key; + use aws_lc_sys::OPENSSL_free; + use aws_lc_sys::CBB; + use aws_lc_sys::CBS; + use aws_lc_sys::EVP_PKEY_EC; + use std::ptr::null_mut; + + const ELEM_MAX_BITS: usize = 521; + const ELEM_MAX_BYTES: usize = (ELEM_MAX_BITS + 7) / 8; + const PUBLIC_KEY_MAX_LEN: usize = 1 + (2 * ELEM_MAX_BYTES); + + pub(crate) fn X509_to_X962( + public_key: &[u8], + compress: bool, + nid: Option, + ) -> Result, String> { + 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 X509 Public Key.".to_string()); + } + let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; + + let ec_group = unsafe { EC_KEY_get0_group(ec_key) }; + if ec_group.is_null() { + return Err("Error in EC_KEY_get0_group in X509_to_X962.".to_string()); + } + if nid.is_some() && nid.unwrap() != unsafe { EC_GROUP_get_curve_name(ec_group) } { + return Err("Curve type mismatch in X509_to_X962.".to_string()); + } + let ec_point = unsafe { EC_KEY_get0_public_key(ec_key) }; + if ec_point.is_null() { + return Err("Error in EC_KEY_get0_public_key in X509_to_X962.".to_string()); + } + + let comp = if compress { + aws_lc_sys::point_conversion_form_t::POINT_CONVERSION_COMPRESSED + } else { + aws_lc_sys::point_conversion_form_t::POINT_CONVERSION_UNCOMPRESSED + }; + + let mut out_buf = [0u8; PUBLIC_KEY_MAX_LEN]; + let new_size = unsafe { + EC_POINT_point2oct( + ec_group, + ec_point, + comp, + out_buf.as_mut_ptr(), + PUBLIC_KEY_MAX_LEN, + null_mut(), + ) + }; + unsafe { EVP_PKEY_free(evp_pkey) }; + Ok(out_buf[..new_size].to_vec()) + } + + pub(crate) fn X962_to_X509( + public_key: &[u8], + alg: &ECDHCurveSpec, + ) -> Result, String> { + let ec_group = unsafe { EC_GROUP_new_by_curve_name(get_nid(alg)) }; + let ec_point = unsafe { EC_POINT_new(ec_group) }; + + if 1 != unsafe { + EC_POINT_oct2point( + ec_group, + ec_point, + public_key.as_ptr(), + public_key.len(), + null_mut(), + ) + } { + return Err("Error in EC_POINT_oct2point.".to_string()); + } + + let ec_key = unsafe { EC_KEY_new_by_curve_name(get_nid(alg)) }; + if 1 != unsafe { EC_KEY_set_public_key(ec_key, ec_point) } { + return Err("Error in EC_KEY_set_public_key.".to_string()); + } + + let evp_pkey = unsafe { EVP_PKEY_new() }; + if 1 != unsafe { EVP_PKEY_assign_EC_KEY(evp_pkey, ec_key) } { + return Err("Error in EVP_PKEY_assign_EC_KEY.".to_string()); + } + + let key_size_bytes: usize = unsafe { EVP_PKEY_size(evp_pkey) }.try_into().unwrap(); + let mut cbb: CBB = Default::default(); + unsafe { CBB_init(&mut cbb as *mut CBB, key_size_bytes * 5) }; + + if 1 != unsafe { EVP_marshal_public_key(&mut cbb, evp_pkey) } { + return Err("Error in EVP_marshal_public_key in GetPublicKey.".to_string()); + }; + + let mut out_data = null_mut::(); + let mut out_len: usize = 0; + + if 1 != unsafe { CBB_finish(&mut cbb, &mut out_data, &mut out_len) } { + return Err("Error in CBB_finish in GetPublicKey.".to_string()); + }; + let slice = unsafe { std::slice::from_raw_parts(out_data, out_len) }; + let slice = slice.to_vec(); + + unsafe { OPENSSL_free(out_data as *mut ::std::os::raw::c_void) }; + unsafe { EVP_PKEY_free(evp_pkey) }; + unsafe { EC_POINT_free(ec_point) }; + Ok(slice) + } + + fn inner_get_public_key( + key_bytes: &[u8], + expected_curve_nid: i32, + ) -> Result, String> { + let mut out = null_mut(); + let evp_pkey = unsafe { + aws_lc_sys::d2i_PrivateKey( + EVP_PKEY_EC, + &mut out, + &mut key_bytes.as_ptr(), + key_bytes + .len() + .try_into() + .map_err(|_| "Key too long".to_string())?, + ) + }; + if evp_pkey.is_null() { + return Err("Error in d2i_PrivateKey in GetPublicKey.".to_string()); + } + + let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; + if ec_key.is_null() { + return Err("Error in EVP_PKEY_get0_EC_KEY in GetPublicKey.".to_string()); + } + let ec_group = unsafe { EC_KEY_get0_group(ec_key) }; + if ec_group.is_null() { + return Err("Error in EC_KEY_get0_group in GetPublicKey.".to_string()); + } + let key_nid = unsafe { EC_GROUP_get_curve_name(ec_group) }; + + if key_nid != expected_curve_nid { + return Err("Wrong Algorithm".to_string()); + } + + let key_size_bytes: usize = unsafe { EVP_PKEY_size(evp_pkey) }.try_into().unwrap(); + let mut cbb: CBB = Default::default(); + unsafe { CBB_init(&mut cbb as *mut CBB, key_size_bytes * 5) }; + + if 1 != unsafe { EVP_marshal_public_key(&mut cbb, evp_pkey) } { + return Err("Error in EVP_marshal_public_key in GetPublicKey.".to_string()); + }; + + let mut out_data = null_mut::(); + let mut out_len: usize = 0; + + if 1 != unsafe { CBB_finish(&mut cbb, &mut out_data, &mut out_len) } { + return Err("Error in CBB_finish in GetPublicKey.".to_string()); + }; + let slice = unsafe { std::slice::from_raw_parts(out_data, out_len) }; + let slice = slice.to_vec(); + + unsafe { OPENSSL_free(out_data as *mut ::std::os::raw::c_void) }; + unsafe { EVP_PKEY_free(evp_pkey) }; + Ok(slice) + } + fn get_public_key(alg: &ECDHCurveSpec, pem: &[u8]) -> Result, String> { + let pem = std::str::from_utf8(pem).map_err(|e| format!("{:?}", e))?; + let private_key = pem::parse(pem).map_err(|e| format!("{:?}", e))?; + inner_get_public_key(private_key.contents(), get_nid(alg)) + } + + fn get_out_of_bounds(curve: &ECDHCurveSpec) -> Vec { + match curve { + ECDHCurveSpec::ECC_NIST_P256 {} => vec![ + 48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, + 3, 1, 7, 3, 66, 0, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, + ], + ECDHCurveSpec::ECC_NIST_P384 {} => vec![ + 48, 118, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, + 98, 0, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, + ], + ECDHCurveSpec::ECC_NIST_P521 {} => vec![ + 48, 129, 155, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, + 35, 3, 129, 134, 0, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, + ], + ECDHCurveSpec::SM2 {} => vec![], + } + } + pub fn GetOutOfBoundsPublicKey( + curve_algorithm: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let result = get_out_of_bounds(curve_algorithm); + Rc::new(_Wrappers_Compile::Result::Success { + value: result.iter().cloned().collect(), + }) + } + + fn get_infinity(curve: &ECDHCurveSpec) -> Vec { + match curve { + ECDHCurveSpec::ECC_NIST_P256 {} => vec![ + 48, 25, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, + 3, 1, 7, 3, 2, 0, 0, + ], + ECDHCurveSpec::ECC_NIST_P384 {} => vec![ + 48, 22, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, + 2, 0, 0, + ], + ECDHCurveSpec::ECC_NIST_P521 {} => vec![ + 48, 22, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 35, 3, + 2, 0, 0, + ], + ECDHCurveSpec::SM2 {} => vec![], + } + } + + pub fn GetInfinityPublicKey( + curve_algorithm: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let result = get_infinity(curve_algorithm); + Rc::new(_Wrappers_Compile::Result::Success { + value: result.iter().cloned().collect(), + }) + } + pub fn GetPublicKey( + curve_algorithm: &Rc, + private_key: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let private_key: Vec = private_key.pem().iter().collect(); + match get_public_key(curve_algorithm, &private_key) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: x.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("ECDH Get Public Key : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&msg), + }) + } + } + } + + // 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)))?; + Ok(()) + } + + pub fn ValidatePublicKey( + curve_algorithm: &Rc, + public_key: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result>> { + let public_key: Vec = public_key.iter().collect(); + match valid_public_key(curve_algorithm, &public_key) { + Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { value: true }), + Err(e) => Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&e), + }), + } + } + + pub fn CompressPublicKey( + public_key: &::dafny_runtime::Sequence, + _curve_algorithm: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let public_key: Vec = public_key.iter().collect(); + match X509_to_X962(&public_key, true, None) { + Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { + value: v.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("ECDH Compress Public Key {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&msg), + }) + } + } + } + + pub fn DecompressPublicKey( + public_key: &::dafny_runtime::Sequence, + curve_algorithm: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let public_key: Vec = public_key.iter().collect(); + match X962_to_X509(&public_key, curve_algorithm) { + Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { + value: v.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("ECDH Decompress Public Key {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&msg), + }) + } + } + } + + pub fn ParsePublicKey( + publicKey: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let public_key: Vec = publicKey.iter().collect(); + match X509_to_X962(&public_key, false, None) { + Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { + value: publicKey.clone(), + }), + Err(e) => Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&e), + }), + } + } + } + pub mod DeriveSharedSecret { + use crate::software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec; + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use crate::*; + use std::rc::Rc; + + pub fn agree( + curve_algorithm: &ECDHCurveSpec, + private_key_pem: &[u8], + public_key_der: &[u8], + ) -> Result, String> { + let pem = std::str::from_utf8(private_key_pem).map_err(|e| format!("{:?}", e))?; + let private_key = pem::parse(pem).map_err(|e| format!("{:?}", e))?; + let private_key = aws_lc_rs::agreement::PrivateKey::from_private_key_der( + super::ECCUtils::get_alg(curve_algorithm), + private_key.contents(), + ) + .map_err(|e| format!("{:?}", e))?; + let public_key = super::ECCUtils::X509_to_X962(public_key_der, false, None)?; + let public_key = aws_lc_rs::agreement::UnparsedPublicKey::new( + super::ECCUtils::get_alg(curve_algorithm), + &public_key, + ); + let shared: Vec = + aws_lc_rs::agreement::agree(&private_key, &public_key, "foo", |x| Ok(x.to_vec())) + .map_err(|_e| "Failure in aws_lc_rs::agreement::agree.".to_string())?; + Ok(shared) + } + pub fn CalculateSharedSecret( + curve_algorithm: &Rc, + private_key: &Rc, + public_key: &Rc, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let private_key: Vec = private_key.pem().iter().collect(); + let public_key: Vec = public_key.der().iter().collect(); + match agree(curve_algorithm, &private_key, &public_key) { + Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { + value: v.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("ECDH Calculate Shared Secret : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&msg), + }) + } + } + } + } + pub mod KeyGeneration { + use crate::software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec; + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use crate::*; + use aws_lc_rs::encoding::AsDer; + use aws_lc_rs::encoding::EcPrivateKeyRfc5915Der; + use std::rc::Rc; + + fn ecdsa_key_gen(alg: &ECDHCurveSpec) -> Result<(Vec, Vec), String> { + let private_key = + aws_lc_rs::agreement::PrivateKey::generate(super::ECCUtils::get_alg(alg)) + .map_err(|e| format!("{:?}", e))?; + + let public_key = private_key + .compute_public_key() + .map_err(|e| format!("{:?}", e))?; + + let public_key: Vec = super::ECCUtils::X962_to_X509(public_key.as_ref(), alg)?; + + let private_key_der = AsDer::::as_der(&private_key) + .map_err(|e| format!("{:?}", e))?; + let private_key = pem::Pem::new("PRIVATE KEY", private_key_der.as_ref()); + let private_key = pem::encode(&private_key); + let private_key: Vec = private_key.into_bytes(); + + Ok((public_key, private_key)) + } + + pub fn GenerateKeyPair( + s: &Rc, + ) -> Rc<_Wrappers_Compile::Result, Rc>> { + match ecdsa_key_gen(s) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: Rc::new(crate::ECDH::EccKeyPair::EccKeyPair { + publicKey: x.0.iter().cloned().collect(), + privateKey: x.1.iter().cloned().collect(), + }), + }), + Err(e) => { + let msg = format!("ECDH Generate Key Pair : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { + error: super::error(&msg), + }) + } + } + } + } + #[cfg(test)] + mod tests { + use super::*; + use crate::software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec; + use crate::*; + use std::rc::Rc; + + #[test] + fn test_generate() { + let alg = Rc::new(ECDHCurveSpec::ECC_NIST_P256 {}); + + let pair: crate::ECDH::EccKeyPair = match &*KeyGeneration::GenerateKeyPair(&alg) { + _Wrappers_Compile::Result::Success { value } => (**value).clone(), + _Wrappers_Compile::Result::Failure { error } => panic!("{:?}", error), + }; + + match &*ECCUtils::ValidatePublicKey(&alg, pair.publicKey()) { + _Wrappers_Compile::Result::Success { .. } => {} + _Wrappers_Compile::Result::Failure { error } => panic!("{:?}", error), + }; + } + } +} diff --git a/releases/rust/esdk/src/ecdsa.rs b/releases/rust/esdk/src/ecdsa.rs new file mode 100644 index 000000000..ae4a51b7b --- /dev/null +++ b/releases/rust/esdk/src/ecdsa.rs @@ -0,0 +1,282 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +#[allow(non_snake_case)] +pub mod Signature { + pub mod ECDSA { + use crate::software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm; + use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; + use crate::*; + use aws_lc_rs::encoding::AsDer; + use aws_lc_rs::rand::SystemRandom; + use aws_lc_rs::signature::EcdsaKeyPair; + use aws_lc_rs::signature::EcdsaSigningAlgorithm; + use aws_lc_rs::signature::EcdsaVerificationAlgorithm; + use aws_lc_rs::signature::KeyPair; + use aws_lc_rs::signature::UnparsedPublicKey; + use std::rc::Rc; + + fn error(s: &str) -> Rc { + Rc::new(DafnyError::AwsCryptographicPrimitivesError { + message: + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(s), + }) + } + + fn get_alg(x: &ECDSASignatureAlgorithm) -> &'static EcdsaSigningAlgorithm { + match x { + ECDSASignatureAlgorithm::ECDSA_P256 {} => { + // &aws_lc_rs::signature::ECDSA_P256_SHA256_FIXED_SIGNING + &aws_lc_rs::signature::ECDSA_P256_SHA256_ASN1_SIGNING + } + ECDSASignatureAlgorithm::ECDSA_P384 {} => { + // &aws_lc_rs::signature::ECDSA_P384_SHA384_FIXED_SIGNING + &aws_lc_rs::signature::ECDSA_P384_SHA384_ASN1_SIGNING + } + } + } + + fn get_ver_alg(x: &ECDSASignatureAlgorithm) -> &'static EcdsaVerificationAlgorithm { + match x { + ECDSASignatureAlgorithm::ECDSA_P256 {} => { + // &aws_lc_rs::signature::ECDSA_P256_SHA256_FIXED + &aws_lc_rs::signature::ECDSA_P256_SHA256_ASN1 + } + ECDSASignatureAlgorithm::ECDSA_P384 {} => { + // &aws_lc_rs::signature::ECDSA_P384_SHA384_FIXED + &aws_lc_rs::signature::ECDSA_P384_SHA384_ASN1 + } + } + } + + fn get_nid(x: &ECDSASignatureAlgorithm) -> i32 { + match x { + ECDSASignatureAlgorithm::ECDSA_P256 {} => aws_lc_sys::NID_X9_62_prime256v1, + ECDSASignatureAlgorithm::ECDSA_P384 {} => aws_lc_sys::NID_secp384r1, + } + } + + const ELEM_MAX_BITS: usize = 521; + const ELEM_MAX_BYTES: usize = (ELEM_MAX_BITS + 7) / 8; + const PUBLIC_KEY_MAX_LEN: usize = 1 + (2 * ELEM_MAX_BYTES); + + pub(crate) fn sec1_compress( + data: &[u8], + alg: &ECDSASignatureAlgorithm, + ) -> Result, String> { + sec1_convert( + data, + get_nid(alg), + aws_lc_sys::point_conversion_form_t::POINT_CONVERSION_COMPRESSED, + ) + } + + pub(crate) fn sec1_convert( + data: &[u8], + nid: i32, + form: aws_lc_sys::point_conversion_form_t, + ) -> Result, String> { + use aws_lc_sys::EC_GROUP_new_by_curve_name; + use aws_lc_sys::EC_POINT_free; + use aws_lc_sys::EC_POINT_new; + use aws_lc_sys::EC_POINT_oct2point; + use aws_lc_sys::EC_POINT_point2oct; + use std::ptr::null_mut; + + // no need to free ec_group + let ec_group = unsafe { EC_GROUP_new_by_curve_name(nid) }; + if ec_group.is_null() { + return Err("EC_GROUP_new_by_curve_name returned failure.".to_string()); + } + + let ec_point = unsafe { EC_POINT_new(ec_group) }; + if ec_point.is_null() { + return Err("EC_POINT_new returned failure.".to_string()); + } + let mut out_buf = [0u8; PUBLIC_KEY_MAX_LEN]; + + let ret = unsafe { + EC_POINT_oct2point(ec_group, ec_point, data.as_ptr(), data.len(), null_mut()) + }; + if ret == 0 { + return Err("EC_POINT_oct2point returned failure.".to_string()); + } + let new_size: usize = unsafe { + EC_POINT_point2oct( + ec_group, + ec_point, + form, + out_buf.as_mut_ptr(), + PUBLIC_KEY_MAX_LEN, + null_mut(), + ) + }; + unsafe { EC_POINT_free(ec_point) }; + Ok(out_buf[..new_size].to_vec()) + } + + fn ecdsa_key_gen(alg: &ECDSASignatureAlgorithm) -> Result<(Vec, Vec), String> { + let pair = EcdsaKeyPair::generate(get_alg(alg)).map_err(|e| format!("{:?}", e))?; + + let public_key: Vec = sec1_compress(pair.public_key().as_ref(), alg)?; + let private_key: Vec = pair.private_key().as_der().unwrap().as_ref().to_vec(); + Ok((public_key, private_key)) + } + + pub fn ExternKeyGen( + alg: &Rc, + ) -> Rc<_Wrappers_Compile::Result, Rc>> + { + match ecdsa_key_gen(alg) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: Rc::new(Signature::SignatureKeyPair::SignatureKeyPair { + verificationKey: x.0.iter().cloned().collect(), + signingKey: x.1.iter().cloned().collect(), + }), + }), + Err(e) => { + let msg = format!("ECDSA Key Gen : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { error: error(&msg) }) + } + } + } + + fn ecdsa_sign_inner( + alg: &ECDSASignatureAlgorithm, + key: &[u8], + msg: &[u8], + ) -> Result, String> { + let private_key = EcdsaKeyPair::from_private_key_der(get_alg(alg), key) + .map_err(|e| format!("{:?}", e))?; + let rng = SystemRandom::new(); + let sig = private_key + .sign(&rng, msg) + .map_err(|e| format!("{:?}", e))?; + Ok(sig.as_ref().to_vec()) + } + fn ecdsa_sign( + alg: &ECDSASignatureAlgorithm, + key: &[u8], + msg: &[u8], + ) -> Result, String> { + // This loop can in theory run forever, but the chances of that are negligible. + // We may want to consider failing, after some number of loops, if we can do so in a way consistent with other ESDKs. + loop { + let result = ecdsa_sign_inner(alg, key, msg)?; + if (get_alg(alg) == &aws_lc_rs::signature::ECDSA_P384_SHA384_ASN1_SIGNING + && result.len() == 103) + || (get_alg(alg) == &aws_lc_rs::signature::ECDSA_P256_SHA256_ASN1_SIGNING + && result.len() == 71) + { + return Ok(result); + } + } + } + + pub fn Sign( + alg: &Rc, + key: &::dafny_runtime::Sequence, + msg: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + match ecdsa_sign(alg, &key, &msg) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { + value: x.iter().cloned().collect(), + }), + Err(e) => { + let msg = format!("ECDSA Sign : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { error: error(&msg) }) + } + } + } + + fn ecdsa_verify( + alg: &ECDSASignatureAlgorithm, + key: &[u8], + msg: &[u8], + sig: &[u8], + ) -> Result { + let public_key = UnparsedPublicKey::new(get_ver_alg(alg), key); + match public_key.verify(msg, sig) { + Ok(_) => Ok(true), + Err(_) => Ok(false), + } + } + + pub fn Verify( + alg: &Rc, + key: &::dafny_runtime::Sequence, + msg: &::dafny_runtime::Sequence, + sig: &::dafny_runtime::Sequence, + ) -> Rc<_Wrappers_Compile::Result>> { + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + let sig: Vec = sig.iter().collect(); + match ecdsa_verify(alg, &key, &msg, &sig) { + Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: x }), + Err(e) => { + let msg = format!("ECDSA Verify : {}", e); + Rc::new(_Wrappers_Compile::Result::Failure { error: error(&msg) }) + } + } + } + #[cfg(test)] + mod tests { + use super::*; + use std::rc::Rc; + + #[test] + fn test_generate() { + let alg = Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}); + let key_pair = match &*ExternKeyGen(&alg) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("ExternKeyGen Failed : {:?}", error); + } + }; + + let (s_key, v_key) = match &*key_pair { + Signature::SignatureKeyPair::SignatureKeyPair { + signingKey, + verificationKey, + } => (signingKey, verificationKey), + }; + + let message: ::dafny_runtime::Sequence = + [1u8, 2, 3, 4, 5].iter().cloned().collect(); + + let sig = match &*Sign(&alg, &s_key, &message) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("Sign Failed : {:?}", error); + } + }; + + let ver: bool = match &*Verify(&alg, &v_key, &message, &sig) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("Verify Failed : {:?}", error); + } + }; + assert!(ver); + + let mut sig_vec: Vec = sig.iter().collect(); + sig_vec[0] = 42; + let sig2: ::dafny_runtime::Sequence = sig_vec.iter().cloned().collect(); + assert!(sig != sig2); + let ver2: bool = match &*Verify(&alg, &v_key, &message, &sig2) { + _Wrappers_Compile::Result::Success { value } => value.clone(), + _Wrappers_Compile::Result::Failure { error } => { + panic!("Verify Failed : {:?}", error); + } + }; + assert!(!ver2); + } + } + } +} diff --git a/releases/rust/esdk/src/error.rs b/releases/rust/esdk/src/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/esdk/src/error.rs @@ -0,0 +1,16 @@ +// 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 use ::aws_smithy_runtime_api::box_error::BoxError; + +/// Error type returned by the client. +pub type SdkError = + ::aws_smithy_runtime_api::client::result::SdkError; +pub use ::aws_smithy_runtime_api::client::result::ConnectorError; +pub use ::aws_smithy_types::error::operation::BuildError; + +pub use ::aws_smithy_types::error::display::DisplayErrorContext; +pub use ::aws_smithy_types::error::metadata::ErrorMetadata; +pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; + +pub(crate) mod sealed_unhandled; diff --git a/releases/rust/esdk/src/error/sealed_unhandled.rs b/releases/rust/esdk/src/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/esdk/src/error/sealed_unhandled.rs @@ -0,0 +1,32 @@ +// 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. +use std::any::Any; + +use dafny_runtime::UpcastObject; + +/// This struct is not intended to be used. +/// +/// This struct holds information about an unhandled error, +/// but that information should be obtained by using the +/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait +/// on the error type. +/// +/// This struct intentionally doesn't yield any useful information itself. +#[deprecated( + note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ +variable wildcard pattern and check `.code()`: + \ +   `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ +See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." +)] +#[derive(Debug)] +pub struct Unhandled { + pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, + pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, +} + +impl UpcastObject for Unhandled { + ::dafny_runtime::UpcastObjectFn!(dyn ::std::any::Any); +} diff --git a/releases/rust/esdk/src/hmac.rs b/releases/rust/esdk/src/hmac.rs new file mode 100644 index 000000000..a336060f5 --- /dev/null +++ b/releases/rust/esdk/src/hmac.rs @@ -0,0 +1,123 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#![deny(warnings, unconditional_panic)] +#![deny(nonstandard_style)] +#![deny(clippy::all)] + +use crate::software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm; +use crate::*; +use aws_lc_rs::hmac; + +fn convert_algorithm(input: &DigestAlgorithm) -> hmac::Algorithm { + match input { + DigestAlgorithm::SHA_512 {} => hmac::HMAC_SHA512, + DigestAlgorithm::SHA_384 {} => hmac::HMAC_SHA384, + DigestAlgorithm::SHA_256 {} => hmac::HMAC_SHA256, + } +} + +// Let's implement HMAC::_default::Digest +impl crate::HMAC::_default { + #[allow(non_snake_case)] + pub fn Digest( + input: &::std::rc::Rc< + crate::software::amazon::cryptography::primitives::internaldafny::types::HMacInput, + >, + ) -> ::std::rc::Rc< + _Wrappers_Compile::Result< + ::dafny_runtime::Sequence, + ::std::rc::Rc, + >, + > { + let key_vec: Vec = input.key().iter().collect(); + let the_key = hmac::Key::new(convert_algorithm(input.digestAlgorithm()), &key_vec); + let message_vec: Vec = input.message().iter().collect(); + let result = hmac::sign(&the_key, &message_vec); + ::std::rc::Rc::new(_Wrappers_Compile::Result::Success { + value: result.as_ref().iter().cloned().collect(), + }) + } +} + +#[allow(non_snake_case)] +pub mod HMAC { + use crate::*; + use aws_lc_rs::hmac; + use std::cell::RefCell; + #[allow(non_camel_case_types)] + pub struct _default {} + + #[derive(Debug)] + pub struct HMacInner { + context: Option, + key: Option, + } + pub struct HMac { + algorithm: hmac::Algorithm, + inner: RefCell, + } + + impl dafny_runtime::UpcastObject for HMac { + dafny_runtime::UpcastObjectFn!(dyn std::any::Any); + } + + impl HMac { + pub fn Init(&self, salt: &::dafny_runtime::Sequence) { + let salt: Vec = salt.iter().collect(); + self.inner.borrow_mut().key = Some(hmac::Key::new(self.algorithm, &salt)); + let context = Some(hmac::Context::with_key( + self.inner.borrow().key.as_ref().unwrap(), + )); + self.inner.borrow_mut().context = context; + } + pub fn re_init(&self) { + let context = Some(hmac::Context::with_key( + self.inner.borrow().key.as_ref().unwrap(), + )); + self.inner.borrow_mut().context = context; + } + pub fn Build( + input: &::std::rc::Rc< + software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm, + >, + ) -> ::std::rc::Rc< + _Wrappers_Compile::Result< + ::dafny_runtime::Object, + ::std::rc::Rc< + software::amazon::cryptography::primitives::internaldafny::types::Error, + >, + >, + > { + let inner = dafny_runtime::Object::new(Self { + algorithm: super::convert_algorithm(input), + inner: RefCell::new(HMacInner { + context: None, + key: None, + }), + }); + + ::std::rc::Rc::new(_Wrappers_Compile::Result::Success { value: inner }) + } + pub fn BlockUpdate(&self, block: &::dafny_runtime::Sequence) { + let part: Vec = block.iter().collect(); + self.inner + .borrow_mut() + .context + .as_mut() + .unwrap() + .update(&part); + } + pub fn GetResult(&self) -> ::dafny_runtime::Sequence { + let is_empty = self.inner.borrow().context.is_none(); + if is_empty { + return [].iter().cloned().collect(); + } + let tag = self.inner.borrow_mut().context.take().unwrap().sign(); + // other languages allow you to call BlockUpdate after GetResult + // so we re-initialize to mimic that behavior + self.re_init(); + tag.as_ref().iter().cloned().collect() + } + } +} diff --git a/releases/rust/esdk/src/implementation_from_dafny.rs b/releases/rust/esdk/src/implementation_from_dafny.rs new file mode 100644 index 000000000..a8a130c73 --- /dev/null +++ b/releases/rust/esdk/src/implementation_from_dafny.rs @@ -0,0 +1,96730 @@ +#![allow(warnings, unconditional_panic)] +#![allow(nonstandard_style)] +pub mod _dafny_externs { + pub use crate::aes_gcm::*; + pub use crate::aes_kdf_ctr::*; + pub use crate::concurrent_call::*; + pub use crate::dafny_libraries::*; + pub use crate::ddb::*; + pub use crate::digest::*; + pub use crate::ecdh::*; + pub use crate::ecdsa::*; + pub use crate::hmac::*; + pub use crate::kms::*; + pub use crate::local_cmc::*; + pub use crate::random::*; + pub use crate::rsa::*; + pub use crate::sets::*; + pub use crate::software_externs::*; + pub use crate::storm_tracker::*; + pub use crate::time::*; + pub use crate::uuid::*; +} + +pub mod _module { + +} +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 ::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; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Outcome; + pub use ::dafny_runtime::string_utf16_of; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::OpaqueError; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput; + + pub struct _default {} + + impl _default { + pub fn EncryptionOutputFromByteSeq(s: &Sequence, encAlg: &Rc) -> Rc { + 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() + }) + } + 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() == 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() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut r#__let_tmp_rhs0: Rc = input.clone(); + let mut encAlg: Rc = r#__let_tmp_rhs0.encAlg().clone(); + let mut iv: Sequence = r#__let_tmp_rhs0.iv().clone(); + let mut key: Sequence = r#__let_tmp_rhs0.key().clone(); + let mut msg: Sequence = r#__let_tmp_rhs0.msg().clone(); + let mut aad: Sequence = r#__let_tmp_rhs0.aad().clone(); + let mut valueOrError1 = MaybePlacebo::, OpaqueError>>>::new(); + let mut _out0 = MaybePlacebo::, OpaqueError>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::_dafny_externs::AESEncryption::AES_GCM::AESEncryptExtern(&encAlg, &iv, &key, &msg, &aad)); + valueOrError1 = MaybePlacebo::from(_out0.read()); + if valueOrError1.read().IsFailure() { + res = MaybePlacebo::from(valueOrError1.read().PropagateFailure::>()); + return res.read(); + }; + let mut value: Rc = valueOrError1.read().Extract(); + let mut valueOrError2 = MaybePlacebo::>>>::new(); + valueOrError2 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(value.cipherText().cardinality() == msg.cardinality(), &Rc::new(Error::AwsCryptographicPrimitivesError { + message: string_utf16_of("AESEncrypt did not return cipherText of expected length") + }))); + if valueOrError2.read().IsFailure() { + res = MaybePlacebo::from(valueOrError2.read().PropagateFailure::>()); + return res.read(); + }; + let mut valueOrError3 = MaybePlacebo::>>>::new(); + 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() { + res = MaybePlacebo::from(valueOrError3.read().PropagateFailure::>()); + return res.read(); + }; + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: value.clone() + })); + return res.read(); + } + 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() == 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() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut r#__let_tmp_rhs0: Rc = input.clone(); + let mut encAlg: Rc = r#__let_tmp_rhs0.encAlg().clone(); + let mut key: Sequence = r#__let_tmp_rhs0.key().clone(); + let mut cipherTxt: Sequence = r#__let_tmp_rhs0.cipherTxt().clone(); + let mut authTag: Sequence = r#__let_tmp_rhs0.authTag().clone(); + let mut iv: Sequence = r#__let_tmp_rhs0.iv().clone(); + let mut aad: Sequence = r#__let_tmp_rhs0.aad().clone(); + let mut valueOrError1 = MaybePlacebo::, OpaqueError>>>::new(); + let mut _out0 = MaybePlacebo::, OpaqueError>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::_dafny_externs::AESEncryption::AES_GCM::AESDecryptExtern(&encAlg, &key, &cipherTxt, &authTag, &iv, &aad)); + valueOrError1 = MaybePlacebo::from(_out0.read()); + if valueOrError1.read().IsFailure() { + res = MaybePlacebo::from(valueOrError1.read().PropagateFailure::>()); + return res.read(); + }; + let mut value: Sequence = valueOrError1.read().Extract(); + let mut valueOrError2 = MaybePlacebo::>>>::new(); + valueOrError2 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(cipherTxt.cardinality() == value.cardinality(), &Rc::new(Error::AwsCryptographicPrimitivesError { + message: string_utf16_of("AESDecrypt did not return plaintext of expected length") + }))); + if valueOrError2.read().IsFailure() { + res = MaybePlacebo::from(valueOrError2.read().PropagateFailure::>()); + return res.read(); + }; + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: value.clone() + })); + return res.read(); + } + pub fn CreateAESEncryptExternSuccess(output: &Rc) -> Rc, OpaqueError>> { + Rc::new(Result::, OpaqueError>::Success { + value: output.clone() + }) + } + pub fn CreateAESEncryptExternFailure(error: &OpaqueError) -> Rc, OpaqueError>> { + Rc::new(Result::, OpaqueError>::Failure { + error: error.clone() + }) + } + pub fn CreateAESDecryptExternSuccess(bytes: &Sequence) -> Rc, OpaqueError>> { + Rc::new(Result::, OpaqueError>::Success { + value: bytes.clone() + }) + } + pub fn CreateAESDecryptExternFailure(error: &OpaqueError) -> Rc, OpaqueError>> { + Rc::new(Result::, OpaqueError>::Failure { + error: error.clone() + }) + } + } +} +pub mod r#_Actions_Compile { + pub use ::dafny_runtime::DafnyType; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::MaybePlacebo; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::integer_range; + pub use ::dafny_runtime::int; + 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; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::convert::AsRef; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObject; + + pub struct _default {} + + impl _default { + pub fn DeterministicMap<_A: DafnyType, _R: DafnyType>(action: &Object>, s: &Sequence<_A>) -> Sequence<_R> { + let mut res = MaybePlacebo::>::new(); + let mut rs: Sequence<_R> = seq![] as Sequence<_R>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + r = MaybePlacebo::from(_out0.read()); + rs = rs.concat(&seq![r.read()]); + } + res = MaybePlacebo::from(rs.clone()); + return res.read(); + } + pub fn DeterministicMapWithResult<_A: DafnyType, _R: DafnyType, _E: DafnyType>(action: &Object>, s: &Sequence<_A>) -> Rc, _E>> { + let mut res = MaybePlacebo::, _E>>>::new(); + let mut rs: Sequence<_R> = seq![] as Sequence<_R>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + valueOrError0 = MaybePlacebo::from(_out0.read()); + if valueOrError0.read().IsFailure() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut r: _R = valueOrError0.read().Extract(); + rs = rs.concat(&seq![r.clone()]); + } + res = MaybePlacebo::from(Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::, _E>::Success { + value: rs.clone() + })); + return res.read(); + } + pub fn DeterministicFlatMap<_A: DafnyType, _R: DafnyType>(action: &Object>>, s: &Sequence<_A>) -> Sequence<_R> { + let mut res = MaybePlacebo::>::new(); + let mut rs: Sequence<_R> = seq![] as Sequence<_R>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + r = MaybePlacebo::from(_out0.read()); + rs = rs.concat(&r.read()); + } + res = MaybePlacebo::from(rs.clone()); + return res.read(); + } + pub fn DeterministicFlatMapWithResult<_A: DafnyType, _R: DafnyType, _E: DafnyType>(action: &Object, _E>>, s: &Sequence<_A>) -> Rc, _E>> { + let mut res = MaybePlacebo::, _E>>>::new(); + let mut rs: Sequence<_R> = seq![] as Sequence<_R>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + valueOrError0 = MaybePlacebo::from(_out0.read()); + if valueOrError0.read().IsFailure() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut r: Sequence<_R> = valueOrError0.read().Extract(); + rs = rs.concat(&r); + } + let mut _rhs0: Rc, _E>> = Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::, _E>::Success { + value: rs.clone() + }); + res = MaybePlacebo::from(_rhs0.clone()); + return res.read(); + } + pub fn Filter<_A: DafnyType>(action: &Object>, s: &Sequence<_A>) -> Sequence<_A> { + let mut res = MaybePlacebo::>::new(); + let mut rs: Sequence<_A> = seq![] as Sequence<_A>; + let mut _hi0: DafnyInt = s.cardinality(); + for i in integer_range(int!(0), _hi0.clone()) { + let mut r: bool = ::default(); + let mut _out0: bool = ::default(); + _out0 = DeterministicAction::<_A, bool>::Invoke(md!(action.clone()), &s.get(&i)); + r = _out0; + if r { + rs = rs.concat(&seq![s.get(&i)]); + } + } + res = MaybePlacebo::from(rs.clone()); + return res.read(); + } + pub fn FilterWithResult<_A: DafnyType, _E: DafnyType>(action: &Object>, s: &Sequence<_A>) -> Rc, _E>> { + let mut res = MaybePlacebo::, _E>>>::new(); + let mut rs: Sequence<_A> = seq![] as Sequence<_A>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + valueOrError0 = MaybePlacebo::from(_out0.read()); + if valueOrError0.read().IsFailure() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut r: bool = valueOrError0.read().Extract(); + if r { + rs = rs.concat(&seq![s.get(&i)]); + } + } + res = MaybePlacebo::from(Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::, _E>::Success { + value: rs.clone() + })); + return res.read(); + } + pub fn ReduceToSuccess<_A: DafnyType, _B: DafnyType, _E: DafnyType>(action: &Object>, s: &Sequence<_A>) -> Rc>> { + let mut res = MaybePlacebo::>>>::new(); + let mut attemptedResults: Sequence>> = seq![] as Sequence>>; + let mut _hi0: DafnyInt = s.cardinality(); + 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(md!(action.clone()), &s.get(&i))); + attempt = MaybePlacebo::from(_out0.read()); + attemptedResults = attemptedResults.concat(&seq![attempt.read()]); + if matches!((&attempt.read()).as_ref(), Success{ .. }) { + let mut _rhs0: Rc>> = Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::<_B, Sequence<_E>>::Success { + value: attempt.read().value().clone() + }); + res = MaybePlacebo::from(_rhs0.clone()); + return res.read(); + } + } + res = MaybePlacebo::from(Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::<_B, Sequence<_E>>::Failure { + error: crate::implementation_from_dafny::r#_Seq_Compile::_default::Map::>, _E>(&(Rc::new(move |x0: &Rc>| _default::pluckErrors(x0)) as Rc _>), &attemptedResults) + })); + return res.read(); + } + pub fn pluckErrors<_B: DafnyType, _E: DafnyType>(r: &Rc>) -> _E { + r.error().clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum ActionInvoke { + ActionInvoke { + input: A, + output: R + } + } + + impl ActionInvoke { + pub fn input(&self) -> &A { + match self { + ActionInvoke::ActionInvoke{input, output, } => input, + } + } + pub fn output(&self) -> &R { + match self { + ActionInvoke::ActionInvoke{input, output, } => output, + } + } + } + + impl Debug + for ActionInvoke { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ActionInvoke { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ActionInvoke::ActionInvoke{input, output, } => { + write!(_formatter, "Actions_Compile.ActionInvoke.ActionInvoke(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ActionInvoke {} + + impl Hash + for ActionInvoke { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ActionInvoke::ActionInvoke{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for ActionInvoke { + fn default() -> ActionInvoke { + ActionInvoke::ActionInvoke { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &ActionInvoke { + fn as_ref(&self) -> Self { + self + } + } + + pub trait Action: Any + UpcastObject + where + A: DafnyType, + R: DafnyType { + fn Invoke(&self, a: &A) -> R; + } + + pub trait ActionWithResult: Any + UpcastObject + Action>> + UpcastObject>>> + where + A: DafnyType, + R: DafnyType, + E: DafnyType {} + + pub trait DeterministicAction: Any + UpcastObject + where + A: DafnyType, + R: DafnyType { + fn Invoke(&self, a: &A) -> R; + } + + pub trait DeterministicActionWithResult: Any + UpcastObject + DeterministicAction>> + UpcastObject>>> + where + A: DafnyType, + R: DafnyType, + E: DafnyType {} +} +pub mod AesKdfCtr { + pub use ::dafny_runtime::Sequence; + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Error; + + pub struct _default {} + + impl _default { + pub fn CreateStreamSuccess(bytes: &Sequence) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: bytes.clone() + }) + } + pub fn CreateStreamFailure(error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + } +} +pub mod r#_AlgorithmSuites_Compile { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm::SHA_512; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF; + pub use ::dafny_runtime::seq; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::HMAC; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteId::ESDK; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AES_GCM; + pub use ::dafny_runtime::Sequence; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::Error; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Outcome; + pub use ::dafny_runtime::string_utf16_of; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm; + pub use ::dafny_runtime::Map; + pub use ::dafny_runtime::map; + + pub struct _default {} + + impl _default { + pub fn r#_SupportedESDKEncrypt_q(e: &Rc) -> bool { + true && (e.AES_GCM().keyLength().clone() == 32 || e.AES_GCM().keyLength().clone() == 24 || e.AES_GCM().keyLength().clone() == 16) && e.AES_GCM().tagLength().clone() == 16 && e.AES_GCM().ivLength().clone() == 12 + } + pub fn r#_SupportedDBEEncrypt_q(e: &Rc) -> bool { + true && e.AES_GCM().keyLength().clone() == 32 && e.AES_GCM().tagLength().clone() == 16 && e.AES_GCM().ivLength().clone() == 12 + } + pub fn r#_SupportedDBEEDKWrapping_q(p: &Rc) -> bool { + matches!(p.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. }) && true && p.IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().keyLength().clone() == 32 && p.IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().tagLength().clone() == 16 && p.IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().ivLength().clone() == 12 && matches!(p.IntermediateKeyWrapping().macKeyKdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(p.IntermediateKeyWrapping().keyEncryptionKeyKdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) + } + pub fn r#_KeyDerivationAlgorithm_q(kdf: &Rc) -> bool { + (!(true && matches!(kdf.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. })) || kdf.HKDF().inputKeyLength().clone() == kdf.HKDF().outputKeyLength().clone() && (!(kdf.HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_512 {})) || kdf.HKDF().inputKeyLength().clone() == 32)) && !matches!(kdf.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) + } + pub fn r#_CommitmentDerivationAlgorithm_q(kdf: &Rc) -> bool { + (!(true && matches!(kdf.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. })) || matches!(kdf.HKDF().hmac().as_ref(), SHA_512{ .. }) && kdf.HKDF().saltLength().clone() == 32 && kdf.HKDF().inputKeyLength().clone() == 32 && kdf.HKDF().outputKeyLength().clone() == 32) && !matches!(kdf.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY{ .. }) + } + pub fn r#_EdkWrappingAlgorithm_q(alg: &Rc) -> bool { + matches!(alg.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. }) && matches!(alg.IntermediateKeyWrapping().keyEncryptionKeyKdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(alg.IntermediateKeyWrapping().macKeyKdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && true && alg.IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().keyLength().clone() == 32 || matches!(alg.as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } + pub fn r#_AlgorithmSuiteInfo_q(a: &Rc) -> bool { + _default::r#_KeyDerivationAlgorithm_q(a.kdf()) && _default::r#_CommitmentDerivationAlgorithm_q(a.commitment()) && _default::r#_EdkWrappingAlgorithm_q(a.edkWrapping()) && (!matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) || true && a.kdf().HKDF().outputKeyLength().clone() == a.encrypt().AES_GCM().keyLength().clone()) && (!matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) || matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. })) && (!matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) || a.commitment().HKDF().saltLength().clone() == 32 && a.commitment().clone() == a.kdf().clone()) && (!matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. }) || matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.edkWrapping().IntermediateKeyWrapping().keyEncryptionKeyKdf().clone() == a.kdf().clone() && a.edkWrapping().IntermediateKeyWrapping().macKeyKdf().clone() == a.kdf().clone()) && (!(matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. })) || a.kdf().HKDF().saltLength().clone() == 0) && (!(!matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. })) || true && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. })) + } + pub fn r#_ESDKAlgorithmSuite_q(a: &Rc) -> bool { + _default::r#_AlgorithmSuiteInfo_q(a) && _default::r#_SupportedESDKEncrypt_q(a.encrypt()) && (&({ + let mut a = a.clone(); + Rc::new(move |_source0: &Rc| -> bool{ + if matches!(_source0.as_ref(), ALG_AES_128_GCM_IV12_TAG16_NO_KDF{ .. }) { + a.binaryId().clone() == seq![0, 20] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 16 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY{ .. }) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_192_GCM_IV12_TAG16_NO_KDF{ .. }) { + a.binaryId().clone() == seq![0, 70] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 24 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY{ .. }) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_256_GCM_IV12_TAG16_NO_KDF{ .. }) { + a.binaryId().clone() == seq![0, 120] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY{ .. }) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256{ .. }) { + a.binaryId().clone() == seq![1, 20] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 16 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_256 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256{ .. }) { + a.binaryId().clone() == seq![1, 70] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 24 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_256 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256{ .. }) { + a.binaryId().clone() == seq![1, 120] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_256 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256{ .. }) { + a.binaryId().clone() == seq![2, 20] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 16 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_256 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) && a.signature().ECDSA().curve().clone() == Rc::new(ECDSASignatureAlgorithm::ECDSA_P256 {}) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{ .. }) { + a.binaryId().clone() == seq![3, 70] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 24 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_384 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) && a.signature().ECDSA().curve().clone() == Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{ .. }) { + a.binaryId().clone() == seq![3, 120] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_384 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) && a.signature().ECDSA().curve().clone() == Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + if matches!(_source0.as_ref(), ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY{ .. }) { + a.binaryId().clone() == seq![4, 120] && a.messageVersion().clone() == 2 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_512 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } else { + a.binaryId().clone() == seq![5, 120] && a.messageVersion().clone() == 2 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_512 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) && a.signature().ECDSA().curve().clone() == Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(a.symmetricSignature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SymmetricSignatureAlgorithm::None{ .. }) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{ .. }) + } + } + } + } + } + } + } + } + } + } + }) + }))(a.id().ESDK()) + } + pub fn r#_DBEAlgorithmSuite_q(a: &Rc) -> bool { + _default::r#_AlgorithmSuiteInfo_q(a) && _default::r#_SupportedDBEEncrypt_q(a.encrypt()) && _default::r#_SupportedDBEEDKWrapping_q(a.edkWrapping()) && (&({ + let mut a = a.clone(); + Rc::new(move |_source0: &Rc| -> bool{ + if matches!(_source0.as_ref(), ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384{ .. }) { + a.binaryId().clone() == seq![103, 0] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_512 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::None{ .. }) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(a.symmetricSignature().as_ref(), HMAC{ .. }) && a.symmetricSignature().HMAC().clone() == Rc::new(DigestAlgorithm::SHA_384 {}) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. }) && true && a.edkWrapping().IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().keyLength().clone() == 32 + } else { + a.binaryId().clone() == seq![103, 1] && a.messageVersion().clone() == 1 && true && a.encrypt().AES_GCM().keyLength().clone() == 32 && matches!(a.kdf().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && a.kdf().HKDF().hmac().clone() == Rc::new(DigestAlgorithm::SHA_512 {}) && matches!(a.signature().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::SignatureAlgorithm::ECDSA{ .. }) && a.signature().ECDSA().curve().clone() == Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) && matches!(a.commitment().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF{ .. }) && matches!(a.symmetricSignature().as_ref(), HMAC{ .. }) && a.symmetricSignature().HMAC().clone() == Rc::new(DigestAlgorithm::SHA_384 {}) && matches!(a.edkWrapping().as_ref(), crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EdkWrappingAlgorithm::IntermediateKeyWrapping{ .. }) && true && a.edkWrapping().IntermediateKeyWrapping().pdkEncryptAlgorithm().AES_GCM().keyLength().clone() == 32 + } + }) + }))(a.id().DBE()) + } + pub fn r#_AlgorithmSuite_q(a: &Rc) -> bool { + let mut _source0: Rc = a.id().clone(); + if matches!((&_source0).as_ref(), ESDK{ .. }) { + let mut r#___mcc_h0: Rc = _source0.ESDK().clone(); + _default::r#_ESDKAlgorithmSuite_q(a) + } else { + let mut r#___mcc_h1: Rc = _source0.DBE().clone(); + _default::r#_DBEAlgorithmSuite_q(a) + } + } + pub fn HKDF_SHA_256(keyLength: SymmetricKeyLength) -> Rc { + Rc::new(DerivationAlgorithm::HKDF { + HKDF: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::HKDF::HKDF { + hmac: Rc::new(DigestAlgorithm::SHA_256 {}), + saltLength: 0, + inputKeyLength: keyLength, + outputKeyLength: keyLength + }) + }) + } + pub fn HKDF_SHA_384(keyLength: SymmetricKeyLength) -> Rc { + Rc::new(DerivationAlgorithm::HKDF { + HKDF: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::HKDF::HKDF { + hmac: Rc::new(DigestAlgorithm::SHA_384 {}), + saltLength: 0, + inputKeyLength: keyLength, + outputKeyLength: keyLength + }) + }) + } + pub fn HKDF_SHA_512(keyLength: SymmetricKeyLength) -> Rc { + Rc::new(DerivationAlgorithm::HKDF { + HKDF: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::HKDF::HKDF { + hmac: Rc::new(DigestAlgorithm::SHA_512 {}), + saltLength: 32, + inputKeyLength: keyLength, + outputKeyLength: keyLength + }) + }) + } + pub fn GetSuite(id: &Rc) -> AlgorithmSuite { + let mut _source0: Rc = id.clone(); + if matches!((&_source0).as_ref(), ESDK{ .. }) { + let mut r#___mcc_h0: Rc = _source0.ESDK().clone(); + let mut e: Rc = r#___mcc_h0.clone(); + _default::GetESDKSuite(&e) + } else { + let mut r#___mcc_h1: Rc = _source0.DBE().clone(); + let mut e: Rc = r#___mcc_h1.clone(); + _default::GetDBESuite(&e) + } + } + pub fn GetDBESuite(id: &Rc) -> AlgorithmSuite { + _default::SupportedDBEAlgorithmSuites().get(id) + } + pub fn GetESDKSuite(id: &Rc) -> AlgorithmSuite { + _default::SupportedESDKAlgorithmSuites().get(id) + } + pub fn GetEncryptKeyLength(a: &Rc) -> i32 { + let mut _source0: Rc = a.encrypt().clone(); + let mut r#___mcc_h0: Rc = _source0.AES_GCM().clone(); + let mut e: Rc = r#___mcc_h0.clone(); + e.keyLength().clone() + } + pub fn GetEncryptTagLength(a: &Rc) -> i32 { + let mut _source0: Rc = a.encrypt().clone(); + let mut r#___mcc_h0: Rc = _source0.AES_GCM().clone(); + let mut e: Rc = r#___mcc_h0.clone(); + e.tagLength().clone() + } + pub fn GetEncryptIvLength(a: &Rc) -> i32 { + let mut _source0: Rc = a.encrypt().clone(); + let mut r#___mcc_h0: Rc = _source0.AES_GCM().clone(); + let mut e: Rc = r#___mcc_h0.clone(); + e.ivLength().clone() + } + pub fn GetAlgorithmSuiteInfo(r#_binaryId_q: &Sequence) -> Rc, Rc>> { + let mut valueOrError0: Rc>> = crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(_default::AlgorithmSuiteInfoByBinaryId().contains(r#_binaryId_q), &Rc::new(Error::AwsCryptographicMaterialProvidersException { + message: string_utf16_of("Invalid BinaryId") + })); + if valueOrError0.IsFailure() { + valueOrError0.PropagateFailure::() + } else { + Rc::new(Result::>::Success { + value: _default::AlgorithmSuiteInfoByBinaryId().get(r#_binaryId_q) + }) + } + } + pub fn Bits128() -> i32 { + 16 + } + pub fn TagLen() -> i32 { + 16 + } + pub fn IvLen() -> i32 { + 12 + } + pub fn AES_128_GCM_IV12_TAG16() -> Rc { + Rc::new(Encrypt::AES_GCM { + AES_GCM: Rc::new(AES_GCM::AES_GCM { + keyLength: _default::Bits128(), + tagLength: _default::TagLen(), + ivLength: _default::IvLen() + }) + }) + } + pub fn Bits192() -> i32 { + 24 + } + pub fn AES_192_GCM_IV12_TAG16() -> Rc { + Rc::new(Encrypt::AES_GCM { + AES_GCM: Rc::new(AES_GCM::AES_GCM { + keyLength: _default::Bits192(), + tagLength: _default::TagLen(), + ivLength: _default::IvLen() + }) + }) + } + pub fn Bits256() -> i32 { + 32 + } + pub fn AES_256_GCM_IV12_TAG16() -> Rc { + Rc::new(Encrypt::AES_GCM { + AES_GCM: Rc::new(AES_GCM::AES_GCM { + keyLength: _default::Bits256(), + tagLength: _default::TagLen(), + ivLength: _default::IvLen() + }) + }) + } + pub fn EDK_INTERMEDIATE_WRAPPING_AES_GCM_256_HKDF_SHA_512() -> Rc { + Rc::new(EdkWrappingAlgorithm::IntermediateKeyWrapping { + IntermediateKeyWrapping: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IntermediateKeyWrapping::IntermediateKeyWrapping { + keyEncryptionKeyKdf: _default::HKDF_SHA_512(_default::Bits256()), + macKeyKdf: _default::HKDF_SHA_512(_default::Bits256()), + pdkEncryptAlgorithm: _default::AES_256_GCM_IV12_TAG16() + }) + }) + } + pub fn DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::DBE { + DBE: Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {}) + }), + binaryId: seq![103, 0], + messageVersion: 1, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_512(_default::Bits256()), + commitment: _default::HKDF_SHA_512(_default::Bits256()), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::HMAC { + HMAC: Rc::new(DigestAlgorithm::SHA_384 {}) + }), + edkWrapping: _default::EDK_INTERMEDIATE_WRAPPING_AES_GCM_256_HKDF_SHA_512() + }) + } + pub fn DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::DBE { + DBE: Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {}) + }), + binaryId: seq![103, 1], + messageVersion: 1, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_512(_default::Bits256()), + commitment: _default::HKDF_SHA_512(_default::Bits256()), + signature: Rc::new(SignatureAlgorithm::ECDSA { + ECDSA: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) + }) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::HMAC { + HMAC: Rc::new(DigestAlgorithm::SHA_384 {}) + }), + edkWrapping: _default::EDK_INTERMEDIATE_WRAPPING_AES_GCM_256_HKDF_SHA_512() + }) + } + pub fn ESDK_ALG_AES_128_GCM_IV12_TAG16_NO_KDF() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {}) + }), + binaryId: seq![0, 20], + messageVersion: 1, + encrypt: _default::AES_128_GCM_IV12_TAG16(), + kdf: Rc::new(DerivationAlgorithm::IDENTITY { + IDENTITY: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY::IDENTITY {}) + }), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_192_GCM_IV12_TAG16_NO_KDF() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF {}) + }), + binaryId: seq![0, 70], + messageVersion: 1, + encrypt: _default::AES_192_GCM_IV12_TAG16(), + kdf: Rc::new(DerivationAlgorithm::IDENTITY { + IDENTITY: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY::IDENTITY {}) + }), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_256_GCM_IV12_TAG16_NO_KDF() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF {}) + }), + binaryId: seq![0, 120], + messageVersion: 1, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: Rc::new(DerivationAlgorithm::IDENTITY { + IDENTITY: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IDENTITY::IDENTITY {}) + }), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {}) + }), + binaryId: seq![1, 20], + messageVersion: 1, + encrypt: _default::AES_128_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_256(_default::Bits128()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {}) + }), + binaryId: seq![1, 70], + messageVersion: 1, + encrypt: _default::AES_192_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_256(_default::Bits192()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {}) + }), + binaryId: seq![1, 120], + messageVersion: 1, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_256(_default::Bits256()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {}) + }), + binaryId: seq![2, 20], + messageVersion: 1, + encrypt: _default::AES_128_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_256(_default::Bits128()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::ECDSA { + ECDSA: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: Rc::new(ECDSASignatureAlgorithm::ECDSA_P256 {}) + }) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}) + }), + binaryId: seq![3, 70], + messageVersion: 1, + encrypt: _default::AES_192_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_384(_default::Bits192()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::ECDSA { + ECDSA: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) + }) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}) + }), + binaryId: seq![3, 120], + messageVersion: 1, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_384(_default::Bits256()), + commitment: Rc::new(DerivationAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + signature: Rc::new(SignatureAlgorithm::ECDSA { + ECDSA: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) + }) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {}) + }), + binaryId: seq![4, 120], + messageVersion: 2, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_512(_default::Bits256()), + commitment: _default::HKDF_SHA_512(_default::Bits256()), + signature: Rc::new(SignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384() -> AlgorithmSuite { + Rc::new(AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Rc::new(AlgorithmSuiteId::ESDK { + ESDK: Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {}) + }), + binaryId: seq![5, 120], + messageVersion: 2, + encrypt: _default::AES_256_GCM_IV12_TAG16(), + kdf: _default::HKDF_SHA_512(_default::Bits256()), + commitment: _default::HKDF_SHA_512(_default::Bits256()), + signature: Rc::new(SignatureAlgorithm::ECDSA { + ECDSA: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ECDSA::ECDSA { + curve: Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}) + }) + }), + symmetricSignature: Rc::new(SymmetricSignatureAlgorithm::None { + _None: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::None::None {}) + }), + edkWrapping: Rc::new(EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {}) + }) + }) + } + pub fn SupportedESDKAlgorithmSuites() -> Map, AlgorithmSuite> { + map![(Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {})) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_NO_KDF()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF {})) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_NO_KDF()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF {})) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_NO_KDF()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {})) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {})) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {})) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {})) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {})) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {})) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {})) => (_default::ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY()), (Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {})) => (_default::ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384())] + } + pub fn SupportedDBEAlgorithmSuites() -> Map, AlgorithmSuite> { + map![(Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {})) => (_default::DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384()), (Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {})) => (_default::DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384())] + } + pub fn AlgorithmSuiteInfoByBinaryId() -> Map, AlgorithmSuite> { + map![(seq![0, 20]) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_NO_KDF()), (seq![0, 70]) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_NO_KDF()), (seq![0, 120]) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_NO_KDF()), (seq![1, 20]) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256()), (seq![1, 70]) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256()), (seq![1, 120]) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256()), (seq![2, 20]) => (_default::ESDK_ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256()), (seq![3, 70]) => (_default::ESDK_ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384()), (seq![3, 120]) => (_default::ESDK_ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384()), (seq![4, 120]) => (_default::ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY()), (seq![5, 120]) => (_default::ESDK_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384()), (seq![103, 0]) => (_default::DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384()), (seq![103, 1]) => (_default::DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384())] + } + } + + pub type AlgorithmSuite = Rc; +} +pub mod software { + pub mod amazon { + pub mod cryptography { + pub mod primitives { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::CryptoConfig; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Error; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClient; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::update_field_uninit_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateRandomBytesInput; + pub use ::dafny_runtime::Sequence; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DigestInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::HMacInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::HkdfExtractInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::HkdfExpandInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::HkdfInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::KdfCtrInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AesKdfCtrInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESEncryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESEncryptOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AESDecryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateRSAKeyPairOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GetRSAKeyModulusLengthOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSADecryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAEncryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateECDSASignatureKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ECDSASignInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ECDSAVerifyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GenerateECCKeyPairOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::GetPublicKeyFromPrivateKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ValidatePublicKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DeriveSharedSecretOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::CompressPublicKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DecompressPublicKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ParsePublicKeyOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultCryptoConfig() -> Rc { + Rc::new(CryptoConfig::CryptoConfig {}) + } + pub fn AtomicPrimitives(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient::_ctor(&_nw0, &Rc::new(Config::Config {})); + client = MaybePlacebo::from(_nw0.clone()); + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: client.read() + })); + return res.read(); + } + pub fn CreateSuccessOfClient(client: &Object) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: client.clone() + }) + } + pub fn CreateFailureOfError(error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + } + + pub struct AtomicPrimitivesClient { + pub r#__i_config: Rc + } + + impl AtomicPrimitivesClient { + pub fn _allocate_object() -> Object { + allocate_object::() + } + pub fn _ctor(this: &Object, config: &Rc) -> () { + let mut _set__i_config: bool = false; + update_field_uninit_object!(this.clone(), r#__i_config, _set__i_config, config.clone()); + return (); + } + pub fn config(&self) -> Rc { + self.r#__i_config.clone() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient { + UpcastObjectFn!(dyn Any); + } + + impl IAwsCryptographicPrimitivesClient + for crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient { + fn GenerateRandomBytes(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GenerateRandomBytes(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn Digest(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::Digest(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn HMac(&self, input: &Rc) -> Rc, Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::HMac(&self.config().clone(), input) + } + fn HkdfExtract(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::HkdfExtract(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn HkdfExpand(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::HkdfExpand(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn Hkdf(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::Hkdf(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn KdfCounterMode(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::KdfCounterMode(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn AesKdfCounterMode(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::AesKdfCounterMode(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn AESEncrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::AESEncrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn AESDecrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::AESDecrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GenerateRSAKeyPair(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GenerateRSAKeyPair(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetRSAKeyModulusLength(&self, input: &Rc) -> Rc, Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GetRSAKeyModulusLength(&self.config().clone(), input) + } + fn RSADecrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::RSADecrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn RSAEncrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::RSAEncrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GenerateECDSASignatureKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GenerateECDSASignatureKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ECDSASign(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::ECDSASign(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ECDSAVerify(&self, input: &Rc) -> Rc>> { + let mut output = MaybePlacebo::>>>::new(); + let mut _out0 = MaybePlacebo::>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::ECDSAVerify(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GenerateECCKeyPair(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GenerateECCKeyPair(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetPublicKeyFromPrivateKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::GetPublicKeyFromPrivateKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ValidatePublicKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::ValidatePublicKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DeriveSharedSecret(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::DeriveSharedSecret(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CompressPublicKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::CompressPublicKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DecompressPublicKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::DecompressPublicKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ParsePublicKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyPrimitivesOperations_Compile::_default::ParsePublicKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient { + UpcastObjectFn!(dyn IAwsCryptographicPrimitivesClient); + } + + pub mod types { + pub use ::dafny_runtime::truncate; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + pub use ::std::rc::Rc; + pub use ::dafny_runtime::Sequence; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use ::dafny_runtime::SequenceIter; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::DafnyCharUTF16; + + pub struct _default {} + + impl _default { + pub fn IsValid_PositiveInteger(x: i32) -> bool { + !(x < truncate!(int!(0), i32)) + } + pub fn IsValid_RSAModulusLengthBits(x: i32) -> bool { + !(x < truncate!(int!(81), i32)) + } + pub fn IsValid_RSAModulusLengthBitsToGenerate(x: i32) -> bool { + !(x < truncate!(int!(81), i32)) && !(truncate!(int!(4096), i32) < x) + } + pub fn IsValid_SymmetricKeyLength(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(32), i32) < x) + } + pub fn IsValid_Uint8Bits(x: i32) -> bool { + !(x < truncate!(int!(0), i32)) && !(truncate!(int!(255), i32) < x) + } + pub fn IsValid_Uint8Bytes(x: i32) -> bool { + !(x < truncate!(int!(0), i32)) && !(truncate!(int!(32), i32) < x) + } + pub fn IsDummySubsetType(x: &DafnyInt) -> bool { + int!(0) < x.clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum DafnyCallEvent { + DafnyCallEvent { + input: I, + output: O + } + } + + impl DafnyCallEvent { + pub fn input(&self) -> &I { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => input, + } + } + pub fn output(&self) -> &O { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => output, + } + } + } + + impl Debug + for DafnyCallEvent { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DafnyCallEvent { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DafnyCallEvent.DafnyCallEvent(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DafnyCallEvent {} + + impl Hash + for DafnyCallEvent { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for DafnyCallEvent { + fn default() -> DafnyCallEvent { + DafnyCallEvent::DafnyCallEvent { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &DafnyCallEvent { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AES_CTR { + AES_CTR { + keyLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength, + nonceLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bits + } + } + + impl AES_CTR { + pub fn keyLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength { + match self { + AES_CTR::AES_CTR{keyLength, nonceLength, } => keyLength, + } + } + pub fn nonceLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bits { + match self { + AES_CTR::AES_CTR{keyLength, nonceLength, } => nonceLength, + } + } + } + + impl Debug + for AES_CTR { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AES_CTR { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AES_CTR::AES_CTR{keyLength, nonceLength, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AES__CTR.AES__CTR(")?; + DafnyPrint::fmt_print(keyLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(nonceLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AES_CTR {} + + impl Hash + for AES_CTR { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AES_CTR::AES_CTR{keyLength, nonceLength, } => { + Hash::hash(keyLength, _state); + Hash::hash(nonceLength, _state) + }, + } + } + } + + impl Default + for AES_CTR { + fn default() -> AES_CTR { + AES_CTR::AES_CTR { + keyLength: Default::default(), + nonceLength: Default::default() + } + } + } + + impl AsRef + for &AES_CTR { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AES_GCM { + AES_GCM { + keyLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength, + tagLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bytes, + ivLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bits + } + } + + impl AES_GCM { + pub fn keyLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength { + match self { + AES_GCM::AES_GCM{keyLength, tagLength, ivLength, } => keyLength, + } + } + pub fn tagLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bytes { + match self { + AES_GCM::AES_GCM{keyLength, tagLength, ivLength, } => tagLength, + } + } + pub fn ivLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::Uint8Bits { + match self { + AES_GCM::AES_GCM{keyLength, tagLength, ivLength, } => ivLength, + } + } + } + + impl Debug + for AES_GCM { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AES_GCM { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AES_GCM::AES_GCM{keyLength, tagLength, ivLength, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AES__GCM.AES__GCM(")?; + DafnyPrint::fmt_print(keyLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(tagLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ivLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AES_GCM {} + + impl Hash + for AES_GCM { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AES_GCM::AES_GCM{keyLength, tagLength, ivLength, } => { + Hash::hash(keyLength, _state); + Hash::hash(tagLength, _state); + Hash::hash(ivLength, _state) + }, + } + } + } + + impl Default + for AES_GCM { + fn default() -> AES_GCM { + AES_GCM::AES_GCM { + keyLength: Default::default(), + tagLength: Default::default(), + ivLength: Default::default() + } + } + } + + impl AsRef + for &AES_GCM { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AESDecryptInput { + AESDecryptInput { + encAlg: Rc, + key: Sequence, + cipherTxt: Sequence, + authTag: Sequence, + iv: Sequence, + aad: Sequence + } + } + + impl AESDecryptInput { + pub fn encAlg(&self) -> &Rc { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => encAlg, + } + } + pub fn key(&self) -> &Sequence { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => key, + } + } + pub fn cipherTxt(&self) -> &Sequence { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => cipherTxt, + } + } + pub fn authTag(&self) -> &Sequence { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => authTag, + } + } + pub fn iv(&self) -> &Sequence { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => iv, + } + } + pub fn aad(&self) -> &Sequence { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => aad, + } + } + } + + impl Debug + for AESDecryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AESDecryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AESDecryptInput.AESDecryptInput(")?; + DafnyPrint::fmt_print(encAlg, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cipherTxt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(authTag, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(iv, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(aad, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AESDecryptInput {} + + impl Hash + for AESDecryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AESDecryptInput::AESDecryptInput{encAlg, key, cipherTxt, authTag, iv, aad, } => { + Hash::hash(encAlg, _state); + Hash::hash(key, _state); + Hash::hash(cipherTxt, _state); + Hash::hash(authTag, _state); + Hash::hash(iv, _state); + Hash::hash(aad, _state) + }, + } + } + } + + impl Default + for AESDecryptInput { + fn default() -> AESDecryptInput { + AESDecryptInput::AESDecryptInput { + encAlg: Default::default(), + key: Default::default(), + cipherTxt: Default::default(), + authTag: Default::default(), + iv: Default::default(), + aad: Default::default() + } + } + } + + impl AsRef + for &AESDecryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AESEncryptInput { + AESEncryptInput { + encAlg: Rc, + iv: Sequence, + key: Sequence, + msg: Sequence, + aad: Sequence + } + } + + impl AESEncryptInput { + pub fn encAlg(&self) -> &Rc { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => encAlg, + } + } + pub fn iv(&self) -> &Sequence { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => iv, + } + } + pub fn key(&self) -> &Sequence { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => key, + } + } + pub fn msg(&self) -> &Sequence { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => msg, + } + } + pub fn aad(&self) -> &Sequence { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => aad, + } + } + } + + impl Debug + for AESEncryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AESEncryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AESEncryptInput.AESEncryptInput(")?; + DafnyPrint::fmt_print(encAlg, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(iv, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(msg, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(aad, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AESEncryptInput {} + + impl Hash + for AESEncryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AESEncryptInput::AESEncryptInput{encAlg, iv, key, msg, aad, } => { + Hash::hash(encAlg, _state); + Hash::hash(iv, _state); + Hash::hash(key, _state); + Hash::hash(msg, _state); + Hash::hash(aad, _state) + }, + } + } + } + + impl Default + for AESEncryptInput { + fn default() -> AESEncryptInput { + AESEncryptInput::AESEncryptInput { + encAlg: Default::default(), + iv: Default::default(), + key: Default::default(), + msg: Default::default(), + aad: Default::default() + } + } + } + + impl AsRef + for &AESEncryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AESEncryptOutput { + AESEncryptOutput { + cipherText: Sequence, + authTag: Sequence + } + } + + impl AESEncryptOutput { + pub fn cipherText(&self) -> &Sequence { + match self { + AESEncryptOutput::AESEncryptOutput{cipherText, authTag, } => cipherText, + } + } + pub fn authTag(&self) -> &Sequence { + match self { + AESEncryptOutput::AESEncryptOutput{cipherText, authTag, } => authTag, + } + } + } + + impl Debug + for AESEncryptOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AESEncryptOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AESEncryptOutput::AESEncryptOutput{cipherText, authTag, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AESEncryptOutput.AESEncryptOutput(")?; + DafnyPrint::fmt_print(cipherText, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(authTag, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AESEncryptOutput {} + + impl Hash + for AESEncryptOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AESEncryptOutput::AESEncryptOutput{cipherText, authTag, } => { + Hash::hash(cipherText, _state); + Hash::hash(authTag, _state) + }, + } + } + } + + impl Default + for AESEncryptOutput { + fn default() -> AESEncryptOutput { + AESEncryptOutput::AESEncryptOutput { + cipherText: Default::default(), + authTag: Default::default() + } + } + } + + impl AsRef + for &AESEncryptOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AesKdfCtrInput { + AesKdfCtrInput { + ikm: Sequence, + expectedLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger, + nonce: Rc>> + } + } + + impl AesKdfCtrInput { + pub fn ikm(&self) -> &Sequence { + match self { + AesKdfCtrInput::AesKdfCtrInput{ikm, expectedLength, nonce, } => ikm, + } + } + pub fn expectedLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + AesKdfCtrInput::AesKdfCtrInput{ikm, expectedLength, nonce, } => expectedLength, + } + } + pub fn nonce(&self) -> &Rc>> { + match self { + AesKdfCtrInput::AesKdfCtrInput{ikm, expectedLength, nonce, } => nonce, + } + } + } + + impl Debug + for AesKdfCtrInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AesKdfCtrInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AesKdfCtrInput::AesKdfCtrInput{ikm, expectedLength, nonce, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.AesKdfCtrInput.AesKdfCtrInput(")?; + DafnyPrint::fmt_print(ikm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expectedLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(nonce, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AesKdfCtrInput {} + + impl Hash + for AesKdfCtrInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AesKdfCtrInput::AesKdfCtrInput{ikm, expectedLength, nonce, } => { + Hash::hash(ikm, _state); + Hash::hash(expectedLength, _state); + Hash::hash(nonce, _state) + }, + } + } + } + + impl Default + for AesKdfCtrInput { + fn default() -> AesKdfCtrInput { + AesKdfCtrInput::AesKdfCtrInput { + ikm: Default::default(), + expectedLength: Default::default(), + nonce: Default::default() + } + } + } + + impl AsRef + for &AesKdfCtrInput { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IAwsCryptographicPrimitivesClientCallHistory {} + + impl IAwsCryptographicPrimitivesClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IAwsCryptographicPrimitivesClient: Any + UpcastObject { + fn GenerateRandomBytes(&self, input: &Rc) -> Rc, Rc>>; + fn Digest(&self, input: &Rc) -> Rc, Rc>>; + fn HMac(&self, input: &Rc) -> Rc, Rc>>; + fn HkdfExtract(&self, input: &Rc) -> Rc, Rc>>; + fn HkdfExpand(&self, input: &Rc) -> Rc, Rc>>; + fn Hkdf(&self, input: &Rc) -> Rc, Rc>>; + fn KdfCounterMode(&self, input: &Rc) -> Rc, Rc>>; + fn AesKdfCounterMode(&self, input: &Rc) -> Rc, Rc>>; + fn AESEncrypt(&self, input: &Rc) -> Rc, Rc>>; + fn AESDecrypt(&self, input: &Rc) -> Rc, Rc>>; + fn GenerateRSAKeyPair(&self, input: &Rc) -> Rc, Rc>>; + fn GetRSAKeyModulusLength(&self, input: &Rc) -> Rc, Rc>>; + fn RSADecrypt(&self, input: &Rc) -> Rc, Rc>>; + fn RSAEncrypt(&self, input: &Rc) -> Rc, Rc>>; + fn GenerateECDSASignatureKey(&self, input: &Rc) -> Rc, Rc>>; + fn ECDSASign(&self, input: &Rc) -> Rc, Rc>>; + fn ECDSAVerify(&self, input: &Rc) -> Rc>>; + fn GenerateECCKeyPair(&self, input: &Rc) -> Rc, Rc>>; + fn GetPublicKeyFromPrivateKey(&self, input: &Rc) -> Rc, Rc>>; + fn ValidatePublicKey(&self, input: &Rc) -> Rc, Rc>>; + fn DeriveSharedSecret(&self, input: &Rc) -> Rc, Rc>>; + fn CompressPublicKey(&self, input: &Rc) -> Rc, Rc>>; + fn DecompressPublicKey(&self, input: &Rc) -> Rc, Rc>>; + fn ParsePublicKey(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum CompressPublicKeyInput { + CompressPublicKeyInput { + publicKey: Rc, + eccCurve: Rc + } + } + + impl CompressPublicKeyInput { + pub fn publicKey(&self) -> &Rc { + match self { + CompressPublicKeyInput::CompressPublicKeyInput{publicKey, eccCurve, } => publicKey, + } + } + pub fn eccCurve(&self) -> &Rc { + match self { + CompressPublicKeyInput::CompressPublicKeyInput{publicKey, eccCurve, } => eccCurve, + } + } + } + + impl Debug + for CompressPublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CompressPublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CompressPublicKeyInput::CompressPublicKeyInput{publicKey, eccCurve, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.CompressPublicKeyInput.CompressPublicKeyInput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CompressPublicKeyInput {} + + impl Hash + for CompressPublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CompressPublicKeyInput::CompressPublicKeyInput{publicKey, eccCurve, } => { + Hash::hash(publicKey, _state); + Hash::hash(eccCurve, _state) + }, + } + } + } + + impl Default + for CompressPublicKeyInput { + fn default() -> CompressPublicKeyInput { + CompressPublicKeyInput::CompressPublicKeyInput { + publicKey: Default::default(), + eccCurve: Default::default() + } + } + } + + impl AsRef + for &CompressPublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CompressPublicKeyOutput { + CompressPublicKeyOutput { + compressedPublicKey: Sequence + } + } + + impl CompressPublicKeyOutput { + pub fn compressedPublicKey(&self) -> &Sequence { + match self { + CompressPublicKeyOutput::CompressPublicKeyOutput{compressedPublicKey, } => compressedPublicKey, + } + } + } + + impl Debug + for CompressPublicKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CompressPublicKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CompressPublicKeyOutput::CompressPublicKeyOutput{compressedPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.CompressPublicKeyOutput.CompressPublicKeyOutput(")?; + DafnyPrint::fmt_print(compressedPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CompressPublicKeyOutput {} + + impl Hash + for CompressPublicKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CompressPublicKeyOutput::CompressPublicKeyOutput{compressedPublicKey, } => { + Hash::hash(compressedPublicKey, _state) + }, + } + } + } + + impl Default + for CompressPublicKeyOutput { + fn default() -> CompressPublicKeyOutput { + CompressPublicKeyOutput::CompressPublicKeyOutput { + compressedPublicKey: Default::default() + } + } + } + + impl AsRef + for &CompressPublicKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CryptoConfig { + CryptoConfig {} + } + + impl CryptoConfig {} + + impl Debug + for CryptoConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CryptoConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CryptoConfig::CryptoConfig{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.CryptoConfig.CryptoConfig")?; + Ok(()) + }, + } + } + } + + impl CryptoConfig { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(CryptoConfig::CryptoConfig {})].iter() + } + } + + impl Eq + for CryptoConfig {} + + impl Hash + for CryptoConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CryptoConfig::CryptoConfig{} => { + + }, + } + } + } + + impl Default + for CryptoConfig { + fn default() -> CryptoConfig { + CryptoConfig::CryptoConfig {} + } + } + + impl AsRef + for &CryptoConfig { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecompressPublicKeyInput { + DecompressPublicKeyInput { + compressedPublicKey: Sequence, + eccCurve: Rc + } + } + + impl DecompressPublicKeyInput { + pub fn compressedPublicKey(&self) -> &Sequence { + match self { + DecompressPublicKeyInput::DecompressPublicKeyInput{compressedPublicKey, eccCurve, } => compressedPublicKey, + } + } + pub fn eccCurve(&self) -> &Rc { + match self { + DecompressPublicKeyInput::DecompressPublicKeyInput{compressedPublicKey, eccCurve, } => eccCurve, + } + } + } + + impl Debug + for DecompressPublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecompressPublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecompressPublicKeyInput::DecompressPublicKeyInput{compressedPublicKey, eccCurve, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DecompressPublicKeyInput.DecompressPublicKeyInput(")?; + DafnyPrint::fmt_print(compressedPublicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecompressPublicKeyInput {} + + impl Hash + for DecompressPublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecompressPublicKeyInput::DecompressPublicKeyInput{compressedPublicKey, eccCurve, } => { + Hash::hash(compressedPublicKey, _state); + Hash::hash(eccCurve, _state) + }, + } + } + } + + impl Default + for DecompressPublicKeyInput { + fn default() -> DecompressPublicKeyInput { + DecompressPublicKeyInput::DecompressPublicKeyInput { + compressedPublicKey: Default::default(), + eccCurve: Default::default() + } + } + } + + impl AsRef + for &DecompressPublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecompressPublicKeyOutput { + DecompressPublicKeyOutput { + publicKey: Rc + } + } + + impl DecompressPublicKeyOutput { + pub fn publicKey(&self) -> &Rc { + match self { + DecompressPublicKeyOutput::DecompressPublicKeyOutput{publicKey, } => publicKey, + } + } + } + + impl Debug + for DecompressPublicKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecompressPublicKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecompressPublicKeyOutput::DecompressPublicKeyOutput{publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DecompressPublicKeyOutput.DecompressPublicKeyOutput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecompressPublicKeyOutput {} + + impl Hash + for DecompressPublicKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecompressPublicKeyOutput::DecompressPublicKeyOutput{publicKey, } => { + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for DecompressPublicKeyOutput { + fn default() -> DecompressPublicKeyOutput { + DecompressPublicKeyOutput::DecompressPublicKeyOutput { + publicKey: Default::default() + } + } + } + + impl AsRef + for &DecompressPublicKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeriveSharedSecretInput { + DeriveSharedSecretInput { + eccCurve: Rc, + privateKey: Rc, + publicKey: Rc + } + } + + impl DeriveSharedSecretInput { + pub fn eccCurve(&self) -> &Rc { + match self { + DeriveSharedSecretInput::DeriveSharedSecretInput{eccCurve, privateKey, publicKey, } => eccCurve, + } + } + pub fn privateKey(&self) -> &Rc { + match self { + DeriveSharedSecretInput::DeriveSharedSecretInput{eccCurve, privateKey, publicKey, } => privateKey, + } + } + pub fn publicKey(&self) -> &Rc { + match self { + DeriveSharedSecretInput::DeriveSharedSecretInput{eccCurve, privateKey, publicKey, } => publicKey, + } + } + } + + impl Debug + for DeriveSharedSecretInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeriveSharedSecretInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeriveSharedSecretInput::DeriveSharedSecretInput{eccCurve, privateKey, publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DeriveSharedSecretInput.DeriveSharedSecretInput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeriveSharedSecretInput {} + + impl Hash + for DeriveSharedSecretInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeriveSharedSecretInput::DeriveSharedSecretInput{eccCurve, privateKey, publicKey, } => { + Hash::hash(eccCurve, _state); + Hash::hash(privateKey, _state); + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for DeriveSharedSecretInput { + fn default() -> DeriveSharedSecretInput { + DeriveSharedSecretInput::DeriveSharedSecretInput { + eccCurve: Default::default(), + privateKey: Default::default(), + publicKey: Default::default() + } + } + } + + impl AsRef + for &DeriveSharedSecretInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeriveSharedSecretOutput { + DeriveSharedSecretOutput { + sharedSecret: Sequence + } + } + + impl DeriveSharedSecretOutput { + pub fn sharedSecret(&self) -> &Sequence { + match self { + DeriveSharedSecretOutput::DeriveSharedSecretOutput{sharedSecret, } => sharedSecret, + } + } + } + + impl Debug + for DeriveSharedSecretOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeriveSharedSecretOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeriveSharedSecretOutput::DeriveSharedSecretOutput{sharedSecret, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DeriveSharedSecretOutput.DeriveSharedSecretOutput(")?; + DafnyPrint::fmt_print(sharedSecret, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeriveSharedSecretOutput {} + + impl Hash + for DeriveSharedSecretOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeriveSharedSecretOutput::DeriveSharedSecretOutput{sharedSecret, } => { + Hash::hash(sharedSecret, _state) + }, + } + } + } + + impl Default + for DeriveSharedSecretOutput { + fn default() -> DeriveSharedSecretOutput { + DeriveSharedSecretOutput::DeriveSharedSecretOutput { + sharedSecret: Default::default() + } + } + } + + impl AsRef + for &DeriveSharedSecretOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DigestAlgorithm { + SHA_512 {}, + SHA_384 {}, + SHA_256 {} + } + + impl DigestAlgorithm {} + + impl Debug + for DigestAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DigestAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DigestAlgorithm::SHA_512{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DigestAlgorithm.SHA__512")?; + Ok(()) + }, + DigestAlgorithm::SHA_384{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DigestAlgorithm.SHA__384")?; + Ok(()) + }, + DigestAlgorithm::SHA_256{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DigestAlgorithm.SHA__256")?; + Ok(()) + }, + } + } + } + + impl DigestAlgorithm { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DigestAlgorithm::SHA_512 {}), Rc::new(DigestAlgorithm::SHA_384 {}), Rc::new(DigestAlgorithm::SHA_256 {})].iter() + } + } + + impl Eq + for DigestAlgorithm {} + + impl Hash + for DigestAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DigestAlgorithm::SHA_512{} => { + + }, + DigestAlgorithm::SHA_384{} => { + + }, + DigestAlgorithm::SHA_256{} => { + + }, + } + } + } + + impl Default + for DigestAlgorithm { + fn default() -> DigestAlgorithm { + DigestAlgorithm::SHA_512 {} + } + } + + impl AsRef + for &DigestAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DigestInput { + DigestInput { + digestAlgorithm: Rc, + message: Sequence + } + } + + impl DigestInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + DigestInput::DigestInput{digestAlgorithm, message, } => digestAlgorithm, + } + } + pub fn message(&self) -> &Sequence { + match self { + DigestInput::DigestInput{digestAlgorithm, message, } => message, + } + } + } + + impl Debug + for DigestInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DigestInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DigestInput::DigestInput{digestAlgorithm, message, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.DigestInput.DigestInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DigestInput {} + + impl Hash + for DigestInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DigestInput::DigestInput{digestAlgorithm, message, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(message, _state) + }, + } + } + } + + impl Default + for DigestInput { + fn default() -> DigestInput { + DigestInput::DigestInput { + digestAlgorithm: Default::default(), + message: Default::default() + } + } + } + + impl AsRef + for &DigestInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECCPrivateKey { + ECCPrivateKey { + pem: Sequence + } + } + + impl ECCPrivateKey { + pub fn pem(&self) -> &Sequence { + match self { + ECCPrivateKey::ECCPrivateKey{pem, } => pem, + } + } + } + + impl Debug + for ECCPrivateKey { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECCPrivateKey { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECCPrivateKey::ECCPrivateKey{pem, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECCPrivateKey.ECCPrivateKey(")?; + DafnyPrint::fmt_print(pem, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ECCPrivateKey {} + + impl Hash + for ECCPrivateKey { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECCPrivateKey::ECCPrivateKey{pem, } => { + Hash::hash(pem, _state) + }, + } + } + } + + impl Default + for ECCPrivateKey { + fn default() -> ECCPrivateKey { + ECCPrivateKey::ECCPrivateKey { + pem: Default::default() + } + } + } + + impl AsRef + for &ECCPrivateKey { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECCPublicKey { + ECCPublicKey { + der: Sequence + } + } + + impl ECCPublicKey { + pub fn der(&self) -> &Sequence { + match self { + ECCPublicKey::ECCPublicKey{der, } => der, + } + } + } + + impl Debug + for ECCPublicKey { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECCPublicKey { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECCPublicKey::ECCPublicKey{der, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECCPublicKey.ECCPublicKey(")?; + DafnyPrint::fmt_print(der, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ECCPublicKey {} + + impl Hash + for ECCPublicKey { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECCPublicKey::ECCPublicKey{der, } => { + Hash::hash(der, _state) + }, + } + } + } + + impl Default + for ECCPublicKey { + fn default() -> ECCPublicKey { + ECCPublicKey::ECCPublicKey { + der: Default::default() + } + } + } + + impl AsRef + for &ECCPublicKey { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECDHCurveSpec { + ECC_NIST_P256 {}, + ECC_NIST_P384 {}, + ECC_NIST_P521 {}, + SM2 {} + } + + impl ECDHCurveSpec {} + + impl Debug + for ECDHCurveSpec { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECDHCurveSpec { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECDHCurveSpec::ECC_NIST_P256{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDHCurveSpec.ECC__NIST__P256")?; + Ok(()) + }, + ECDHCurveSpec::ECC_NIST_P384{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDHCurveSpec.ECC__NIST__P384")?; + Ok(()) + }, + ECDHCurveSpec::ECC_NIST_P521{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDHCurveSpec.ECC__NIST__P521")?; + Ok(()) + }, + ECDHCurveSpec::SM2{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDHCurveSpec.SM2")?; + Ok(()) + }, + } + } + } + + impl ECDHCurveSpec { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ECDHCurveSpec::ECC_NIST_P256 {}), Rc::new(ECDHCurveSpec::ECC_NIST_P384 {}), Rc::new(ECDHCurveSpec::ECC_NIST_P521 {}), Rc::new(ECDHCurveSpec::SM2 {})].iter() + } + } + + impl Eq + for ECDHCurveSpec {} + + impl Hash + for ECDHCurveSpec { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECDHCurveSpec::ECC_NIST_P256{} => { + + }, + ECDHCurveSpec::ECC_NIST_P384{} => { + + }, + ECDHCurveSpec::ECC_NIST_P521{} => { + + }, + ECDHCurveSpec::SM2{} => { + + }, + } + } + } + + impl Default + for ECDHCurveSpec { + fn default() -> ECDHCurveSpec { + ECDHCurveSpec::ECC_NIST_P256 {} + } + } + + impl AsRef + for &ECDHCurveSpec { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECDSASignatureAlgorithm { + ECDSA_P384 {}, + ECDSA_P256 {} + } + + impl ECDSASignatureAlgorithm {} + + impl Debug + for ECDSASignatureAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECDSASignatureAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECDSASignatureAlgorithm::ECDSA_P384{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDSASignatureAlgorithm.ECDSA__P384")?; + Ok(()) + }, + ECDSASignatureAlgorithm::ECDSA_P256{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDSASignatureAlgorithm.ECDSA__P256")?; + Ok(()) + }, + } + } + } + + impl ECDSASignatureAlgorithm { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ECDSASignatureAlgorithm::ECDSA_P384 {}), Rc::new(ECDSASignatureAlgorithm::ECDSA_P256 {})].iter() + } + } + + impl Eq + for ECDSASignatureAlgorithm {} + + impl Hash + for ECDSASignatureAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECDSASignatureAlgorithm::ECDSA_P384{} => { + + }, + ECDSASignatureAlgorithm::ECDSA_P256{} => { + + }, + } + } + } + + impl Default + for ECDSASignatureAlgorithm { + fn default() -> ECDSASignatureAlgorithm { + ECDSASignatureAlgorithm::ECDSA_P384 {} + } + } + + impl AsRef + for &ECDSASignatureAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECDSASignInput { + ECDSASignInput { + signatureAlgorithm: Rc, + signingKey: Sequence, + message: Sequence + } + } + + impl ECDSASignInput { + pub fn signatureAlgorithm(&self) -> &Rc { + match self { + ECDSASignInput::ECDSASignInput{signatureAlgorithm, signingKey, message, } => signatureAlgorithm, + } + } + pub fn signingKey(&self) -> &Sequence { + match self { + ECDSASignInput::ECDSASignInput{signatureAlgorithm, signingKey, message, } => signingKey, + } + } + pub fn message(&self) -> &Sequence { + match self { + ECDSASignInput::ECDSASignInput{signatureAlgorithm, signingKey, message, } => message, + } + } + } + + impl Debug + for ECDSASignInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECDSASignInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECDSASignInput::ECDSASignInput{signatureAlgorithm, signingKey, message, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDSASignInput.ECDSASignInput(")?; + DafnyPrint::fmt_print(signatureAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signingKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ECDSASignInput {} + + impl Hash + for ECDSASignInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECDSASignInput::ECDSASignInput{signatureAlgorithm, signingKey, message, } => { + Hash::hash(signatureAlgorithm, _state); + Hash::hash(signingKey, _state); + Hash::hash(message, _state) + }, + } + } + } + + impl Default + for ECDSASignInput { + fn default() -> ECDSASignInput { + ECDSASignInput::ECDSASignInput { + signatureAlgorithm: Default::default(), + signingKey: Default::default(), + message: Default::default() + } + } + } + + impl AsRef + for &ECDSASignInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECDSAVerifyInput { + ECDSAVerifyInput { + signatureAlgorithm: Rc, + verificationKey: Sequence, + message: Sequence, + signature: Sequence + } + } + + impl ECDSAVerifyInput { + pub fn signatureAlgorithm(&self) -> &Rc { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => signatureAlgorithm, + } + } + pub fn verificationKey(&self) -> &Sequence { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => verificationKey, + } + } + pub fn message(&self) -> &Sequence { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => message, + } + } + pub fn signature(&self) -> &Sequence { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => signature, + } + } + } + + impl Debug + for ECDSAVerifyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECDSAVerifyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ECDSAVerifyInput.ECDSAVerifyInput(")?; + DafnyPrint::fmt_print(signatureAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(verificationKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signature, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ECDSAVerifyInput {} + + impl Hash + for ECDSAVerifyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECDSAVerifyInput::ECDSAVerifyInput{signatureAlgorithm, verificationKey, message, signature, } => { + Hash::hash(signatureAlgorithm, _state); + Hash::hash(verificationKey, _state); + Hash::hash(message, _state); + Hash::hash(signature, _state) + }, + } + } + } + + impl Default + for ECDSAVerifyInput { + fn default() -> ECDSAVerifyInput { + ECDSAVerifyInput::ECDSAVerifyInput { + signatureAlgorithm: Default::default(), + verificationKey: Default::default(), + message: Default::default(), + signature: Default::default() + } + } + } + + impl AsRef + for &ECDSAVerifyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateECCKeyPairInput { + GenerateECCKeyPairInput { + eccCurve: Rc + } + } + + impl GenerateECCKeyPairInput { + pub fn eccCurve(&self) -> &Rc { + match self { + GenerateECCKeyPairInput::GenerateECCKeyPairInput{eccCurve, } => eccCurve, + } + } + } + + impl Debug + for GenerateECCKeyPairInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateECCKeyPairInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateECCKeyPairInput::GenerateECCKeyPairInput{eccCurve, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateECCKeyPairInput.GenerateECCKeyPairInput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateECCKeyPairInput {} + + impl Hash + for GenerateECCKeyPairInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateECCKeyPairInput::GenerateECCKeyPairInput{eccCurve, } => { + Hash::hash(eccCurve, _state) + }, + } + } + } + + impl Default + for GenerateECCKeyPairInput { + fn default() -> GenerateECCKeyPairInput { + GenerateECCKeyPairInput::GenerateECCKeyPairInput { + eccCurve: Default::default() + } + } + } + + impl AsRef + for &GenerateECCKeyPairInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateECCKeyPairOutput { + GenerateECCKeyPairOutput { + eccCurve: Rc, + privateKey: Rc, + publicKey: Rc + } + } + + impl GenerateECCKeyPairOutput { + pub fn eccCurve(&self) -> &Rc { + match self { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput{eccCurve, privateKey, publicKey, } => eccCurve, + } + } + pub fn privateKey(&self) -> &Rc { + match self { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput{eccCurve, privateKey, publicKey, } => privateKey, + } + } + pub fn publicKey(&self) -> &Rc { + match self { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput{eccCurve, privateKey, publicKey, } => publicKey, + } + } + } + + impl Debug + for GenerateECCKeyPairOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateECCKeyPairOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput{eccCurve, privateKey, publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateECCKeyPairOutput.GenerateECCKeyPairOutput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateECCKeyPairOutput {} + + impl Hash + for GenerateECCKeyPairOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput{eccCurve, privateKey, publicKey, } => { + Hash::hash(eccCurve, _state); + Hash::hash(privateKey, _state); + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for GenerateECCKeyPairOutput { + fn default() -> GenerateECCKeyPairOutput { + GenerateECCKeyPairOutput::GenerateECCKeyPairOutput { + eccCurve: Default::default(), + privateKey: Default::default(), + publicKey: Default::default() + } + } + } + + impl AsRef + for &GenerateECCKeyPairOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateECDSASignatureKeyInput { + GenerateECDSASignatureKeyInput { + signatureAlgorithm: Rc + } + } + + impl GenerateECDSASignatureKeyInput { + pub fn signatureAlgorithm(&self) -> &Rc { + match self { + GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput{signatureAlgorithm, } => signatureAlgorithm, + } + } + } + + impl Debug + for GenerateECDSASignatureKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateECDSASignatureKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput{signatureAlgorithm, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateECDSASignatureKeyInput.GenerateECDSASignatureKeyInput(")?; + DafnyPrint::fmt_print(signatureAlgorithm, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateECDSASignatureKeyInput {} + + impl Hash + for GenerateECDSASignatureKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput{signatureAlgorithm, } => { + Hash::hash(signatureAlgorithm, _state) + }, + } + } + } + + impl Default + for GenerateECDSASignatureKeyInput { + fn default() -> GenerateECDSASignatureKeyInput { + GenerateECDSASignatureKeyInput::GenerateECDSASignatureKeyInput { + signatureAlgorithm: Default::default() + } + } + } + + impl AsRef + for &GenerateECDSASignatureKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateECDSASignatureKeyOutput { + GenerateECDSASignatureKeyOutput { + signatureAlgorithm: Rc, + verificationKey: Sequence, + signingKey: Sequence + } + } + + impl GenerateECDSASignatureKeyOutput { + pub fn signatureAlgorithm(&self) -> &Rc { + match self { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput{signatureAlgorithm, verificationKey, signingKey, } => signatureAlgorithm, + } + } + pub fn verificationKey(&self) -> &Sequence { + match self { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput{signatureAlgorithm, verificationKey, signingKey, } => verificationKey, + } + } + pub fn signingKey(&self) -> &Sequence { + match self { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput{signatureAlgorithm, verificationKey, signingKey, } => signingKey, + } + } + } + + impl Debug + for GenerateECDSASignatureKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateECDSASignatureKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput{signatureAlgorithm, verificationKey, signingKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateECDSASignatureKeyOutput.GenerateECDSASignatureKeyOutput(")?; + DafnyPrint::fmt_print(signatureAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(verificationKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signingKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateECDSASignatureKeyOutput {} + + impl Hash + for GenerateECDSASignatureKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput{signatureAlgorithm, verificationKey, signingKey, } => { + Hash::hash(signatureAlgorithm, _state); + Hash::hash(verificationKey, _state); + Hash::hash(signingKey, _state) + }, + } + } + } + + impl Default + for GenerateECDSASignatureKeyOutput { + fn default() -> GenerateECDSASignatureKeyOutput { + GenerateECDSASignatureKeyOutput::GenerateECDSASignatureKeyOutput { + signatureAlgorithm: Default::default(), + verificationKey: Default::default(), + signingKey: Default::default() + } + } + } + + impl AsRef + for &GenerateECDSASignatureKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateRandomBytesInput { + GenerateRandomBytesInput { + length: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger + } + } + + impl GenerateRandomBytesInput { + pub fn length(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + GenerateRandomBytesInput::GenerateRandomBytesInput{length, } => length, + } + } + } + + impl Debug + for GenerateRandomBytesInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateRandomBytesInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateRandomBytesInput::GenerateRandomBytesInput{length, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateRandomBytesInput.GenerateRandomBytesInput(")?; + DafnyPrint::fmt_print(length, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateRandomBytesInput {} + + impl Hash + for GenerateRandomBytesInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateRandomBytesInput::GenerateRandomBytesInput{length, } => { + Hash::hash(length, _state) + }, + } + } + } + + impl Default + for GenerateRandomBytesInput { + fn default() -> GenerateRandomBytesInput { + GenerateRandomBytesInput::GenerateRandomBytesInput { + length: Default::default() + } + } + } + + impl AsRef + for &GenerateRandomBytesInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateRSAKeyPairInput { + GenerateRSAKeyPairInput { + lengthBits: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBitsToGenerate + } + } + + impl GenerateRSAKeyPairInput { + pub fn lengthBits(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBitsToGenerate { + match self { + GenerateRSAKeyPairInput::GenerateRSAKeyPairInput{lengthBits, } => lengthBits, + } + } + } + + impl Debug + for GenerateRSAKeyPairInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateRSAKeyPairInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateRSAKeyPairInput::GenerateRSAKeyPairInput{lengthBits, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateRSAKeyPairInput.GenerateRSAKeyPairInput(")?; + DafnyPrint::fmt_print(lengthBits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateRSAKeyPairInput {} + + impl Hash + for GenerateRSAKeyPairInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateRSAKeyPairInput::GenerateRSAKeyPairInput{lengthBits, } => { + Hash::hash(lengthBits, _state) + }, + } + } + } + + impl Default + for GenerateRSAKeyPairInput { + fn default() -> GenerateRSAKeyPairInput { + GenerateRSAKeyPairInput::GenerateRSAKeyPairInput { + lengthBits: Default::default() + } + } + } + + impl AsRef + for &GenerateRSAKeyPairInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GenerateRSAKeyPairOutput { + GenerateRSAKeyPairOutput { + publicKey: Rc, + privateKey: Rc + } + } + + impl GenerateRSAKeyPairOutput { + pub fn publicKey(&self) -> &Rc { + match self { + GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput{publicKey, privateKey, } => publicKey, + } + } + pub fn privateKey(&self) -> &Rc { + match self { + GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput{publicKey, privateKey, } => privateKey, + } + } + } + + impl Debug + for GenerateRSAKeyPairOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GenerateRSAKeyPairOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput{publicKey, privateKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GenerateRSAKeyPairOutput.GenerateRSAKeyPairOutput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GenerateRSAKeyPairOutput {} + + impl Hash + for GenerateRSAKeyPairOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput{publicKey, privateKey, } => { + Hash::hash(publicKey, _state); + Hash::hash(privateKey, _state) + }, + } + } + } + + impl Default + for GenerateRSAKeyPairOutput { + fn default() -> GenerateRSAKeyPairOutput { + GenerateRSAKeyPairOutput::GenerateRSAKeyPairOutput { + publicKey: Default::default(), + privateKey: Default::default() + } + } + } + + impl AsRef + for &GenerateRSAKeyPairOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetPublicKeyFromPrivateKeyInput { + GetPublicKeyFromPrivateKeyInput { + eccCurve: Rc, + privateKey: Rc + } + } + + impl GetPublicKeyFromPrivateKeyInput { + pub fn eccCurve(&self) -> &Rc { + match self { + GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput{eccCurve, privateKey, } => eccCurve, + } + } + pub fn privateKey(&self) -> &Rc { + match self { + GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput{eccCurve, privateKey, } => privateKey, + } + } + } + + impl Debug + for GetPublicKeyFromPrivateKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetPublicKeyFromPrivateKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput{eccCurve, privateKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GetPublicKeyFromPrivateKeyInput.GetPublicKeyFromPrivateKeyInput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetPublicKeyFromPrivateKeyInput {} + + impl Hash + for GetPublicKeyFromPrivateKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput{eccCurve, privateKey, } => { + Hash::hash(eccCurve, _state); + Hash::hash(privateKey, _state) + }, + } + } + } + + impl Default + for GetPublicKeyFromPrivateKeyInput { + fn default() -> GetPublicKeyFromPrivateKeyInput { + GetPublicKeyFromPrivateKeyInput::GetPublicKeyFromPrivateKeyInput { + eccCurve: Default::default(), + privateKey: Default::default() + } + } + } + + impl AsRef + for &GetPublicKeyFromPrivateKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetPublicKeyFromPrivateKeyOutput { + GetPublicKeyFromPrivateKeyOutput { + eccCurve: Rc, + privateKey: Rc, + publicKey: Sequence + } + } + + impl GetPublicKeyFromPrivateKeyOutput { + pub fn eccCurve(&self) -> &Rc { + match self { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput{eccCurve, privateKey, publicKey, } => eccCurve, + } + } + pub fn privateKey(&self) -> &Rc { + match self { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput{eccCurve, privateKey, publicKey, } => privateKey, + } + } + pub fn publicKey(&self) -> &Sequence { + match self { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput{eccCurve, privateKey, publicKey, } => publicKey, + } + } + } + + impl Debug + for GetPublicKeyFromPrivateKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetPublicKeyFromPrivateKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput{eccCurve, privateKey, publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GetPublicKeyFromPrivateKeyOutput.GetPublicKeyFromPrivateKeyOutput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetPublicKeyFromPrivateKeyOutput {} + + impl Hash + for GetPublicKeyFromPrivateKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput{eccCurve, privateKey, publicKey, } => { + Hash::hash(eccCurve, _state); + Hash::hash(privateKey, _state); + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for GetPublicKeyFromPrivateKeyOutput { + fn default() -> GetPublicKeyFromPrivateKeyOutput { + GetPublicKeyFromPrivateKeyOutput::GetPublicKeyFromPrivateKeyOutput { + eccCurve: Default::default(), + privateKey: Default::default(), + publicKey: Default::default() + } + } + } + + impl AsRef + for &GetPublicKeyFromPrivateKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetRSAKeyModulusLengthInput { + GetRSAKeyModulusLengthInput { + publicKey: Sequence + } + } + + impl GetRSAKeyModulusLengthInput { + pub fn publicKey(&self) -> &Sequence { + match self { + GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput{publicKey, } => publicKey, + } + } + } + + impl Debug + for GetRSAKeyModulusLengthInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetRSAKeyModulusLengthInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput{publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GetRSAKeyModulusLengthInput.GetRSAKeyModulusLengthInput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetRSAKeyModulusLengthInput {} + + impl Hash + for GetRSAKeyModulusLengthInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput{publicKey, } => { + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for GetRSAKeyModulusLengthInput { + fn default() -> GetRSAKeyModulusLengthInput { + GetRSAKeyModulusLengthInput::GetRSAKeyModulusLengthInput { + publicKey: Default::default() + } + } + } + + impl AsRef + for &GetRSAKeyModulusLengthInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetRSAKeyModulusLengthOutput { + GetRSAKeyModulusLengthOutput { + length: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits + } + } + + impl GetRSAKeyModulusLengthOutput { + pub fn length(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits { + match self { + GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput{length, } => length, + } + } + } + + impl Debug + for GetRSAKeyModulusLengthOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetRSAKeyModulusLengthOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput{length, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.GetRSAKeyModulusLengthOutput.GetRSAKeyModulusLengthOutput(")?; + DafnyPrint::fmt_print(length, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetRSAKeyModulusLengthOutput {} + + impl Hash + for GetRSAKeyModulusLengthOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput{length, } => { + Hash::hash(length, _state) + }, + } + } + } + + impl Default + for GetRSAKeyModulusLengthOutput { + fn default() -> GetRSAKeyModulusLengthOutput { + GetRSAKeyModulusLengthOutput::GetRSAKeyModulusLengthOutput { + length: Default::default() + } + } + } + + impl AsRef + for &GetRSAKeyModulusLengthOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum HkdfExpandInput { + HkdfExpandInput { + digestAlgorithm: Rc, + prk: Sequence, + info: Sequence, + expectedLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger + } + } + + impl HkdfExpandInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => digestAlgorithm, + } + } + pub fn prk(&self) -> &Sequence { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => prk, + } + } + pub fn info(&self) -> &Sequence { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => info, + } + } + pub fn expectedLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => expectedLength, + } + } + } + + impl Debug + for HkdfExpandInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for HkdfExpandInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.HkdfExpandInput.HkdfExpandInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(prk, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(info, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expectedLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for HkdfExpandInput {} + + impl Hash + for HkdfExpandInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + HkdfExpandInput::HkdfExpandInput{digestAlgorithm, prk, info, expectedLength, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(prk, _state); + Hash::hash(info, _state); + Hash::hash(expectedLength, _state) + }, + } + } + } + + impl Default + for HkdfExpandInput { + fn default() -> HkdfExpandInput { + HkdfExpandInput::HkdfExpandInput { + digestAlgorithm: Default::default(), + prk: Default::default(), + info: Default::default(), + expectedLength: Default::default() + } + } + } + + impl AsRef + for &HkdfExpandInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum HkdfExtractInput { + HkdfExtractInput { + digestAlgorithm: Rc, + salt: Rc>>, + ikm: Sequence + } + } + + impl HkdfExtractInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + HkdfExtractInput::HkdfExtractInput{digestAlgorithm, salt, ikm, } => digestAlgorithm, + } + } + pub fn salt(&self) -> &Rc>> { + match self { + HkdfExtractInput::HkdfExtractInput{digestAlgorithm, salt, ikm, } => salt, + } + } + pub fn ikm(&self) -> &Sequence { + match self { + HkdfExtractInput::HkdfExtractInput{digestAlgorithm, salt, ikm, } => ikm, + } + } + } + + impl Debug + for HkdfExtractInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for HkdfExtractInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + HkdfExtractInput::HkdfExtractInput{digestAlgorithm, salt, ikm, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.HkdfExtractInput.HkdfExtractInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(salt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ikm, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for HkdfExtractInput {} + + impl Hash + for HkdfExtractInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + HkdfExtractInput::HkdfExtractInput{digestAlgorithm, salt, ikm, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(salt, _state); + Hash::hash(ikm, _state) + }, + } + } + } + + impl Default + for HkdfExtractInput { + fn default() -> HkdfExtractInput { + HkdfExtractInput::HkdfExtractInput { + digestAlgorithm: Default::default(), + salt: Default::default(), + ikm: Default::default() + } + } + } + + impl AsRef + for &HkdfExtractInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum HkdfInput { + HkdfInput { + digestAlgorithm: Rc, + salt: Rc>>, + ikm: Sequence, + info: Sequence, + expectedLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger + } + } + + impl HkdfInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => digestAlgorithm, + } + } + pub fn salt(&self) -> &Rc>> { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => salt, + } + } + pub fn ikm(&self) -> &Sequence { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => ikm, + } + } + pub fn info(&self) -> &Sequence { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => info, + } + } + pub fn expectedLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => expectedLength, + } + } + } + + impl Debug + for HkdfInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for HkdfInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.HkdfInput.HkdfInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(salt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ikm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(info, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expectedLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for HkdfInput {} + + impl Hash + for HkdfInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + HkdfInput::HkdfInput{digestAlgorithm, salt, ikm, info, expectedLength, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(salt, _state); + Hash::hash(ikm, _state); + Hash::hash(info, _state); + Hash::hash(expectedLength, _state) + }, + } + } + } + + impl Default + for HkdfInput { + fn default() -> HkdfInput { + HkdfInput::HkdfInput { + digestAlgorithm: Default::default(), + salt: Default::default(), + ikm: Default::default(), + info: Default::default(), + expectedLength: Default::default() + } + } + } + + impl AsRef + for &HkdfInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum HMacInput { + HMacInput { + digestAlgorithm: Rc, + key: Sequence, + message: Sequence + } + } + + impl HMacInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + HMacInput::HMacInput{digestAlgorithm, key, message, } => digestAlgorithm, + } + } + pub fn key(&self) -> &Sequence { + match self { + HMacInput::HMacInput{digestAlgorithm, key, message, } => key, + } + } + pub fn message(&self) -> &Sequence { + match self { + HMacInput::HMacInput{digestAlgorithm, key, message, } => message, + } + } + } + + impl Debug + for HMacInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for HMacInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + HMacInput::HMacInput{digestAlgorithm, key, message, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.HMacInput.HMacInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for HMacInput {} + + impl Hash + for HMacInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + HMacInput::HMacInput{digestAlgorithm, key, message, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(key, _state); + Hash::hash(message, _state) + }, + } + } + } + + impl Default + for HMacInput { + fn default() -> HMacInput { + HMacInput::HMacInput { + digestAlgorithm: Default::default(), + key: Default::default(), + message: Default::default() + } + } + } + + impl AsRef + for &HMacInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KdfCtrInput { + KdfCtrInput { + digestAlgorithm: Rc, + ikm: Sequence, + expectedLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger, + purpose: Rc>>, + nonce: Rc>> + } + } + + impl KdfCtrInput { + pub fn digestAlgorithm(&self) -> &Rc { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => digestAlgorithm, + } + } + pub fn ikm(&self) -> &Sequence { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => ikm, + } + } + pub fn expectedLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => expectedLength, + } + } + pub fn purpose(&self) -> &Rc>> { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => purpose, + } + } + pub fn nonce(&self) -> &Rc>> { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => nonce, + } + } + } + + impl Debug + for KdfCtrInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KdfCtrInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.KdfCtrInput.KdfCtrInput(")?; + DafnyPrint::fmt_print(digestAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ikm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expectedLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(purpose, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(nonce, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KdfCtrInput {} + + impl Hash + for KdfCtrInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KdfCtrInput::KdfCtrInput{digestAlgorithm, ikm, expectedLength, purpose, nonce, } => { + Hash::hash(digestAlgorithm, _state); + Hash::hash(ikm, _state); + Hash::hash(expectedLength, _state); + Hash::hash(purpose, _state); + Hash::hash(nonce, _state) + }, + } + } + } + + impl Default + for KdfCtrInput { + fn default() -> KdfCtrInput { + KdfCtrInput::KdfCtrInput { + digestAlgorithm: Default::default(), + ikm: Default::default(), + expectedLength: Default::default(), + purpose: Default::default(), + nonce: Default::default() + } + } + } + + impl AsRef + for &KdfCtrInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ParsePublicKeyInput { + ParsePublicKeyInput { + publicKey: Sequence + } + } + + impl ParsePublicKeyInput { + pub fn publicKey(&self) -> &Sequence { + match self { + ParsePublicKeyInput::ParsePublicKeyInput{publicKey, } => publicKey, + } + } + } + + impl Debug + for ParsePublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ParsePublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ParsePublicKeyInput::ParsePublicKeyInput{publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ParsePublicKeyInput.ParsePublicKeyInput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ParsePublicKeyInput {} + + impl Hash + for ParsePublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ParsePublicKeyInput::ParsePublicKeyInput{publicKey, } => { + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for ParsePublicKeyInput { + fn default() -> ParsePublicKeyInput { + ParsePublicKeyInput::ParsePublicKeyInput { + publicKey: Default::default() + } + } + } + + impl AsRef + for &ParsePublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ParsePublicKeyOutput { + ParsePublicKeyOutput { + publicKey: Rc + } + } + + impl ParsePublicKeyOutput { + pub fn publicKey(&self) -> &Rc { + match self { + ParsePublicKeyOutput::ParsePublicKeyOutput{publicKey, } => publicKey, + } + } + } + + impl Debug + for ParsePublicKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ParsePublicKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ParsePublicKeyOutput::ParsePublicKeyOutput{publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ParsePublicKeyOutput.ParsePublicKeyOutput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ParsePublicKeyOutput {} + + impl Hash + for ParsePublicKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ParsePublicKeyOutput::ParsePublicKeyOutput{publicKey, } => { + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for ParsePublicKeyOutput { + fn default() -> ParsePublicKeyOutput { + ParsePublicKeyOutput::ParsePublicKeyOutput { + publicKey: Default::default() + } + } + } + + impl AsRef + for &ParsePublicKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type PositiveInteger = i32; + + #[derive(PartialEq, Clone)] + pub enum RSADecryptInput { + RSADecryptInput { + padding: Rc, + privateKey: Sequence, + cipherText: Sequence + } + } + + impl RSADecryptInput { + pub fn padding(&self) -> &Rc { + match self { + RSADecryptInput::RSADecryptInput{padding, privateKey, cipherText, } => padding, + } + } + pub fn privateKey(&self) -> &Sequence { + match self { + RSADecryptInput::RSADecryptInput{padding, privateKey, cipherText, } => privateKey, + } + } + pub fn cipherText(&self) -> &Sequence { + match self { + RSADecryptInput::RSADecryptInput{padding, privateKey, cipherText, } => cipherText, + } + } + } + + impl Debug + for RSADecryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RSADecryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RSADecryptInput::RSADecryptInput{padding, privateKey, cipherText, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSADecryptInput.RSADecryptInput(")?; + DafnyPrint::fmt_print(padding, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cipherText, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RSADecryptInput {} + + impl Hash + for RSADecryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RSADecryptInput::RSADecryptInput{padding, privateKey, cipherText, } => { + Hash::hash(padding, _state); + Hash::hash(privateKey, _state); + Hash::hash(cipherText, _state) + }, + } + } + } + + impl Default + for RSADecryptInput { + fn default() -> RSADecryptInput { + RSADecryptInput::RSADecryptInput { + padding: Default::default(), + privateKey: Default::default(), + cipherText: Default::default() + } + } + } + + impl AsRef + for &RSADecryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RSAEncryptInput { + RSAEncryptInput { + padding: Rc, + publicKey: Sequence, + plaintext: Sequence + } + } + + impl RSAEncryptInput { + pub fn padding(&self) -> &Rc { + match self { + RSAEncryptInput::RSAEncryptInput{padding, publicKey, plaintext, } => padding, + } + } + pub fn publicKey(&self) -> &Sequence { + match self { + RSAEncryptInput::RSAEncryptInput{padding, publicKey, plaintext, } => publicKey, + } + } + pub fn plaintext(&self) -> &Sequence { + match self { + RSAEncryptInput::RSAEncryptInput{padding, publicKey, plaintext, } => plaintext, + } + } + } + + impl Debug + for RSAEncryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RSAEncryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RSAEncryptInput::RSAEncryptInput{padding, publicKey, plaintext, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAEncryptInput.RSAEncryptInput(")?; + DafnyPrint::fmt_print(padding, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RSAEncryptInput {} + + impl Hash + for RSAEncryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RSAEncryptInput::RSAEncryptInput{padding, publicKey, plaintext, } => { + Hash::hash(padding, _state); + Hash::hash(publicKey, _state); + Hash::hash(plaintext, _state) + }, + } + } + } + + impl Default + for RSAEncryptInput { + fn default() -> RSAEncryptInput { + RSAEncryptInput::RSAEncryptInput { + padding: Default::default(), + publicKey: Default::default(), + plaintext: Default::default() + } + } + } + + impl AsRef + for &RSAEncryptInput { + fn as_ref(&self) -> Self { + self + } + } + + pub type RSAModulusLengthBits = i32; + + pub type RSAModulusLengthBitsToGenerate = i32; + + #[derive(PartialEq, Clone)] + pub enum RSAPaddingMode { + PKCS1 {}, + OAEP_SHA1 {}, + OAEP_SHA256 {}, + OAEP_SHA384 {}, + OAEP_SHA512 {} + } + + impl RSAPaddingMode {} + + impl Debug + for RSAPaddingMode { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RSAPaddingMode { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RSAPaddingMode::PKCS1{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPaddingMode.PKCS1")?; + Ok(()) + }, + RSAPaddingMode::OAEP_SHA1{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPaddingMode.OAEP__SHA1")?; + Ok(()) + }, + RSAPaddingMode::OAEP_SHA256{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPaddingMode.OAEP__SHA256")?; + Ok(()) + }, + RSAPaddingMode::OAEP_SHA384{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPaddingMode.OAEP__SHA384")?; + Ok(()) + }, + RSAPaddingMode::OAEP_SHA512{} => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPaddingMode.OAEP__SHA512")?; + Ok(()) + }, + } + } + } + + impl RSAPaddingMode { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(RSAPaddingMode::PKCS1 {}), Rc::new(RSAPaddingMode::OAEP_SHA1 {}), Rc::new(RSAPaddingMode::OAEP_SHA256 {}), Rc::new(RSAPaddingMode::OAEP_SHA384 {}), Rc::new(RSAPaddingMode::OAEP_SHA512 {})].iter() + } + } + + impl Eq + for RSAPaddingMode {} + + impl Hash + for RSAPaddingMode { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RSAPaddingMode::PKCS1{} => { + + }, + RSAPaddingMode::OAEP_SHA1{} => { + + }, + RSAPaddingMode::OAEP_SHA256{} => { + + }, + RSAPaddingMode::OAEP_SHA384{} => { + + }, + RSAPaddingMode::OAEP_SHA512{} => { + + }, + } + } + } + + impl Default + for RSAPaddingMode { + fn default() -> RSAPaddingMode { + RSAPaddingMode::PKCS1 {} + } + } + + impl AsRef + for &RSAPaddingMode { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RSAPrivateKey { + RSAPrivateKey { + lengthBits: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits, + pem: Sequence + } + } + + impl RSAPrivateKey { + pub fn lengthBits(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits { + match self { + RSAPrivateKey::RSAPrivateKey{lengthBits, pem, } => lengthBits, + } + } + pub fn pem(&self) -> &Sequence { + match self { + RSAPrivateKey::RSAPrivateKey{lengthBits, pem, } => pem, + } + } + } + + impl Debug + for RSAPrivateKey { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RSAPrivateKey { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RSAPrivateKey::RSAPrivateKey{lengthBits, pem, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPrivateKey.RSAPrivateKey(")?; + DafnyPrint::fmt_print(lengthBits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(pem, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RSAPrivateKey {} + + impl Hash + for RSAPrivateKey { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RSAPrivateKey::RSAPrivateKey{lengthBits, pem, } => { + Hash::hash(lengthBits, _state); + Hash::hash(pem, _state) + }, + } + } + } + + impl Default + for RSAPrivateKey { + fn default() -> RSAPrivateKey { + RSAPrivateKey::RSAPrivateKey { + lengthBits: Default::default(), + pem: Default::default() + } + } + } + + impl AsRef + for &RSAPrivateKey { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RSAPublicKey { + RSAPublicKey { + lengthBits: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits, + pem: Sequence + } + } + + impl RSAPublicKey { + pub fn lengthBits(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::RSAModulusLengthBits { + match self { + RSAPublicKey::RSAPublicKey{lengthBits, pem, } => lengthBits, + } + } + pub fn pem(&self) -> &Sequence { + match self { + RSAPublicKey::RSAPublicKey{lengthBits, pem, } => pem, + } + } + } + + impl Debug + for RSAPublicKey { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RSAPublicKey { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RSAPublicKey::RSAPublicKey{lengthBits, pem, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.RSAPublicKey.RSAPublicKey(")?; + DafnyPrint::fmt_print(lengthBits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(pem, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RSAPublicKey {} + + impl Hash + for RSAPublicKey { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RSAPublicKey::RSAPublicKey{lengthBits, pem, } => { + Hash::hash(lengthBits, _state); + Hash::hash(pem, _state) + }, + } + } + } + + impl Default + for RSAPublicKey { + fn default() -> RSAPublicKey { + RSAPublicKey::RSAPublicKey { + lengthBits: Default::default(), + pem: Default::default() + } + } + } + + impl AsRef + for &RSAPublicKey { + fn as_ref(&self) -> Self { + self + } + } + + pub type SymmetricKeyLength = i32; + + pub type Uint8Bits = i32; + + pub type Uint8Bytes = i32; + + #[derive(PartialEq, Clone)] + pub enum ValidatePublicKeyInput { + ValidatePublicKeyInput { + eccCurve: Rc, + publicKey: Sequence + } + } + + impl ValidatePublicKeyInput { + pub fn eccCurve(&self) -> &Rc { + match self { + ValidatePublicKeyInput::ValidatePublicKeyInput{eccCurve, publicKey, } => eccCurve, + } + } + pub fn publicKey(&self) -> &Sequence { + match self { + ValidatePublicKeyInput::ValidatePublicKeyInput{eccCurve, publicKey, } => publicKey, + } + } + } + + impl Debug + for ValidatePublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidatePublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidatePublicKeyInput::ValidatePublicKeyInput{eccCurve, publicKey, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ValidatePublicKeyInput.ValidatePublicKeyInput(")?; + DafnyPrint::fmt_print(eccCurve, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidatePublicKeyInput {} + + impl Hash + for ValidatePublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidatePublicKeyInput::ValidatePublicKeyInput{eccCurve, publicKey, } => { + Hash::hash(eccCurve, _state); + Hash::hash(publicKey, _state) + }, + } + } + } + + impl Default + for ValidatePublicKeyInput { + fn default() -> ValidatePublicKeyInput { + ValidatePublicKeyInput::ValidatePublicKeyInput { + eccCurve: Default::default(), + publicKey: Default::default() + } + } + } + + impl AsRef + for &ValidatePublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ValidatePublicKeyOutput { + ValidatePublicKeyOutput { + success: bool + } + } + + impl ValidatePublicKeyOutput { + pub fn success(&self) -> &bool { + match self { + ValidatePublicKeyOutput::ValidatePublicKeyOutput{success, } => success, + } + } + } + + impl Debug + for ValidatePublicKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidatePublicKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidatePublicKeyOutput::ValidatePublicKeyOutput{success, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.ValidatePublicKeyOutput.ValidatePublicKeyOutput(")?; + DafnyPrint::fmt_print(success, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidatePublicKeyOutput {} + + impl Hash + for ValidatePublicKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidatePublicKeyOutput::ValidatePublicKeyOutput{success, } => { + Hash::hash(success, _state) + }, + } + } + } + + impl Default + for ValidatePublicKeyOutput { + fn default() -> ValidatePublicKeyOutput { + ValidatePublicKeyOutput::ValidatePublicKeyOutput { + success: Default::default() + } + } + } + + impl AsRef + for &ValidatePublicKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + AwsCryptographicPrimitivesError { + message: Sequence + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::AwsCryptographicPrimitivesError{message, } => message, + Error::CollectionOfErrors{list, message, } => message, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn list(&self) -> &Sequence> { + match self { + Error::AwsCryptographicPrimitivesError{message, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => list, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn obj(&self) -> &Object { + match self { + Error::AwsCryptographicPrimitivesError{message, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => obj, + Error::OpaqueWithText{obj, objMessage, } => obj, + } + } + pub fn objMessage(&self) -> &Sequence { + match self { + Error::AwsCryptographicPrimitivesError{message, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => objMessage, + } + } + } + + impl Debug + for Error { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Error { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Error::AwsCryptographicPrimitivesError{message, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.Error.AwsCryptographicPrimitivesError(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.Error.CollectionOfErrors(")?; + DafnyPrint::fmt_print(list, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::Opaque{obj, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.primitives.internaldafny.types.Error.OpaqueWithText(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(objMessage, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Error {} + + impl Hash + for Error { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Error::AwsCryptographicPrimitivesError{message, } => { + Hash::hash(message, _state) + }, + Error::CollectionOfErrors{list, message, } => { + Hash::hash(list, _state); + Hash::hash(message, _state) + }, + Error::Opaque{obj, } => { + Hash::hash(obj, _state) + }, + Error::OpaqueWithText{obj, objMessage, } => { + Hash::hash(obj, _state); + Hash::hash(objMessage, _state) + }, + } + } + } + + impl Default + for Error { + fn default() -> Error { + Error::AwsCryptographicPrimitivesError { + message: Default::default() + } + } + } + + impl AsRef + for &Error { + fn as_ref(&self) -> Self { + self + } + } + + pub type OpaqueError = Rc; + + pub type DummySubsetType = DafnyInt; + + pub fn r#__init_DummySubsetType() -> DafnyInt { + int!(1) + } + } + } + } + + pub mod encryptionsdk { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::AwsEncryptionSdkConfig; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::CountingNumbers; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::NetV4_0_0_RetryPolicy; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClient; + pub use ::dafny_runtime::upcast_object; + 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 crate::implementation_from_dafny::r#_AwsEncryptionSdkOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::IAwsEncryptionSdkClient; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::update_field_uninit_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::EncryptOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::DecryptOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultAwsEncryptionSdkConfig() -> Rc { + Rc::new(AwsEncryptionSdkConfig::AwsEncryptionSdkConfig { + commitmentPolicy: Rc::new(Option::>::Some { + value: Rc::new(ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {}) + }), + maxEncryptedDataKeys: Rc::new(Option::::None {}), + netV4_0_0_RetryPolicy: Rc::new(Option::>::Some { + value: Rc::new(NetV4_0_0_RetryPolicy::ALLOW_RETRY {}) + }) + }) + } + pub fn ESDK(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut maybeCrypto = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::_default::AtomicPrimitives(&crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::_default::DefaultCryptoConfig())); + maybeCrypto = MaybePlacebo::from(_out0.read()); + let mut valueOrError0: Rc, Rc>> = maybeCrypto.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: e.clone() + }) + }) + })); + if valueOrError0.IsFailure() { + res = MaybePlacebo::from(valueOrError0.PropagateFailure::>()); + return res.read(); + }; + let mut cryptoX: Object = upcast_object::()(valueOrError0.Extract()); + let mut crypto: Object = cast_object!(cryptoX.clone(), AtomicPrimitivesClient); + let mut maybeMpl = MaybePlacebo::, Rc>>>::new(); + let mut _out1 = MaybePlacebo::, Rc>>>::new(); + _out1 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::_default::MaterialProviders(&crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::_default::DefaultMaterialProvidersConfig())); + maybeMpl = MaybePlacebo::from(_out1.read()); + let mut valueOrError1: Rc, Rc>> = maybeMpl.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: e.clone() + }) + }) + })); + if valueOrError1.IsFailure() { + res = MaybePlacebo::from(valueOrError1.PropagateFailure::>()); + return res.read(); + }; + let mut mplX: Object = upcast_object::()(valueOrError1.Extract()); + let mut mpl: Object = cast_object!(mplX.clone(), MaterialProvidersClient); + let mut internalConfig: Rc = Rc::new(Config::Config { + crypto: crypto.clone(), + mpl: mpl.clone(), + commitmentPolicy: config.commitmentPolicy().UnwrapOr(&Rc::new(ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {})), + maxEncryptedDataKeys: config.maxEncryptedDataKeys().clone(), + netV4_0_0_RetryPolicy: config.netV4_0_0_RetryPolicy().UnwrapOr(&Rc::new(NetV4_0_0_RetryPolicy::ALLOW_RETRY {})) + }); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::ESDKClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::ESDKClient::_ctor(&_nw0, &internalConfig); + client = MaybePlacebo::from(_nw0.clone()); + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: client.read() + })); + return res.read(); + } + pub fn CreateSuccessOfClient(client: &Object) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: client.clone() + }) + } + pub fn CreateFailureOfError(error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + } + + pub struct ESDKClient { + pub r#__i_config: Rc + } + + impl ESDKClient { + pub fn _allocate_object() -> Object { + allocate_object::() + } + pub fn _ctor(this: &Object, config: &Rc) -> () { + let mut _set__i_config: bool = false; + update_field_uninit_object!(this.clone(), r#__i_config, _set__i_config, config.clone()); + return (); + } + pub fn config(&self) -> Rc { + self.r#__i_config.clone() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::ESDKClient { + UpcastObjectFn!(dyn Any); + } + + impl IAwsEncryptionSdkClient + for crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::ESDKClient { + fn Encrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsEncryptionSdkOperations_Compile::_default::Encrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn Decrypt(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsEncryptionSdkOperations_Compile::_default::Decrypt(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::ESDKClient { + UpcastObjectFn!(dyn IAwsEncryptionSdkClient); + } + + pub mod types { + pub use ::dafny_runtime::truncate; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKCommitmentPolicy; + pub use ::dafny_runtime::Sequence; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::UTF8::ValidUTF8Bytes; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ESDKAlgorithmSuiteId; + pub use ::dafny_runtime::SequenceIter; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::DafnyCharUTF16; + + pub struct _default {} + + impl _default { + pub fn IsValid_CountingNumbers(x: i64) -> bool { + !(x < truncate!(int!(1), i64)) + } + pub fn IsValid_FrameLength(x: i64) -> bool { + !(x < truncate!(int!(1), i64)) && !(truncate!(int!(b"4294967296"), i64) < x) + } + pub fn IsDummySubsetType(x: &DafnyInt) -> bool { + int!(0) < x.clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum DafnyCallEvent { + DafnyCallEvent { + input: I, + output: O + } + } + + impl DafnyCallEvent { + pub fn input(&self) -> &I { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => input, + } + } + pub fn output(&self) -> &O { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => output, + } + } + } + + impl Debug + for DafnyCallEvent { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DafnyCallEvent { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.DafnyCallEvent.DafnyCallEvent(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DafnyCallEvent {} + + impl Hash + for DafnyCallEvent { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for DafnyCallEvent { + fn default() -> DafnyCallEvent { + DafnyCallEvent::DafnyCallEvent { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &DafnyCallEvent { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IAwsEncryptionSdkClientCallHistory {} + + impl IAwsEncryptionSdkClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::encryptionsdk::internaldafny::types::IAwsEncryptionSdkClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IAwsEncryptionSdkClient: Any + UpcastObject { + fn Encrypt(&self, input: &Rc) -> Rc, Rc>>; + fn Decrypt(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum AwsEncryptionSdkConfig { + AwsEncryptionSdkConfig { + commitmentPolicy: Rc>>, + maxEncryptedDataKeys: Rc>, + netV4_0_0_RetryPolicy: Rc>> + } + } + + impl AwsEncryptionSdkConfig { + pub fn commitmentPolicy(&self) -> &Rc>> { + match self { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig{commitmentPolicy, maxEncryptedDataKeys, netV4_0_0_RetryPolicy, } => commitmentPolicy, + } + } + pub fn maxEncryptedDataKeys(&self) -> &Rc> { + match self { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig{commitmentPolicy, maxEncryptedDataKeys, netV4_0_0_RetryPolicy, } => maxEncryptedDataKeys, + } + } + pub fn netV4_0_0_RetryPolicy(&self) -> &Rc>> { + match self { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig{commitmentPolicy, maxEncryptedDataKeys, netV4_0_0_RetryPolicy, } => netV4_0_0_RetryPolicy, + } + } + } + + impl Debug + for AwsEncryptionSdkConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AwsEncryptionSdkConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig{commitmentPolicy, maxEncryptedDataKeys, netV4_0_0_RetryPolicy, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.AwsEncryptionSdkConfig.AwsEncryptionSdkConfig(")?; + DafnyPrint::fmt_print(commitmentPolicy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(maxEncryptedDataKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(netV4_0_0_RetryPolicy, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AwsEncryptionSdkConfig {} + + impl Hash + for AwsEncryptionSdkConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig{commitmentPolicy, maxEncryptedDataKeys, netV4_0_0_RetryPolicy, } => { + Hash::hash(commitmentPolicy, _state); + Hash::hash(maxEncryptedDataKeys, _state); + Hash::hash(netV4_0_0_RetryPolicy, _state) + }, + } + } + } + + impl Default + for AwsEncryptionSdkConfig { + fn default() -> AwsEncryptionSdkConfig { + AwsEncryptionSdkConfig::AwsEncryptionSdkConfig { + commitmentPolicy: Default::default(), + maxEncryptedDataKeys: Default::default(), + netV4_0_0_RetryPolicy: Default::default() + } + } + } + + impl AsRef + for &AwsEncryptionSdkConfig { + fn as_ref(&self) -> Self { + self + } + } + + pub type CountingNumbers = i64; + + #[derive(PartialEq, Clone)] + pub enum DecryptInput { + DecryptInput { + ciphertext: Sequence, + materialsManager: Rc>>, + keyring: Rc>>, + encryptionContext: Rc>> + } + } + + impl DecryptInput { + pub fn ciphertext(&self) -> &Sequence { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => ciphertext, + } + } + pub fn materialsManager(&self) -> &Rc>> { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => materialsManager, + } + } + pub fn keyring(&self) -> &Rc>> { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => keyring, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for DecryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.DecryptInput.DecryptInput(")?; + DafnyPrint::fmt_print(ciphertext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(materialsManager, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptInput {} + + impl Hash + for DecryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptInput::DecryptInput{ciphertext, materialsManager, keyring, encryptionContext, } => { + Hash::hash(ciphertext, _state); + Hash::hash(materialsManager, _state); + Hash::hash(keyring, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for DecryptInput { + fn default() -> DecryptInput { + DecryptInput::DecryptInput { + ciphertext: Default::default(), + materialsManager: Default::default(), + keyring: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for &DecryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptOutput { + DecryptOutput { + plaintext: Sequence, + encryptionContext: Map, + algorithmSuiteId: Rc + } + } + + impl DecryptOutput { + pub fn plaintext(&self) -> &Sequence { + match self { + DecryptOutput::DecryptOutput{plaintext, encryptionContext, algorithmSuiteId, } => plaintext, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + DecryptOutput::DecryptOutput{plaintext, encryptionContext, algorithmSuiteId, } => encryptionContext, + } + } + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + DecryptOutput::DecryptOutput{plaintext, encryptionContext, algorithmSuiteId, } => algorithmSuiteId, + } + } + } + + impl Debug + for DecryptOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptOutput::DecryptOutput{plaintext, encryptionContext, algorithmSuiteId, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.DecryptOutput.DecryptOutput(")?; + DafnyPrint::fmt_print(plaintext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptOutput {} + + impl Hash + for DecryptOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptOutput::DecryptOutput{plaintext, encryptionContext, algorithmSuiteId, } => { + Hash::hash(plaintext, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(algorithmSuiteId, _state) + }, + } + } + } + + impl Default + for DecryptOutput { + fn default() -> DecryptOutput { + DecryptOutput::DecryptOutput { + plaintext: Default::default(), + encryptionContext: Default::default(), + algorithmSuiteId: Default::default() + } + } + } + + impl AsRef + for &DecryptOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptInput { + EncryptInput { + plaintext: Sequence, + encryptionContext: Rc>>, + materialsManager: Rc>>, + keyring: Rc>>, + algorithmSuiteId: Rc>>, + frameLength: Rc> + } + } + + impl EncryptInput { + pub fn plaintext(&self) -> &Sequence { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => plaintext, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => encryptionContext, + } + } + pub fn materialsManager(&self) -> &Rc>> { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => materialsManager, + } + } + pub fn keyring(&self) -> &Rc>> { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => keyring, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => algorithmSuiteId, + } + } + pub fn frameLength(&self) -> &Rc> { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => frameLength, + } + } + } + + impl Debug + for EncryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.EncryptInput.EncryptInput(")?; + DafnyPrint::fmt_print(plaintext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(materialsManager, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(frameLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptInput {} + + impl Hash + for EncryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptInput::EncryptInput{plaintext, encryptionContext, materialsManager, keyring, algorithmSuiteId, frameLength, } => { + Hash::hash(plaintext, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(materialsManager, _state); + Hash::hash(keyring, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(frameLength, _state) + }, + } + } + } + + impl Default + for EncryptInput { + fn default() -> EncryptInput { + EncryptInput::EncryptInput { + plaintext: Default::default(), + encryptionContext: Default::default(), + materialsManager: Default::default(), + keyring: Default::default(), + algorithmSuiteId: Default::default(), + frameLength: Default::default() + } + } + } + + impl AsRef + for &EncryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptOutput { + EncryptOutput { + ciphertext: Sequence, + encryptionContext: Map, + algorithmSuiteId: Rc + } + } + + impl EncryptOutput { + pub fn ciphertext(&self) -> &Sequence { + match self { + EncryptOutput::EncryptOutput{ciphertext, encryptionContext, algorithmSuiteId, } => ciphertext, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + EncryptOutput::EncryptOutput{ciphertext, encryptionContext, algorithmSuiteId, } => encryptionContext, + } + } + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + EncryptOutput::EncryptOutput{ciphertext, encryptionContext, algorithmSuiteId, } => algorithmSuiteId, + } + } + } + + impl Debug + for EncryptOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptOutput::EncryptOutput{ciphertext, encryptionContext, algorithmSuiteId, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.EncryptOutput.EncryptOutput(")?; + DafnyPrint::fmt_print(ciphertext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptOutput {} + + impl Hash + for EncryptOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptOutput::EncryptOutput{ciphertext, encryptionContext, algorithmSuiteId, } => { + Hash::hash(ciphertext, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(algorithmSuiteId, _state) + }, + } + } + } + + impl Default + for EncryptOutput { + fn default() -> EncryptOutput { + EncryptOutput::EncryptOutput { + ciphertext: Default::default(), + encryptionContext: Default::default(), + algorithmSuiteId: Default::default() + } + } + } + + impl AsRef + for &EncryptOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type FrameLength = i64; + + #[derive(PartialEq, Clone)] + pub enum NetV4_0_0_RetryPolicy { + FORBID_RETRY {}, + ALLOW_RETRY {} + } + + impl NetV4_0_0_RetryPolicy {} + + impl Debug + for NetV4_0_0_RetryPolicy { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for NetV4_0_0_RetryPolicy { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + NetV4_0_0_RetryPolicy::FORBID_RETRY{} => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.NetV4__0__0__RetryPolicy.FORBID__RETRY")?; + Ok(()) + }, + NetV4_0_0_RetryPolicy::ALLOW_RETRY{} => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.NetV4__0__0__RetryPolicy.ALLOW__RETRY")?; + Ok(()) + }, + } + } + } + + impl NetV4_0_0_RetryPolicy { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(NetV4_0_0_RetryPolicy::FORBID_RETRY {}), Rc::new(NetV4_0_0_RetryPolicy::ALLOW_RETRY {})].iter() + } + } + + impl Eq + for NetV4_0_0_RetryPolicy {} + + impl Hash + for NetV4_0_0_RetryPolicy { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + NetV4_0_0_RetryPolicy::FORBID_RETRY{} => { + + }, + NetV4_0_0_RetryPolicy::ALLOW_RETRY{} => { + + }, + } + } + } + + impl Default + for NetV4_0_0_RetryPolicy { + fn default() -> NetV4_0_0_RetryPolicy { + NetV4_0_0_RetryPolicy::FORBID_RETRY {} + } + } + + impl AsRef + for &NetV4_0_0_RetryPolicy { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + AwsEncryptionSdkException { + message: Sequence + }, + AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: Rc + }, + AwsCryptographyPrimitives { + AwsCryptographyPrimitives: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::AwsEncryptionSdkException{message, } => message, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => message, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn AwsCryptographyMaterialProviders(&self) -> &Rc { + match self { + Error::AwsEncryptionSdkException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => AwsCryptographyMaterialProviders, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn AwsCryptographyPrimitives(&self) -> &Rc { + match self { + Error::AwsEncryptionSdkException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => AwsCryptographyPrimitives, + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn list(&self) -> &Sequence> { + match self { + Error::AwsEncryptionSdkException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => list, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn obj(&self) -> &Object { + match self { + Error::AwsEncryptionSdkException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => obj, + Error::OpaqueWithText{obj, objMessage, } => obj, + } + } + pub fn objMessage(&self) -> &Sequence { + match self { + Error::AwsEncryptionSdkException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => objMessage, + } + } + } + + impl Debug + for Error { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Error { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Error::AwsEncryptionSdkException{message, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.AwsEncryptionSdkException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.AwsCryptographyMaterialProviders(")?; + DafnyPrint::fmt_print(AwsCryptographyMaterialProviders, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.AwsCryptographyPrimitives(")?; + DafnyPrint::fmt_print(AwsCryptographyPrimitives, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.CollectionOfErrors(")?; + DafnyPrint::fmt_print(list, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::Opaque{obj, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.encryptionsdk.internaldafny.types.Error.OpaqueWithText(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(objMessage, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Error {} + + impl Hash + for Error { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Error::AwsEncryptionSdkException{message, } => { + Hash::hash(message, _state) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + Hash::hash(AwsCryptographyMaterialProviders, _state) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + Hash::hash(AwsCryptographyPrimitives, _state) + }, + Error::CollectionOfErrors{list, message, } => { + Hash::hash(list, _state); + Hash::hash(message, _state) + }, + Error::Opaque{obj, } => { + Hash::hash(obj, _state) + }, + Error::OpaqueWithText{obj, objMessage, } => { + Hash::hash(obj, _state); + Hash::hash(objMessage, _state) + }, + } + } + } + + impl Default + for Error { + fn default() -> Error { + Error::AwsEncryptionSdkException { + message: Default::default() + } + } + } + + impl AsRef + for &Error { + fn as_ref(&self) -> Self { + self + } + } + + pub type OpaqueError = Rc; + + pub type DummySubsetType = DafnyInt; + + pub fn r#__init_DummySubsetType() -> DafnyInt { + int!(1) + } + } + } + } + + pub mod keystore { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::KeyStoreConfig; + pub use ::dafny_runtime::string_utf16_of; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::r#_AwsArnParsing_Compile::AwsKmsArn; + pub use crate::implementation_from_dafny::r#_AwsArnParsing_Compile::AwsArn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::mrDiscovery; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Outcome; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result::Success; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::Some; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::None; + pub use crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::IKeyStoreClient; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::update_field_uninit_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetKeyStoreInfoOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::CreateKeyStoreOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::CreateKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::CreateKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::VersionKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::VersionKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetActiveBranchKeyOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetBranchKeyVersionOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::GetBeaconKeyOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultKeyStoreConfig() -> Rc { + Rc::new(KeyStoreConfig::KeyStoreConfig { + ddbTableName: string_utf16_of("None"), + kmsConfiguration: Rc::new(KMSConfiguration::kmsKeyArn { + kmsKeyArn: string_utf16_of("arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab") + }), + logicalKeyStoreName: string_utf16_of("None"), + id: Rc::new(Option::>::None {}), + grantTokens: Rc::new(Option::>>::None {}), + ddbClient: Rc::new(Option::>::None {}), + kmsClient: Rc::new(Option::>::None {}) + }) + } + pub fn KeyStore(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut kmsClient = MaybePlacebo::>::new(); + let mut ddbClient = MaybePlacebo::>::new(); + let mut inferredRegion: Rc>> = Rc::new(Option::>::None {}); + if crate::implementation_from_dafny::r#_KMSKeystoreOperations_Compile::_default::HasKeyId(config.kmsConfiguration()) { + let mut valueOrError0: Rc>> = crate::implementation_from_dafny::r#_KmsArn_Compile::_default::IsValidKeyArn(&crate::implementation_from_dafny::r#_KMSKeystoreOperations_Compile::_default::GetKeyId(config.kmsConfiguration())); + if valueOrError0.IsFailure() { + res = MaybePlacebo::from(valueOrError0.PropagateFailure::>()); + return res.read(); + }; + let mut parsedArn: Rc = valueOrError0.Extract(); + inferredRegion = Rc::new(Option::>::Some { + value: parsedArn.region().clone() + }); + } else { + if matches!(config.kmsConfiguration().as_ref(), mrDiscovery{ .. }) { + inferredRegion = Rc::new(Option::>::Some { + value: config.kmsConfiguration().mrDiscovery().region().clone() + }); + } + }; + let mut grantTokens: Rc>, Rc>> = crate::implementation_from_dafny::r#_AwsKmsUtils_Compile::_default::GetValidGrantTokens(config.grantTokens()); + let mut valueOrError1 = MaybePlacebo::>>>::new(); + valueOrError1 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(true && matches!((&grantTokens).as_ref(), Success{ .. }), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::KeyStoreException { + message: string_utf16_of("Grant Tokens passed to Key Store configuration are invalid.") + }))); + if valueOrError1.read().IsFailure() { + res = MaybePlacebo::from(valueOrError1.read().PropagateFailure::>()); + return res.read(); + }; + let mut keyStoreId = MaybePlacebo::>::new(); + if matches!(config.id().as_ref(), Some{ .. }) { + keyStoreId = MaybePlacebo::from(config.id().value().clone()); + } else { + let mut maybeUuid = MaybePlacebo::, Sequence>>>::new(); + let mut _out0 = MaybePlacebo::, Sequence>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::UUID::_default::GenerateUUID()); + maybeUuid = MaybePlacebo::from(_out0.read()); + let mut valueOrError2 = MaybePlacebo::, Rc>>>::new(); + valueOrError2 = MaybePlacebo::from(maybeUuid.read().MapFailure::>(&({ + Rc::new(move |e: &Sequence| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::KeyStoreException { + message: e.clone() + }) + }) + }))); + if valueOrError2.read().IsFailure() { + res = MaybePlacebo::from(valueOrError2.read().PropagateFailure::>()); + return res.read(); + }; + let mut uuid: Sequence = valueOrError2.read().Extract(); + keyStoreId = MaybePlacebo::from(uuid.clone()); + }; + if matches!(config.kmsClient().as_ref(), Some{ .. }) { + kmsClient = MaybePlacebo::from(config.kmsClient().value().clone()); + } else { + if matches!(config.kmsClient().as_ref(), None{ .. }) && matches!((&inferredRegion).as_ref(), Some{ .. }) { + let mut maybeKmsClient = MaybePlacebo::, Rc>>>::new(); + let mut _out1 = MaybePlacebo::, Rc>>>::new(); + _out1 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::_default::KMSClientForRegion(inferredRegion.value())); + maybeKmsClient = MaybePlacebo::from(_out1.read()); + let mut valueOrError3: Rc, Rc>> = maybeKmsClient.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsKms { + ComAmazonawsKms: e.clone() + }) + }) + })); + if valueOrError3.IsFailure() { + res = MaybePlacebo::from(valueOrError3.PropagateFailure::>()); + return res.read(); + }; + kmsClient = MaybePlacebo::from(valueOrError3.Extract()); + } else { + let mut maybeKmsClient = MaybePlacebo::, Rc>>>::new(); + let mut _out2 = MaybePlacebo::, Rc>>>::new(); + _out2 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::_default::KMSClient()); + maybeKmsClient = MaybePlacebo::from(_out2.read()); + let mut valueOrError4: Rc, Rc>> = maybeKmsClient.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsKms { + ComAmazonawsKms: e.clone() + }) + }) + })); + if valueOrError4.IsFailure() { + res = MaybePlacebo::from(valueOrError4.PropagateFailure::>()); + return res.read(); + }; + kmsClient = MaybePlacebo::from(valueOrError4.Extract()); + } + }; + if matches!(config.ddbClient().as_ref(), Some{ .. }) { + ddbClient = MaybePlacebo::from(config.ddbClient().value().clone()); + } else { + if matches!(config.ddbClient().as_ref(), None{ .. }) && matches!((&inferredRegion).as_ref(), Some{ .. }) { + let mut maybeDdbClient = MaybePlacebo::, Rc>>>::new(); + let mut _out3 = MaybePlacebo::, Rc>>>::new(); + _out3 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::_default::DDBClientForRegion(inferredRegion.value())); + maybeDdbClient = MaybePlacebo::from(_out3.read()); + let mut valueOrError5: Rc, Rc>> = maybeDdbClient.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: e.clone() + }) + }) + })); + if valueOrError5.IsFailure() { + res = MaybePlacebo::from(valueOrError5.PropagateFailure::>()); + return res.read(); + }; + ddbClient = MaybePlacebo::from(valueOrError5.Extract()); + } else { + let mut maybeDdbClient = MaybePlacebo::, Rc>>>::new(); + let mut _out4 = MaybePlacebo::, Rc>>>::new(); + _out4 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::_default::DynamoDBClient()); + maybeDdbClient = MaybePlacebo::from(_out4.read()); + let mut valueOrError6: Rc, Rc>> = maybeDdbClient.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: e.clone() + }) + }) + })); + if valueOrError6.IsFailure() { + res = MaybePlacebo::from(valueOrError6.PropagateFailure::>()); + return res.read(); + }; + ddbClient = MaybePlacebo::from(valueOrError6.Extract()); + } + }; + let mut valueOrError7 = MaybePlacebo::>>>::new(); + valueOrError7 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::_default::IsValid_TableName(config.ddbTableName()), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::Error::KeyStoreException { + message: string_utf16_of("Invalid Amazon DynamoDB Table Name") + }))); + if valueOrError7.read().IsFailure() { + res = MaybePlacebo::from(valueOrError7.read().PropagateFailure::>()); + return res.read(); + }; + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::KeyStoreClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::KeyStoreClient::_ctor(&_nw0, &Rc::new(Config::Config { + id: keyStoreId.read(), + ddbTableName: config.ddbTableName().clone(), + logicalKeyStoreName: config.logicalKeyStoreName().clone(), + kmsConfiguration: config.kmsConfiguration().clone(), + grantTokens: grantTokens.value().clone(), + kmsClient: kmsClient.read(), + ddbClient: ddbClient.read() + })); + client = MaybePlacebo::from(_nw0.clone()); + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: client.read() + })); + return res.read(); + } + pub fn CreateSuccessOfClient(client: &Object) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: client.clone() + }) + } + pub fn CreateFailureOfError(error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + } + + pub struct KeyStoreClient { + pub r#__i_config: Rc + } + + impl KeyStoreClient { + pub fn _allocate_object() -> Object { + allocate_object::() + } + pub fn _ctor(this: &Object, config: &Rc) -> () { + let mut _set__i_config: bool = false; + update_field_uninit_object!(this.clone(), r#__i_config, _set__i_config, config.clone()); + return (); + } + pub fn config(&self) -> Rc { + self.r#__i_config.clone() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::KeyStoreClient { + UpcastObjectFn!(dyn Any); + } + + impl IKeyStoreClient + for crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::KeyStoreClient { + fn GetKeyStoreInfo(&self) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::GetKeyStoreInfo(&self.config().clone())); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateKeyStore(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::CreateKeyStore(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::CreateKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn VersionKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::VersionKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetActiveBranchKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::GetActiveBranchKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetBranchKeyVersion(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::GetBranchKeyVersion(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetBeaconKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyKeyStoreOperations_Compile::_default::GetBeaconKey(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::KeyStoreClient { + UpcastObjectFn!(dyn IKeyStoreClient); + } + + pub mod types { + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::UTF8::ValidUTF8Bytes; + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::SequenceIter; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::types::IKMSClient; + + pub struct _default {} + + impl _default { + pub fn IsDummySubsetType(x: &DafnyInt) -> bool { + int!(0) < x.clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum DafnyCallEvent { + DafnyCallEvent { + input: I, + output: O + } + } + + impl DafnyCallEvent { + pub fn input(&self) -> &I { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => input, + } + } + pub fn output(&self) -> &O { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => output, + } + } + } + + impl Debug + for DafnyCallEvent { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DafnyCallEvent { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.DafnyCallEvent.DafnyCallEvent(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DafnyCallEvent {} + + impl Hash + for DafnyCallEvent { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for DafnyCallEvent { + fn default() -> DafnyCallEvent { + DafnyCallEvent::DafnyCallEvent { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &DafnyCallEvent { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BeaconKeyMaterials { + BeaconKeyMaterials { + beaconKeyIdentifier: Sequence, + encryptionContext: Map, + beaconKey: Rc>>, + hmacKeys: Rc, Sequence>>> + } + } + + impl BeaconKeyMaterials { + pub fn beaconKeyIdentifier(&self) -> &Sequence { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => beaconKeyIdentifier, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => encryptionContext, + } + } + pub fn beaconKey(&self) -> &Rc>> { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => beaconKey, + } + } + pub fn hmacKeys(&self) -> &Rc, Sequence>>> { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => hmacKeys, + } + } + } + + impl Debug + for BeaconKeyMaterials { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BeaconKeyMaterials { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.BeaconKeyMaterials.BeaconKeyMaterials(")?; + DafnyPrint::fmt_print(beaconKeyIdentifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(beaconKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(hmacKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BeaconKeyMaterials {} + + impl Hash + for BeaconKeyMaterials { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BeaconKeyMaterials::BeaconKeyMaterials{beaconKeyIdentifier, encryptionContext, beaconKey, hmacKeys, } => { + Hash::hash(beaconKeyIdentifier, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(beaconKey, _state); + Hash::hash(hmacKeys, _state) + }, + } + } + } + + impl Default + for BeaconKeyMaterials { + fn default() -> BeaconKeyMaterials { + BeaconKeyMaterials::BeaconKeyMaterials { + beaconKeyIdentifier: Default::default(), + encryptionContext: Default::default(), + beaconKey: Default::default(), + hmacKeys: Default::default() + } + } + } + + impl AsRef + for &BeaconKeyMaterials { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BranchKeyMaterials { + BranchKeyMaterials { + branchKeyIdentifier: Sequence, + branchKeyVersion: ValidUTF8Bytes, + encryptionContext: Map, + branchKey: Sequence + } + } + + impl BranchKeyMaterials { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => branchKeyIdentifier, + } + } + pub fn branchKeyVersion(&self) -> &ValidUTF8Bytes { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => branchKeyVersion, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => encryptionContext, + } + } + pub fn branchKey(&self) -> &Sequence { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => branchKey, + } + } + } + + impl Debug + for BranchKeyMaterials { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BranchKeyMaterials { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.BranchKeyMaterials.BranchKeyMaterials(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKeyVersion, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BranchKeyMaterials {} + + impl Hash + for BranchKeyMaterials { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BranchKeyMaterials::BranchKeyMaterials{branchKeyIdentifier, branchKeyVersion, encryptionContext, branchKey, } => { + Hash::hash(branchKeyIdentifier, _state); + Hash::hash(branchKeyVersion, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(branchKey, _state) + }, + } + } + } + + impl Default + for BranchKeyMaterials { + fn default() -> BranchKeyMaterials { + BranchKeyMaterials::BranchKeyMaterials { + branchKeyIdentifier: Default::default(), + branchKeyVersion: Default::default(), + encryptionContext: Default::default(), + branchKey: Default::default() + } + } + } + + impl AsRef + for &BranchKeyMaterials { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateKeyInput { + CreateKeyInput { + branchKeyIdentifier: Rc>>, + encryptionContext: Rc>> + } + } + + impl CreateKeyInput { + pub fn branchKeyIdentifier(&self) -> &Rc>> { + match self { + CreateKeyInput::CreateKeyInput{branchKeyIdentifier, encryptionContext, } => branchKeyIdentifier, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + CreateKeyInput::CreateKeyInput{branchKeyIdentifier, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for CreateKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateKeyInput::CreateKeyInput{branchKeyIdentifier, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.CreateKeyInput.CreateKeyInput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateKeyInput {} + + impl Hash + for CreateKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateKeyInput::CreateKeyInput{branchKeyIdentifier, encryptionContext, } => { + Hash::hash(branchKeyIdentifier, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for CreateKeyInput { + fn default() -> CreateKeyInput { + CreateKeyInput::CreateKeyInput { + branchKeyIdentifier: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for &CreateKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateKeyOutput { + CreateKeyOutput { + branchKeyIdentifier: Sequence + } + } + + impl CreateKeyOutput { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + CreateKeyOutput::CreateKeyOutput{branchKeyIdentifier, } => branchKeyIdentifier, + } + } + } + + impl Debug + for CreateKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateKeyOutput::CreateKeyOutput{branchKeyIdentifier, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.CreateKeyOutput.CreateKeyOutput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateKeyOutput {} + + impl Hash + for CreateKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateKeyOutput::CreateKeyOutput{branchKeyIdentifier, } => { + Hash::hash(branchKeyIdentifier, _state) + }, + } + } + } + + impl Default + for CreateKeyOutput { + fn default() -> CreateKeyOutput { + CreateKeyOutput::CreateKeyOutput { + branchKeyIdentifier: Default::default() + } + } + } + + impl AsRef + for &CreateKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateKeyStoreInput { + CreateKeyStoreInput {} + } + + impl CreateKeyStoreInput {} + + impl Debug + for CreateKeyStoreInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateKeyStoreInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateKeyStoreInput::CreateKeyStoreInput{} => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.CreateKeyStoreInput.CreateKeyStoreInput")?; + Ok(()) + }, + } + } + } + + impl CreateKeyStoreInput { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(CreateKeyStoreInput::CreateKeyStoreInput {})].iter() + } + } + + impl Eq + for CreateKeyStoreInput {} + + impl Hash + for CreateKeyStoreInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateKeyStoreInput::CreateKeyStoreInput{} => { + + }, + } + } + } + + impl Default + for CreateKeyStoreInput { + fn default() -> CreateKeyStoreInput { + CreateKeyStoreInput::CreateKeyStoreInput {} + } + } + + impl AsRef + for &CreateKeyStoreInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateKeyStoreOutput { + CreateKeyStoreOutput { + tableArn: Sequence + } + } + + impl CreateKeyStoreOutput { + pub fn tableArn(&self) -> &Sequence { + match self { + CreateKeyStoreOutput::CreateKeyStoreOutput{tableArn, } => tableArn, + } + } + } + + impl Debug + for CreateKeyStoreOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateKeyStoreOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateKeyStoreOutput::CreateKeyStoreOutput{tableArn, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.CreateKeyStoreOutput.CreateKeyStoreOutput(")?; + DafnyPrint::fmt_print(tableArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateKeyStoreOutput {} + + impl Hash + for CreateKeyStoreOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateKeyStoreOutput::CreateKeyStoreOutput{tableArn, } => { + Hash::hash(tableArn, _state) + }, + } + } + } + + impl Default + for CreateKeyStoreOutput { + fn default() -> CreateKeyStoreOutput { + CreateKeyStoreOutput::CreateKeyStoreOutput { + tableArn: Default::default() + } + } + } + + impl AsRef + for &CreateKeyStoreOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Discovery { + Discovery {} + } + + impl Discovery {} + + impl Debug + for Discovery { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Discovery { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Discovery::Discovery{} => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Discovery.Discovery")?; + Ok(()) + }, + } + } + } + + impl Discovery { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(Discovery::Discovery {})].iter() + } + } + + impl Eq + for Discovery {} + + impl Hash + for Discovery { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Discovery::Discovery{} => { + + }, + } + } + } + + impl Default + for Discovery { + fn default() -> Discovery { + Discovery::Discovery {} + } + } + + impl AsRef + for &Discovery { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetActiveBranchKeyInput { + GetActiveBranchKeyInput { + branchKeyIdentifier: Sequence + } + } + + impl GetActiveBranchKeyInput { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + GetActiveBranchKeyInput::GetActiveBranchKeyInput{branchKeyIdentifier, } => branchKeyIdentifier, + } + } + } + + impl Debug + for GetActiveBranchKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetActiveBranchKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetActiveBranchKeyInput::GetActiveBranchKeyInput{branchKeyIdentifier, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetActiveBranchKeyInput.GetActiveBranchKeyInput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetActiveBranchKeyInput {} + + impl Hash + for GetActiveBranchKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetActiveBranchKeyInput::GetActiveBranchKeyInput{branchKeyIdentifier, } => { + Hash::hash(branchKeyIdentifier, _state) + }, + } + } + } + + impl Default + for GetActiveBranchKeyInput { + fn default() -> GetActiveBranchKeyInput { + GetActiveBranchKeyInput::GetActiveBranchKeyInput { + branchKeyIdentifier: Default::default() + } + } + } + + impl AsRef + for &GetActiveBranchKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetActiveBranchKeyOutput { + GetActiveBranchKeyOutput { + branchKeyMaterials: Rc + } + } + + impl GetActiveBranchKeyOutput { + pub fn branchKeyMaterials(&self) -> &Rc { + match self { + GetActiveBranchKeyOutput::GetActiveBranchKeyOutput{branchKeyMaterials, } => branchKeyMaterials, + } + } + } + + impl Debug + for GetActiveBranchKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetActiveBranchKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetActiveBranchKeyOutput::GetActiveBranchKeyOutput{branchKeyMaterials, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetActiveBranchKeyOutput.GetActiveBranchKeyOutput(")?; + DafnyPrint::fmt_print(branchKeyMaterials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetActiveBranchKeyOutput {} + + impl Hash + for GetActiveBranchKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetActiveBranchKeyOutput::GetActiveBranchKeyOutput{branchKeyMaterials, } => { + Hash::hash(branchKeyMaterials, _state) + }, + } + } + } + + impl Default + for GetActiveBranchKeyOutput { + fn default() -> GetActiveBranchKeyOutput { + GetActiveBranchKeyOutput::GetActiveBranchKeyOutput { + branchKeyMaterials: Default::default() + } + } + } + + impl AsRef + for &GetActiveBranchKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBeaconKeyInput { + GetBeaconKeyInput { + branchKeyIdentifier: Sequence + } + } + + impl GetBeaconKeyInput { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + GetBeaconKeyInput::GetBeaconKeyInput{branchKeyIdentifier, } => branchKeyIdentifier, + } + } + } + + impl Debug + for GetBeaconKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBeaconKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBeaconKeyInput::GetBeaconKeyInput{branchKeyIdentifier, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetBeaconKeyInput.GetBeaconKeyInput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBeaconKeyInput {} + + impl Hash + for GetBeaconKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBeaconKeyInput::GetBeaconKeyInput{branchKeyIdentifier, } => { + Hash::hash(branchKeyIdentifier, _state) + }, + } + } + } + + impl Default + for GetBeaconKeyInput { + fn default() -> GetBeaconKeyInput { + GetBeaconKeyInput::GetBeaconKeyInput { + branchKeyIdentifier: Default::default() + } + } + } + + impl AsRef + for &GetBeaconKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBeaconKeyOutput { + GetBeaconKeyOutput { + beaconKeyMaterials: Rc + } + } + + impl GetBeaconKeyOutput { + pub fn beaconKeyMaterials(&self) -> &Rc { + match self { + GetBeaconKeyOutput::GetBeaconKeyOutput{beaconKeyMaterials, } => beaconKeyMaterials, + } + } + } + + impl Debug + for GetBeaconKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBeaconKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBeaconKeyOutput::GetBeaconKeyOutput{beaconKeyMaterials, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetBeaconKeyOutput.GetBeaconKeyOutput(")?; + DafnyPrint::fmt_print(beaconKeyMaterials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBeaconKeyOutput {} + + impl Hash + for GetBeaconKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBeaconKeyOutput::GetBeaconKeyOutput{beaconKeyMaterials, } => { + Hash::hash(beaconKeyMaterials, _state) + }, + } + } + } + + impl Default + for GetBeaconKeyOutput { + fn default() -> GetBeaconKeyOutput { + GetBeaconKeyOutput::GetBeaconKeyOutput { + beaconKeyMaterials: Default::default() + } + } + } + + impl AsRef + for &GetBeaconKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyVersionInput { + GetBranchKeyVersionInput { + branchKeyIdentifier: Sequence, + branchKeyVersion: Sequence + } + } + + impl GetBranchKeyVersionInput { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + GetBranchKeyVersionInput::GetBranchKeyVersionInput{branchKeyIdentifier, branchKeyVersion, } => branchKeyIdentifier, + } + } + pub fn branchKeyVersion(&self) -> &Sequence { + match self { + GetBranchKeyVersionInput::GetBranchKeyVersionInput{branchKeyIdentifier, branchKeyVersion, } => branchKeyVersion, + } + } + } + + impl Debug + for GetBranchKeyVersionInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyVersionInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyVersionInput::GetBranchKeyVersionInput{branchKeyIdentifier, branchKeyVersion, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetBranchKeyVersionInput.GetBranchKeyVersionInput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKeyVersion, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyVersionInput {} + + impl Hash + for GetBranchKeyVersionInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyVersionInput::GetBranchKeyVersionInput{branchKeyIdentifier, branchKeyVersion, } => { + Hash::hash(branchKeyIdentifier, _state); + Hash::hash(branchKeyVersion, _state) + }, + } + } + } + + impl Default + for GetBranchKeyVersionInput { + fn default() -> GetBranchKeyVersionInput { + GetBranchKeyVersionInput::GetBranchKeyVersionInput { + branchKeyIdentifier: Default::default(), + branchKeyVersion: Default::default() + } + } + } + + impl AsRef + for &GetBranchKeyVersionInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyVersionOutput { + GetBranchKeyVersionOutput { + branchKeyMaterials: Rc + } + } + + impl GetBranchKeyVersionOutput { + pub fn branchKeyMaterials(&self) -> &Rc { + match self { + GetBranchKeyVersionOutput::GetBranchKeyVersionOutput{branchKeyMaterials, } => branchKeyMaterials, + } + } + } + + impl Debug + for GetBranchKeyVersionOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyVersionOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyVersionOutput::GetBranchKeyVersionOutput{branchKeyMaterials, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetBranchKeyVersionOutput.GetBranchKeyVersionOutput(")?; + DafnyPrint::fmt_print(branchKeyMaterials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyVersionOutput {} + + impl Hash + for GetBranchKeyVersionOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyVersionOutput::GetBranchKeyVersionOutput{branchKeyMaterials, } => { + Hash::hash(branchKeyMaterials, _state) + }, + } + } + } + + impl Default + for GetBranchKeyVersionOutput { + fn default() -> GetBranchKeyVersionOutput { + GetBranchKeyVersionOutput::GetBranchKeyVersionOutput { + branchKeyMaterials: Default::default() + } + } + } + + impl AsRef + for &GetBranchKeyVersionOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetKeyStoreInfoOutput { + GetKeyStoreInfoOutput { + keyStoreId: Sequence, + keyStoreName: Sequence, + logicalKeyStoreName: Sequence, + grantTokens: Sequence>, + kmsConfiguration: Rc + } + } + + impl GetKeyStoreInfoOutput { + pub fn keyStoreId(&self) -> &Sequence { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => keyStoreId, + } + } + pub fn keyStoreName(&self) -> &Sequence { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => keyStoreName, + } + } + pub fn logicalKeyStoreName(&self) -> &Sequence { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => logicalKeyStoreName, + } + } + pub fn grantTokens(&self) -> &Sequence> { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => grantTokens, + } + } + pub fn kmsConfiguration(&self) -> &Rc { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => kmsConfiguration, + } + } + } + + impl Debug + for GetKeyStoreInfoOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetKeyStoreInfoOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.GetKeyStoreInfoOutput.GetKeyStoreInfoOutput(")?; + DafnyPrint::fmt_print(keyStoreId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyStoreName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(logicalKeyStoreName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetKeyStoreInfoOutput {} + + impl Hash + for GetKeyStoreInfoOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput{keyStoreId, keyStoreName, logicalKeyStoreName, grantTokens, kmsConfiguration, } => { + Hash::hash(keyStoreId, _state); + Hash::hash(keyStoreName, _state); + Hash::hash(logicalKeyStoreName, _state); + Hash::hash(grantTokens, _state); + Hash::hash(kmsConfiguration, _state) + }, + } + } + } + + impl Default + for GetKeyStoreInfoOutput { + fn default() -> GetKeyStoreInfoOutput { + GetKeyStoreInfoOutput::GetKeyStoreInfoOutput { + keyStoreId: Default::default(), + keyStoreName: Default::default(), + logicalKeyStoreName: Default::default(), + grantTokens: Default::default(), + kmsConfiguration: Default::default() + } + } + } + + impl AsRef + for &GetKeyStoreInfoOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IKeyStoreClientCallHistory {} + + impl IKeyStoreClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::IKeyStoreClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IKeyStoreClient: Any + UpcastObject { + fn GetKeyStoreInfo(&self) -> Rc, Rc>>; + fn CreateKeyStore(&self, input: &Rc) -> Rc, Rc>>; + fn CreateKey(&self, input: &Rc) -> Rc, Rc>>; + fn VersionKey(&self, input: &Rc) -> Rc, Rc>>; + fn GetActiveBranchKey(&self, input: &Rc) -> Rc, Rc>>; + fn GetBranchKeyVersion(&self, input: &Rc) -> Rc, Rc>>; + fn GetBeaconKey(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum KeyStoreConfig { + KeyStoreConfig { + ddbTableName: Sequence, + kmsConfiguration: Rc, + logicalKeyStoreName: Sequence, + id: Rc>>, + grantTokens: Rc>>>, + ddbClient: Rc>>, + kmsClient: Rc>> + } + } + + impl KeyStoreConfig { + pub fn ddbTableName(&self) -> &Sequence { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => ddbTableName, + } + } + pub fn kmsConfiguration(&self) -> &Rc { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => kmsConfiguration, + } + } + pub fn logicalKeyStoreName(&self) -> &Sequence { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => logicalKeyStoreName, + } + } + pub fn id(&self) -> &Rc>> { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => id, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => grantTokens, + } + } + pub fn ddbClient(&self) -> &Rc>> { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => ddbClient, + } + } + pub fn kmsClient(&self) -> &Rc>> { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => kmsClient, + } + } + } + + impl Debug + for KeyStoreConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KeyStoreConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.KeyStoreConfig.KeyStoreConfig(")?; + DafnyPrint::fmt_print(ddbTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsConfiguration, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(logicalKeyStoreName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(id, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ddbClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KeyStoreConfig {} + + impl Hash + for KeyStoreConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KeyStoreConfig::KeyStoreConfig{ddbTableName, kmsConfiguration, logicalKeyStoreName, id, grantTokens, ddbClient, kmsClient, } => { + Hash::hash(ddbTableName, _state); + Hash::hash(kmsConfiguration, _state); + Hash::hash(logicalKeyStoreName, _state); + Hash::hash(id, _state); + Hash::hash(grantTokens, _state); + Hash::hash(ddbClient, _state); + Hash::hash(kmsClient, _state) + }, + } + } + } + + impl Default + for KeyStoreConfig { + fn default() -> KeyStoreConfig { + KeyStoreConfig::KeyStoreConfig { + ddbTableName: Default::default(), + kmsConfiguration: Default::default(), + logicalKeyStoreName: Default::default(), + id: Default::default(), + grantTokens: Default::default(), + ddbClient: Default::default(), + kmsClient: Default::default() + } + } + } + + impl AsRef + for &KeyStoreConfig { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KMSConfiguration { + kmsKeyArn { + kmsKeyArn: Sequence + }, + kmsMRKeyArn { + kmsMRKeyArn: Sequence + }, + discovery { + discovery: Rc + }, + mrDiscovery { + mrDiscovery: Rc + } + } + + impl KMSConfiguration { + pub fn kmsKeyArn(&self) -> &Sequence { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => kmsKeyArn, + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::discovery{discovery, } => panic!("field does not exist on this variant"), + KMSConfiguration::mrDiscovery{mrDiscovery, } => panic!("field does not exist on this variant"), + } + } + pub fn kmsMRKeyArn(&self) -> &Sequence { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => kmsMRKeyArn, + KMSConfiguration::discovery{discovery, } => panic!("field does not exist on this variant"), + KMSConfiguration::mrDiscovery{mrDiscovery, } => panic!("field does not exist on this variant"), + } + } + pub fn discovery(&self) -> &Rc { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::discovery{discovery, } => discovery, + KMSConfiguration::mrDiscovery{mrDiscovery, } => panic!("field does not exist on this variant"), + } + } + pub fn mrDiscovery(&self) -> &Rc { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => panic!("field does not exist on this variant"), + KMSConfiguration::discovery{discovery, } => panic!("field does not exist on this variant"), + KMSConfiguration::mrDiscovery{mrDiscovery, } => mrDiscovery, + } + } + } + + impl Debug + for KMSConfiguration { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KMSConfiguration { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration.kmsKeyArn(")?; + DafnyPrint::fmt_print(kmsKeyArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration.kmsMRKeyArn(")?; + DafnyPrint::fmt_print(kmsMRKeyArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + KMSConfiguration::discovery{discovery, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration.discovery(")?; + DafnyPrint::fmt_print(discovery, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + KMSConfiguration::mrDiscovery{mrDiscovery, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration.mrDiscovery(")?; + DafnyPrint::fmt_print(mrDiscovery, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KMSConfiguration {} + + impl Hash + for KMSConfiguration { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KMSConfiguration::kmsKeyArn{kmsKeyArn, } => { + Hash::hash(kmsKeyArn, _state) + }, + KMSConfiguration::kmsMRKeyArn{kmsMRKeyArn, } => { + Hash::hash(kmsMRKeyArn, _state) + }, + KMSConfiguration::discovery{discovery, } => { + Hash::hash(discovery, _state) + }, + KMSConfiguration::mrDiscovery{mrDiscovery, } => { + Hash::hash(mrDiscovery, _state) + }, + } + } + } + + impl Default + for KMSConfiguration { + fn default() -> KMSConfiguration { + KMSConfiguration::kmsKeyArn { + kmsKeyArn: Default::default() + } + } + } + + impl AsRef + for &KMSConfiguration { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum MRDiscovery { + MRDiscovery { + region: Sequence + } + } + + impl MRDiscovery { + pub fn region(&self) -> &Sequence { + match self { + MRDiscovery::MRDiscovery{region, } => region, + } + } + } + + impl Debug + for MRDiscovery { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for MRDiscovery { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + MRDiscovery::MRDiscovery{region, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.MRDiscovery.MRDiscovery(")?; + DafnyPrint::fmt_print(region, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for MRDiscovery {} + + impl Hash + for MRDiscovery { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + MRDiscovery::MRDiscovery{region, } => { + Hash::hash(region, _state) + }, + } + } + } + + impl Default + for MRDiscovery { + fn default() -> MRDiscovery { + MRDiscovery::MRDiscovery { + region: Default::default() + } + } + } + + impl AsRef + for &MRDiscovery { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum VersionKeyInput { + VersionKeyInput { + branchKeyIdentifier: Sequence + } + } + + impl VersionKeyInput { + pub fn branchKeyIdentifier(&self) -> &Sequence { + match self { + VersionKeyInput::VersionKeyInput{branchKeyIdentifier, } => branchKeyIdentifier, + } + } + } + + impl Debug + for VersionKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for VersionKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + VersionKeyInput::VersionKeyInput{branchKeyIdentifier, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.VersionKeyInput.VersionKeyInput(")?; + DafnyPrint::fmt_print(branchKeyIdentifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for VersionKeyInput {} + + impl Hash + for VersionKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + VersionKeyInput::VersionKeyInput{branchKeyIdentifier, } => { + Hash::hash(branchKeyIdentifier, _state) + }, + } + } + } + + impl Default + for VersionKeyInput { + fn default() -> VersionKeyInput { + VersionKeyInput::VersionKeyInput { + branchKeyIdentifier: Default::default() + } + } + } + + impl AsRef + for &VersionKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum VersionKeyOutput { + VersionKeyOutput {} + } + + impl VersionKeyOutput {} + + impl Debug + for VersionKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for VersionKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + VersionKeyOutput::VersionKeyOutput{} => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.VersionKeyOutput.VersionKeyOutput")?; + Ok(()) + }, + } + } + } + + impl VersionKeyOutput { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(VersionKeyOutput::VersionKeyOutput {})].iter() + } + } + + impl Eq + for VersionKeyOutput {} + + impl Hash + for VersionKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + VersionKeyOutput::VersionKeyOutput{} => { + + }, + } + } + } + + impl Default + for VersionKeyOutput { + fn default() -> VersionKeyOutput { + VersionKeyOutput::VersionKeyOutput {} + } + } + + impl AsRef + for &VersionKeyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + KeyStoreException { + message: Sequence + }, + ComAmazonawsDynamodb { + ComAmazonawsDynamodb: Rc + }, + ComAmazonawsKms { + ComAmazonawsKms: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::KeyStoreException{message, } => message, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => message, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn ComAmazonawsDynamodb(&self) -> &Rc { + match self { + Error::KeyStoreException{message, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => ComAmazonawsDynamodb, + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn ComAmazonawsKms(&self) -> &Rc { + match self { + Error::KeyStoreException{message, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => ComAmazonawsKms, + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn list(&self) -> &Sequence> { + match self { + Error::KeyStoreException{message, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => list, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn obj(&self) -> &Object { + match self { + Error::KeyStoreException{message, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => obj, + Error::OpaqueWithText{obj, objMessage, } => obj, + } + } + pub fn objMessage(&self) -> &Sequence { + match self { + Error::KeyStoreException{message, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => objMessage, + } + } + } + + impl Debug + for Error { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Error { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Error::KeyStoreException{message, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.KeyStoreException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.ComAmazonawsDynamodb(")?; + DafnyPrint::fmt_print(ComAmazonawsDynamodb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsKms{ComAmazonawsKms, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.ComAmazonawsKms(")?; + DafnyPrint::fmt_print(ComAmazonawsKms, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.CollectionOfErrors(")?; + DafnyPrint::fmt_print(list, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::Opaque{obj, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.keystore.internaldafny.types.Error.OpaqueWithText(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(objMessage, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Error {} + + impl Hash + for Error { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Error::KeyStoreException{message, } => { + Hash::hash(message, _state) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + Hash::hash(ComAmazonawsDynamodb, _state) + }, + Error::ComAmazonawsKms{ComAmazonawsKms, } => { + Hash::hash(ComAmazonawsKms, _state) + }, + Error::CollectionOfErrors{list, message, } => { + Hash::hash(list, _state); + Hash::hash(message, _state) + }, + Error::Opaque{obj, } => { + Hash::hash(obj, _state) + }, + Error::OpaqueWithText{obj, objMessage, } => { + Hash::hash(obj, _state); + Hash::hash(objMessage, _state) + }, + } + } + } + + impl Default + for Error { + fn default() -> Error { + Error::KeyStoreException { + message: Default::default() + } + } + } + + impl AsRef + for &Error { + fn as_ref(&self) -> Self { + self + } + } + + pub type OpaqueError = Rc; + + pub type DummySubsetType = DafnyInt; + + pub fn r#__init_DummySubsetType() -> DafnyInt { + int!(1) + } + } + } + } + + pub mod materialproviders { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::MaterialProvidersConfig; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::AtomicPrimitivesClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClient; + pub use ::dafny_runtime::upcast_object; + pub use ::dafny_runtime::cast_object; + pub use crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IAwsCryptographicMaterialProvidersClient; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::update_field_uninit_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyring; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMultiKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsDiscoveryMultiKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkMultiKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsMrkDiscoveryMultiKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsHierarchicalKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsRsaKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateAwsKmsEcdhKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateMultiKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawAesKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawRsaKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateRawEcdhKeyringInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateRequiredEncryptionContextCMMInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateCryptographicMaterialsCacheInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCache; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultClientSupplierInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplier; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::InitializeEncryptionMaterialsInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EncryptionMaterials; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::InitializeDecryptionMaterialsInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DecryptionMaterials; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ValidEncryptionMaterialsTransitionInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ValidDecryptionMaterialsTransitionInput; + pub use ::dafny_runtime::Sequence; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::AlgorithmSuiteInfo; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnEncryptInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ValidateCommitmentPolicyOnDecryptInput; + + pub struct _default {} + + impl _default { + pub fn DefaultMaterialProvidersConfig() -> Rc { + Rc::new(MaterialProvidersConfig::MaterialProvidersConfig {}) + } + pub fn MaterialProviders(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut maybeCrypto = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::_default::AtomicPrimitives(&crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::_default::DefaultCryptoConfig())); + maybeCrypto = MaybePlacebo::from(_out0.read()); + let mut valueOrError0: Rc, Rc>> = maybeCrypto.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: e.clone() + }) + }) + })); + if valueOrError0.IsFailure() { + res = MaybePlacebo::from(valueOrError0.PropagateFailure::>()); + return res.read(); + }; + let mut cryptoPrimitivesX: Object = upcast_object::()(valueOrError0.Extract()); + let mut cryptoPrimitives: Object = cast_object!(cryptoPrimitivesX.clone(), AtomicPrimitivesClient); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient::_ctor(&_nw0, &Rc::new(Config::Config { + crypto: cryptoPrimitives.clone() + })); + client = MaybePlacebo::from(_nw0.clone()); + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Success { + value: client.read() + })); + return res.read(); + } + pub fn CreateSuccessOfClient(client: &Object) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: client.clone() + }) + } + pub fn CreateFailureOfError(error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + } + + pub struct MaterialProvidersClient { + pub r#__i_config: Rc + } + + impl MaterialProvidersClient { + pub fn _allocate_object() -> Object { + allocate_object::() + } + pub fn _ctor(this: &Object, config: &Rc) -> () { + let mut _set__i_config: bool = false; + update_field_uninit_object!(this.clone(), r#__i_config, _set__i_config, config.clone()); + return (); + } + pub fn config(&self) -> Rc { + self.r#__i_config.clone() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient { + UpcastObjectFn!(dyn Any); + } + + impl IAwsCryptographicMaterialProvidersClient + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient { + fn CreateAwsKmsKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsDiscoveryKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsDiscoveryKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsMultiKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsMultiKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsDiscoveryMultiKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsDiscoveryMultiKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsMrkKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsMrkKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsMrkMultiKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsMrkMultiKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsMrkDiscoveryKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsMrkDiscoveryKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsMrkDiscoveryMultiKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsMrkDiscoveryMultiKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsHierarchicalKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsHierarchicalKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsRsaKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsRsaKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateAwsKmsEcdhKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateAwsKmsEcdhKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateMultiKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateMultiKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateRawAesKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateRawAesKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateRawRsaKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateRawRsaKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateRawEcdhKeyring(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateRawEcdhKeyring(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateDefaultCryptographicMaterialsManager(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateDefaultCryptographicMaterialsManager(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateRequiredEncryptionContextCMM(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateRequiredEncryptionContextCMM(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateCryptographicMaterialsCache(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateCryptographicMaterialsCache(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn CreateDefaultClientSupplier(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::CreateDefaultClientSupplier(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn InitializeEncryptionMaterials(&self, input: &Rc) -> Rc, Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::InitializeEncryptionMaterials(&self.config().clone(), input) + } + fn InitializeDecryptionMaterials(&self, input: &Rc) -> Rc, Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::InitializeDecryptionMaterials(&self.config().clone(), input) + } + fn ValidEncryptionMaterialsTransition(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::ValidEncryptionMaterialsTransition(&self.config().clone(), input) + } + fn ValidDecryptionMaterialsTransition(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::ValidDecryptionMaterialsTransition(&self.config().clone(), input) + } + fn EncryptionMaterialsHasPlaintextDataKey(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::EncryptionMaterialsHasPlaintextDataKey(&self.config().clone(), input) + } + fn DecryptionMaterialsWithPlaintextDataKey(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::DecryptionMaterialsWithPlaintextDataKey(&self.config().clone(), input) + } + fn GetAlgorithmSuiteInfo(&self, input: &Sequence) -> Rc, Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::GetAlgorithmSuiteInfo(&self.config().clone(), input) + } + fn ValidAlgorithmSuiteInfo(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::ValidAlgorithmSuiteInfo(&self.config().clone(), input) + } + fn ValidateCommitmentPolicyOnEncrypt(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::ValidateCommitmentPolicyOnEncrypt(&self.config().clone(), input) + } + fn ValidateCommitmentPolicyOnDecrypt(&self, input: &Rc) -> Rc>> { + crate::implementation_from_dafny::r#_AwsCryptographyMaterialProvidersOperations_Compile::_default::ValidateCommitmentPolicyOnDecrypt(&self.config().clone(), input) + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::MaterialProvidersClient { + UpcastObjectFn!(dyn IAwsCryptographicMaterialProvidersClient); + } + + pub mod types { + pub use ::dafny_runtime::truncate; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + pub use ::dafny_runtime::SequenceIter; + pub use ::std::rc::Rc; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use ::dafny_runtime::MaybePlacebo; + 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; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ECDHCurveSpec; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::IKeyStoreClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::kms::internaldafny::types::EncryptionAlgorithmSpec; + pub use crate::implementation_from_dafny::UTF8::ValidUTF8Bytes; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::ECDSASignatureAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::AES_GCM; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::DigestAlgorithm; + pub use crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::SymmetricKeyLength; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::BranchKeyMaterials; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::BeaconKeyMaterials; + + pub struct _default {} + + impl _default { + pub fn IsValid_CountingNumber(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) + } + pub fn IsValid_PositiveInteger(x: i32) -> bool { + !(x < truncate!(int!(0), i32)) + } + pub fn IsValid_PositiveLong(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsDummySubsetType(x: &DafnyInt) -> bool { + int!(0) < x.clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum DafnyCallEvent { + DafnyCallEvent { + input: I, + output: O + } + } + + impl DafnyCallEvent { + pub fn input(&self) -> &I { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => input, + } + } + pub fn output(&self) -> &O { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => output, + } + } + } + + impl Debug + for DafnyCallEvent { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DafnyCallEvent { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DafnyCallEvent.DafnyCallEvent(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DafnyCallEvent {} + + impl Hash + for DafnyCallEvent { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for DafnyCallEvent { + fn default() -> DafnyCallEvent { + DafnyCallEvent::DafnyCallEvent { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &DafnyCallEvent { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AesWrappingAlg { + ALG_AES128_GCM_IV12_TAG16 {}, + ALG_AES192_GCM_IV12_TAG16 {}, + ALG_AES256_GCM_IV12_TAG16 {} + } + + impl AesWrappingAlg {} + + impl Debug + for AesWrappingAlg { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AesWrappingAlg { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AesWrappingAlg.ALG__AES128__GCM__IV12__TAG16")?; + Ok(()) + }, + AesWrappingAlg::ALG_AES192_GCM_IV12_TAG16{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AesWrappingAlg.ALG__AES192__GCM__IV12__TAG16")?; + Ok(()) + }, + AesWrappingAlg::ALG_AES256_GCM_IV12_TAG16{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AesWrappingAlg.ALG__AES256__GCM__IV12__TAG16")?; + Ok(()) + }, + } + } + } + + impl AesWrappingAlg { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16 {}), Rc::new(AesWrappingAlg::ALG_AES192_GCM_IV12_TAG16 {}), Rc::new(AesWrappingAlg::ALG_AES256_GCM_IV12_TAG16 {})].iter() + } + } + + impl Eq + for AesWrappingAlg {} + + impl Hash + for AesWrappingAlg { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16{} => { + + }, + AesWrappingAlg::ALG_AES192_GCM_IV12_TAG16{} => { + + }, + AesWrappingAlg::ALG_AES256_GCM_IV12_TAG16{} => { + + }, + } + } + } + + impl Default + for AesWrappingAlg { + fn default() -> AesWrappingAlg { + AesWrappingAlg::ALG_AES128_GCM_IV12_TAG16 {} + } + } + + impl AsRef + for &AesWrappingAlg { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AlgorithmSuiteId { + ESDK { + ESDK: Rc + }, + DBE { + DBE: Rc + } + } + + impl AlgorithmSuiteId { + pub fn ESDK(&self) -> &Rc { + match self { + AlgorithmSuiteId::ESDK{ESDK, } => ESDK, + AlgorithmSuiteId::DBE{DBE, } => panic!("field does not exist on this variant"), + } + } + pub fn DBE(&self) -> &Rc { + match self { + AlgorithmSuiteId::ESDK{ESDK, } => panic!("field does not exist on this variant"), + AlgorithmSuiteId::DBE{DBE, } => DBE, + } + } + } + + impl Debug + for AlgorithmSuiteId { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AlgorithmSuiteId { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AlgorithmSuiteId::ESDK{ESDK, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId.ESDK(")?; + DafnyPrint::fmt_print(ESDK, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AlgorithmSuiteId::DBE{DBE, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId.DBE(")?; + DafnyPrint::fmt_print(DBE, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AlgorithmSuiteId {} + + impl Hash + for AlgorithmSuiteId { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AlgorithmSuiteId::ESDK{ESDK, } => { + Hash::hash(ESDK, _state) + }, + AlgorithmSuiteId::DBE{DBE, } => { + Hash::hash(DBE, _state) + }, + } + } + } + + impl Default + for AlgorithmSuiteId { + fn default() -> AlgorithmSuiteId { + AlgorithmSuiteId::ESDK { + ESDK: Default::default() + } + } + } + + impl AsRef + for &AlgorithmSuiteId { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AlgorithmSuiteInfo { + AlgorithmSuiteInfo { + id: Rc, + binaryId: Sequence, + messageVersion: i32, + encrypt: Rc, + kdf: Rc, + commitment: Rc, + signature: Rc, + symmetricSignature: Rc, + edkWrapping: Rc + } + } + + impl AlgorithmSuiteInfo { + pub fn id(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => id, + } + } + pub fn binaryId(&self) -> &Sequence { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => binaryId, + } + } + pub fn messageVersion(&self) -> &i32 { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => messageVersion, + } + } + pub fn encrypt(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => encrypt, + } + } + pub fn kdf(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => kdf, + } + } + pub fn commitment(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => commitment, + } + } + pub fn signature(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => signature, + } + } + pub fn symmetricSignature(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => symmetricSignature, + } + } + pub fn edkWrapping(&self) -> &Rc { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => edkWrapping, + } + } + } + + impl Debug + for AlgorithmSuiteInfo { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AlgorithmSuiteInfo { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteInfo.AlgorithmSuiteInfo(")?; + DafnyPrint::fmt_print(id, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(binaryId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(messageVersion, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encrypt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kdf, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(commitment, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signature, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(symmetricSignature, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(edkWrapping, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AlgorithmSuiteInfo {} + + impl Hash + for AlgorithmSuiteInfo { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AlgorithmSuiteInfo::AlgorithmSuiteInfo{id, binaryId, messageVersion, encrypt, kdf, commitment, signature, symmetricSignature, edkWrapping, } => { + Hash::hash(id, _state); + Hash::hash(binaryId, _state); + Hash::hash(messageVersion, _state); + Hash::hash(encrypt, _state); + Hash::hash(kdf, _state); + Hash::hash(commitment, _state); + Hash::hash(signature, _state); + Hash::hash(symmetricSignature, _state); + Hash::hash(edkWrapping, _state) + }, + } + } + } + + impl Default + for AlgorithmSuiteInfo { + fn default() -> AlgorithmSuiteInfo { + AlgorithmSuiteInfo::AlgorithmSuiteInfo { + id: Default::default(), + binaryId: Default::default(), + messageVersion: Default::default(), + encrypt: Default::default(), + kdf: Default::default(), + commitment: Default::default(), + signature: Default::default(), + symmetricSignature: Default::default(), + edkWrapping: Default::default() + } + } + } + + impl AsRef + for &AlgorithmSuiteInfo { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IAwsCryptographicMaterialProvidersClientCallHistory {} + + impl IAwsCryptographicMaterialProvidersClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IAwsCryptographicMaterialProvidersClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IAwsCryptographicMaterialProvidersClient: Any + UpcastObject { + fn CreateAwsKmsKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsDiscoveryKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsMultiKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsDiscoveryMultiKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsMrkKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsMrkMultiKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsMrkDiscoveryKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsMrkDiscoveryMultiKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsHierarchicalKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsRsaKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateAwsKmsEcdhKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateMultiKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateRawAesKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateRawRsaKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateRawEcdhKeyring(&self, input: &Rc) -> Rc, Rc>>; + fn CreateDefaultCryptographicMaterialsManager(&self, input: &Rc) -> Rc, Rc>>; + fn CreateRequiredEncryptionContextCMM(&self, input: &Rc) -> Rc, Rc>>; + fn CreateCryptographicMaterialsCache(&self, input: &Rc) -> Rc, Rc>>; + fn CreateDefaultClientSupplier(&self, input: &Rc) -> Rc, Rc>>; + fn InitializeEncryptionMaterials(&self, input: &Rc) -> Rc, Rc>>; + fn InitializeDecryptionMaterials(&self, input: &Rc) -> Rc, Rc>>; + fn ValidEncryptionMaterialsTransition(&self, input: &Rc) -> Rc>>; + fn ValidDecryptionMaterialsTransition(&self, input: &Rc) -> Rc>>; + fn EncryptionMaterialsHasPlaintextDataKey(&self, input: &Rc) -> Rc>>; + fn DecryptionMaterialsWithPlaintextDataKey(&self, input: &Rc) -> Rc>>; + fn GetAlgorithmSuiteInfo(&self, input: &Sequence) -> Rc, Rc>>; + fn ValidAlgorithmSuiteInfo(&self, input: &Rc) -> Rc>>; + fn ValidateCommitmentPolicyOnEncrypt(&self, input: &Rc) -> Rc>>; + fn ValidateCommitmentPolicyOnDecrypt(&self, input: &Rc) -> Rc>>; + } + + pub struct IBranchKeyIdSupplierCallHistory {} + + impl IBranchKeyIdSupplierCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplierCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IBranchKeyIdSupplier: Any + UpcastObject { + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_GetBranchKeyId_k(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum CacheType { + Default { + Default: Rc + }, + No { + No: Rc + }, + SingleThreaded { + SingleThreaded: Rc + }, + MultiThreaded { + MultiThreaded: Rc + }, + StormTracking { + StormTracking: Rc + }, + Shared { + Shared: Object + } + } + + impl CacheType { + pub fn Default(&self) -> &Rc { + match self { + CacheType::Default{Default, } => Default, + CacheType::No{No, } => panic!("field does not exist on this variant"), + CacheType::SingleThreaded{SingleThreaded, } => panic!("field does not exist on this variant"), + CacheType::MultiThreaded{MultiThreaded, } => panic!("field does not exist on this variant"), + CacheType::StormTracking{StormTracking, } => panic!("field does not exist on this variant"), + CacheType::Shared{Shared, } => panic!("field does not exist on this variant"), + } + } + pub fn No(&self) -> &Rc { + match self { + CacheType::Default{Default, } => panic!("field does not exist on this variant"), + CacheType::No{No, } => No, + CacheType::SingleThreaded{SingleThreaded, } => panic!("field does not exist on this variant"), + CacheType::MultiThreaded{MultiThreaded, } => panic!("field does not exist on this variant"), + CacheType::StormTracking{StormTracking, } => panic!("field does not exist on this variant"), + CacheType::Shared{Shared, } => panic!("field does not exist on this variant"), + } + } + pub fn SingleThreaded(&self) -> &Rc { + match self { + CacheType::Default{Default, } => panic!("field does not exist on this variant"), + CacheType::No{No, } => panic!("field does not exist on this variant"), + CacheType::SingleThreaded{SingleThreaded, } => SingleThreaded, + CacheType::MultiThreaded{MultiThreaded, } => panic!("field does not exist on this variant"), + CacheType::StormTracking{StormTracking, } => panic!("field does not exist on this variant"), + CacheType::Shared{Shared, } => panic!("field does not exist on this variant"), + } + } + pub fn MultiThreaded(&self) -> &Rc { + match self { + CacheType::Default{Default, } => panic!("field does not exist on this variant"), + CacheType::No{No, } => panic!("field does not exist on this variant"), + CacheType::SingleThreaded{SingleThreaded, } => panic!("field does not exist on this variant"), + CacheType::MultiThreaded{MultiThreaded, } => MultiThreaded, + CacheType::StormTracking{StormTracking, } => panic!("field does not exist on this variant"), + CacheType::Shared{Shared, } => panic!("field does not exist on this variant"), + } + } + pub fn StormTracking(&self) -> &Rc { + match self { + CacheType::Default{Default, } => panic!("field does not exist on this variant"), + CacheType::No{No, } => panic!("field does not exist on this variant"), + CacheType::SingleThreaded{SingleThreaded, } => panic!("field does not exist on this variant"), + CacheType::MultiThreaded{MultiThreaded, } => panic!("field does not exist on this variant"), + CacheType::StormTracking{StormTracking, } => StormTracking, + CacheType::Shared{Shared, } => panic!("field does not exist on this variant"), + } + } + pub fn Shared(&self) -> &Object { + match self { + CacheType::Default{Default, } => panic!("field does not exist on this variant"), + CacheType::No{No, } => panic!("field does not exist on this variant"), + CacheType::SingleThreaded{SingleThreaded, } => panic!("field does not exist on this variant"), + CacheType::MultiThreaded{MultiThreaded, } => panic!("field does not exist on this variant"), + CacheType::StormTracking{StormTracking, } => panic!("field does not exist on this variant"), + CacheType::Shared{Shared, } => Shared, + } + } + } + + impl Debug + for CacheType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CacheType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CacheType::Default{Default, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.Default(")?; + DafnyPrint::fmt_print(Default, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CacheType::No{No, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.No(")?; + DafnyPrint::fmt_print(No, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CacheType::SingleThreaded{SingleThreaded, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.SingleThreaded(")?; + DafnyPrint::fmt_print(SingleThreaded, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CacheType::MultiThreaded{MultiThreaded, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.MultiThreaded(")?; + DafnyPrint::fmt_print(MultiThreaded, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CacheType::StormTracking{StormTracking, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.StormTracking(")?; + DafnyPrint::fmt_print(StormTracking, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CacheType::Shared{Shared, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CacheType.Shared(")?; + DafnyPrint::fmt_print(Shared, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CacheType {} + + impl Hash + for CacheType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CacheType::Default{Default, } => { + Hash::hash(Default, _state) + }, + CacheType::No{No, } => { + Hash::hash(No, _state) + }, + CacheType::SingleThreaded{SingleThreaded, } => { + Hash::hash(SingleThreaded, _state) + }, + CacheType::MultiThreaded{MultiThreaded, } => { + Hash::hash(MultiThreaded, _state) + }, + CacheType::StormTracking{StormTracking, } => { + Hash::hash(StormTracking, _state) + }, + CacheType::Shared{Shared, } => { + Hash::hash(Shared, _state) + }, + } + } + } + + impl Default + for CacheType { + fn default() -> CacheType { + CacheType::Default { + Default: Default::default() + } + } + } + + impl AsRef + for &CacheType { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IClientSupplierCallHistory {} + + impl IClientSupplierCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IClientSupplierCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IClientSupplier: Any + UpcastObject { + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_GetClient_k(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum CommitmentPolicy { + ESDK { + ESDK: Rc + }, + DBE { + DBE: Rc + } + } + + impl CommitmentPolicy { + pub fn ESDK(&self) -> &Rc { + match self { + CommitmentPolicy::ESDK{ESDK, } => ESDK, + CommitmentPolicy::DBE{DBE, } => panic!("field does not exist on this variant"), + } + } + pub fn DBE(&self) -> &Rc { + match self { + CommitmentPolicy::ESDK{ESDK, } => panic!("field does not exist on this variant"), + CommitmentPolicy::DBE{DBE, } => DBE, + } + } + } + + impl Debug + for CommitmentPolicy { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CommitmentPolicy { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CommitmentPolicy::ESDK{ESDK, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy.ESDK(")?; + DafnyPrint::fmt_print(ESDK, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + CommitmentPolicy::DBE{DBE, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy.DBE(")?; + DafnyPrint::fmt_print(DBE, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CommitmentPolicy {} + + impl Hash + for CommitmentPolicy { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CommitmentPolicy::ESDK{ESDK, } => { + Hash::hash(ESDK, _state) + }, + CommitmentPolicy::DBE{DBE, } => { + Hash::hash(DBE, _state) + }, + } + } + } + + impl Default + for CommitmentPolicy { + fn default() -> CommitmentPolicy { + CommitmentPolicy::ESDK { + ESDK: Default::default() + } + } + } + + impl AsRef + for &CommitmentPolicy { + fn as_ref(&self) -> Self { + self + } + } + + pub type CountingNumber = i32; + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsDiscoveryKeyringInput { + CreateAwsKmsDiscoveryKeyringInput { + kmsClient: Object, + discoveryFilter: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsDiscoveryKeyringInput { + pub fn kmsClient(&self) -> &Object { + match self { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, } => kmsClient, + } + } + pub fn discoveryFilter(&self) -> &Rc>> { + match self { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, } => discoveryFilter, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsDiscoveryKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsDiscoveryKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsDiscoveryKeyringInput.CreateAwsKmsDiscoveryKeyringInput(")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(discoveryFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsDiscoveryKeyringInput {} + + impl Hash + for CreateAwsKmsDiscoveryKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, } => { + Hash::hash(kmsClient, _state); + Hash::hash(discoveryFilter, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsDiscoveryKeyringInput { + fn default() -> CreateAwsKmsDiscoveryKeyringInput { + CreateAwsKmsDiscoveryKeyringInput::CreateAwsKmsDiscoveryKeyringInput { + kmsClient: Default::default(), + discoveryFilter: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsDiscoveryKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsDiscoveryMultiKeyringInput { + CreateAwsKmsDiscoveryMultiKeyringInput { + regions: Sequence>, + discoveryFilter: Rc>>, + clientSupplier: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsDiscoveryMultiKeyringInput { + pub fn regions(&self) -> &Sequence> { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => regions, + } + } + pub fn discoveryFilter(&self) -> &Rc>> { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => discoveryFilter, + } + } + pub fn clientSupplier(&self) -> &Rc>> { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => clientSupplier, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsDiscoveryMultiKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsDiscoveryMultiKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsDiscoveryMultiKeyringInput.CreateAwsKmsDiscoveryMultiKeyringInput(")?; + DafnyPrint::fmt_print(regions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(discoveryFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(clientSupplier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsDiscoveryMultiKeyringInput {} + + impl Hash + for CreateAwsKmsDiscoveryMultiKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => { + Hash::hash(regions, _state); + Hash::hash(discoveryFilter, _state); + Hash::hash(clientSupplier, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsDiscoveryMultiKeyringInput { + fn default() -> CreateAwsKmsDiscoveryMultiKeyringInput { + CreateAwsKmsDiscoveryMultiKeyringInput::CreateAwsKmsDiscoveryMultiKeyringInput { + regions: Default::default(), + discoveryFilter: Default::default(), + clientSupplier: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsDiscoveryMultiKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsEcdhKeyringInput { + CreateAwsKmsEcdhKeyringInput { + KeyAgreementScheme: Rc, + curveSpec: Rc, + kmsClient: Object, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsEcdhKeyringInput { + pub fn KeyAgreementScheme(&self) -> &Rc { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => KeyAgreementScheme, + } + } + pub fn curveSpec(&self) -> &Rc { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => curveSpec, + } + } + pub fn kmsClient(&self) -> &Object { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => kmsClient, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsEcdhKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsEcdhKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsEcdhKeyringInput.CreateAwsKmsEcdhKeyringInput(")?; + DafnyPrint::fmt_print(KeyAgreementScheme, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(curveSpec, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsEcdhKeyringInput {} + + impl Hash + for CreateAwsKmsEcdhKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput{KeyAgreementScheme, curveSpec, kmsClient, grantTokens, } => { + Hash::hash(KeyAgreementScheme, _state); + Hash::hash(curveSpec, _state); + Hash::hash(kmsClient, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsEcdhKeyringInput { + fn default() -> CreateAwsKmsEcdhKeyringInput { + CreateAwsKmsEcdhKeyringInput::CreateAwsKmsEcdhKeyringInput { + KeyAgreementScheme: Default::default(), + curveSpec: Default::default(), + kmsClient: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsEcdhKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsHierarchicalKeyringInput { + CreateAwsKmsHierarchicalKeyringInput { + branchKeyId: Rc>>, + branchKeyIdSupplier: Rc>>, + keyStore: Object, + ttlSeconds: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong, + cache: Rc>>, + partitionId: Rc>> + } + } + + impl CreateAwsKmsHierarchicalKeyringInput { + pub fn branchKeyId(&self) -> &Rc>> { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => branchKeyId, + } + } + pub fn branchKeyIdSupplier(&self) -> &Rc>> { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => branchKeyIdSupplier, + } + } + pub fn keyStore(&self) -> &Object { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => keyStore, + } + } + pub fn ttlSeconds(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => ttlSeconds, + } + } + pub fn cache(&self) -> &Rc>> { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => cache, + } + } + pub fn partitionId(&self) -> &Rc>> { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => partitionId, + } + } + } + + impl Debug + for CreateAwsKmsHierarchicalKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsHierarchicalKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsHierarchicalKeyringInput.CreateAwsKmsHierarchicalKeyringInput(")?; + DafnyPrint::fmt_print(branchKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKeyIdSupplier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyStore, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ttlSeconds, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cache, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(partitionId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsHierarchicalKeyringInput {} + + impl Hash + for CreateAwsKmsHierarchicalKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput{branchKeyId, branchKeyIdSupplier, keyStore, ttlSeconds, cache, partitionId, } => { + Hash::hash(branchKeyId, _state); + Hash::hash(branchKeyIdSupplier, _state); + Hash::hash(keyStore, _state); + Hash::hash(ttlSeconds, _state); + Hash::hash(cache, _state); + Hash::hash(partitionId, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsHierarchicalKeyringInput { + fn default() -> CreateAwsKmsHierarchicalKeyringInput { + CreateAwsKmsHierarchicalKeyringInput::CreateAwsKmsHierarchicalKeyringInput { + branchKeyId: Default::default(), + branchKeyIdSupplier: Default::default(), + keyStore: Default::default(), + ttlSeconds: Default::default(), + cache: Default::default(), + partitionId: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsHierarchicalKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsKeyringInput { + CreateAwsKmsKeyringInput { + kmsKeyId: Sequence, + kmsClient: Object, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsKeyringInput { + pub fn kmsKeyId(&self) -> &Sequence { + match self { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput{kmsKeyId, kmsClient, grantTokens, } => kmsKeyId, + } + } + pub fn kmsClient(&self) -> &Object { + match self { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput{kmsKeyId, kmsClient, grantTokens, } => kmsClient, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput{kmsKeyId, kmsClient, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput{kmsKeyId, kmsClient, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsKeyringInput.CreateAwsKmsKeyringInput(")?; + DafnyPrint::fmt_print(kmsKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsKeyringInput {} + + impl Hash + for CreateAwsKmsKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput{kmsKeyId, kmsClient, grantTokens, } => { + Hash::hash(kmsKeyId, _state); + Hash::hash(kmsClient, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsKeyringInput { + fn default() -> CreateAwsKmsKeyringInput { + CreateAwsKmsKeyringInput::CreateAwsKmsKeyringInput { + kmsKeyId: Default::default(), + kmsClient: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsMrkDiscoveryKeyringInput { + CreateAwsKmsMrkDiscoveryKeyringInput { + kmsClient: Object, + discoveryFilter: Rc>>, + grantTokens: Rc>>>, + region: Sequence + } + } + + impl CreateAwsKmsMrkDiscoveryKeyringInput { + pub fn kmsClient(&self) -> &Object { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => kmsClient, + } + } + pub fn discoveryFilter(&self) -> &Rc>> { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => discoveryFilter, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => grantTokens, + } + } + pub fn region(&self) -> &Sequence { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => region, + } + } + } + + impl Debug + for CreateAwsKmsMrkDiscoveryKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsMrkDiscoveryKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsMrkDiscoveryKeyringInput.CreateAwsKmsMrkDiscoveryKeyringInput(")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(discoveryFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(region, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsMrkDiscoveryKeyringInput {} + + impl Hash + for CreateAwsKmsMrkDiscoveryKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput{kmsClient, discoveryFilter, grantTokens, region, } => { + Hash::hash(kmsClient, _state); + Hash::hash(discoveryFilter, _state); + Hash::hash(grantTokens, _state); + Hash::hash(region, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsMrkDiscoveryKeyringInput { + fn default() -> CreateAwsKmsMrkDiscoveryKeyringInput { + CreateAwsKmsMrkDiscoveryKeyringInput::CreateAwsKmsMrkDiscoveryKeyringInput { + kmsClient: Default::default(), + discoveryFilter: Default::default(), + grantTokens: Default::default(), + region: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsMrkDiscoveryKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsMrkDiscoveryMultiKeyringInput { + CreateAwsKmsMrkDiscoveryMultiKeyringInput { + regions: Sequence>, + discoveryFilter: Rc>>, + clientSupplier: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsMrkDiscoveryMultiKeyringInput { + pub fn regions(&self) -> &Sequence> { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => regions, + } + } + pub fn discoveryFilter(&self) -> &Rc>> { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => discoveryFilter, + } + } + pub fn clientSupplier(&self) -> &Rc>> { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => clientSupplier, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsMrkDiscoveryMultiKeyringInput.CreateAwsKmsMrkDiscoveryMultiKeyringInput(")?; + DafnyPrint::fmt_print(regions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(discoveryFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(clientSupplier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsMrkDiscoveryMultiKeyringInput {} + + impl Hash + for CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput{regions, discoveryFilter, clientSupplier, grantTokens, } => { + Hash::hash(regions, _state); + Hash::hash(discoveryFilter, _state); + Hash::hash(clientSupplier, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn default() -> CreateAwsKmsMrkDiscoveryMultiKeyringInput { + CreateAwsKmsMrkDiscoveryMultiKeyringInput::CreateAwsKmsMrkDiscoveryMultiKeyringInput { + regions: Default::default(), + discoveryFilter: Default::default(), + clientSupplier: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsMrkDiscoveryMultiKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsMrkKeyringInput { + CreateAwsKmsMrkKeyringInput { + kmsKeyId: Sequence, + kmsClient: Object, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsMrkKeyringInput { + pub fn kmsKeyId(&self) -> &Sequence { + match self { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput{kmsKeyId, kmsClient, grantTokens, } => kmsKeyId, + } + } + pub fn kmsClient(&self) -> &Object { + match self { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput{kmsKeyId, kmsClient, grantTokens, } => kmsClient, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput{kmsKeyId, kmsClient, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsMrkKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsMrkKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput{kmsKeyId, kmsClient, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsMrkKeyringInput.CreateAwsKmsMrkKeyringInput(")?; + DafnyPrint::fmt_print(kmsKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsMrkKeyringInput {} + + impl Hash + for CreateAwsKmsMrkKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput{kmsKeyId, kmsClient, grantTokens, } => { + Hash::hash(kmsKeyId, _state); + Hash::hash(kmsClient, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsMrkKeyringInput { + fn default() -> CreateAwsKmsMrkKeyringInput { + CreateAwsKmsMrkKeyringInput::CreateAwsKmsMrkKeyringInput { + kmsKeyId: Default::default(), + kmsClient: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsMrkKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsMrkMultiKeyringInput { + CreateAwsKmsMrkMultiKeyringInput { + generator: Rc>>, + kmsKeyIds: Rc>>>, + clientSupplier: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsMrkMultiKeyringInput { + pub fn generator(&self) -> &Rc>> { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => generator, + } + } + pub fn kmsKeyIds(&self) -> &Rc>>> { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => kmsKeyIds, + } + } + pub fn clientSupplier(&self) -> &Rc>> { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => clientSupplier, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsMrkMultiKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsMrkMultiKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsMrkMultiKeyringInput.CreateAwsKmsMrkMultiKeyringInput(")?; + DafnyPrint::fmt_print(generator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsKeyIds, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(clientSupplier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsMrkMultiKeyringInput {} + + impl Hash + for CreateAwsKmsMrkMultiKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => { + Hash::hash(generator, _state); + Hash::hash(kmsKeyIds, _state); + Hash::hash(clientSupplier, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsMrkMultiKeyringInput { + fn default() -> CreateAwsKmsMrkMultiKeyringInput { + CreateAwsKmsMrkMultiKeyringInput::CreateAwsKmsMrkMultiKeyringInput { + generator: Default::default(), + kmsKeyIds: Default::default(), + clientSupplier: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsMrkMultiKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsMultiKeyringInput { + CreateAwsKmsMultiKeyringInput { + generator: Rc>>, + kmsKeyIds: Rc>>>, + clientSupplier: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsMultiKeyringInput { + pub fn generator(&self) -> &Rc>> { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => generator, + } + } + pub fn kmsKeyIds(&self) -> &Rc>>> { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => kmsKeyIds, + } + } + pub fn clientSupplier(&self) -> &Rc>> { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => clientSupplier, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsMultiKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsMultiKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsMultiKeyringInput.CreateAwsKmsMultiKeyringInput(")?; + DafnyPrint::fmt_print(generator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsKeyIds, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(clientSupplier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsMultiKeyringInput {} + + impl Hash + for CreateAwsKmsMultiKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput{generator, kmsKeyIds, clientSupplier, grantTokens, } => { + Hash::hash(generator, _state); + Hash::hash(kmsKeyIds, _state); + Hash::hash(clientSupplier, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsMultiKeyringInput { + fn default() -> CreateAwsKmsMultiKeyringInput { + CreateAwsKmsMultiKeyringInput::CreateAwsKmsMultiKeyringInput { + generator: Default::default(), + kmsKeyIds: Default::default(), + clientSupplier: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsMultiKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateAwsKmsRsaKeyringInput { + CreateAwsKmsRsaKeyringInput { + publicKey: Rc>>, + kmsKeyId: Sequence, + encryptionAlgorithm: Rc, + kmsClient: Rc>>, + grantTokens: Rc>>> + } + } + + impl CreateAwsKmsRsaKeyringInput { + pub fn publicKey(&self) -> &Rc>> { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => publicKey, + } + } + pub fn kmsKeyId(&self) -> &Sequence { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => kmsKeyId, + } + } + pub fn encryptionAlgorithm(&self) -> &Rc { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => encryptionAlgorithm, + } + } + pub fn kmsClient(&self) -> &Rc>> { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => kmsClient, + } + } + pub fn grantTokens(&self) -> &Rc>>> { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => grantTokens, + } + } + } + + impl Debug + for CreateAwsKmsRsaKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateAwsKmsRsaKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateAwsKmsRsaKeyringInput.CreateAwsKmsRsaKeyringInput(")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(kmsClient, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(grantTokens, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateAwsKmsRsaKeyringInput {} + + impl Hash + for CreateAwsKmsRsaKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput{publicKey, kmsKeyId, encryptionAlgorithm, kmsClient, grantTokens, } => { + Hash::hash(publicKey, _state); + Hash::hash(kmsKeyId, _state); + Hash::hash(encryptionAlgorithm, _state); + Hash::hash(kmsClient, _state); + Hash::hash(grantTokens, _state) + }, + } + } + } + + impl Default + for CreateAwsKmsRsaKeyringInput { + fn default() -> CreateAwsKmsRsaKeyringInput { + CreateAwsKmsRsaKeyringInput::CreateAwsKmsRsaKeyringInput { + publicKey: Default::default(), + kmsKeyId: Default::default(), + encryptionAlgorithm: Default::default(), + kmsClient: Default::default(), + grantTokens: Default::default() + } + } + } + + impl AsRef + for &CreateAwsKmsRsaKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateCryptographicMaterialsCacheInput { + CreateCryptographicMaterialsCacheInput { + cache: Rc + } + } + + impl CreateCryptographicMaterialsCacheInput { + pub fn cache(&self) -> &Rc { + match self { + CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput{cache, } => cache, + } + } + } + + impl Debug + for CreateCryptographicMaterialsCacheInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateCryptographicMaterialsCacheInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput{cache, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateCryptographicMaterialsCacheInput.CreateCryptographicMaterialsCacheInput(")?; + DafnyPrint::fmt_print(cache, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateCryptographicMaterialsCacheInput {} + + impl Hash + for CreateCryptographicMaterialsCacheInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput{cache, } => { + Hash::hash(cache, _state) + }, + } + } + } + + impl Default + for CreateCryptographicMaterialsCacheInput { + fn default() -> CreateCryptographicMaterialsCacheInput { + CreateCryptographicMaterialsCacheInput::CreateCryptographicMaterialsCacheInput { + cache: Default::default() + } + } + } + + impl AsRef + for &CreateCryptographicMaterialsCacheInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateDefaultClientSupplierInput { + CreateDefaultClientSupplierInput {} + } + + impl CreateDefaultClientSupplierInput {} + + impl Debug + for CreateDefaultClientSupplierInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateDefaultClientSupplierInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateDefaultClientSupplierInput.CreateDefaultClientSupplierInput")?; + Ok(()) + }, + } + } + } + + impl CreateDefaultClientSupplierInput { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput {})].iter() + } + } + + impl Eq + for CreateDefaultClientSupplierInput {} + + impl Hash + for CreateDefaultClientSupplierInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput{} => { + + }, + } + } + } + + impl Default + for CreateDefaultClientSupplierInput { + fn default() -> CreateDefaultClientSupplierInput { + CreateDefaultClientSupplierInput::CreateDefaultClientSupplierInput {} + } + } + + impl AsRef + for &CreateDefaultClientSupplierInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateDefaultCryptographicMaterialsManagerInput { + CreateDefaultCryptographicMaterialsManagerInput { + keyring: Object + } + } + + impl CreateDefaultCryptographicMaterialsManagerInput { + pub fn keyring(&self) -> &Object { + match self { + CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput{keyring, } => keyring, + } + } + } + + impl Debug + for CreateDefaultCryptographicMaterialsManagerInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateDefaultCryptographicMaterialsManagerInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput{keyring, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateDefaultCryptographicMaterialsManagerInput.CreateDefaultCryptographicMaterialsManagerInput(")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateDefaultCryptographicMaterialsManagerInput {} + + impl Hash + for CreateDefaultCryptographicMaterialsManagerInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput{keyring, } => { + Hash::hash(keyring, _state) + }, + } + } + } + + impl Default + for CreateDefaultCryptographicMaterialsManagerInput { + fn default() -> CreateDefaultCryptographicMaterialsManagerInput { + CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { + keyring: Default::default() + } + } + } + + impl AsRef + for &CreateDefaultCryptographicMaterialsManagerInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateMultiKeyringInput { + CreateMultiKeyringInput { + generator: Rc>>, + childKeyrings: Sequence> + } + } + + impl CreateMultiKeyringInput { + pub fn generator(&self) -> &Rc>> { + match self { + CreateMultiKeyringInput::CreateMultiKeyringInput{generator, childKeyrings, } => generator, + } + } + pub fn childKeyrings(&self) -> &Sequence> { + match self { + CreateMultiKeyringInput::CreateMultiKeyringInput{generator, childKeyrings, } => childKeyrings, + } + } + } + + impl Debug + for CreateMultiKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateMultiKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateMultiKeyringInput::CreateMultiKeyringInput{generator, childKeyrings, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateMultiKeyringInput.CreateMultiKeyringInput(")?; + DafnyPrint::fmt_print(generator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(childKeyrings, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateMultiKeyringInput {} + + impl Hash + for CreateMultiKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateMultiKeyringInput::CreateMultiKeyringInput{generator, childKeyrings, } => { + Hash::hash(generator, _state); + Hash::hash(childKeyrings, _state) + }, + } + } + } + + impl Default + for CreateMultiKeyringInput { + fn default() -> CreateMultiKeyringInput { + CreateMultiKeyringInput::CreateMultiKeyringInput { + generator: Default::default(), + childKeyrings: Default::default() + } + } + } + + impl AsRef + for &CreateMultiKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateRawAesKeyringInput { + CreateRawAesKeyringInput { + keyNamespace: Sequence, + keyName: Sequence, + wrappingKey: Sequence, + wrappingAlg: Rc + } + } + + impl CreateRawAesKeyringInput { + pub fn keyNamespace(&self) -> &Sequence { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => keyNamespace, + } + } + pub fn keyName(&self) -> &Sequence { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => keyName, + } + } + pub fn wrappingKey(&self) -> &Sequence { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => wrappingKey, + } + } + pub fn wrappingAlg(&self) -> &Rc { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => wrappingAlg, + } + } + } + + impl Debug + for CreateRawAesKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateRawAesKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateRawAesKeyringInput.CreateRawAesKeyringInput(")?; + DafnyPrint::fmt_print(keyNamespace, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(wrappingKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(wrappingAlg, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateRawAesKeyringInput {} + + impl Hash + for CreateRawAesKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateRawAesKeyringInput::CreateRawAesKeyringInput{keyNamespace, keyName, wrappingKey, wrappingAlg, } => { + Hash::hash(keyNamespace, _state); + Hash::hash(keyName, _state); + Hash::hash(wrappingKey, _state); + Hash::hash(wrappingAlg, _state) + }, + } + } + } + + impl Default + for CreateRawAesKeyringInput { + fn default() -> CreateRawAesKeyringInput { + CreateRawAesKeyringInput::CreateRawAesKeyringInput { + keyNamespace: Default::default(), + keyName: Default::default(), + wrappingKey: Default::default(), + wrappingAlg: Default::default() + } + } + } + + impl AsRef + for &CreateRawAesKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateRawEcdhKeyringInput { + CreateRawEcdhKeyringInput { + KeyAgreementScheme: Rc, + curveSpec: Rc + } + } + + impl CreateRawEcdhKeyringInput { + pub fn KeyAgreementScheme(&self) -> &Rc { + match self { + CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput{KeyAgreementScheme, curveSpec, } => KeyAgreementScheme, + } + } + pub fn curveSpec(&self) -> &Rc { + match self { + CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput{KeyAgreementScheme, curveSpec, } => curveSpec, + } + } + } + + impl Debug + for CreateRawEcdhKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateRawEcdhKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput{KeyAgreementScheme, curveSpec, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateRawEcdhKeyringInput.CreateRawEcdhKeyringInput(")?; + DafnyPrint::fmt_print(KeyAgreementScheme, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(curveSpec, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateRawEcdhKeyringInput {} + + impl Hash + for CreateRawEcdhKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput{KeyAgreementScheme, curveSpec, } => { + Hash::hash(KeyAgreementScheme, _state); + Hash::hash(curveSpec, _state) + }, + } + } + } + + impl Default + for CreateRawEcdhKeyringInput { + fn default() -> CreateRawEcdhKeyringInput { + CreateRawEcdhKeyringInput::CreateRawEcdhKeyringInput { + KeyAgreementScheme: Default::default(), + curveSpec: Default::default() + } + } + } + + impl AsRef + for &CreateRawEcdhKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateRawRsaKeyringInput { + CreateRawRsaKeyringInput { + keyNamespace: Sequence, + keyName: Sequence, + paddingScheme: Rc, + publicKey: Rc>>, + privateKey: Rc>> + } + } + + impl CreateRawRsaKeyringInput { + pub fn keyNamespace(&self) -> &Sequence { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => keyNamespace, + } + } + pub fn keyName(&self) -> &Sequence { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => keyName, + } + } + pub fn paddingScheme(&self) -> &Rc { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => paddingScheme, + } + } + pub fn publicKey(&self) -> &Rc>> { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => publicKey, + } + } + pub fn privateKey(&self) -> &Rc>> { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => privateKey, + } + } + } + + impl Debug + for CreateRawRsaKeyringInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateRawRsaKeyringInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateRawRsaKeyringInput.CreateRawRsaKeyringInput(")?; + DafnyPrint::fmt_print(keyNamespace, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(paddingScheme, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(publicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(privateKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateRawRsaKeyringInput {} + + impl Hash + for CreateRawRsaKeyringInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput{keyNamespace, keyName, paddingScheme, publicKey, privateKey, } => { + Hash::hash(keyNamespace, _state); + Hash::hash(keyName, _state); + Hash::hash(paddingScheme, _state); + Hash::hash(publicKey, _state); + Hash::hash(privateKey, _state) + }, + } + } + } + + impl Default + for CreateRawRsaKeyringInput { + fn default() -> CreateRawRsaKeyringInput { + CreateRawRsaKeyringInput::CreateRawRsaKeyringInput { + keyNamespace: Default::default(), + keyName: Default::default(), + paddingScheme: Default::default(), + publicKey: Default::default(), + privateKey: Default::default() + } + } + } + + impl AsRef + for &CreateRawRsaKeyringInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateRequiredEncryptionContextCMMInput { + CreateRequiredEncryptionContextCMMInput { + underlyingCMM: Rc>>, + keyring: Rc>>, + requiredEncryptionContextKeys: Sequence + } + } + + impl CreateRequiredEncryptionContextCMMInput { + pub fn underlyingCMM(&self) -> &Rc>> { + match self { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput{underlyingCMM, keyring, requiredEncryptionContextKeys, } => underlyingCMM, + } + } + pub fn keyring(&self) -> &Rc>> { + match self { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput{underlyingCMM, keyring, requiredEncryptionContextKeys, } => keyring, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Sequence { + match self { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput{underlyingCMM, keyring, requiredEncryptionContextKeys, } => requiredEncryptionContextKeys, + } + } + } + + impl Debug + for CreateRequiredEncryptionContextCMMInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateRequiredEncryptionContextCMMInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput{underlyingCMM, keyring, requiredEncryptionContextKeys, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.CreateRequiredEncryptionContextCMMInput.CreateRequiredEncryptionContextCMMInput(")?; + DafnyPrint::fmt_print(underlyingCMM, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateRequiredEncryptionContextCMMInput {} + + impl Hash + for CreateRequiredEncryptionContextCMMInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput{underlyingCMM, keyring, requiredEncryptionContextKeys, } => { + Hash::hash(underlyingCMM, _state); + Hash::hash(keyring, _state); + Hash::hash(requiredEncryptionContextKeys, _state) + }, + } + } + } + + impl Default + for CreateRequiredEncryptionContextCMMInput { + fn default() -> CreateRequiredEncryptionContextCMMInput { + CreateRequiredEncryptionContextCMMInput::CreateRequiredEncryptionContextCMMInput { + underlyingCMM: Default::default(), + keyring: Default::default(), + requiredEncryptionContextKeys: Default::default() + } + } + } + + impl AsRef + for &CreateRequiredEncryptionContextCMMInput { + fn as_ref(&self) -> Self { + self + } + } + + pub struct ICryptographicMaterialsCacheCallHistory {} + + impl ICryptographicMaterialsCacheCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsCacheCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait ICryptographicMaterialsCache: Any + UpcastObject { + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_PutCacheEntry_k(&self, input: &Rc) -> Rc>>; + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_UpdateUsageMetadata_k(&self, input: &Rc) -> Rc>>; + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_GetCacheEntry_k(&self, input: &Rc) -> Rc, Rc>>; + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_DeleteCacheEntry_k(&self, input: &Rc) -> Rc>>; + } + + pub struct ICryptographicMaterialsManagerCallHistory {} + + impl ICryptographicMaterialsManagerCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManagerCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait ICryptographicMaterialsManager: Any + UpcastObject { + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_GetEncryptionMaterials_k(&self, input: &Rc) -> Rc, Rc>>; + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_DecryptMaterials_k(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum DBEAlgorithmSuiteId { + ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {}, + ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {} + } + + impl DBEAlgorithmSuiteId {} + + impl Debug + for DBEAlgorithmSuiteId { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DBEAlgorithmSuiteId { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DBEAlgorithmSuiteId.ALG__AES__256__GCM__HKDF__SHA512__COMMIT__KEY__SYMSIG__HMAC__SHA384")?; + Ok(()) + }, + DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DBEAlgorithmSuiteId.ALG__AES__256__GCM__HKDF__SHA512__COMMIT__KEY__ECDSA__P384__SYMSIG__HMAC__SHA384")?; + Ok(()) + }, + } + } + } + + impl DBEAlgorithmSuiteId { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {}), Rc::new(DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384 {})].iter() + } + } + + impl Eq + for DBEAlgorithmSuiteId {} + + impl Hash + for DBEAlgorithmSuiteId { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384{} => { + + }, + DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384{} => { + + }, + } + } + } + + impl Default + for DBEAlgorithmSuiteId { + fn default() -> DBEAlgorithmSuiteId { + DBEAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384 {} + } + } + + impl AsRef + for &DBEAlgorithmSuiteId { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DBECommitmentPolicy { + REQUIRE_ENCRYPT_REQUIRE_DECRYPT {} + } + + impl DBECommitmentPolicy {} + + impl Debug + for DBECommitmentPolicy { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DBECommitmentPolicy { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DBECommitmentPolicy.REQUIRE__ENCRYPT__REQUIRE__DECRYPT")?; + Ok(()) + }, + } + } + } + + impl DBECommitmentPolicy { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {})].iter() + } + } + + impl Eq + for DBECommitmentPolicy {} + + impl Hash + for DBECommitmentPolicy { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT{} => { + + }, + } + } + } + + impl Default + for DBECommitmentPolicy { + fn default() -> DBECommitmentPolicy { + DBECommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {} + } + } + + impl AsRef + for &DBECommitmentPolicy { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptionMaterials { + DecryptionMaterials { + algorithmSuite: Rc, + encryptionContext: Map, + requiredEncryptionContextKeys: Sequence, + plaintextDataKey: Rc>>, + verificationKey: Rc>>, + symmetricSigningKey: Rc>> + } + } + + impl DecryptionMaterials { + pub fn algorithmSuite(&self) -> &Rc { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => algorithmSuite, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => encryptionContext, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Sequence { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => requiredEncryptionContextKeys, + } + } + pub fn plaintextDataKey(&self) -> &Rc>> { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => plaintextDataKey, + } + } + pub fn verificationKey(&self) -> &Rc>> { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => verificationKey, + } + } + pub fn symmetricSigningKey(&self) -> &Rc>> { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => symmetricSigningKey, + } + } + } + + impl Debug + for DecryptionMaterials { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptionMaterials { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials.DecryptionMaterials(")?; + DafnyPrint::fmt_print(algorithmSuite, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextDataKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(verificationKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(symmetricSigningKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptionMaterials {} + + impl Hash + for DecryptionMaterials { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptionMaterials::DecryptionMaterials{algorithmSuite, encryptionContext, requiredEncryptionContextKeys, plaintextDataKey, verificationKey, symmetricSigningKey, } => { + Hash::hash(algorithmSuite, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(requiredEncryptionContextKeys, _state); + Hash::hash(plaintextDataKey, _state); + Hash::hash(verificationKey, _state); + Hash::hash(symmetricSigningKey, _state) + }, + } + } + } + + impl Default + for DecryptionMaterials { + fn default() -> DecryptionMaterials { + DecryptionMaterials::DecryptionMaterials { + algorithmSuite: Default::default(), + encryptionContext: Default::default(), + requiredEncryptionContextKeys: Default::default(), + plaintextDataKey: Default::default(), + verificationKey: Default::default(), + symmetricSigningKey: Default::default() + } + } + } + + impl AsRef + for &DecryptionMaterials { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptMaterialsInput { + DecryptMaterialsInput { + algorithmSuiteId: Rc, + commitmentPolicy: Rc, + encryptedDataKeys: Sequence>, + encryptionContext: Map, + reproducedEncryptionContext: Rc>> + } + } + + impl DecryptMaterialsInput { + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => algorithmSuiteId, + } + } + pub fn commitmentPolicy(&self) -> &Rc { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => commitmentPolicy, + } + } + pub fn encryptedDataKeys(&self) -> &Sequence> { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => encryptedDataKeys, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => encryptionContext, + } + } + pub fn reproducedEncryptionContext(&self) -> &Rc>> { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => reproducedEncryptionContext, + } + } + } + + impl Debug + for DecryptMaterialsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptMaterialsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DecryptMaterialsInput.DecryptMaterialsInput(")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(commitmentPolicy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedDataKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(reproducedEncryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptMaterialsInput {} + + impl Hash + for DecryptMaterialsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptMaterialsInput::DecryptMaterialsInput{algorithmSuiteId, commitmentPolicy, encryptedDataKeys, encryptionContext, reproducedEncryptionContext, } => { + Hash::hash(algorithmSuiteId, _state); + Hash::hash(commitmentPolicy, _state); + Hash::hash(encryptedDataKeys, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(reproducedEncryptionContext, _state) + }, + } + } + } + + impl Default + for DecryptMaterialsInput { + fn default() -> DecryptMaterialsInput { + DecryptMaterialsInput::DecryptMaterialsInput { + algorithmSuiteId: Default::default(), + commitmentPolicy: Default::default(), + encryptedDataKeys: Default::default(), + encryptionContext: Default::default(), + reproducedEncryptionContext: Default::default() + } + } + } + + impl AsRef + for &DecryptMaterialsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptMaterialsOutput { + DecryptMaterialsOutput { + decryptionMaterials: Rc + } + } + + impl DecryptMaterialsOutput { + pub fn decryptionMaterials(&self) -> &Rc { + match self { + DecryptMaterialsOutput::DecryptMaterialsOutput{decryptionMaterials, } => decryptionMaterials, + } + } + } + + impl Debug + for DecryptMaterialsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptMaterialsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptMaterialsOutput::DecryptMaterialsOutput{decryptionMaterials, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DecryptMaterialsOutput.DecryptMaterialsOutput(")?; + DafnyPrint::fmt_print(decryptionMaterials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptMaterialsOutput {} + + impl Hash + for DecryptMaterialsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptMaterialsOutput::DecryptMaterialsOutput{decryptionMaterials, } => { + Hash::hash(decryptionMaterials, _state) + }, + } + } + } + + impl Default + for DecryptMaterialsOutput { + fn default() -> DecryptMaterialsOutput { + DecryptMaterialsOutput::DecryptMaterialsOutput { + decryptionMaterials: Default::default() + } + } + } + + impl AsRef + for &DecryptMaterialsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DefaultCache { + DefaultCache { + entryCapacity: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber + } + } + + impl DefaultCache { + pub fn entryCapacity(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + DefaultCache::DefaultCache{entryCapacity, } => entryCapacity, + } + } + } + + impl Debug + for DefaultCache { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DefaultCache { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DefaultCache::DefaultCache{entryCapacity, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DefaultCache.DefaultCache(")?; + DafnyPrint::fmt_print(entryCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DefaultCache {} + + impl Hash + for DefaultCache { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DefaultCache::DefaultCache{entryCapacity, } => { + Hash::hash(entryCapacity, _state) + }, + } + } + } + + impl Default + for DefaultCache { + fn default() -> DefaultCache { + DefaultCache::DefaultCache { + entryCapacity: Default::default() + } + } + } + + impl AsRef + for &DefaultCache { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteCacheEntryInput { + DeleteCacheEntryInput { + identifier: Sequence + } + } + + impl DeleteCacheEntryInput { + pub fn identifier(&self) -> &Sequence { + match self { + DeleteCacheEntryInput::DeleteCacheEntryInput{identifier, } => identifier, + } + } + } + + impl Debug + for DeleteCacheEntryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteCacheEntryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteCacheEntryInput::DeleteCacheEntryInput{identifier, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DeleteCacheEntryInput.DeleteCacheEntryInput(")?; + DafnyPrint::fmt_print(identifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteCacheEntryInput {} + + impl Hash + for DeleteCacheEntryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteCacheEntryInput::DeleteCacheEntryInput{identifier, } => { + Hash::hash(identifier, _state) + }, + } + } + } + + impl Default + for DeleteCacheEntryInput { + fn default() -> DeleteCacheEntryInput { + DeleteCacheEntryInput::DeleteCacheEntryInput { + identifier: Default::default() + } + } + } + + impl AsRef + for &DeleteCacheEntryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DerivationAlgorithm { + HKDF { + HKDF: Rc + }, + IDENTITY { + IDENTITY: Rc + }, + None { + _None: Rc + } + } + + impl DerivationAlgorithm { + pub fn HKDF(&self) -> &Rc { + match self { + DerivationAlgorithm::HKDF{HKDF, } => HKDF, + DerivationAlgorithm::IDENTITY{IDENTITY, } => panic!("field does not exist on this variant"), + DerivationAlgorithm::None{_None, } => panic!("field does not exist on this variant"), + } + } + pub fn IDENTITY(&self) -> &Rc { + match self { + DerivationAlgorithm::HKDF{HKDF, } => panic!("field does not exist on this variant"), + DerivationAlgorithm::IDENTITY{IDENTITY, } => IDENTITY, + DerivationAlgorithm::None{_None, } => panic!("field does not exist on this variant"), + } + } + pub fn _None(&self) -> &Rc { + match self { + DerivationAlgorithm::HKDF{HKDF, } => panic!("field does not exist on this variant"), + DerivationAlgorithm::IDENTITY{IDENTITY, } => panic!("field does not exist on this variant"), + DerivationAlgorithm::None{_None, } => _None, + } + } + } + + impl Debug + for DerivationAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DerivationAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DerivationAlgorithm::HKDF{HKDF, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm.HKDF(")?; + DafnyPrint::fmt_print(HKDF, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + DerivationAlgorithm::IDENTITY{IDENTITY, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm.IDENTITY(")?; + DafnyPrint::fmt_print(IDENTITY, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + DerivationAlgorithm::None{_None, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm.None(")?; + DafnyPrint::fmt_print(_None, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DerivationAlgorithm {} + + impl Hash + for DerivationAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DerivationAlgorithm::HKDF{HKDF, } => { + Hash::hash(HKDF, _state) + }, + DerivationAlgorithm::IDENTITY{IDENTITY, } => { + Hash::hash(IDENTITY, _state) + }, + DerivationAlgorithm::None{_None, } => { + Hash::hash(_None, _state) + }, + } + } + } + + impl Default + for DerivationAlgorithm { + fn default() -> DerivationAlgorithm { + DerivationAlgorithm::HKDF { + HKDF: Default::default() + } + } + } + + impl AsRef + for &DerivationAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING {} + } + + impl DIRECT_KEY_WRAPPING {} + + impl Debug + for DIRECT_KEY_WRAPPING { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DIRECT_KEY_WRAPPING { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DIRECT__KEY__WRAPPING.DIRECT__KEY__WRAPPING")?; + Ok(()) + }, + } + } + } + + impl DIRECT_KEY_WRAPPING { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {})].iter() + } + } + + impl Eq + for DIRECT_KEY_WRAPPING {} + + impl Hash + for DIRECT_KEY_WRAPPING { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING{} => { + + }, + } + } + } + + impl Default + for DIRECT_KEY_WRAPPING { + fn default() -> DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING::DIRECT_KEY_WRAPPING {} + } + } + + impl AsRef + for &DIRECT_KEY_WRAPPING { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DiscoveryFilter { + DiscoveryFilter { + accountIds: Sequence>, + partition: Sequence + } + } + + impl DiscoveryFilter { + pub fn accountIds(&self) -> &Sequence> { + match self { + DiscoveryFilter::DiscoveryFilter{accountIds, partition, } => accountIds, + } + } + pub fn partition(&self) -> &Sequence { + match self { + DiscoveryFilter::DiscoveryFilter{accountIds, partition, } => partition, + } + } + } + + impl Debug + for DiscoveryFilter { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DiscoveryFilter { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DiscoveryFilter::DiscoveryFilter{accountIds, partition, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.DiscoveryFilter.DiscoveryFilter(")?; + DafnyPrint::fmt_print(accountIds, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(partition, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DiscoveryFilter {} + + impl Hash + for DiscoveryFilter { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DiscoveryFilter::DiscoveryFilter{accountIds, partition, } => { + Hash::hash(accountIds, _state); + Hash::hash(partition, _state) + }, + } + } + } + + impl Default + for DiscoveryFilter { + fn default() -> DiscoveryFilter { + DiscoveryFilter::DiscoveryFilter { + accountIds: Default::default(), + partition: Default::default() + } + } + } + + impl AsRef + for &DiscoveryFilter { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ECDSA { + ECDSA { + curve: Rc + } + } + + impl ECDSA { + pub fn curve(&self) -> &Rc { + match self { + ECDSA::ECDSA{curve, } => curve, + } + } + } + + impl Debug + for ECDSA { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ECDSA { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ECDSA::ECDSA{curve, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ECDSA.ECDSA(")?; + DafnyPrint::fmt_print(curve, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ECDSA {} + + impl Hash + for ECDSA { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ECDSA::ECDSA{curve, } => { + Hash::hash(curve, _state) + }, + } + } + } + + impl Default + for ECDSA { + fn default() -> ECDSA { + ECDSA::ECDSA { + curve: Default::default() + } + } + } + + impl AsRef + for &ECDSA { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EdkWrappingAlgorithm { + DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Rc + }, + IntermediateKeyWrapping { + IntermediateKeyWrapping: Rc + } + } + + impl EdkWrappingAlgorithm { + pub fn DIRECT_KEY_WRAPPING(&self) -> &Rc { + match self { + EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{DIRECT_KEY_WRAPPING, } => DIRECT_KEY_WRAPPING, + EdkWrappingAlgorithm::IntermediateKeyWrapping{IntermediateKeyWrapping, } => panic!("field does not exist on this variant"), + } + } + pub fn IntermediateKeyWrapping(&self) -> &Rc { + match self { + EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{DIRECT_KEY_WRAPPING, } => panic!("field does not exist on this variant"), + EdkWrappingAlgorithm::IntermediateKeyWrapping{IntermediateKeyWrapping, } => IntermediateKeyWrapping, + } + } + } + + impl Debug + for EdkWrappingAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EdkWrappingAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{DIRECT_KEY_WRAPPING, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm.DIRECT__KEY__WRAPPING(")?; + DafnyPrint::fmt_print(DIRECT_KEY_WRAPPING, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + EdkWrappingAlgorithm::IntermediateKeyWrapping{IntermediateKeyWrapping, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm.IntermediateKeyWrapping(")?; + DafnyPrint::fmt_print(IntermediateKeyWrapping, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EdkWrappingAlgorithm {} + + impl Hash + for EdkWrappingAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING{DIRECT_KEY_WRAPPING, } => { + Hash::hash(DIRECT_KEY_WRAPPING, _state) + }, + EdkWrappingAlgorithm::IntermediateKeyWrapping{IntermediateKeyWrapping, } => { + Hash::hash(IntermediateKeyWrapping, _state) + }, + } + } + } + + impl Default + for EdkWrappingAlgorithm { + fn default() -> EdkWrappingAlgorithm { + EdkWrappingAlgorithm::DIRECT_KEY_WRAPPING { + DIRECT_KEY_WRAPPING: Default::default() + } + } + } + + impl AsRef + for &EdkWrappingAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Encrypt { + AES_GCM { + AES_GCM: Rc + } + } + + impl Encrypt { + pub fn AES_GCM(&self) -> &Rc { + match self { + Encrypt::AES_GCM{AES_GCM, } => AES_GCM, + } + } + } + + impl Debug + for Encrypt { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Encrypt { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Encrypt::AES_GCM{AES_GCM, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Encrypt.AES__GCM(")?; + DafnyPrint::fmt_print(AES_GCM, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Encrypt {} + + impl Hash + for Encrypt { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Encrypt::AES_GCM{AES_GCM, } => { + Hash::hash(AES_GCM, _state) + }, + } + } + } + + impl Default + for Encrypt { + fn default() -> Encrypt { + Encrypt::AES_GCM { + AES_GCM: Default::default() + } + } + } + + impl AsRef + for &Encrypt { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptedDataKey { + EncryptedDataKey { + keyProviderId: ValidUTF8Bytes, + keyProviderInfo: Sequence, + ciphertext: Sequence + } + } + + impl EncryptedDataKey { + pub fn keyProviderId(&self) -> &ValidUTF8Bytes { + match self { + EncryptedDataKey::EncryptedDataKey{keyProviderId, keyProviderInfo, ciphertext, } => keyProviderId, + } + } + pub fn keyProviderInfo(&self) -> &Sequence { + match self { + EncryptedDataKey::EncryptedDataKey{keyProviderId, keyProviderInfo, ciphertext, } => keyProviderInfo, + } + } + pub fn ciphertext(&self) -> &Sequence { + match self { + EncryptedDataKey::EncryptedDataKey{keyProviderId, keyProviderInfo, ciphertext, } => ciphertext, + } + } + } + + impl Debug + for EncryptedDataKey { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptedDataKey { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptedDataKey::EncryptedDataKey{keyProviderId, keyProviderInfo, ciphertext, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.EncryptedDataKey.EncryptedDataKey(")?; + DafnyPrint::fmt_print(keyProviderId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyProviderInfo, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ciphertext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptedDataKey {} + + impl Hash + for EncryptedDataKey { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptedDataKey::EncryptedDataKey{keyProviderId, keyProviderInfo, ciphertext, } => { + Hash::hash(keyProviderId, _state); + Hash::hash(keyProviderInfo, _state); + Hash::hash(ciphertext, _state) + }, + } + } + } + + impl Default + for EncryptedDataKey { + fn default() -> EncryptedDataKey { + EncryptedDataKey::EncryptedDataKey { + keyProviderId: Default::default(), + keyProviderInfo: Default::default(), + ciphertext: Default::default() + } + } + } + + impl AsRef + for &EncryptedDataKey { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptionMaterials { + EncryptionMaterials { + algorithmSuite: Rc, + encryptionContext: Map, + encryptedDataKeys: Sequence>, + requiredEncryptionContextKeys: Sequence, + plaintextDataKey: Rc>>, + signingKey: Rc>>, + symmetricSigningKeys: Rc>>> + } + } + + impl EncryptionMaterials { + pub fn algorithmSuite(&self) -> &Rc { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => algorithmSuite, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => encryptionContext, + } + } + pub fn encryptedDataKeys(&self) -> &Sequence> { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => encryptedDataKeys, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Sequence { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => requiredEncryptionContextKeys, + } + } + pub fn plaintextDataKey(&self) -> &Rc>> { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => plaintextDataKey, + } + } + pub fn signingKey(&self) -> &Rc>> { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => signingKey, + } + } + pub fn symmetricSigningKeys(&self) -> &Rc>>> { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => symmetricSigningKeys, + } + } + } + + impl Debug + for EncryptionMaterials { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptionMaterials { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.EncryptionMaterials.EncryptionMaterials(")?; + DafnyPrint::fmt_print(algorithmSuite, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedDataKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextDataKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signingKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(symmetricSigningKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptionMaterials {} + + impl Hash + for EncryptionMaterials { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptionMaterials::EncryptionMaterials{algorithmSuite, encryptionContext, encryptedDataKeys, requiredEncryptionContextKeys, plaintextDataKey, signingKey, symmetricSigningKeys, } => { + Hash::hash(algorithmSuite, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(encryptedDataKeys, _state); + Hash::hash(requiredEncryptionContextKeys, _state); + Hash::hash(plaintextDataKey, _state); + Hash::hash(signingKey, _state); + Hash::hash(symmetricSigningKeys, _state) + }, + } + } + } + + impl Default + for EncryptionMaterials { + fn default() -> EncryptionMaterials { + EncryptionMaterials::EncryptionMaterials { + algorithmSuite: Default::default(), + encryptionContext: Default::default(), + encryptedDataKeys: Default::default(), + requiredEncryptionContextKeys: Default::default(), + plaintextDataKey: Default::default(), + signingKey: Default::default(), + symmetricSigningKeys: Default::default() + } + } + } + + impl AsRef + for &EncryptionMaterials { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EphemeralPrivateKeyToStaticPublicKeyInput { + EphemeralPrivateKeyToStaticPublicKeyInput { + recipientPublicKey: Sequence + } + } + + impl EphemeralPrivateKeyToStaticPublicKeyInput { + pub fn recipientPublicKey(&self) -> &Sequence { + match self { + EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput{recipientPublicKey, } => recipientPublicKey, + } + } + } + + impl Debug + for EphemeralPrivateKeyToStaticPublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EphemeralPrivateKeyToStaticPublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput{recipientPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.EphemeralPrivateKeyToStaticPublicKeyInput.EphemeralPrivateKeyToStaticPublicKeyInput(")?; + DafnyPrint::fmt_print(recipientPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EphemeralPrivateKeyToStaticPublicKeyInput {} + + impl Hash + for EphemeralPrivateKeyToStaticPublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput{recipientPublicKey, } => { + Hash::hash(recipientPublicKey, _state) + }, + } + } + } + + impl Default + for EphemeralPrivateKeyToStaticPublicKeyInput { + fn default() -> EphemeralPrivateKeyToStaticPublicKeyInput { + EphemeralPrivateKeyToStaticPublicKeyInput::EphemeralPrivateKeyToStaticPublicKeyInput { + recipientPublicKey: Default::default() + } + } + } + + impl AsRef + for &EphemeralPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ESDKAlgorithmSuiteId { + ALG_AES_128_GCM_IV12_TAG16_NO_KDF {}, + ALG_AES_192_GCM_IV12_TAG16_NO_KDF {}, + ALG_AES_256_GCM_IV12_TAG16_NO_KDF {}, + ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {}, + ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {}, + ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {}, + ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {}, + ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}, + ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}, + ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {}, + ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {} + } + + impl ESDKAlgorithmSuiteId {} + + impl Debug + for ESDKAlgorithmSuiteId { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ESDKAlgorithmSuiteId { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__128__GCM__IV12__TAG16__NO__KDF")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__192__GCM__IV12__TAG16__NO__KDF")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__256__GCM__IV12__TAG16__NO__KDF")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__128__GCM__IV12__TAG16__HKDF__SHA256")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__192__GCM__IV12__TAG16__HKDF__SHA256")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__256__GCM__IV12__TAG16__HKDF__SHA256")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__128__GCM__IV12__TAG16__HKDF__SHA256__ECDSA__P256")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__192__GCM__IV12__TAG16__HKDF__SHA384__ECDSA__P384")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__256__GCM__IV12__TAG16__HKDF__SHA384__ECDSA__P384")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__256__GCM__HKDF__SHA512__COMMIT__KEY")?; + Ok(()) + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKAlgorithmSuiteId.ALG__AES__256__GCM__HKDF__SHA512__COMMIT__KEY__ECDSA__P384")?; + Ok(()) + }, + } + } + } + + impl ESDKAlgorithmSuiteId { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY {}), Rc::new(ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 {})].iter() + } + } + + impl Eq + for ESDKAlgorithmSuiteId {} + + impl Hash + for ESDKAlgorithmSuiteId { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_NO_KDF{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_NO_KDF{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY{} => { + + }, + ESDKAlgorithmSuiteId::ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384{} => { + + }, + } + } + } + + impl Default + for ESDKAlgorithmSuiteId { + fn default() -> ESDKAlgorithmSuiteId { + ESDKAlgorithmSuiteId::ALG_AES_128_GCM_IV12_TAG16_NO_KDF {} + } + } + + impl AsRef + for &ESDKAlgorithmSuiteId { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ESDKCommitmentPolicy { + FORBID_ENCRYPT_ALLOW_DECRYPT {}, + REQUIRE_ENCRYPT_ALLOW_DECRYPT {}, + REQUIRE_ENCRYPT_REQUIRE_DECRYPT {} + } + + impl ESDKCommitmentPolicy {} + + impl Debug + for ESDKCommitmentPolicy { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ESDKCommitmentPolicy { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKCommitmentPolicy.FORBID__ENCRYPT__ALLOW__DECRYPT")?; + Ok(()) + }, + ESDKCommitmentPolicy::REQUIRE_ENCRYPT_ALLOW_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKCommitmentPolicy.REQUIRE__ENCRYPT__ALLOW__DECRYPT")?; + Ok(()) + }, + ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ESDKCommitmentPolicy.REQUIRE__ENCRYPT__REQUIRE__DECRYPT")?; + Ok(()) + }, + } + } + } + + impl ESDKCommitmentPolicy { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT {}), Rc::new(ESDKCommitmentPolicy::REQUIRE_ENCRYPT_ALLOW_DECRYPT {}), Rc::new(ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT {})].iter() + } + } + + impl Eq + for ESDKCommitmentPolicy {} + + impl Hash + for ESDKCommitmentPolicy { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT{} => { + + }, + ESDKCommitmentPolicy::REQUIRE_ENCRYPT_ALLOW_DECRYPT{} => { + + }, + ESDKCommitmentPolicy::REQUIRE_ENCRYPT_REQUIRE_DECRYPT{} => { + + }, + } + } + } + + impl Default + for ESDKCommitmentPolicy { + fn default() -> ESDKCommitmentPolicy { + ESDKCommitmentPolicy::FORBID_ENCRYPT_ALLOW_DECRYPT {} + } + } + + impl AsRef + for &ESDKCommitmentPolicy { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyIdInput { + GetBranchKeyIdInput { + encryptionContext: Map + } + } + + impl GetBranchKeyIdInput { + pub fn encryptionContext(&self) -> &Map { + match self { + GetBranchKeyIdInput::GetBranchKeyIdInput{encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for GetBranchKeyIdInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyIdInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyIdInput::GetBranchKeyIdInput{encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetBranchKeyIdInput.GetBranchKeyIdInput(")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyIdInput {} + + impl Hash + for GetBranchKeyIdInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyIdInput::GetBranchKeyIdInput{encryptionContext, } => { + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for GetBranchKeyIdInput { + fn default() -> GetBranchKeyIdInput { + GetBranchKeyIdInput::GetBranchKeyIdInput { + encryptionContext: Default::default() + } + } + } + + impl AsRef + for &GetBranchKeyIdInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyIdOutput { + GetBranchKeyIdOutput { + branchKeyId: Sequence + } + } + + impl GetBranchKeyIdOutput { + pub fn branchKeyId(&self) -> &Sequence { + match self { + GetBranchKeyIdOutput::GetBranchKeyIdOutput{branchKeyId, } => branchKeyId, + } + } + } + + impl Debug + for GetBranchKeyIdOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyIdOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyIdOutput::GetBranchKeyIdOutput{branchKeyId, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetBranchKeyIdOutput.GetBranchKeyIdOutput(")?; + DafnyPrint::fmt_print(branchKeyId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyIdOutput {} + + impl Hash + for GetBranchKeyIdOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyIdOutput::GetBranchKeyIdOutput{branchKeyId, } => { + Hash::hash(branchKeyId, _state) + }, + } + } + } + + impl Default + for GetBranchKeyIdOutput { + fn default() -> GetBranchKeyIdOutput { + GetBranchKeyIdOutput::GetBranchKeyIdOutput { + branchKeyId: Default::default() + } + } + } + + impl AsRef + for &GetBranchKeyIdOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetCacheEntryInput { + GetCacheEntryInput { + identifier: Sequence, + bytesUsed: Rc> + } + } + + impl GetCacheEntryInput { + pub fn identifier(&self) -> &Sequence { + match self { + GetCacheEntryInput::GetCacheEntryInput{identifier, bytesUsed, } => identifier, + } + } + pub fn bytesUsed(&self) -> &Rc> { + match self { + GetCacheEntryInput::GetCacheEntryInput{identifier, bytesUsed, } => bytesUsed, + } + } + } + + impl Debug + for GetCacheEntryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetCacheEntryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetCacheEntryInput::GetCacheEntryInput{identifier, bytesUsed, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetCacheEntryInput.GetCacheEntryInput(")?; + DafnyPrint::fmt_print(identifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(bytesUsed, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetCacheEntryInput {} + + impl Hash + for GetCacheEntryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetCacheEntryInput::GetCacheEntryInput{identifier, bytesUsed, } => { + Hash::hash(identifier, _state); + Hash::hash(bytesUsed, _state) + }, + } + } + } + + impl Default + for GetCacheEntryInput { + fn default() -> GetCacheEntryInput { + GetCacheEntryInput::GetCacheEntryInput { + identifier: Default::default(), + bytesUsed: Default::default() + } + } + } + + impl AsRef + for &GetCacheEntryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetCacheEntryOutput { + GetCacheEntryOutput { + materials: Rc, + creationTime: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong, + expiryTime: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong, + messagesUsed: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger, + bytesUsed: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger + } + } + + impl GetCacheEntryOutput { + pub fn materials(&self) -> &Rc { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => materials, + } + } + pub fn creationTime(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => creationTime, + } + } + pub fn expiryTime(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => expiryTime, + } + } + pub fn messagesUsed(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => messagesUsed, + } + } + pub fn bytesUsed(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => bytesUsed, + } + } + } + + impl Debug + for GetCacheEntryOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetCacheEntryOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetCacheEntryOutput.GetCacheEntryOutput(")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(creationTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expiryTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(messagesUsed, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(bytesUsed, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetCacheEntryOutput {} + + impl Hash + for GetCacheEntryOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetCacheEntryOutput::GetCacheEntryOutput{materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => { + Hash::hash(materials, _state); + Hash::hash(creationTime, _state); + Hash::hash(expiryTime, _state); + Hash::hash(messagesUsed, _state); + Hash::hash(bytesUsed, _state) + }, + } + } + } + + impl Default + for GetCacheEntryOutput { + fn default() -> GetCacheEntryOutput { + GetCacheEntryOutput::GetCacheEntryOutput { + materials: Default::default(), + creationTime: Default::default(), + expiryTime: Default::default(), + messagesUsed: Default::default(), + bytesUsed: Default::default() + } + } + } + + impl AsRef + for &GetCacheEntryOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetClientInput { + GetClientInput { + region: Sequence + } + } + + impl GetClientInput { + pub fn region(&self) -> &Sequence { + match self { + GetClientInput::GetClientInput{region, } => region, + } + } + } + + impl Debug + for GetClientInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetClientInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetClientInput::GetClientInput{region, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetClientInput.GetClientInput(")?; + DafnyPrint::fmt_print(region, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetClientInput {} + + impl Hash + for GetClientInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetClientInput::GetClientInput{region, } => { + Hash::hash(region, _state) + }, + } + } + } + + impl Default + for GetClientInput { + fn default() -> GetClientInput { + GetClientInput::GetClientInput { + region: Default::default() + } + } + } + + impl AsRef + for &GetClientInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetEncryptionMaterialsInput { + GetEncryptionMaterialsInput { + encryptionContext: Map, + commitmentPolicy: Rc, + algorithmSuiteId: Rc>>, + maxPlaintextLength: Rc>, + requiredEncryptionContextKeys: Rc>> + } + } + + impl GetEncryptionMaterialsInput { + pub fn encryptionContext(&self) -> &Map { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => encryptionContext, + } + } + pub fn commitmentPolicy(&self) -> &Rc { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => commitmentPolicy, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => algorithmSuiteId, + } + } + pub fn maxPlaintextLength(&self) -> &Rc> { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => maxPlaintextLength, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Rc>> { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => requiredEncryptionContextKeys, + } + } + } + + impl Debug + for GetEncryptionMaterialsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetEncryptionMaterialsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetEncryptionMaterialsInput.GetEncryptionMaterialsInput(")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(commitmentPolicy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(maxPlaintextLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetEncryptionMaterialsInput {} + + impl Hash + for GetEncryptionMaterialsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput{encryptionContext, commitmentPolicy, algorithmSuiteId, maxPlaintextLength, requiredEncryptionContextKeys, } => { + Hash::hash(encryptionContext, _state); + Hash::hash(commitmentPolicy, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(maxPlaintextLength, _state); + Hash::hash(requiredEncryptionContextKeys, _state) + }, + } + } + } + + impl Default + for GetEncryptionMaterialsInput { + fn default() -> GetEncryptionMaterialsInput { + GetEncryptionMaterialsInput::GetEncryptionMaterialsInput { + encryptionContext: Default::default(), + commitmentPolicy: Default::default(), + algorithmSuiteId: Default::default(), + maxPlaintextLength: Default::default(), + requiredEncryptionContextKeys: Default::default() + } + } + } + + impl AsRef + for &GetEncryptionMaterialsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetEncryptionMaterialsOutput { + GetEncryptionMaterialsOutput { + encryptionMaterials: Rc + } + } + + impl GetEncryptionMaterialsOutput { + pub fn encryptionMaterials(&self) -> &Rc { + match self { + GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput{encryptionMaterials, } => encryptionMaterials, + } + } + } + + impl Debug + for GetEncryptionMaterialsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetEncryptionMaterialsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput{encryptionMaterials, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.GetEncryptionMaterialsOutput.GetEncryptionMaterialsOutput(")?; + DafnyPrint::fmt_print(encryptionMaterials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetEncryptionMaterialsOutput {} + + impl Hash + for GetEncryptionMaterialsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput{encryptionMaterials, } => { + Hash::hash(encryptionMaterials, _state) + }, + } + } + } + + impl Default + for GetEncryptionMaterialsOutput { + fn default() -> GetEncryptionMaterialsOutput { + GetEncryptionMaterialsOutput::GetEncryptionMaterialsOutput { + encryptionMaterials: Default::default() + } + } + } + + impl AsRef + for &GetEncryptionMaterialsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum HKDF { + HKDF { + hmac: Rc, + saltLength: crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger, + inputKeyLength: SymmetricKeyLength, + outputKeyLength: SymmetricKeyLength + } + } + + impl HKDF { + pub fn hmac(&self) -> &Rc { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => hmac, + } + } + pub fn saltLength(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::primitives::internaldafny::types::PositiveInteger { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => saltLength, + } + } + pub fn inputKeyLength(&self) -> &SymmetricKeyLength { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => inputKeyLength, + } + } + pub fn outputKeyLength(&self) -> &SymmetricKeyLength { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => outputKeyLength, + } + } + } + + impl Debug + for HKDF { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for HKDF { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.HKDF.HKDF(")?; + DafnyPrint::fmt_print(hmac, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(saltLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(inputKeyLength, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(outputKeyLength, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for HKDF {} + + impl Hash + for HKDF { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + HKDF::HKDF{hmac, saltLength, inputKeyLength, outputKeyLength, } => { + Hash::hash(hmac, _state); + Hash::hash(saltLength, _state); + Hash::hash(inputKeyLength, _state); + Hash::hash(outputKeyLength, _state) + }, + } + } + } + + impl Default + for HKDF { + fn default() -> HKDF { + HKDF::HKDF { + hmac: Default::default(), + saltLength: Default::default(), + inputKeyLength: Default::default(), + outputKeyLength: Default::default() + } + } + } + + impl AsRef + for &HKDF { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum IDENTITY { + IDENTITY {} + } + + impl IDENTITY {} + + impl Debug + for IDENTITY { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for IDENTITY { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + IDENTITY::IDENTITY{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.IDENTITY.IDENTITY")?; + Ok(()) + }, + } + } + } + + impl IDENTITY { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(IDENTITY::IDENTITY {})].iter() + } + } + + impl Eq + for IDENTITY {} + + impl Hash + for IDENTITY { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + IDENTITY::IDENTITY{} => { + + }, + } + } + } + + impl Default + for IDENTITY { + fn default() -> IDENTITY { + IDENTITY::IDENTITY {} + } + } + + impl AsRef + for &IDENTITY { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum InitializeDecryptionMaterialsInput { + InitializeDecryptionMaterialsInput { + algorithmSuiteId: Rc, + encryptionContext: Map, + requiredEncryptionContextKeys: Sequence + } + } + + impl InitializeDecryptionMaterialsInput { + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, } => algorithmSuiteId, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, } => encryptionContext, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Sequence { + match self { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, } => requiredEncryptionContextKeys, + } + } + } + + impl Debug + for InitializeDecryptionMaterialsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for InitializeDecryptionMaterialsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.InitializeDecryptionMaterialsInput.InitializeDecryptionMaterialsInput(")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for InitializeDecryptionMaterialsInput {} + + impl Hash + for InitializeDecryptionMaterialsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, } => { + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(requiredEncryptionContextKeys, _state) + }, + } + } + } + + impl Default + for InitializeDecryptionMaterialsInput { + fn default() -> InitializeDecryptionMaterialsInput { + InitializeDecryptionMaterialsInput::InitializeDecryptionMaterialsInput { + algorithmSuiteId: Default::default(), + encryptionContext: Default::default(), + requiredEncryptionContextKeys: Default::default() + } + } + } + + impl AsRef + for &InitializeDecryptionMaterialsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum InitializeEncryptionMaterialsInput { + InitializeEncryptionMaterialsInput { + algorithmSuiteId: Rc, + encryptionContext: Map, + requiredEncryptionContextKeys: Sequence, + signingKey: Rc>>, + verificationKey: Rc>> + } + } + + impl InitializeEncryptionMaterialsInput { + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => algorithmSuiteId, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => encryptionContext, + } + } + pub fn requiredEncryptionContextKeys(&self) -> &Sequence { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => requiredEncryptionContextKeys, + } + } + pub fn signingKey(&self) -> &Rc>> { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => signingKey, + } + } + pub fn verificationKey(&self) -> &Rc>> { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => verificationKey, + } + } + } + + impl Debug + for InitializeEncryptionMaterialsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for InitializeEncryptionMaterialsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.InitializeEncryptionMaterialsInput.InitializeEncryptionMaterialsInput(")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(requiredEncryptionContextKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signingKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(verificationKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for InitializeEncryptionMaterialsInput {} + + impl Hash + for InitializeEncryptionMaterialsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput{algorithmSuiteId, encryptionContext, requiredEncryptionContextKeys, signingKey, verificationKey, } => { + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(requiredEncryptionContextKeys, _state); + Hash::hash(signingKey, _state); + Hash::hash(verificationKey, _state) + }, + } + } + } + + impl Default + for InitializeEncryptionMaterialsInput { + fn default() -> InitializeEncryptionMaterialsInput { + InitializeEncryptionMaterialsInput::InitializeEncryptionMaterialsInput { + algorithmSuiteId: Default::default(), + encryptionContext: Default::default(), + requiredEncryptionContextKeys: Default::default(), + signingKey: Default::default(), + verificationKey: Default::default() + } + } + } + + impl AsRef + for &InitializeEncryptionMaterialsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum IntermediateKeyWrapping { + IntermediateKeyWrapping { + keyEncryptionKeyKdf: Rc, + macKeyKdf: Rc, + pdkEncryptAlgorithm: Rc + } + } + + impl IntermediateKeyWrapping { + pub fn keyEncryptionKeyKdf(&self) -> &Rc { + match self { + IntermediateKeyWrapping::IntermediateKeyWrapping{keyEncryptionKeyKdf, macKeyKdf, pdkEncryptAlgorithm, } => keyEncryptionKeyKdf, + } + } + pub fn macKeyKdf(&self) -> &Rc { + match self { + IntermediateKeyWrapping::IntermediateKeyWrapping{keyEncryptionKeyKdf, macKeyKdf, pdkEncryptAlgorithm, } => macKeyKdf, + } + } + pub fn pdkEncryptAlgorithm(&self) -> &Rc { + match self { + IntermediateKeyWrapping::IntermediateKeyWrapping{keyEncryptionKeyKdf, macKeyKdf, pdkEncryptAlgorithm, } => pdkEncryptAlgorithm, + } + } + } + + impl Debug + for IntermediateKeyWrapping { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for IntermediateKeyWrapping { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + IntermediateKeyWrapping::IntermediateKeyWrapping{keyEncryptionKeyKdf, macKeyKdf, pdkEncryptAlgorithm, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.IntermediateKeyWrapping.IntermediateKeyWrapping(")?; + DafnyPrint::fmt_print(keyEncryptionKeyKdf, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(macKeyKdf, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(pdkEncryptAlgorithm, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for IntermediateKeyWrapping {} + + impl Hash + for IntermediateKeyWrapping { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + IntermediateKeyWrapping::IntermediateKeyWrapping{keyEncryptionKeyKdf, macKeyKdf, pdkEncryptAlgorithm, } => { + Hash::hash(keyEncryptionKeyKdf, _state); + Hash::hash(macKeyKdf, _state); + Hash::hash(pdkEncryptAlgorithm, _state) + }, + } + } + } + + impl Default + for IntermediateKeyWrapping { + fn default() -> IntermediateKeyWrapping { + IntermediateKeyWrapping::IntermediateKeyWrapping { + keyEncryptionKeyKdf: Default::default(), + macKeyKdf: Default::default(), + pdkEncryptAlgorithm: Default::default() + } + } + } + + impl AsRef + for &IntermediateKeyWrapping { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KeyAgreementScheme { + StaticConfiguration { + StaticConfiguration: Rc + } + } + + impl KeyAgreementScheme { + pub fn StaticConfiguration(&self) -> &Rc { + match self { + KeyAgreementScheme::StaticConfiguration{StaticConfiguration, } => StaticConfiguration, + } + } + } + + impl Debug + for KeyAgreementScheme { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KeyAgreementScheme { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KeyAgreementScheme::StaticConfiguration{StaticConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.KeyAgreementScheme.StaticConfiguration(")?; + DafnyPrint::fmt_print(StaticConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KeyAgreementScheme {} + + impl Hash + for KeyAgreementScheme { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KeyAgreementScheme::StaticConfiguration{StaticConfiguration, } => { + Hash::hash(StaticConfiguration, _state) + }, + } + } + } + + impl Default + for KeyAgreementScheme { + fn default() -> KeyAgreementScheme { + KeyAgreementScheme::StaticConfiguration { + StaticConfiguration: Default::default() + } + } + } + + impl AsRef + for &KeyAgreementScheme { + fn as_ref(&self) -> Self { + self + } + } + + pub struct IKeyringCallHistory {} + + impl IKeyringCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IKeyringCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IKeyring: Any + UpcastObject { + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_OnEncrypt_k(&self, input: &Rc) -> Rc, Rc>>; + 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(md!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_OnDecrypt_k(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum KmsEcdhStaticConfigurations { + KmsPublicKeyDiscovery { + KmsPublicKeyDiscovery: Rc + }, + KmsPrivateKeyToStaticPublicKey { + KmsPrivateKeyToStaticPublicKey: Rc + } + } + + impl KmsEcdhStaticConfigurations { + pub fn KmsPublicKeyDiscovery(&self) -> &Rc { + match self { + KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery{KmsPublicKeyDiscovery, } => KmsPublicKeyDiscovery, + KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey{KmsPrivateKeyToStaticPublicKey, } => panic!("field does not exist on this variant"), + } + } + pub fn KmsPrivateKeyToStaticPublicKey(&self) -> &Rc { + match self { + KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery{KmsPublicKeyDiscovery, } => panic!("field does not exist on this variant"), + KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey{KmsPrivateKeyToStaticPublicKey, } => KmsPrivateKeyToStaticPublicKey, + } + } + } + + impl Debug + for KmsEcdhStaticConfigurations { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KmsEcdhStaticConfigurations { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery{KmsPublicKeyDiscovery, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations.KmsPublicKeyDiscovery(")?; + DafnyPrint::fmt_print(KmsPublicKeyDiscovery, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey{KmsPrivateKeyToStaticPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations.KmsPrivateKeyToStaticPublicKey(")?; + DafnyPrint::fmt_print(KmsPrivateKeyToStaticPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KmsEcdhStaticConfigurations {} + + impl Hash + for KmsEcdhStaticConfigurations { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery{KmsPublicKeyDiscovery, } => { + Hash::hash(KmsPublicKeyDiscovery, _state) + }, + KmsEcdhStaticConfigurations::KmsPrivateKeyToStaticPublicKey{KmsPrivateKeyToStaticPublicKey, } => { + Hash::hash(KmsPrivateKeyToStaticPublicKey, _state) + }, + } + } + } + + impl Default + for KmsEcdhStaticConfigurations { + fn default() -> KmsEcdhStaticConfigurations { + KmsEcdhStaticConfigurations::KmsPublicKeyDiscovery { + KmsPublicKeyDiscovery: Default::default() + } + } + } + + impl AsRef + for &KmsEcdhStaticConfigurations { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KmsPrivateKeyToStaticPublicKeyInput { + KmsPrivateKeyToStaticPublicKeyInput { + senderKmsIdentifier: Sequence, + senderPublicKey: Rc>>, + recipientPublicKey: Sequence + } + } + + impl KmsPrivateKeyToStaticPublicKeyInput { + pub fn senderKmsIdentifier(&self) -> &Sequence { + match self { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput{senderKmsIdentifier, senderPublicKey, recipientPublicKey, } => senderKmsIdentifier, + } + } + pub fn senderPublicKey(&self) -> &Rc>> { + match self { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput{senderKmsIdentifier, senderPublicKey, recipientPublicKey, } => senderPublicKey, + } + } + pub fn recipientPublicKey(&self) -> &Sequence { + match self { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput{senderKmsIdentifier, senderPublicKey, recipientPublicKey, } => recipientPublicKey, + } + } + } + + impl Debug + for KmsPrivateKeyToStaticPublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KmsPrivateKeyToStaticPublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput{senderKmsIdentifier, senderPublicKey, recipientPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.KmsPrivateKeyToStaticPublicKeyInput.KmsPrivateKeyToStaticPublicKeyInput(")?; + DafnyPrint::fmt_print(senderKmsIdentifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(senderPublicKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(recipientPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KmsPrivateKeyToStaticPublicKeyInput {} + + impl Hash + for KmsPrivateKeyToStaticPublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput{senderKmsIdentifier, senderPublicKey, recipientPublicKey, } => { + Hash::hash(senderKmsIdentifier, _state); + Hash::hash(senderPublicKey, _state); + Hash::hash(recipientPublicKey, _state) + }, + } + } + } + + impl Default + for KmsPrivateKeyToStaticPublicKeyInput { + fn default() -> KmsPrivateKeyToStaticPublicKeyInput { + KmsPrivateKeyToStaticPublicKeyInput::KmsPrivateKeyToStaticPublicKeyInput { + senderKmsIdentifier: Default::default(), + senderPublicKey: Default::default(), + recipientPublicKey: Default::default() + } + } + } + + impl AsRef + for &KmsPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KmsPublicKeyDiscoveryInput { + KmsPublicKeyDiscoveryInput { + recipientKmsIdentifier: Sequence + } + } + + impl KmsPublicKeyDiscoveryInput { + pub fn recipientKmsIdentifier(&self) -> &Sequence { + match self { + KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput{recipientKmsIdentifier, } => recipientKmsIdentifier, + } + } + } + + impl Debug + for KmsPublicKeyDiscoveryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KmsPublicKeyDiscoveryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput{recipientKmsIdentifier, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.KmsPublicKeyDiscoveryInput.KmsPublicKeyDiscoveryInput(")?; + DafnyPrint::fmt_print(recipientKmsIdentifier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KmsPublicKeyDiscoveryInput {} + + impl Hash + for KmsPublicKeyDiscoveryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput{recipientKmsIdentifier, } => { + Hash::hash(recipientKmsIdentifier, _state) + }, + } + } + } + + impl Default + for KmsPublicKeyDiscoveryInput { + fn default() -> KmsPublicKeyDiscoveryInput { + KmsPublicKeyDiscoveryInput::KmsPublicKeyDiscoveryInput { + recipientKmsIdentifier: Default::default() + } + } + } + + impl AsRef + for &KmsPublicKeyDiscoveryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum MaterialProvidersConfig { + MaterialProvidersConfig {} + } + + impl MaterialProvidersConfig {} + + impl Debug + for MaterialProvidersConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for MaterialProvidersConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + MaterialProvidersConfig::MaterialProvidersConfig{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.MaterialProvidersConfig.MaterialProvidersConfig")?; + Ok(()) + }, + } + } + } + + impl MaterialProvidersConfig { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(MaterialProvidersConfig::MaterialProvidersConfig {})].iter() + } + } + + impl Eq + for MaterialProvidersConfig {} + + impl Hash + for MaterialProvidersConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + MaterialProvidersConfig::MaterialProvidersConfig{} => { + + }, + } + } + } + + impl Default + for MaterialProvidersConfig { + fn default() -> MaterialProvidersConfig { + MaterialProvidersConfig::MaterialProvidersConfig {} + } + } + + impl AsRef + for &MaterialProvidersConfig { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Materials { + Encryption { + Encryption: Rc + }, + Decryption { + Decryption: Rc + }, + BranchKey { + BranchKey: Rc + }, + BeaconKey { + BeaconKey: Rc + } + } + + impl Materials { + pub fn Encryption(&self) -> &Rc { + match self { + Materials::Encryption{Encryption, } => Encryption, + Materials::Decryption{Decryption, } => panic!("field does not exist on this variant"), + Materials::BranchKey{BranchKey, } => panic!("field does not exist on this variant"), + Materials::BeaconKey{BeaconKey, } => panic!("field does not exist on this variant"), + } + } + pub fn Decryption(&self) -> &Rc { + match self { + Materials::Encryption{Encryption, } => panic!("field does not exist on this variant"), + Materials::Decryption{Decryption, } => Decryption, + Materials::BranchKey{BranchKey, } => panic!("field does not exist on this variant"), + Materials::BeaconKey{BeaconKey, } => panic!("field does not exist on this variant"), + } + } + pub fn BranchKey(&self) -> &Rc { + match self { + Materials::Encryption{Encryption, } => panic!("field does not exist on this variant"), + Materials::Decryption{Decryption, } => panic!("field does not exist on this variant"), + Materials::BranchKey{BranchKey, } => BranchKey, + Materials::BeaconKey{BeaconKey, } => panic!("field does not exist on this variant"), + } + } + pub fn BeaconKey(&self) -> &Rc { + match self { + Materials::Encryption{Encryption, } => panic!("field does not exist on this variant"), + Materials::Decryption{Decryption, } => panic!("field does not exist on this variant"), + Materials::BranchKey{BranchKey, } => panic!("field does not exist on this variant"), + Materials::BeaconKey{BeaconKey, } => BeaconKey, + } + } + } + + impl Debug + for Materials { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Materials { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Materials::Encryption{Encryption, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Materials.Encryption(")?; + DafnyPrint::fmt_print(Encryption, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Materials::Decryption{Decryption, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Materials.Decryption(")?; + DafnyPrint::fmt_print(Decryption, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Materials::BranchKey{BranchKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Materials.BranchKey(")?; + DafnyPrint::fmt_print(BranchKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Materials::BeaconKey{BeaconKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Materials.BeaconKey(")?; + DafnyPrint::fmt_print(BeaconKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Materials {} + + impl Hash + for Materials { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Materials::Encryption{Encryption, } => { + Hash::hash(Encryption, _state) + }, + Materials::Decryption{Decryption, } => { + Hash::hash(Decryption, _state) + }, + Materials::BranchKey{BranchKey, } => { + Hash::hash(BranchKey, _state) + }, + Materials::BeaconKey{BeaconKey, } => { + Hash::hash(BeaconKey, _state) + }, + } + } + } + + impl Default + for Materials { + fn default() -> Materials { + Materials::Encryption { + Encryption: Default::default() + } + } + } + + impl AsRef + for &Materials { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum MultiThreadedCache { + MultiThreadedCache { + entryCapacity: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + entryPruningTailSize: Rc> + } + } + + impl MultiThreadedCache { + pub fn entryCapacity(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + MultiThreadedCache::MultiThreadedCache{entryCapacity, entryPruningTailSize, } => entryCapacity, + } + } + pub fn entryPruningTailSize(&self) -> &Rc> { + match self { + MultiThreadedCache::MultiThreadedCache{entryCapacity, entryPruningTailSize, } => entryPruningTailSize, + } + } + } + + impl Debug + for MultiThreadedCache { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for MultiThreadedCache { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + MultiThreadedCache::MultiThreadedCache{entryCapacity, entryPruningTailSize, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.MultiThreadedCache.MultiThreadedCache(")?; + DafnyPrint::fmt_print(entryCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(entryPruningTailSize, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for MultiThreadedCache {} + + impl Hash + for MultiThreadedCache { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + MultiThreadedCache::MultiThreadedCache{entryCapacity, entryPruningTailSize, } => { + Hash::hash(entryCapacity, _state); + Hash::hash(entryPruningTailSize, _state) + }, + } + } + } + + impl Default + for MultiThreadedCache { + fn default() -> MultiThreadedCache { + MultiThreadedCache::MultiThreadedCache { + entryCapacity: Default::default(), + entryPruningTailSize: Default::default() + } + } + } + + impl AsRef + for &MultiThreadedCache { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum NoCache { + NoCache {} + } + + impl NoCache {} + + impl Debug + for NoCache { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for NoCache { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + NoCache::NoCache{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.NoCache.NoCache")?; + Ok(()) + }, + } + } + } + + impl NoCache { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(NoCache::NoCache {})].iter() + } + } + + impl Eq + for NoCache {} + + impl Hash + for NoCache { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + NoCache::NoCache{} => { + + }, + } + } + } + + impl Default + for NoCache { + fn default() -> NoCache { + NoCache::NoCache {} + } + } + + impl AsRef + for &NoCache { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum None { + None {} + } + + impl None {} + + impl Debug + for None { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for None { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + None::None{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.None.None")?; + Ok(()) + }, + } + } + } + + impl None { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(None::None {})].iter() + } + } + + impl Eq + for None {} + + impl Hash + for None { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + None::None{} => { + + }, + } + } + } + + impl Default + for None { + fn default() -> None { + None::None {} + } + } + + impl AsRef + for &None { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum OnDecryptInput { + OnDecryptInput { + materials: Rc, + encryptedDataKeys: Sequence> + } + } + + impl OnDecryptInput { + pub fn materials(&self) -> &Rc { + match self { + OnDecryptInput::OnDecryptInput{materials, encryptedDataKeys, } => materials, + } + } + pub fn encryptedDataKeys(&self) -> &Sequence> { + match self { + OnDecryptInput::OnDecryptInput{materials, encryptedDataKeys, } => encryptedDataKeys, + } + } + } + + impl Debug + for OnDecryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnDecryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnDecryptInput::OnDecryptInput{materials, encryptedDataKeys, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.OnDecryptInput.OnDecryptInput(")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedDataKeys, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnDecryptInput {} + + impl Hash + for OnDecryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnDecryptInput::OnDecryptInput{materials, encryptedDataKeys, } => { + Hash::hash(materials, _state); + Hash::hash(encryptedDataKeys, _state) + }, + } + } + } + + impl Default + for OnDecryptInput { + fn default() -> OnDecryptInput { + OnDecryptInput::OnDecryptInput { + materials: Default::default(), + encryptedDataKeys: Default::default() + } + } + } + + impl AsRef + for &OnDecryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum OnDecryptOutput { + OnDecryptOutput { + materials: Rc + } + } + + impl OnDecryptOutput { + pub fn materials(&self) -> &Rc { + match self { + OnDecryptOutput::OnDecryptOutput{materials, } => materials, + } + } + } + + impl Debug + for OnDecryptOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnDecryptOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnDecryptOutput::OnDecryptOutput{materials, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.OnDecryptOutput.OnDecryptOutput(")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnDecryptOutput {} + + impl Hash + for OnDecryptOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnDecryptOutput::OnDecryptOutput{materials, } => { + Hash::hash(materials, _state) + }, + } + } + } + + impl Default + for OnDecryptOutput { + fn default() -> OnDecryptOutput { + OnDecryptOutput::OnDecryptOutput { + materials: Default::default() + } + } + } + + impl AsRef + for &OnDecryptOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum OnEncryptInput { + OnEncryptInput { + materials: Rc + } + } + + impl OnEncryptInput { + pub fn materials(&self) -> &Rc { + match self { + OnEncryptInput::OnEncryptInput{materials, } => materials, + } + } + } + + impl Debug + for OnEncryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnEncryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnEncryptInput::OnEncryptInput{materials, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.OnEncryptInput.OnEncryptInput(")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnEncryptInput {} + + impl Hash + for OnEncryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnEncryptInput::OnEncryptInput{materials, } => { + Hash::hash(materials, _state) + }, + } + } + } + + impl Default + for OnEncryptInput { + fn default() -> OnEncryptInput { + OnEncryptInput::OnEncryptInput { + materials: Default::default() + } + } + } + + impl AsRef + for &OnEncryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum OnEncryptOutput { + OnEncryptOutput { + materials: Rc + } + } + + impl OnEncryptOutput { + pub fn materials(&self) -> &Rc { + match self { + OnEncryptOutput::OnEncryptOutput{materials, } => materials, + } + } + } + + impl Debug + for OnEncryptOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnEncryptOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnEncryptOutput::OnEncryptOutput{materials, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.OnEncryptOutput.OnEncryptOutput(")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnEncryptOutput {} + + impl Hash + for OnEncryptOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnEncryptOutput::OnEncryptOutput{materials, } => { + Hash::hash(materials, _state) + }, + } + } + } + + impl Default + for OnEncryptOutput { + fn default() -> OnEncryptOutput { + OnEncryptOutput::OnEncryptOutput { + materials: Default::default() + } + } + } + + impl AsRef + for &OnEncryptOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PaddingScheme { + PKCS1 {}, + OAEP_SHA1_MGF1 {}, + OAEP_SHA256_MGF1 {}, + OAEP_SHA384_MGF1 {}, + OAEP_SHA512_MGF1 {} + } + + impl PaddingScheme {} + + impl Debug + for PaddingScheme { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PaddingScheme { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PaddingScheme::PKCS1{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PaddingScheme.PKCS1")?; + Ok(()) + }, + PaddingScheme::OAEP_SHA1_MGF1{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PaddingScheme.OAEP__SHA1__MGF1")?; + Ok(()) + }, + PaddingScheme::OAEP_SHA256_MGF1{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PaddingScheme.OAEP__SHA256__MGF1")?; + Ok(()) + }, + PaddingScheme::OAEP_SHA384_MGF1{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PaddingScheme.OAEP__SHA384__MGF1")?; + Ok(()) + }, + PaddingScheme::OAEP_SHA512_MGF1{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PaddingScheme.OAEP__SHA512__MGF1")?; + Ok(()) + }, + } + } + } + + impl PaddingScheme { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(PaddingScheme::PKCS1 {}), Rc::new(PaddingScheme::OAEP_SHA1_MGF1 {}), Rc::new(PaddingScheme::OAEP_SHA256_MGF1 {}), Rc::new(PaddingScheme::OAEP_SHA384_MGF1 {}), Rc::new(PaddingScheme::OAEP_SHA512_MGF1 {})].iter() + } + } + + impl Eq + for PaddingScheme {} + + impl Hash + for PaddingScheme { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PaddingScheme::PKCS1{} => { + + }, + PaddingScheme::OAEP_SHA1_MGF1{} => { + + }, + PaddingScheme::OAEP_SHA256_MGF1{} => { + + }, + PaddingScheme::OAEP_SHA384_MGF1{} => { + + }, + PaddingScheme::OAEP_SHA512_MGF1{} => { + + }, + } + } + } + + impl Default + for PaddingScheme { + fn default() -> PaddingScheme { + PaddingScheme::PKCS1 {} + } + } + + impl AsRef + for &PaddingScheme { + fn as_ref(&self) -> Self { + self + } + } + + pub type PositiveInteger = i32; + + pub type PositiveLong = i64; + + #[derive(PartialEq, Clone)] + pub enum PublicKeyDiscoveryInput { + PublicKeyDiscoveryInput { + recipientStaticPrivateKey: Sequence + } + } + + impl PublicKeyDiscoveryInput { + pub fn recipientStaticPrivateKey(&self) -> &Sequence { + match self { + PublicKeyDiscoveryInput::PublicKeyDiscoveryInput{recipientStaticPrivateKey, } => recipientStaticPrivateKey, + } + } + } + + impl Debug + for PublicKeyDiscoveryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PublicKeyDiscoveryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PublicKeyDiscoveryInput::PublicKeyDiscoveryInput{recipientStaticPrivateKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PublicKeyDiscoveryInput.PublicKeyDiscoveryInput(")?; + DafnyPrint::fmt_print(recipientStaticPrivateKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PublicKeyDiscoveryInput {} + + impl Hash + for PublicKeyDiscoveryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PublicKeyDiscoveryInput::PublicKeyDiscoveryInput{recipientStaticPrivateKey, } => { + Hash::hash(recipientStaticPrivateKey, _state) + }, + } + } + } + + impl Default + for PublicKeyDiscoveryInput { + fn default() -> PublicKeyDiscoveryInput { + PublicKeyDiscoveryInput::PublicKeyDiscoveryInput { + recipientStaticPrivateKey: Default::default() + } + } + } + + impl AsRef + for &PublicKeyDiscoveryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutCacheEntryInput { + PutCacheEntryInput { + identifier: Sequence, + materials: Rc, + creationTime: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong, + expiryTime: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong, + messagesUsed: Rc>, + bytesUsed: Rc> + } + } + + impl PutCacheEntryInput { + pub fn identifier(&self) -> &Sequence { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => identifier, + } + } + pub fn materials(&self) -> &Rc { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => materials, + } + } + pub fn creationTime(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => creationTime, + } + } + pub fn expiryTime(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveLong { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => expiryTime, + } + } + pub fn messagesUsed(&self) -> &Rc> { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => messagesUsed, + } + } + pub fn bytesUsed(&self) -> &Rc> { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => bytesUsed, + } + } + } + + impl Debug + for PutCacheEntryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutCacheEntryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.PutCacheEntryInput.PutCacheEntryInput(")?; + DafnyPrint::fmt_print(identifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(materials, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(creationTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(expiryTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(messagesUsed, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(bytesUsed, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutCacheEntryInput {} + + impl Hash + for PutCacheEntryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutCacheEntryInput::PutCacheEntryInput{identifier, materials, creationTime, expiryTime, messagesUsed, bytesUsed, } => { + Hash::hash(identifier, _state); + Hash::hash(materials, _state); + Hash::hash(creationTime, _state); + Hash::hash(expiryTime, _state); + Hash::hash(messagesUsed, _state); + Hash::hash(bytesUsed, _state) + }, + } + } + } + + impl Default + for PutCacheEntryInput { + fn default() -> PutCacheEntryInput { + PutCacheEntryInput::PutCacheEntryInput { + identifier: Default::default(), + materials: Default::default(), + creationTime: Default::default(), + expiryTime: Default::default(), + messagesUsed: Default::default(), + bytesUsed: Default::default() + } + } + } + + impl AsRef + for &PutCacheEntryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RawEcdhStaticConfigurations { + PublicKeyDiscovery { + PublicKeyDiscovery: Rc + }, + RawPrivateKeyToStaticPublicKey { + RawPrivateKeyToStaticPublicKey: Rc + }, + EphemeralPrivateKeyToStaticPublicKey { + EphemeralPrivateKeyToStaticPublicKey: Rc + } + } + + impl RawEcdhStaticConfigurations { + pub fn PublicKeyDiscovery(&self) -> &Rc { + match self { + RawEcdhStaticConfigurations::PublicKeyDiscovery{PublicKeyDiscovery, } => PublicKeyDiscovery, + RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey{RawPrivateKeyToStaticPublicKey, } => panic!("field does not exist on this variant"), + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey{EphemeralPrivateKeyToStaticPublicKey, } => panic!("field does not exist on this variant"), + } + } + pub fn RawPrivateKeyToStaticPublicKey(&self) -> &Rc { + match self { + RawEcdhStaticConfigurations::PublicKeyDiscovery{PublicKeyDiscovery, } => panic!("field does not exist on this variant"), + RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey{RawPrivateKeyToStaticPublicKey, } => RawPrivateKeyToStaticPublicKey, + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey{EphemeralPrivateKeyToStaticPublicKey, } => panic!("field does not exist on this variant"), + } + } + pub fn EphemeralPrivateKeyToStaticPublicKey(&self) -> &Rc { + match self { + RawEcdhStaticConfigurations::PublicKeyDiscovery{PublicKeyDiscovery, } => panic!("field does not exist on this variant"), + RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey{RawPrivateKeyToStaticPublicKey, } => panic!("field does not exist on this variant"), + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey{EphemeralPrivateKeyToStaticPublicKey, } => EphemeralPrivateKeyToStaticPublicKey, + } + } + } + + impl Debug + for RawEcdhStaticConfigurations { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RawEcdhStaticConfigurations { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RawEcdhStaticConfigurations::PublicKeyDiscovery{PublicKeyDiscovery, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations.PublicKeyDiscovery(")?; + DafnyPrint::fmt_print(PublicKeyDiscovery, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey{RawPrivateKeyToStaticPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations.RawPrivateKeyToStaticPublicKey(")?; + DafnyPrint::fmt_print(RawPrivateKeyToStaticPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey{EphemeralPrivateKeyToStaticPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations.EphemeralPrivateKeyToStaticPublicKey(")?; + DafnyPrint::fmt_print(EphemeralPrivateKeyToStaticPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RawEcdhStaticConfigurations {} + + impl Hash + for RawEcdhStaticConfigurations { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RawEcdhStaticConfigurations::PublicKeyDiscovery{PublicKeyDiscovery, } => { + Hash::hash(PublicKeyDiscovery, _state) + }, + RawEcdhStaticConfigurations::RawPrivateKeyToStaticPublicKey{RawPrivateKeyToStaticPublicKey, } => { + Hash::hash(RawPrivateKeyToStaticPublicKey, _state) + }, + RawEcdhStaticConfigurations::EphemeralPrivateKeyToStaticPublicKey{EphemeralPrivateKeyToStaticPublicKey, } => { + Hash::hash(EphemeralPrivateKeyToStaticPublicKey, _state) + }, + } + } + } + + impl Default + for RawEcdhStaticConfigurations { + fn default() -> RawEcdhStaticConfigurations { + RawEcdhStaticConfigurations::PublicKeyDiscovery { + PublicKeyDiscovery: Default::default() + } + } + } + + impl AsRef + for &RawEcdhStaticConfigurations { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RawPrivateKeyToStaticPublicKeyInput { + RawPrivateKeyToStaticPublicKeyInput { + senderStaticPrivateKey: Sequence, + recipientPublicKey: Sequence + } + } + + impl RawPrivateKeyToStaticPublicKeyInput { + pub fn senderStaticPrivateKey(&self) -> &Sequence { + match self { + RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput{senderStaticPrivateKey, recipientPublicKey, } => senderStaticPrivateKey, + } + } + pub fn recipientPublicKey(&self) -> &Sequence { + match self { + RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput{senderStaticPrivateKey, recipientPublicKey, } => recipientPublicKey, + } + } + } + + impl Debug + for RawPrivateKeyToStaticPublicKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RawPrivateKeyToStaticPublicKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput{senderStaticPrivateKey, recipientPublicKey, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.RawPrivateKeyToStaticPublicKeyInput.RawPrivateKeyToStaticPublicKeyInput(")?; + DafnyPrint::fmt_print(senderStaticPrivateKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(recipientPublicKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RawPrivateKeyToStaticPublicKeyInput {} + + impl Hash + for RawPrivateKeyToStaticPublicKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput{senderStaticPrivateKey, recipientPublicKey, } => { + Hash::hash(senderStaticPrivateKey, _state); + Hash::hash(recipientPublicKey, _state) + }, + } + } + } + + impl Default + for RawPrivateKeyToStaticPublicKeyInput { + fn default() -> RawPrivateKeyToStaticPublicKeyInput { + RawPrivateKeyToStaticPublicKeyInput::RawPrivateKeyToStaticPublicKeyInput { + senderStaticPrivateKey: Default::default(), + recipientPublicKey: Default::default() + } + } + } + + impl AsRef + for &RawPrivateKeyToStaticPublicKeyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum SignatureAlgorithm { + ECDSA { + ECDSA: Rc + }, + None { + _None: Rc + } + } + + impl SignatureAlgorithm { + pub fn ECDSA(&self) -> &Rc { + match self { + SignatureAlgorithm::ECDSA{ECDSA, } => ECDSA, + SignatureAlgorithm::None{_None, } => panic!("field does not exist on this variant"), + } + } + pub fn _None(&self) -> &Rc { + match self { + SignatureAlgorithm::ECDSA{ECDSA, } => panic!("field does not exist on this variant"), + SignatureAlgorithm::None{_None, } => _None, + } + } + } + + impl Debug + for SignatureAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SignatureAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SignatureAlgorithm::ECDSA{ECDSA, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm.ECDSA(")?; + DafnyPrint::fmt_print(ECDSA, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + SignatureAlgorithm::None{_None, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm.None(")?; + DafnyPrint::fmt_print(_None, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SignatureAlgorithm {} + + impl Hash + for SignatureAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SignatureAlgorithm::ECDSA{ECDSA, } => { + Hash::hash(ECDSA, _state) + }, + SignatureAlgorithm::None{_None, } => { + Hash::hash(_None, _state) + }, + } + } + } + + impl Default + for SignatureAlgorithm { + fn default() -> SignatureAlgorithm { + SignatureAlgorithm::ECDSA { + ECDSA: Default::default() + } + } + } + + impl AsRef + for &SignatureAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum SingleThreadedCache { + SingleThreadedCache { + entryCapacity: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + entryPruningTailSize: Rc> + } + } + + impl SingleThreadedCache { + pub fn entryCapacity(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + SingleThreadedCache::SingleThreadedCache{entryCapacity, entryPruningTailSize, } => entryCapacity, + } + } + pub fn entryPruningTailSize(&self) -> &Rc> { + match self { + SingleThreadedCache::SingleThreadedCache{entryCapacity, entryPruningTailSize, } => entryPruningTailSize, + } + } + } + + impl Debug + for SingleThreadedCache { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SingleThreadedCache { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SingleThreadedCache::SingleThreadedCache{entryCapacity, entryPruningTailSize, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.SingleThreadedCache.SingleThreadedCache(")?; + DafnyPrint::fmt_print(entryCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(entryPruningTailSize, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SingleThreadedCache {} + + impl Hash + for SingleThreadedCache { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SingleThreadedCache::SingleThreadedCache{entryCapacity, entryPruningTailSize, } => { + Hash::hash(entryCapacity, _state); + Hash::hash(entryPruningTailSize, _state) + }, + } + } + } + + impl Default + for SingleThreadedCache { + fn default() -> SingleThreadedCache { + SingleThreadedCache::SingleThreadedCache { + entryCapacity: Default::default(), + entryPruningTailSize: Default::default() + } + } + } + + impl AsRef + for &SingleThreadedCache { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum StaticConfigurations { + AWS_KMS_ECDH { + AWS_KMS_ECDH: Rc + }, + RAW_ECDH { + RAW_ECDH: Rc + } + } + + impl StaticConfigurations { + pub fn AWS_KMS_ECDH(&self) -> &Rc { + match self { + StaticConfigurations::AWS_KMS_ECDH{AWS_KMS_ECDH, } => AWS_KMS_ECDH, + StaticConfigurations::RAW_ECDH{RAW_ECDH, } => panic!("field does not exist on this variant"), + } + } + pub fn RAW_ECDH(&self) -> &Rc { + match self { + StaticConfigurations::AWS_KMS_ECDH{AWS_KMS_ECDH, } => panic!("field does not exist on this variant"), + StaticConfigurations::RAW_ECDH{RAW_ECDH, } => RAW_ECDH, + } + } + } + + impl Debug + for StaticConfigurations { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StaticConfigurations { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StaticConfigurations::AWS_KMS_ECDH{AWS_KMS_ECDH, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations.AWS__KMS__ECDH(")?; + DafnyPrint::fmt_print(AWS_KMS_ECDH, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + StaticConfigurations::RAW_ECDH{RAW_ECDH, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations.RAW__ECDH(")?; + DafnyPrint::fmt_print(RAW_ECDH, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for StaticConfigurations {} + + impl Hash + for StaticConfigurations { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StaticConfigurations::AWS_KMS_ECDH{AWS_KMS_ECDH, } => { + Hash::hash(AWS_KMS_ECDH, _state) + }, + StaticConfigurations::RAW_ECDH{RAW_ECDH, } => { + Hash::hash(RAW_ECDH, _state) + }, + } + } + } + + impl Default + for StaticConfigurations { + fn default() -> StaticConfigurations { + StaticConfigurations::AWS_KMS_ECDH { + AWS_KMS_ECDH: Default::default() + } + } + } + + impl AsRef + for &StaticConfigurations { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum StormTrackingCache { + StormTrackingCache { + entryCapacity: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + entryPruningTailSize: Rc>, + gracePeriod: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + graceInterval: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + fanOut: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + inFlightTTL: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + sleepMilli: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber, + timeUnits: Rc>> + } + } + + impl StormTrackingCache { + pub fn entryCapacity(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => entryCapacity, + } + } + pub fn entryPruningTailSize(&self) -> &Rc> { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => entryPruningTailSize, + } + } + pub fn gracePeriod(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => gracePeriod, + } + } + pub fn graceInterval(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => graceInterval, + } + } + pub fn fanOut(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => fanOut, + } + } + pub fn inFlightTTL(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => inFlightTTL, + } + } + pub fn sleepMilli(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CountingNumber { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => sleepMilli, + } + } + pub fn timeUnits(&self) -> &Rc>> { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => timeUnits, + } + } + } + + impl Debug + for StormTrackingCache { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StormTrackingCache { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.StormTrackingCache.StormTrackingCache(")?; + DafnyPrint::fmt_print(entryCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(entryPruningTailSize, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(gracePeriod, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(graceInterval, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(fanOut, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(inFlightTTL, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(sleepMilli, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(timeUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for StormTrackingCache {} + + impl Hash + for StormTrackingCache { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StormTrackingCache::StormTrackingCache{entryCapacity, entryPruningTailSize, gracePeriod, graceInterval, fanOut, inFlightTTL, sleepMilli, timeUnits, } => { + Hash::hash(entryCapacity, _state); + Hash::hash(entryPruningTailSize, _state); + Hash::hash(gracePeriod, _state); + Hash::hash(graceInterval, _state); + Hash::hash(fanOut, _state); + Hash::hash(inFlightTTL, _state); + Hash::hash(sleepMilli, _state); + Hash::hash(timeUnits, _state) + }, + } + } + } + + impl Default + for StormTrackingCache { + fn default() -> StormTrackingCache { + StormTrackingCache::StormTrackingCache { + entryCapacity: Default::default(), + entryPruningTailSize: Default::default(), + gracePeriod: Default::default(), + graceInterval: Default::default(), + fanOut: Default::default(), + inFlightTTL: Default::default(), + sleepMilli: Default::default(), + timeUnits: Default::default() + } + } + } + + impl AsRef + for &StormTrackingCache { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum SymmetricSignatureAlgorithm { + HMAC { + HMAC: Rc + }, + None { + _None: Rc + } + } + + impl SymmetricSignatureAlgorithm { + pub fn HMAC(&self) -> &Rc { + match self { + SymmetricSignatureAlgorithm::HMAC{HMAC, } => HMAC, + SymmetricSignatureAlgorithm::None{_None, } => panic!("field does not exist on this variant"), + } + } + pub fn _None(&self) -> &Rc { + match self { + SymmetricSignatureAlgorithm::HMAC{HMAC, } => panic!("field does not exist on this variant"), + SymmetricSignatureAlgorithm::None{_None, } => _None, + } + } + } + + impl Debug + for SymmetricSignatureAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SymmetricSignatureAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SymmetricSignatureAlgorithm::HMAC{HMAC, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm.HMAC(")?; + DafnyPrint::fmt_print(HMAC, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + SymmetricSignatureAlgorithm::None{_None, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm.None(")?; + DafnyPrint::fmt_print(_None, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SymmetricSignatureAlgorithm {} + + impl Hash + for SymmetricSignatureAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SymmetricSignatureAlgorithm::HMAC{HMAC, } => { + Hash::hash(HMAC, _state) + }, + SymmetricSignatureAlgorithm::None{_None, } => { + Hash::hash(_None, _state) + }, + } + } + } + + impl Default + for SymmetricSignatureAlgorithm { + fn default() -> SymmetricSignatureAlgorithm { + SymmetricSignatureAlgorithm::HMAC { + HMAC: Default::default() + } + } + } + + impl AsRef + for &SymmetricSignatureAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TimeUnits { + Seconds {}, + Milliseconds {} + } + + impl TimeUnits {} + + impl Debug + for TimeUnits { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TimeUnits { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TimeUnits::Seconds{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.TimeUnits.Seconds")?; + Ok(()) + }, + TimeUnits::Milliseconds{} => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.TimeUnits.Milliseconds")?; + Ok(()) + }, + } + } + } + + impl TimeUnits { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(TimeUnits::Seconds {}), Rc::new(TimeUnits::Milliseconds {})].iter() + } + } + + impl Eq + for TimeUnits {} + + impl Hash + for TimeUnits { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TimeUnits::Seconds{} => { + + }, + TimeUnits::Milliseconds{} => { + + }, + } + } + } + + impl Default + for TimeUnits { + fn default() -> TimeUnits { + TimeUnits::Seconds {} + } + } + + impl AsRef + for &TimeUnits { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum UpdateUsageMetadataInput { + UpdateUsageMetadataInput { + identifier: Sequence, + bytesUsed: crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger + } + } + + impl UpdateUsageMetadataInput { + pub fn identifier(&self) -> &Sequence { + match self { + UpdateUsageMetadataInput::UpdateUsageMetadataInput{identifier, bytesUsed, } => identifier, + } + } + pub fn bytesUsed(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::PositiveInteger { + match self { + UpdateUsageMetadataInput::UpdateUsageMetadataInput{identifier, bytesUsed, } => bytesUsed, + } + } + } + + impl Debug + for UpdateUsageMetadataInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for UpdateUsageMetadataInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + UpdateUsageMetadataInput::UpdateUsageMetadataInput{identifier, bytesUsed, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.UpdateUsageMetadataInput.UpdateUsageMetadataInput(")?; + DafnyPrint::fmt_print(identifier, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(bytesUsed, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for UpdateUsageMetadataInput {} + + impl Hash + for UpdateUsageMetadataInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + UpdateUsageMetadataInput::UpdateUsageMetadataInput{identifier, bytesUsed, } => { + Hash::hash(identifier, _state); + Hash::hash(bytesUsed, _state) + }, + } + } + } + + impl Default + for UpdateUsageMetadataInput { + fn default() -> UpdateUsageMetadataInput { + UpdateUsageMetadataInput::UpdateUsageMetadataInput { + identifier: Default::default(), + bytesUsed: Default::default() + } + } + } + + impl AsRef + for &UpdateUsageMetadataInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ValidateCommitmentPolicyOnDecryptInput { + ValidateCommitmentPolicyOnDecryptInput { + algorithm: Rc, + commitmentPolicy: Rc + } + } + + impl ValidateCommitmentPolicyOnDecryptInput { + pub fn algorithm(&self) -> &Rc { + match self { + ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput{algorithm, commitmentPolicy, } => algorithm, + } + } + pub fn commitmentPolicy(&self) -> &Rc { + match self { + ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput{algorithm, commitmentPolicy, } => commitmentPolicy, + } + } + } + + impl Debug + for ValidateCommitmentPolicyOnDecryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidateCommitmentPolicyOnDecryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput{algorithm, commitmentPolicy, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ValidateCommitmentPolicyOnDecryptInput.ValidateCommitmentPolicyOnDecryptInput(")?; + DafnyPrint::fmt_print(algorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(commitmentPolicy, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidateCommitmentPolicyOnDecryptInput {} + + impl Hash + for ValidateCommitmentPolicyOnDecryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput{algorithm, commitmentPolicy, } => { + Hash::hash(algorithm, _state); + Hash::hash(commitmentPolicy, _state) + }, + } + } + } + + impl Default + for ValidateCommitmentPolicyOnDecryptInput { + fn default() -> ValidateCommitmentPolicyOnDecryptInput { + ValidateCommitmentPolicyOnDecryptInput::ValidateCommitmentPolicyOnDecryptInput { + algorithm: Default::default(), + commitmentPolicy: Default::default() + } + } + } + + impl AsRef + for &ValidateCommitmentPolicyOnDecryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ValidateCommitmentPolicyOnEncryptInput { + ValidateCommitmentPolicyOnEncryptInput { + algorithm: Rc, + commitmentPolicy: Rc + } + } + + impl ValidateCommitmentPolicyOnEncryptInput { + pub fn algorithm(&self) -> &Rc { + match self { + ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput{algorithm, commitmentPolicy, } => algorithm, + } + } + pub fn commitmentPolicy(&self) -> &Rc { + match self { + ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput{algorithm, commitmentPolicy, } => commitmentPolicy, + } + } + } + + impl Debug + for ValidateCommitmentPolicyOnEncryptInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidateCommitmentPolicyOnEncryptInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput{algorithm, commitmentPolicy, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ValidateCommitmentPolicyOnEncryptInput.ValidateCommitmentPolicyOnEncryptInput(")?; + DafnyPrint::fmt_print(algorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(commitmentPolicy, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidateCommitmentPolicyOnEncryptInput {} + + impl Hash + for ValidateCommitmentPolicyOnEncryptInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput{algorithm, commitmentPolicy, } => { + Hash::hash(algorithm, _state); + Hash::hash(commitmentPolicy, _state) + }, + } + } + } + + impl Default + for ValidateCommitmentPolicyOnEncryptInput { + fn default() -> ValidateCommitmentPolicyOnEncryptInput { + ValidateCommitmentPolicyOnEncryptInput::ValidateCommitmentPolicyOnEncryptInput { + algorithm: Default::default(), + commitmentPolicy: Default::default() + } + } + } + + impl AsRef + for &ValidateCommitmentPolicyOnEncryptInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ValidDecryptionMaterialsTransitionInput { + ValidDecryptionMaterialsTransitionInput { + start: Rc, + stop: Rc + } + } + + impl ValidDecryptionMaterialsTransitionInput { + pub fn start(&self) -> &Rc { + match self { + ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput{start, stop, } => start, + } + } + pub fn stop(&self) -> &Rc { + match self { + ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput{start, stop, } => stop, + } + } + } + + impl Debug + for ValidDecryptionMaterialsTransitionInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidDecryptionMaterialsTransitionInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput{start, stop, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ValidDecryptionMaterialsTransitionInput.ValidDecryptionMaterialsTransitionInput(")?; + DafnyPrint::fmt_print(start, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(stop, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidDecryptionMaterialsTransitionInput {} + + impl Hash + for ValidDecryptionMaterialsTransitionInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput{start, stop, } => { + Hash::hash(start, _state); + Hash::hash(stop, _state) + }, + } + } + } + + impl Default + for ValidDecryptionMaterialsTransitionInput { + fn default() -> ValidDecryptionMaterialsTransitionInput { + ValidDecryptionMaterialsTransitionInput::ValidDecryptionMaterialsTransitionInput { + start: Default::default(), + stop: Default::default() + } + } + } + + impl AsRef + for &ValidDecryptionMaterialsTransitionInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ValidEncryptionMaterialsTransitionInput { + ValidEncryptionMaterialsTransitionInput { + start: Rc, + stop: Rc + } + } + + impl ValidEncryptionMaterialsTransitionInput { + pub fn start(&self) -> &Rc { + match self { + ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput{start, stop, } => start, + } + } + pub fn stop(&self) -> &Rc { + match self { + ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput{start, stop, } => stop, + } + } + } + + impl Debug + for ValidEncryptionMaterialsTransitionInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ValidEncryptionMaterialsTransitionInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput{start, stop, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.ValidEncryptionMaterialsTransitionInput.ValidEncryptionMaterialsTransitionInput(")?; + DafnyPrint::fmt_print(start, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(stop, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ValidEncryptionMaterialsTransitionInput {} + + impl Hash + for ValidEncryptionMaterialsTransitionInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput{start, stop, } => { + Hash::hash(start, _state); + Hash::hash(stop, _state) + }, + } + } + } + + impl Default + for ValidEncryptionMaterialsTransitionInput { + fn default() -> ValidEncryptionMaterialsTransitionInput { + ValidEncryptionMaterialsTransitionInput::ValidEncryptionMaterialsTransitionInput { + start: Default::default(), + stop: Default::default() + } + } + } + + impl AsRef + for &ValidEncryptionMaterialsTransitionInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + AwsCryptographicMaterialProvidersException { + message: Sequence + }, + EntryAlreadyExists { + message: Sequence + }, + EntryDoesNotExist { + message: Sequence + }, + InFlightTTLExceeded { + message: Sequence + }, + InvalidAlgorithmSuiteInfo { + message: Sequence + }, + InvalidAlgorithmSuiteInfoOnDecrypt { + message: Sequence + }, + InvalidAlgorithmSuiteInfoOnEncrypt { + message: Sequence + }, + InvalidDecryptionMaterials { + message: Sequence + }, + InvalidDecryptionMaterialsTransition { + message: Sequence + }, + InvalidEncryptionMaterials { + message: Sequence + }, + InvalidEncryptionMaterialsTransition { + message: Sequence + }, + AwsCryptographyKeyStore { + AwsCryptographyKeyStore: Rc + }, + AwsCryptographyPrimitives { + AwsCryptographyPrimitives: Rc + }, + ComAmazonawsDynamodb { + ComAmazonawsDynamodb: Rc + }, + ComAmazonawsKms { + ComAmazonawsKms: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => message, + Error::EntryAlreadyExists{message, } => message, + Error::EntryDoesNotExist{message, } => message, + Error::InFlightTTLExceeded{message, } => message, + Error::InvalidAlgorithmSuiteInfo{message, } => message, + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => message, + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => message, + Error::InvalidDecryptionMaterials{message, } => message, + Error::InvalidDecryptionMaterialsTransition{message, } => message, + Error::InvalidEncryptionMaterials{message, } => message, + Error::InvalidEncryptionMaterialsTransition{message, } => message, + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => message, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn AwsCryptographyKeyStore(&self) -> &Rc { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => AwsCryptographyKeyStore, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn AwsCryptographyPrimitives(&self) -> &Rc { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => AwsCryptographyPrimitives, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn ComAmazonawsDynamodb(&self) -> &Rc { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => ComAmazonawsDynamodb, + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn ComAmazonawsKms(&self) -> &Rc { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => ComAmazonawsKms, + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn list(&self) -> &Sequence> { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => list, + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => panic!("field does not exist on this variant"), + } + } + pub fn obj(&self) -> &Object { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => obj, + Error::OpaqueWithText{obj, objMessage, } => obj, + } + } + pub fn objMessage(&self) -> &Sequence { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => panic!("field does not exist on this variant"), + Error::EntryAlreadyExists{message, } => panic!("field does not exist on this variant"), + Error::EntryDoesNotExist{message, } => panic!("field does not exist on this variant"), + Error::InFlightTTLExceeded{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfo{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidDecryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterials{message, } => panic!("field does not exist on this variant"), + Error::InvalidEncryptionMaterialsTransition{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsKms{ComAmazonawsKms, } => panic!("field does not exist on this variant"), + Error::CollectionOfErrors{list, message, } => panic!("field does not exist on this variant"), + Error::Opaque{obj, } => panic!("field does not exist on this variant"), + Error::OpaqueWithText{obj, objMessage, } => objMessage, + } + } + } + + impl Debug + for Error { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Error { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.AwsCryptographicMaterialProvidersException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::EntryAlreadyExists{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.EntryAlreadyExists(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::EntryDoesNotExist{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.EntryDoesNotExist(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InFlightTTLExceeded{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InFlightTTLExceeded(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidAlgorithmSuiteInfo{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidAlgorithmSuiteInfo(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidAlgorithmSuiteInfoOnDecrypt(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidAlgorithmSuiteInfoOnEncrypt(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidDecryptionMaterials{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidDecryptionMaterials(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidDecryptionMaterialsTransition{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidDecryptionMaterialsTransition(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidEncryptionMaterials{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidEncryptionMaterials(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::InvalidEncryptionMaterialsTransition{message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.InvalidEncryptionMaterialsTransition(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.AwsCryptographyKeyStore(")?; + DafnyPrint::fmt_print(AwsCryptographyKeyStore, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.AwsCryptographyPrimitives(")?; + DafnyPrint::fmt_print(AwsCryptographyPrimitives, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.ComAmazonawsDynamodb(")?; + DafnyPrint::fmt_print(ComAmazonawsDynamodb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsKms{ComAmazonawsKms, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.ComAmazonawsKms(")?; + DafnyPrint::fmt_print(ComAmazonawsKms, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.CollectionOfErrors(")?; + DafnyPrint::fmt_print(list, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::Opaque{obj, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.materialproviders.internaldafny.types.Error.OpaqueWithText(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(objMessage, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Error {} + + impl Hash + for Error { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Error::AwsCryptographicMaterialProvidersException{message, } => { + Hash::hash(message, _state) + }, + Error::EntryAlreadyExists{message, } => { + Hash::hash(message, _state) + }, + Error::EntryDoesNotExist{message, } => { + Hash::hash(message, _state) + }, + Error::InFlightTTLExceeded{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidAlgorithmSuiteInfo{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidAlgorithmSuiteInfoOnDecrypt{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidAlgorithmSuiteInfoOnEncrypt{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidDecryptionMaterials{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidDecryptionMaterialsTransition{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidEncryptionMaterials{message, } => { + Hash::hash(message, _state) + }, + Error::InvalidEncryptionMaterialsTransition{message, } => { + Hash::hash(message, _state) + }, + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => { + Hash::hash(AwsCryptographyKeyStore, _state) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + Hash::hash(AwsCryptographyPrimitives, _state) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + Hash::hash(ComAmazonawsDynamodb, _state) + }, + Error::ComAmazonawsKms{ComAmazonawsKms, } => { + Hash::hash(ComAmazonawsKms, _state) + }, + Error::CollectionOfErrors{list, message, } => { + Hash::hash(list, _state); + Hash::hash(message, _state) + }, + Error::Opaque{obj, } => { + Hash::hash(obj, _state) + }, + Error::OpaqueWithText{obj, objMessage, } => { + Hash::hash(obj, _state); + Hash::hash(objMessage, _state) + }, + } + } + } + + impl Default + for Error { + fn default() -> Error { + Error::AwsCryptographicMaterialProvidersException { + message: Default::default() + } + } + } + + impl AsRef + for &Error { + fn as_ref(&self) -> Self { + self + } + } + + pub type OpaqueError = Rc; + + pub type DummySubsetType = DafnyInt; + + pub fn r#__init_DummySubsetType() -> DafnyInt { + int!(1) + } + } + } + } + + pub mod services { + pub mod dynamodb { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::Error; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::dafny_runtime::SequenceIter; + pub use ::dafny_runtime::seq; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + + pub struct _default {} + + impl _default { + pub fn DefaultDynamoDBClientConfigType() -> Rc { + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::DynamoDBClientConfigType::DynamoDBClientConfigType {}) + } + pub fn CreateSuccessOfClient(client: &Object) -> Rc, Rc>> { + Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::, Rc>::Success { + value: client.clone() + }) + } + pub fn CreateFailureOfError(error: &Rc) -> Rc, Rc>> { + Rc::new(crate::implementation_from_dafny::r#_Wrappers_Compile::Result::, Rc>::Failure { + error: error.clone() + }) + } + } + + #[derive(PartialEq, Clone)] + pub enum DynamoDBClientConfigType { + DynamoDBClientConfigType {} + } + + impl DynamoDBClientConfigType {} + + impl Debug + for DynamoDBClientConfigType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DynamoDBClientConfigType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DynamoDBClientConfigType::DynamoDBClientConfigType{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.DynamoDBClientConfigType.DynamoDBClientConfigType")?; + Ok(()) + }, + } + } + } + + impl DynamoDBClientConfigType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DynamoDBClientConfigType::DynamoDBClientConfigType {})].iter() + } + } + + impl Eq + for DynamoDBClientConfigType {} + + impl Hash + for DynamoDBClientConfigType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DynamoDBClientConfigType::DynamoDBClientConfigType{} => { + + }, + } + } + } + + impl Default + for DynamoDBClientConfigType { + fn default() -> DynamoDBClientConfigType { + DynamoDBClientConfigType::DynamoDBClientConfigType {} + } + } + + impl AsRef + for &DynamoDBClientConfigType { + fn as_ref(&self) -> Self { + self + } + } + + pub mod types { + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::truncate; + pub use ::dafny_runtime::Map; + pub use ::std::rc::Rc; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::dafny_runtime::DafnyPrint; + pub use ::std::cmp::Eq; + pub use ::std::hash::Hash; + pub use ::std::hash::Hasher; + pub use ::std::default::Default; + pub use ::std::convert::AsRef; + pub use ::dafny_runtime::SequenceIter; + pub use ::dafny_runtime::seq; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::Object; + pub use ::dafny_runtime::allocate_object; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + + pub struct _default {} + + impl _default { + pub fn IsValid_AttributeName(x: &Sequence) -> bool { + !(x.cardinality() < int!(0)) && !(int!(b"65535") < x.cardinality()) + } + pub fn IsValid_AttributeNameList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_AutoScalingPolicyName(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(256) < x.cardinality()) + } + pub fn IsValid_AutoScalingRoleArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1600) < x.cardinality()) + } + pub fn IsValid_BackupArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(37)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_BackupName(x: &Sequence) -> bool { + !(x.cardinality() < int!(3)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_BackupsInputLimit(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(100), i32) < x) + } + pub fn IsValid_BackupSizeBytes(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_BatchGetRequestMap(x: &Map, Rc>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_BatchWriteItemRequestMap(x: &Map, crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::WriteRequests>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(25) < x.cardinality()) + } + pub fn IsValid_BilledSizeBytes(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_CancellationReasonList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_ClientRequestToken(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(36) < x.cardinality()) + } + pub fn IsValid_CloudWatchLogGroupArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_ConsumedCapacityUnits(x: &Sequence) -> bool { + !(x.cardinality() < int!(8)) && !(int!(8) < x.cardinality()) + } + pub fn IsValid_CsvDelimiter(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1) < x.cardinality()) + } + pub fn IsValid_CsvHeader(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(b"65536") < x.cardinality()) + } + pub fn IsValid_CsvHeaderList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_DoubleObject(x: &Sequence) -> bool { + !(x.cardinality() < int!(8)) && !(int!(8) < x.cardinality()) + } + pub fn IsValid_ErrorCount(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_ExportArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(37)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_GlobalSecondaryIndexAutoScalingUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_GlobalTableGlobalSecondaryIndexSettingsUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(20) < x.cardinality()) + } + pub fn IsValid_ImportArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(37)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_ImportedItemCount(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_ImportNextToken(x: &Sequence) -> bool { + !(x.cardinality() < int!(112)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_IndexName(x: &Sequence) -> bool { + !(x.cardinality() < int!(3)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_ItemCollectionSizeEstimateBound(x: &Sequence) -> bool { + !(x.cardinality() < int!(8)) && !(int!(8) < x.cardinality()) + } + pub fn IsValid_ItemCount(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_ItemResponseList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_KeyList(x: &Sequence, Rc>>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_KeySchema(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(2) < x.cardinality()) + } + pub fn IsValid_KeySchemaAttributeName(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_ListContributorInsightsLimit(x: i32) -> bool { + !(truncate!(int!(100), i32) < x) + } + pub fn IsValid_ListExportsMaxLimit(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(25), i32) < x) + } + pub fn IsValid_ListImportsMaxLimit(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(25), i32) < x) + } + pub fn IsValid_ListTablesInputLimit(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(100), i32) < x) + } + pub fn IsValid_NonKeyAttributeName(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_NonKeyAttributeNameList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(20) < x.cardinality()) + } + pub fn IsValid_NonNegativeLongObject(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_ParameterizedStatements(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_PartiQLBatchRequest(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(25) < x.cardinality()) + } + pub fn IsValid_PartiQLNextToken(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(b"32768") < x.cardinality()) + } + pub fn IsValid_PartiQLStatement(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(8192) < x.cardinality()) + } + pub fn IsValid_PolicyRevisionId(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_PositiveIntegerObject(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) + } + pub fn IsValid_PositiveLongObject(x: i64) -> bool { + !(x < truncate!(int!(1), i64)) + } + pub fn IsValid_PreparedStatementParameters(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ProcessedItemCount(x: i64) -> bool { + !(x < truncate!(int!(0), i64)) + } + pub fn IsValid_ReplicaAutoScalingUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ReplicaGlobalSecondaryIndexList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ReplicaGlobalSecondaryIndexSettingsUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(20) < x.cardinality()) + } + pub fn IsValid_ReplicaSettingsUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(50) < x.cardinality()) + } + pub fn IsValid_ReplicationGroupUpdateList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ResourceArnString(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1283) < x.cardinality()) + } + pub fn IsValid_S3Bucket(x: &Sequence) -> bool { + !(x.cardinality() < int!(0)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_S3Prefix(x: &Sequence) -> bool { + !(x.cardinality() < int!(0)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_S3SseKmsKeyId(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(2048) < x.cardinality()) + } + pub fn IsValid_ScanSegment(x: i32) -> bool { + !(x < truncate!(int!(0), i32)) && !(truncate!(int!(b"999999"), i32) < x) + } + pub fn IsValid_ScanTotalSegments(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(b"1000000"), i32) < x) + } + pub fn IsValid_StreamArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(37)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_TableArn(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1024) < x.cardinality()) + } + pub fn IsValid_TableName(x: &Sequence) -> bool { + !(x.cardinality() < int!(3)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_TagKeyString(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(128) < x.cardinality()) + } + pub fn IsValid_TagValueString(x: &Sequence) -> bool { + !(x.cardinality() < int!(0)) && !(int!(256) < x.cardinality()) + } + pub fn IsValid_TimeToLiveAttributeName(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(255) < x.cardinality()) + } + pub fn IsValid_TransactGetItemList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_TransactWriteItemList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(100) < x.cardinality()) + } + pub fn IsValid_WriteRequests(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(25) < x.cardinality()) + } + pub fn IsDummySubsetType(x: &DafnyInt) -> bool { + int!(0) < x.clone() + } + } + + #[derive(PartialEq, Clone)] + pub enum DafnyCallEvent { + DafnyCallEvent { + input: I, + output: O + } + } + + impl DafnyCallEvent { + pub fn input(&self) -> &I { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => input, + } + } + pub fn output(&self) -> &O { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => output, + } + } + } + + impl Debug + for DafnyCallEvent { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DafnyCallEvent { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DafnyCallEvent.DafnyCallEvent(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(output, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DafnyCallEvent {} + + impl Hash + for DafnyCallEvent { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DafnyCallEvent::DafnyCallEvent{input, output, } => { + Hash::hash(input, _state); + Hash::hash(output, _state) + }, + } + } + } + + impl Default + for DafnyCallEvent { + fn default() -> DafnyCallEvent { + DafnyCallEvent::DafnyCallEvent { + input: Default::default(), + output: Default::default() + } + } + } + + impl AsRef> + for &DafnyCallEvent { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ApproximateCreationDateTimePrecision { + MILLISECOND {}, + MICROSECOND {} + } + + impl ApproximateCreationDateTimePrecision {} + + impl Debug + for ApproximateCreationDateTimePrecision { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ApproximateCreationDateTimePrecision { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ApproximateCreationDateTimePrecision::MILLISECOND{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ApproximateCreationDateTimePrecision.MILLISECOND")?; + Ok(()) + }, + ApproximateCreationDateTimePrecision::MICROSECOND{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ApproximateCreationDateTimePrecision.MICROSECOND")?; + Ok(()) + }, + } + } + } + + impl ApproximateCreationDateTimePrecision { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ApproximateCreationDateTimePrecision::MILLISECOND {}), Rc::new(ApproximateCreationDateTimePrecision::MICROSECOND {})].iter() + } + } + + impl Eq + for ApproximateCreationDateTimePrecision {} + + impl Hash + for ApproximateCreationDateTimePrecision { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ApproximateCreationDateTimePrecision::MILLISECOND{} => { + + }, + ApproximateCreationDateTimePrecision::MICROSECOND{} => { + + }, + } + } + } + + impl Default + for ApproximateCreationDateTimePrecision { + fn default() -> ApproximateCreationDateTimePrecision { + ApproximateCreationDateTimePrecision::MILLISECOND {} + } + } + + impl AsRef + for &ApproximateCreationDateTimePrecision { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ArchivalSummary { + ArchivalSummary { + ArchivalDateTime: Rc>>, + ArchivalReason: Rc>>, + ArchivalBackupArn: Rc>> + } + } + + impl ArchivalSummary { + pub fn ArchivalDateTime(&self) -> &Rc>> { + match self { + ArchivalSummary::ArchivalSummary{ArchivalDateTime, ArchivalReason, ArchivalBackupArn, } => ArchivalDateTime, + } + } + pub fn ArchivalReason(&self) -> &Rc>> { + match self { + ArchivalSummary::ArchivalSummary{ArchivalDateTime, ArchivalReason, ArchivalBackupArn, } => ArchivalReason, + } + } + pub fn ArchivalBackupArn(&self) -> &Rc>> { + match self { + ArchivalSummary::ArchivalSummary{ArchivalDateTime, ArchivalReason, ArchivalBackupArn, } => ArchivalBackupArn, + } + } + } + + impl Debug + for ArchivalSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ArchivalSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ArchivalSummary::ArchivalSummary{ArchivalDateTime, ArchivalReason, ArchivalBackupArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary.ArchivalSummary(")?; + DafnyPrint::fmt_print(ArchivalDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ArchivalReason, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ArchivalBackupArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ArchivalSummary {} + + impl Hash + for ArchivalSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ArchivalSummary::ArchivalSummary{ArchivalDateTime, ArchivalReason, ArchivalBackupArn, } => { + Hash::hash(ArchivalDateTime, _state); + Hash::hash(ArchivalReason, _state); + Hash::hash(ArchivalBackupArn, _state) + }, + } + } + } + + impl Default + for ArchivalSummary { + fn default() -> ArchivalSummary { + ArchivalSummary::ArchivalSummary { + ArchivalDateTime: Default::default(), + ArchivalReason: Default::default(), + ArchivalBackupArn: Default::default() + } + } + } + + impl AsRef + for &ArchivalSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AttributeAction { + ADD {}, + PUT {}, + DELETE {} + } + + impl AttributeAction {} + + impl Debug + for AttributeAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AttributeAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AttributeAction::ADD{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeAction.ADD")?; + Ok(()) + }, + AttributeAction::PUT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeAction.PUT")?; + Ok(()) + }, + AttributeAction::DELETE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeAction.DELETE")?; + Ok(()) + }, + } + } + } + + impl AttributeAction { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(AttributeAction::ADD {}), Rc::new(AttributeAction::PUT {}), Rc::new(AttributeAction::DELETE {})].iter() + } + } + + impl Eq + for AttributeAction {} + + impl Hash + for AttributeAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AttributeAction::ADD{} => { + + }, + AttributeAction::PUT{} => { + + }, + AttributeAction::DELETE{} => { + + }, + } + } + } + + impl Default + for AttributeAction { + fn default() -> AttributeAction { + AttributeAction::ADD {} + } + } + + impl AsRef + for &AttributeAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AttributeDefinition { + AttributeDefinition { + AttributeName: Sequence, + AttributeType: Rc + } + } + + impl AttributeDefinition { + pub fn AttributeName(&self) -> &Sequence { + match self { + AttributeDefinition::AttributeDefinition{AttributeName, AttributeType, } => AttributeName, + } + } + pub fn AttributeType(&self) -> &Rc { + match self { + AttributeDefinition::AttributeDefinition{AttributeName, AttributeType, } => AttributeType, + } + } + } + + impl Debug + for AttributeDefinition { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AttributeDefinition { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AttributeDefinition::AttributeDefinition{AttributeName, AttributeType, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeDefinition.AttributeDefinition(")?; + DafnyPrint::fmt_print(AttributeName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributeType, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AttributeDefinition {} + + impl Hash + for AttributeDefinition { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AttributeDefinition::AttributeDefinition{AttributeName, AttributeType, } => { + Hash::hash(AttributeName, _state); + Hash::hash(AttributeType, _state) + }, + } + } + } + + impl Default + for AttributeDefinition { + fn default() -> AttributeDefinition { + AttributeDefinition::AttributeDefinition { + AttributeName: Default::default(), + AttributeType: Default::default() + } + } + } + + impl AsRef + for &AttributeDefinition { + fn as_ref(&self) -> Self { + self + } + } + + pub type AttributeName = Sequence; + + pub type AttributeNameList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum AttributeValue { + S { + S: Sequence + }, + N { + N: Sequence + }, + B { + B: Sequence + }, + SS { + SS: Sequence> + }, + NS { + NS: Sequence> + }, + BS { + BS: Sequence> + }, + M { + M: Map, Rc> + }, + L { + L: Sequence> + }, + NULL { + NULL: bool + }, + BOOL { + BOOL: bool + } + } + + impl AttributeValue { + pub fn S(&self) -> &Sequence { + match self { + AttributeValue::S{S, } => S, + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn N(&self) -> &Sequence { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => N, + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn B(&self) -> &Sequence { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => B, + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn SS(&self) -> &Sequence> { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => SS, + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn NS(&self) -> &Sequence> { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => NS, + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn BS(&self) -> &Sequence> { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => BS, + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn M(&self) -> &Map, Rc> { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => M, + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn L(&self) -> &Sequence> { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => L, + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn NULL(&self) -> &bool { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => NULL, + AttributeValue::BOOL{BOOL, } => panic!("field does not exist on this variant"), + } + } + pub fn BOOL(&self) -> &bool { + match self { + AttributeValue::S{S, } => panic!("field does not exist on this variant"), + AttributeValue::N{N, } => panic!("field does not exist on this variant"), + AttributeValue::B{B, } => panic!("field does not exist on this variant"), + AttributeValue::SS{SS, } => panic!("field does not exist on this variant"), + AttributeValue::NS{NS, } => panic!("field does not exist on this variant"), + AttributeValue::BS{BS, } => panic!("field does not exist on this variant"), + AttributeValue::M{M, } => panic!("field does not exist on this variant"), + AttributeValue::L{L, } => panic!("field does not exist on this variant"), + AttributeValue::NULL{NULL, } => panic!("field does not exist on this variant"), + AttributeValue::BOOL{BOOL, } => BOOL, + } + } + } + + impl Debug + for AttributeValue { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AttributeValue { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AttributeValue::S{S, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.S(")?; + DafnyPrint::fmt_print(S, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::N{N, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.N(")?; + DafnyPrint::fmt_print(N, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::B{B, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.B(")?; + DafnyPrint::fmt_print(B, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::SS{SS, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.SS(")?; + DafnyPrint::fmt_print(SS, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::NS{NS, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.NS(")?; + DafnyPrint::fmt_print(NS, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::BS{BS, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.BS(")?; + DafnyPrint::fmt_print(BS, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::M{M, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.M(")?; + DafnyPrint::fmt_print(M, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::L{L, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.L(")?; + DafnyPrint::fmt_print(L, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::NULL{NULL, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.NULL(")?; + DafnyPrint::fmt_print(NULL, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + AttributeValue::BOOL{BOOL, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue.BOOL(")?; + DafnyPrint::fmt_print(BOOL, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AttributeValue {} + + impl Hash + for AttributeValue { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AttributeValue::S{S, } => { + Hash::hash(S, _state) + }, + AttributeValue::N{N, } => { + Hash::hash(N, _state) + }, + AttributeValue::B{B, } => { + Hash::hash(B, _state) + }, + AttributeValue::SS{SS, } => { + Hash::hash(SS, _state) + }, + AttributeValue::NS{NS, } => { + Hash::hash(NS, _state) + }, + AttributeValue::BS{BS, } => { + Hash::hash(BS, _state) + }, + AttributeValue::M{M, } => { + Hash::hash(M, _state) + }, + AttributeValue::L{L, } => { + Hash::hash(L, _state) + }, + AttributeValue::NULL{NULL, } => { + Hash::hash(NULL, _state) + }, + AttributeValue::BOOL{BOOL, } => { + Hash::hash(BOOL, _state) + }, + } + } + } + + impl Default + for AttributeValue { + fn default() -> AttributeValue { + AttributeValue::S { + S: Default::default() + } + } + } + + impl AsRef + for &AttributeValue { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AttributeValueUpdate { + AttributeValueUpdate { + Value: Rc>>, + Action: Rc>> + } + } + + impl AttributeValueUpdate { + pub fn Value(&self) -> &Rc>> { + match self { + AttributeValueUpdate::AttributeValueUpdate{Value, Action, } => Value, + } + } + pub fn Action(&self) -> &Rc>> { + match self { + AttributeValueUpdate::AttributeValueUpdate{Value, Action, } => Action, + } + } + } + + impl Debug + for AttributeValueUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AttributeValueUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AttributeValueUpdate::AttributeValueUpdate{Value, Action, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValueUpdate.AttributeValueUpdate(")?; + DafnyPrint::fmt_print(Value, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Action, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AttributeValueUpdate {} + + impl Hash + for AttributeValueUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AttributeValueUpdate::AttributeValueUpdate{Value, Action, } => { + Hash::hash(Value, _state); + Hash::hash(Action, _state) + }, + } + } + } + + impl Default + for AttributeValueUpdate { + fn default() -> AttributeValueUpdate { + AttributeValueUpdate::AttributeValueUpdate { + Value: Default::default(), + Action: Default::default() + } + } + } + + impl AsRef + for &AttributeValueUpdate { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AutoScalingPolicyDescription { + AutoScalingPolicyDescription { + PolicyName: Rc>>, + TargetTrackingScalingPolicyConfiguration: Rc>> + } + } + + impl AutoScalingPolicyDescription { + pub fn PolicyName(&self) -> &Rc>> { + match self { + AutoScalingPolicyDescription::AutoScalingPolicyDescription{PolicyName, TargetTrackingScalingPolicyConfiguration, } => PolicyName, + } + } + pub fn TargetTrackingScalingPolicyConfiguration(&self) -> &Rc>> { + match self { + AutoScalingPolicyDescription::AutoScalingPolicyDescription{PolicyName, TargetTrackingScalingPolicyConfiguration, } => TargetTrackingScalingPolicyConfiguration, + } + } + } + + impl Debug + for AutoScalingPolicyDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingPolicyDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingPolicyDescription::AutoScalingPolicyDescription{PolicyName, TargetTrackingScalingPolicyConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyDescription.AutoScalingPolicyDescription(")?; + DafnyPrint::fmt_print(PolicyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TargetTrackingScalingPolicyConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingPolicyDescription {} + + impl Hash + for AutoScalingPolicyDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingPolicyDescription::AutoScalingPolicyDescription{PolicyName, TargetTrackingScalingPolicyConfiguration, } => { + Hash::hash(PolicyName, _state); + Hash::hash(TargetTrackingScalingPolicyConfiguration, _state) + }, + } + } + } + + impl Default + for AutoScalingPolicyDescription { + fn default() -> AutoScalingPolicyDescription { + AutoScalingPolicyDescription::AutoScalingPolicyDescription { + PolicyName: Default::default(), + TargetTrackingScalingPolicyConfiguration: Default::default() + } + } + } + + impl AsRef + for &AutoScalingPolicyDescription { + fn as_ref(&self) -> Self { + self + } + } + + pub type AutoScalingPolicyName = Sequence; + + #[derive(PartialEq, Clone)] + pub enum AutoScalingPolicyUpdate { + AutoScalingPolicyUpdate { + PolicyName: Rc>>, + TargetTrackingScalingPolicyConfiguration: Rc + } + } + + impl AutoScalingPolicyUpdate { + pub fn PolicyName(&self) -> &Rc>> { + match self { + AutoScalingPolicyUpdate::AutoScalingPolicyUpdate{PolicyName, TargetTrackingScalingPolicyConfiguration, } => PolicyName, + } + } + pub fn TargetTrackingScalingPolicyConfiguration(&self) -> &Rc { + match self { + AutoScalingPolicyUpdate::AutoScalingPolicyUpdate{PolicyName, TargetTrackingScalingPolicyConfiguration, } => TargetTrackingScalingPolicyConfiguration, + } + } + } + + impl Debug + for AutoScalingPolicyUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingPolicyUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingPolicyUpdate::AutoScalingPolicyUpdate{PolicyName, TargetTrackingScalingPolicyConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyUpdate.AutoScalingPolicyUpdate(")?; + DafnyPrint::fmt_print(PolicyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TargetTrackingScalingPolicyConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingPolicyUpdate {} + + impl Hash + for AutoScalingPolicyUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingPolicyUpdate::AutoScalingPolicyUpdate{PolicyName, TargetTrackingScalingPolicyConfiguration, } => { + Hash::hash(PolicyName, _state); + Hash::hash(TargetTrackingScalingPolicyConfiguration, _state) + }, + } + } + } + + impl Default + for AutoScalingPolicyUpdate { + fn default() -> AutoScalingPolicyUpdate { + AutoScalingPolicyUpdate::AutoScalingPolicyUpdate { + PolicyName: Default::default(), + TargetTrackingScalingPolicyConfiguration: Default::default() + } + } + } + + impl AsRef + for &AutoScalingPolicyUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type AutoScalingRoleArn = Sequence; + + #[derive(PartialEq, Clone)] + pub enum AutoScalingSettingsDescription { + AutoScalingSettingsDescription { + MinimumUnits: Rc>, + MaximumUnits: Rc>, + AutoScalingDisabled: Rc>, + AutoScalingRoleArn: Rc>>, + ScalingPolicies: Rc>>> + } + } + + impl AutoScalingSettingsDescription { + pub fn MinimumUnits(&self) -> &Rc> { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => MinimumUnits, + } + } + pub fn MaximumUnits(&self) -> &Rc> { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => MaximumUnits, + } + } + pub fn AutoScalingDisabled(&self) -> &Rc> { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => AutoScalingDisabled, + } + } + pub fn AutoScalingRoleArn(&self) -> &Rc>> { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => AutoScalingRoleArn, + } + } + pub fn ScalingPolicies(&self) -> &Rc>>> { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => ScalingPolicies, + } + } + } + + impl Debug + for AutoScalingSettingsDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingSettingsDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsDescription.AutoScalingSettingsDescription(")?; + DafnyPrint::fmt_print(MinimumUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(MaximumUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AutoScalingDisabled, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AutoScalingRoleArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScalingPolicies, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingSettingsDescription {} + + impl Hash + for AutoScalingSettingsDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingSettingsDescription::AutoScalingSettingsDescription{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicies, } => { + Hash::hash(MinimumUnits, _state); + Hash::hash(MaximumUnits, _state); + Hash::hash(AutoScalingDisabled, _state); + Hash::hash(AutoScalingRoleArn, _state); + Hash::hash(ScalingPolicies, _state) + }, + } + } + } + + impl Default + for AutoScalingSettingsDescription { + fn default() -> AutoScalingSettingsDescription { + AutoScalingSettingsDescription::AutoScalingSettingsDescription { + MinimumUnits: Default::default(), + MaximumUnits: Default::default(), + AutoScalingDisabled: Default::default(), + AutoScalingRoleArn: Default::default(), + ScalingPolicies: Default::default() + } + } + } + + impl AsRef + for &AutoScalingSettingsDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AutoScalingSettingsUpdate { + AutoScalingSettingsUpdate { + MinimumUnits: Rc>, + MaximumUnits: Rc>, + AutoScalingDisabled: Rc>, + AutoScalingRoleArn: Rc>>, + ScalingPolicyUpdate: Rc>> + } + } + + impl AutoScalingSettingsUpdate { + pub fn MinimumUnits(&self) -> &Rc> { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => MinimumUnits, + } + } + pub fn MaximumUnits(&self) -> &Rc> { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => MaximumUnits, + } + } + pub fn AutoScalingDisabled(&self) -> &Rc> { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => AutoScalingDisabled, + } + } + pub fn AutoScalingRoleArn(&self) -> &Rc>> { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => AutoScalingRoleArn, + } + } + pub fn ScalingPolicyUpdate(&self) -> &Rc>> { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => ScalingPolicyUpdate, + } + } + } + + impl Debug + for AutoScalingSettingsUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingSettingsUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsUpdate.AutoScalingSettingsUpdate(")?; + DafnyPrint::fmt_print(MinimumUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(MaximumUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AutoScalingDisabled, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AutoScalingRoleArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScalingPolicyUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingSettingsUpdate {} + + impl Hash + for AutoScalingSettingsUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate{MinimumUnits, MaximumUnits, AutoScalingDisabled, AutoScalingRoleArn, ScalingPolicyUpdate, } => { + Hash::hash(MinimumUnits, _state); + Hash::hash(MaximumUnits, _state); + Hash::hash(AutoScalingDisabled, _state); + Hash::hash(AutoScalingRoleArn, _state); + Hash::hash(ScalingPolicyUpdate, _state) + }, + } + } + } + + impl Default + for AutoScalingSettingsUpdate { + fn default() -> AutoScalingSettingsUpdate { + AutoScalingSettingsUpdate::AutoScalingSettingsUpdate { + MinimumUnits: Default::default(), + MaximumUnits: Default::default(), + AutoScalingDisabled: Default::default(), + AutoScalingRoleArn: Default::default(), + ScalingPolicyUpdate: Default::default() + } + } + } + + impl AsRef + for &AutoScalingSettingsUpdate { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + DisableScaleIn: Rc>, + ScaleInCooldown: Rc>, + ScaleOutCooldown: Rc>, + TargetValue: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DoubleObject + } + } + + impl AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + pub fn DisableScaleIn(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => DisableScaleIn, + } + } + pub fn ScaleInCooldown(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => ScaleInCooldown, + } + } + pub fn ScaleOutCooldown(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => ScaleOutCooldown, + } + } + pub fn TargetValue(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DoubleObject { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => TargetValue, + } + } + } + + impl Debug + for AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationDescription.AutoScalingTargetTrackingScalingPolicyConfigurationDescription(")?; + DafnyPrint::fmt_print(DisableScaleIn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScaleInCooldown, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScaleOutCooldown, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TargetValue, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingTargetTrackingScalingPolicyConfigurationDescription {} + + impl Hash + for AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => { + Hash::hash(DisableScaleIn, _state); + Hash::hash(ScaleInCooldown, _state); + Hash::hash(ScaleOutCooldown, _state); + Hash::hash(TargetValue, _state) + }, + } + } + } + + impl Default + for AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn default() -> AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + AutoScalingTargetTrackingScalingPolicyConfigurationDescription::AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + DisableScaleIn: Default::default(), + ScaleInCooldown: Default::default(), + ScaleOutCooldown: Default::default(), + TargetValue: Default::default() + } + } + } + + impl AsRef + for &AutoScalingTargetTrackingScalingPolicyConfigurationDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + DisableScaleIn: Rc>, + ScaleInCooldown: Rc>, + ScaleOutCooldown: Rc>, + TargetValue: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DoubleObject + } + } + + impl AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + pub fn DisableScaleIn(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => DisableScaleIn, + } + } + pub fn ScaleInCooldown(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => ScaleInCooldown, + } + } + pub fn ScaleOutCooldown(&self) -> &Rc> { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => ScaleOutCooldown, + } + } + pub fn TargetValue(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DoubleObject { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => TargetValue, + } + } + } + + impl Debug + for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(")?; + DafnyPrint::fmt_print(DisableScaleIn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScaleInCooldown, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScaleOutCooldown, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TargetValue, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {} + + impl Hash + for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate{DisableScaleIn, ScaleInCooldown, ScaleOutCooldown, TargetValue, } => { + Hash::hash(DisableScaleIn, _state); + Hash::hash(ScaleInCooldown, _state); + Hash::hash(ScaleOutCooldown, _state); + Hash::hash(TargetValue, _state) + }, + } + } + } + + impl Default + for AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn default() -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + DisableScaleIn: Default::default(), + ScaleInCooldown: Default::default(), + ScaleOutCooldown: Default::default(), + TargetValue: Default::default() + } + } + } + + impl AsRef + for &AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type BackupArn = Sequence; + + #[derive(PartialEq, Clone)] + pub enum BackupDescription { + BackupDescription { + BackupDetails: Rc>>, + SourceTableDetails: Rc>>, + SourceTableFeatureDetails: Rc>> + } + } + + impl BackupDescription { + pub fn BackupDetails(&self) -> &Rc>> { + match self { + BackupDescription::BackupDescription{BackupDetails, SourceTableDetails, SourceTableFeatureDetails, } => BackupDetails, + } + } + pub fn SourceTableDetails(&self) -> &Rc>> { + match self { + BackupDescription::BackupDescription{BackupDetails, SourceTableDetails, SourceTableFeatureDetails, } => SourceTableDetails, + } + } + pub fn SourceTableFeatureDetails(&self) -> &Rc>> { + match self { + BackupDescription::BackupDescription{BackupDetails, SourceTableDetails, SourceTableFeatureDetails, } => SourceTableFeatureDetails, + } + } + } + + impl Debug + for BackupDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupDescription::BackupDescription{BackupDetails, SourceTableDetails, SourceTableFeatureDetails, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDescription.BackupDescription(")?; + DafnyPrint::fmt_print(BackupDetails, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SourceTableDetails, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SourceTableFeatureDetails, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BackupDescription {} + + impl Hash + for BackupDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupDescription::BackupDescription{BackupDetails, SourceTableDetails, SourceTableFeatureDetails, } => { + Hash::hash(BackupDetails, _state); + Hash::hash(SourceTableDetails, _state); + Hash::hash(SourceTableFeatureDetails, _state) + }, + } + } + } + + impl Default + for BackupDescription { + fn default() -> BackupDescription { + BackupDescription::BackupDescription { + BackupDetails: Default::default(), + SourceTableDetails: Default::default(), + SourceTableFeatureDetails: Default::default() + } + } + } + + impl AsRef + for &BackupDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BackupDetails { + BackupDetails { + BackupArn: Sequence, + BackupName: Sequence, + BackupSizeBytes: Rc>, + BackupStatus: Rc, + BackupType: Rc, + BackupCreationDateTime: Sequence, + BackupExpiryDateTime: Rc>> + } + } + + impl BackupDetails { + pub fn BackupArn(&self) -> &Sequence { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupArn, + } + } + pub fn BackupName(&self) -> &Sequence { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupName, + } + } + pub fn BackupSizeBytes(&self) -> &Rc> { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupSizeBytes, + } + } + pub fn BackupStatus(&self) -> &Rc { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupStatus, + } + } + pub fn BackupType(&self) -> &Rc { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupType, + } + } + pub fn BackupCreationDateTime(&self) -> &Sequence { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupCreationDateTime, + } + } + pub fn BackupExpiryDateTime(&self) -> &Rc>> { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => BackupExpiryDateTime, + } + } + } + + impl Debug + for BackupDetails { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupDetails { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDetails.BackupDetails(")?; + DafnyPrint::fmt_print(BackupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupSizeBytes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupCreationDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupExpiryDateTime, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BackupDetails {} + + impl Hash + for BackupDetails { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupDetails::BackupDetails{BackupArn, BackupName, BackupSizeBytes, BackupStatus, BackupType, BackupCreationDateTime, BackupExpiryDateTime, } => { + Hash::hash(BackupArn, _state); + Hash::hash(BackupName, _state); + Hash::hash(BackupSizeBytes, _state); + Hash::hash(BackupStatus, _state); + Hash::hash(BackupType, _state); + Hash::hash(BackupCreationDateTime, _state); + Hash::hash(BackupExpiryDateTime, _state) + }, + } + } + } + + impl Default + for BackupDetails { + fn default() -> BackupDetails { + BackupDetails::BackupDetails { + BackupArn: Default::default(), + BackupName: Default::default(), + BackupSizeBytes: Default::default(), + BackupStatus: Default::default(), + BackupType: Default::default(), + BackupCreationDateTime: Default::default(), + BackupExpiryDateTime: Default::default() + } + } + } + + impl AsRef + for &BackupDetails { + fn as_ref(&self) -> Self { + self + } + } + + pub type BackupName = Sequence; + + pub type BackupsInputLimit = i32; + + pub type BackupSizeBytes = i64; + + #[derive(PartialEq, Clone)] + pub enum BackupStatus { + CREATING {}, + DELETED {}, + AVAILABLE {} + } + + impl BackupStatus {} + + impl Debug + for BackupStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupStatus::CREATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupStatus.CREATING")?; + Ok(()) + }, + BackupStatus::DELETED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupStatus.DELETED")?; + Ok(()) + }, + BackupStatus::AVAILABLE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupStatus.AVAILABLE")?; + Ok(()) + }, + } + } + } + + impl BackupStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(BackupStatus::CREATING {}), Rc::new(BackupStatus::DELETED {}), Rc::new(BackupStatus::AVAILABLE {})].iter() + } + } + + impl Eq + for BackupStatus {} + + impl Hash + for BackupStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupStatus::CREATING{} => { + + }, + BackupStatus::DELETED{} => { + + }, + BackupStatus::AVAILABLE{} => { + + }, + } + } + } + + impl Default + for BackupStatus { + fn default() -> BackupStatus { + BackupStatus::CREATING {} + } + } + + impl AsRef + for &BackupStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BackupSummary { + BackupSummary { + TableName: Rc>>, + TableId: Rc>>, + TableArn: Rc>>, + BackupArn: Rc>>, + BackupName: Rc>>, + BackupCreationDateTime: Rc>>, + BackupExpiryDateTime: Rc>>, + BackupStatus: Rc>>, + BackupType: Rc>>, + BackupSizeBytes: Rc> + } + } + + impl BackupSummary { + pub fn TableName(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => TableName, + } + } + pub fn TableId(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => TableId, + } + } + pub fn TableArn(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => TableArn, + } + } + pub fn BackupArn(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupArn, + } + } + pub fn BackupName(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupName, + } + } + pub fn BackupCreationDateTime(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupCreationDateTime, + } + } + pub fn BackupExpiryDateTime(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupExpiryDateTime, + } + } + pub fn BackupStatus(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupStatus, + } + } + pub fn BackupType(&self) -> &Rc>> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupType, + } + } + pub fn BackupSizeBytes(&self) -> &Rc> { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => BackupSizeBytes, + } + } + } + + impl Debug + for BackupSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupSummary.BackupSummary(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupCreationDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupExpiryDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupSizeBytes, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BackupSummary {} + + impl Hash + for BackupSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupSummary::BackupSummary{TableName, TableId, TableArn, BackupArn, BackupName, BackupCreationDateTime, BackupExpiryDateTime, BackupStatus, BackupType, BackupSizeBytes, } => { + Hash::hash(TableName, _state); + Hash::hash(TableId, _state); + Hash::hash(TableArn, _state); + Hash::hash(BackupArn, _state); + Hash::hash(BackupName, _state); + Hash::hash(BackupCreationDateTime, _state); + Hash::hash(BackupExpiryDateTime, _state); + Hash::hash(BackupStatus, _state); + Hash::hash(BackupType, _state); + Hash::hash(BackupSizeBytes, _state) + }, + } + } + } + + impl Default + for BackupSummary { + fn default() -> BackupSummary { + BackupSummary::BackupSummary { + TableName: Default::default(), + TableId: Default::default(), + TableArn: Default::default(), + BackupArn: Default::default(), + BackupName: Default::default(), + BackupCreationDateTime: Default::default(), + BackupExpiryDateTime: Default::default(), + BackupStatus: Default::default(), + BackupType: Default::default(), + BackupSizeBytes: Default::default() + } + } + } + + impl AsRef + for &BackupSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BackupType { + USER {}, + SYSTEM {}, + AWS_BACKUP {} + } + + impl BackupType {} + + impl Debug + for BackupType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupType::USER{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupType.USER")?; + Ok(()) + }, + BackupType::SYSTEM{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupType.SYSTEM")?; + Ok(()) + }, + BackupType::AWS_BACKUP{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupType.AWS__BACKUP")?; + Ok(()) + }, + } + } + } + + impl BackupType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(BackupType::USER {}), Rc::new(BackupType::SYSTEM {}), Rc::new(BackupType::AWS_BACKUP {})].iter() + } + } + + impl Eq + for BackupType {} + + impl Hash + for BackupType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupType::USER{} => { + + }, + BackupType::SYSTEM{} => { + + }, + BackupType::AWS_BACKUP{} => { + + }, + } + } + } + + impl Default + for BackupType { + fn default() -> BackupType { + BackupType::USER {} + } + } + + impl AsRef + for &BackupType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BackupTypeFilter { + USER {}, + SYSTEM {}, + AWS_BACKUP {}, + ALL {} + } + + impl BackupTypeFilter {} + + impl Debug + for BackupTypeFilter { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BackupTypeFilter { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BackupTypeFilter::USER{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupTypeFilter.USER")?; + Ok(()) + }, + BackupTypeFilter::SYSTEM{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupTypeFilter.SYSTEM")?; + Ok(()) + }, + BackupTypeFilter::AWS_BACKUP{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupTypeFilter.AWS__BACKUP")?; + Ok(()) + }, + BackupTypeFilter::ALL{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupTypeFilter.ALL")?; + Ok(()) + }, + } + } + } + + impl BackupTypeFilter { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(BackupTypeFilter::USER {}), Rc::new(BackupTypeFilter::SYSTEM {}), Rc::new(BackupTypeFilter::AWS_BACKUP {}), Rc::new(BackupTypeFilter::ALL {})].iter() + } + } + + impl Eq + for BackupTypeFilter {} + + impl Hash + for BackupTypeFilter { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BackupTypeFilter::USER{} => { + + }, + BackupTypeFilter::SYSTEM{} => { + + }, + BackupTypeFilter::AWS_BACKUP{} => { + + }, + BackupTypeFilter::ALL{} => { + + }, + } + } + } + + impl Default + for BackupTypeFilter { + fn default() -> BackupTypeFilter { + BackupTypeFilter::USER {} + } + } + + impl AsRef + for &BackupTypeFilter { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchExecuteStatementInput { + BatchExecuteStatementInput { + Statements: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PartiQLBatchRequest, + ReturnConsumedCapacity: Rc>> + } + } + + impl BatchExecuteStatementInput { + pub fn Statements(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PartiQLBatchRequest { + match self { + BatchExecuteStatementInput::BatchExecuteStatementInput{Statements, ReturnConsumedCapacity, } => Statements, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + BatchExecuteStatementInput::BatchExecuteStatementInput{Statements, ReturnConsumedCapacity, } => ReturnConsumedCapacity, + } + } + } + + impl Debug + for BatchExecuteStatementInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementInput::BatchExecuteStatementInput{Statements, ReturnConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementInput.BatchExecuteStatementInput(")?; + DafnyPrint::fmt_print(Statements, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementInput {} + + impl Hash + for BatchExecuteStatementInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementInput::BatchExecuteStatementInput{Statements, ReturnConsumedCapacity, } => { + Hash::hash(Statements, _state); + Hash::hash(ReturnConsumedCapacity, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementInput { + fn default() -> BatchExecuteStatementInput { + BatchExecuteStatementInput::BatchExecuteStatementInput { + Statements: Default::default(), + ReturnConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &BatchExecuteStatementInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchExecuteStatementOutput { + BatchExecuteStatementOutput { + Responses: Rc>>>, + ConsumedCapacity: Rc>>> + } + } + + impl BatchExecuteStatementOutput { + pub fn Responses(&self) -> &Rc>>> { + match self { + BatchExecuteStatementOutput::BatchExecuteStatementOutput{Responses, ConsumedCapacity, } => Responses, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>>> { + match self { + BatchExecuteStatementOutput::BatchExecuteStatementOutput{Responses, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for BatchExecuteStatementOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementOutput::BatchExecuteStatementOutput{Responses, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementOutput.BatchExecuteStatementOutput(")?; + DafnyPrint::fmt_print(Responses, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementOutput {} + + impl Hash + for BatchExecuteStatementOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementOutput::BatchExecuteStatementOutput{Responses, ConsumedCapacity, } => { + Hash::hash(Responses, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementOutput { + fn default() -> BatchExecuteStatementOutput { + BatchExecuteStatementOutput::BatchExecuteStatementOutput { + Responses: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &BatchExecuteStatementOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemInput { + BatchGetItemInput { + RequestItems: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetRequestMap, + ReturnConsumedCapacity: Rc>> + } + } + + impl BatchGetItemInput { + pub fn RequestItems(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetRequestMap { + match self { + BatchGetItemInput::BatchGetItemInput{RequestItems, ReturnConsumedCapacity, } => RequestItems, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + BatchGetItemInput::BatchGetItemInput{RequestItems, ReturnConsumedCapacity, } => ReturnConsumedCapacity, + } + } + } + + impl Debug + for BatchGetItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemInput::BatchGetItemInput{RequestItems, ReturnConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemInput.BatchGetItemInput(")?; + DafnyPrint::fmt_print(RequestItems, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemInput {} + + impl Hash + for BatchGetItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemInput::BatchGetItemInput{RequestItems, ReturnConsumedCapacity, } => { + Hash::hash(RequestItems, _state); + Hash::hash(ReturnConsumedCapacity, _state) + }, + } + } + } + + impl Default + for BatchGetItemInput { + fn default() -> BatchGetItemInput { + BatchGetItemInput::BatchGetItemInput { + RequestItems: Default::default(), + ReturnConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &BatchGetItemInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemOutput { + BatchGetItemOutput { + Responses: Rc, Sequence, Rc>>>>>, + UnprocessedKeys: Rc>, + ConsumedCapacity: Rc>>> + } + } + + impl BatchGetItemOutput { + pub fn Responses(&self) -> &Rc, Sequence, Rc>>>>> { + match self { + BatchGetItemOutput::BatchGetItemOutput{Responses, UnprocessedKeys, ConsumedCapacity, } => Responses, + } + } + pub fn UnprocessedKeys(&self) -> &Rc> { + match self { + BatchGetItemOutput::BatchGetItemOutput{Responses, UnprocessedKeys, ConsumedCapacity, } => UnprocessedKeys, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>>> { + match self { + BatchGetItemOutput::BatchGetItemOutput{Responses, UnprocessedKeys, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for BatchGetItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemOutput::BatchGetItemOutput{Responses, UnprocessedKeys, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemOutput.BatchGetItemOutput(")?; + DafnyPrint::fmt_print(Responses, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(UnprocessedKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemOutput {} + + impl Hash + for BatchGetItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemOutput::BatchGetItemOutput{Responses, UnprocessedKeys, ConsumedCapacity, } => { + Hash::hash(Responses, _state); + Hash::hash(UnprocessedKeys, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for BatchGetItemOutput { + fn default() -> BatchGetItemOutput { + BatchGetItemOutput::BatchGetItemOutput { + Responses: Default::default(), + UnprocessedKeys: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &BatchGetItemOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type BatchGetRequestMap = Map, Rc>; + + #[derive(PartialEq, Clone)] + pub enum BatchStatementError { + BatchStatementError { + Code: Rc>>, + Message: Rc>> + } + } + + impl BatchStatementError { + pub fn Code(&self) -> &Rc>> { + match self { + BatchStatementError::BatchStatementError{Code, Message, } => Code, + } + } + pub fn Message(&self) -> &Rc>> { + match self { + BatchStatementError::BatchStatementError{Code, Message, } => Message, + } + } + } + + impl Debug + for BatchStatementError { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchStatementError { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchStatementError::BatchStatementError{Code, Message, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementError.BatchStatementError(")?; + DafnyPrint::fmt_print(Code, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchStatementError {} + + impl Hash + for BatchStatementError { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchStatementError::BatchStatementError{Code, Message, } => { + Hash::hash(Code, _state); + Hash::hash(Message, _state) + }, + } + } + } + + impl Default + for BatchStatementError { + fn default() -> BatchStatementError { + BatchStatementError::BatchStatementError { + Code: Default::default(), + Message: Default::default() + } + } + } + + impl AsRef + for &BatchStatementError { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchStatementErrorCodeEnum { + ConditionalCheckFailed {}, + ItemCollectionSizeLimitExceeded {}, + RequestLimitExceeded {}, + ValidationError {}, + ProvisionedThroughputExceeded {}, + TransactionConflict {}, + ThrottlingError {}, + InternalServerError {}, + ResourceNotFound {}, + AccessDenied {}, + DuplicateItem {} + } + + impl BatchStatementErrorCodeEnum {} + + impl Debug + for BatchStatementErrorCodeEnum { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchStatementErrorCodeEnum { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchStatementErrorCodeEnum::ConditionalCheckFailed{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ConditionalCheckFailed")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ItemCollectionSizeLimitExceeded")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::RequestLimitExceeded{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.RequestLimitExceeded")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::ValidationError{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ValidationError")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ProvisionedThroughputExceeded")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::TransactionConflict{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.TransactionConflict")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::ThrottlingError{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ThrottlingError")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::InternalServerError{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.InternalServerError")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::ResourceNotFound{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.ResourceNotFound")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::AccessDenied{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.AccessDenied")?; + Ok(()) + }, + BatchStatementErrorCodeEnum::DuplicateItem{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementErrorCodeEnum.DuplicateItem")?; + Ok(()) + }, + } + } + } + + impl BatchStatementErrorCodeEnum { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(BatchStatementErrorCodeEnum::ConditionalCheckFailed {}), Rc::new(BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded {}), Rc::new(BatchStatementErrorCodeEnum::RequestLimitExceeded {}), Rc::new(BatchStatementErrorCodeEnum::ValidationError {}), Rc::new(BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded {}), Rc::new(BatchStatementErrorCodeEnum::TransactionConflict {}), Rc::new(BatchStatementErrorCodeEnum::ThrottlingError {}), Rc::new(BatchStatementErrorCodeEnum::InternalServerError {}), Rc::new(BatchStatementErrorCodeEnum::ResourceNotFound {}), Rc::new(BatchStatementErrorCodeEnum::AccessDenied {}), Rc::new(BatchStatementErrorCodeEnum::DuplicateItem {})].iter() + } + } + + impl Eq + for BatchStatementErrorCodeEnum {} + + impl Hash + for BatchStatementErrorCodeEnum { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchStatementErrorCodeEnum::ConditionalCheckFailed{} => { + + }, + BatchStatementErrorCodeEnum::ItemCollectionSizeLimitExceeded{} => { + + }, + BatchStatementErrorCodeEnum::RequestLimitExceeded{} => { + + }, + BatchStatementErrorCodeEnum::ValidationError{} => { + + }, + BatchStatementErrorCodeEnum::ProvisionedThroughputExceeded{} => { + + }, + BatchStatementErrorCodeEnum::TransactionConflict{} => { + + }, + BatchStatementErrorCodeEnum::ThrottlingError{} => { + + }, + BatchStatementErrorCodeEnum::InternalServerError{} => { + + }, + BatchStatementErrorCodeEnum::ResourceNotFound{} => { + + }, + BatchStatementErrorCodeEnum::AccessDenied{} => { + + }, + BatchStatementErrorCodeEnum::DuplicateItem{} => { + + }, + } + } + } + + impl Default + for BatchStatementErrorCodeEnum { + fn default() -> BatchStatementErrorCodeEnum { + BatchStatementErrorCodeEnum::ConditionalCheckFailed {} + } + } + + impl AsRef + for &BatchStatementErrorCodeEnum { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchStatementRequest { + BatchStatementRequest { + Statement: Sequence, + Parameters: Rc>, + ConsistentRead: Rc> + } + } + + impl BatchStatementRequest { + pub fn Statement(&self) -> &Sequence { + match self { + BatchStatementRequest::BatchStatementRequest{Statement, Parameters, ConsistentRead, } => Statement, + } + } + pub fn Parameters(&self) -> &Rc> { + match self { + BatchStatementRequest::BatchStatementRequest{Statement, Parameters, ConsistentRead, } => Parameters, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + BatchStatementRequest::BatchStatementRequest{Statement, Parameters, ConsistentRead, } => ConsistentRead, + } + } + } + + impl Debug + for BatchStatementRequest { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchStatementRequest { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchStatementRequest::BatchStatementRequest{Statement, Parameters, ConsistentRead, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementRequest.BatchStatementRequest(")?; + DafnyPrint::fmt_print(Statement, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Parameters, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchStatementRequest {} + + impl Hash + for BatchStatementRequest { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchStatementRequest::BatchStatementRequest{Statement, Parameters, ConsistentRead, } => { + Hash::hash(Statement, _state); + Hash::hash(Parameters, _state); + Hash::hash(ConsistentRead, _state) + }, + } + } + } + + impl Default + for BatchStatementRequest { + fn default() -> BatchStatementRequest { + BatchStatementRequest::BatchStatementRequest { + Statement: Default::default(), + Parameters: Default::default(), + ConsistentRead: Default::default() + } + } + } + + impl AsRef + for &BatchStatementRequest { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchStatementResponse { + BatchStatementResponse { + Error: Rc>>, + TableName: Rc>>, + Item: Rc, Rc>>> + } + } + + impl BatchStatementResponse { + pub fn Error(&self) -> &Rc>> { + match self { + BatchStatementResponse::BatchStatementResponse{Error, TableName, Item, } => Error, + } + } + pub fn TableName(&self) -> &Rc>> { + match self { + BatchStatementResponse::BatchStatementResponse{Error, TableName, Item, } => TableName, + } + } + pub fn Item(&self) -> &Rc, Rc>>> { + match self { + BatchStatementResponse::BatchStatementResponse{Error, TableName, Item, } => Item, + } + } + } + + impl Debug + for BatchStatementResponse { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchStatementResponse { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchStatementResponse::BatchStatementResponse{Error, TableName, Item, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementResponse.BatchStatementResponse(")?; + DafnyPrint::fmt_print(Error, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchStatementResponse {} + + impl Hash + for BatchStatementResponse { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchStatementResponse::BatchStatementResponse{Error, TableName, Item, } => { + Hash::hash(Error, _state); + Hash::hash(TableName, _state); + Hash::hash(Item, _state) + }, + } + } + } + + impl Default + for BatchStatementResponse { + fn default() -> BatchStatementResponse { + BatchStatementResponse::BatchStatementResponse { + Error: Default::default(), + TableName: Default::default(), + Item: Default::default() + } + } + } + + impl AsRef + for &BatchStatementResponse { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemInput { + BatchWriteItemInput { + RequestItems: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemRequestMap, + ReturnConsumedCapacity: Rc>>, + ReturnItemCollectionMetrics: Rc>> + } + } + + impl BatchWriteItemInput { + pub fn RequestItems(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemRequestMap { + match self { + BatchWriteItemInput::BatchWriteItemInput{RequestItems, ReturnConsumedCapacity, ReturnItemCollectionMetrics, } => RequestItems, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + BatchWriteItemInput::BatchWriteItemInput{RequestItems, ReturnConsumedCapacity, ReturnItemCollectionMetrics, } => ReturnConsumedCapacity, + } + } + pub fn ReturnItemCollectionMetrics(&self) -> &Rc>> { + match self { + BatchWriteItemInput::BatchWriteItemInput{RequestItems, ReturnConsumedCapacity, ReturnItemCollectionMetrics, } => ReturnItemCollectionMetrics, + } + } + } + + impl Debug + for BatchWriteItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemInput::BatchWriteItemInput{RequestItems, ReturnConsumedCapacity, ReturnItemCollectionMetrics, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemInput.BatchWriteItemInput(")?; + DafnyPrint::fmt_print(RequestItems, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemInput {} + + impl Hash + for BatchWriteItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemInput::BatchWriteItemInput{RequestItems, ReturnConsumedCapacity, ReturnItemCollectionMetrics, } => { + Hash::hash(RequestItems, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(ReturnItemCollectionMetrics, _state) + }, + } + } + } + + impl Default + for BatchWriteItemInput { + fn default() -> BatchWriteItemInput { + BatchWriteItemInput::BatchWriteItemInput { + RequestItems: Default::default(), + ReturnConsumedCapacity: Default::default(), + ReturnItemCollectionMetrics: Default::default() + } + } + } + + impl AsRef + for &BatchWriteItemInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemOutput { + BatchWriteItemOutput { + UnprocessedItems: Rc>, + ItemCollectionMetrics: Rc, Sequence>>>>, + ConsumedCapacity: Rc>>> + } + } + + impl BatchWriteItemOutput { + pub fn UnprocessedItems(&self) -> &Rc> { + match self { + BatchWriteItemOutput::BatchWriteItemOutput{UnprocessedItems, ItemCollectionMetrics, ConsumedCapacity, } => UnprocessedItems, + } + } + pub fn ItemCollectionMetrics(&self) -> &Rc, Sequence>>>> { + match self { + BatchWriteItemOutput::BatchWriteItemOutput{UnprocessedItems, ItemCollectionMetrics, ConsumedCapacity, } => ItemCollectionMetrics, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>>> { + match self { + BatchWriteItemOutput::BatchWriteItemOutput{UnprocessedItems, ItemCollectionMetrics, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for BatchWriteItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemOutput::BatchWriteItemOutput{UnprocessedItems, ItemCollectionMetrics, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemOutput.BatchWriteItemOutput(")?; + DafnyPrint::fmt_print(UnprocessedItems, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemOutput {} + + impl Hash + for BatchWriteItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemOutput::BatchWriteItemOutput{UnprocessedItems, ItemCollectionMetrics, ConsumedCapacity, } => { + Hash::hash(UnprocessedItems, _state); + Hash::hash(ItemCollectionMetrics, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for BatchWriteItemOutput { + fn default() -> BatchWriteItemOutput { + BatchWriteItemOutput::BatchWriteItemOutput { + UnprocessedItems: Default::default(), + ItemCollectionMetrics: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &BatchWriteItemOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type BatchWriteItemRequestMap = Map, crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::WriteRequests>; + + pub type BilledSizeBytes = i64; + + #[derive(PartialEq, Clone)] + pub enum BillingMode { + PROVISIONED {}, + PAY_PER_REQUEST {} + } + + impl BillingMode {} + + impl Debug + for BillingMode { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BillingMode { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BillingMode::PROVISIONED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BillingMode.PROVISIONED")?; + Ok(()) + }, + BillingMode::PAY_PER_REQUEST{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BillingMode.PAY__PER__REQUEST")?; + Ok(()) + }, + } + } + } + + impl BillingMode { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(BillingMode::PROVISIONED {}), Rc::new(BillingMode::PAY_PER_REQUEST {})].iter() + } + } + + impl Eq + for BillingMode {} + + impl Hash + for BillingMode { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BillingMode::PROVISIONED{} => { + + }, + BillingMode::PAY_PER_REQUEST{} => { + + }, + } + } + } + + impl Default + for BillingMode { + fn default() -> BillingMode { + BillingMode::PROVISIONED {} + } + } + + impl AsRef + for &BillingMode { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BillingModeSummary { + BillingModeSummary { + BillingMode: Rc>>, + LastUpdateToPayPerRequestDateTime: Rc>> + } + } + + impl BillingModeSummary { + pub fn BillingMode(&self) -> &Rc>> { + match self { + BillingModeSummary::BillingModeSummary{BillingMode, LastUpdateToPayPerRequestDateTime, } => BillingMode, + } + } + pub fn LastUpdateToPayPerRequestDateTime(&self) -> &Rc>> { + match self { + BillingModeSummary::BillingModeSummary{BillingMode, LastUpdateToPayPerRequestDateTime, } => LastUpdateToPayPerRequestDateTime, + } + } + } + + impl Debug + for BillingModeSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BillingModeSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BillingModeSummary::BillingModeSummary{BillingMode, LastUpdateToPayPerRequestDateTime, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.BillingModeSummary.BillingModeSummary(")?; + DafnyPrint::fmt_print(BillingMode, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastUpdateToPayPerRequestDateTime, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BillingModeSummary {} + + impl Hash + for BillingModeSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BillingModeSummary::BillingModeSummary{BillingMode, LastUpdateToPayPerRequestDateTime, } => { + Hash::hash(BillingMode, _state); + Hash::hash(LastUpdateToPayPerRequestDateTime, _state) + }, + } + } + } + + impl Default + for BillingModeSummary { + fn default() -> BillingModeSummary { + BillingModeSummary::BillingModeSummary { + BillingMode: Default::default(), + LastUpdateToPayPerRequestDateTime: Default::default() + } + } + } + + impl AsRef + for &BillingModeSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CancellationReason { + CancellationReason { + Item: Rc, Rc>>>, + Code: Rc>>, + Message: Rc>> + } + } + + impl CancellationReason { + pub fn Item(&self) -> &Rc, Rc>>> { + match self { + CancellationReason::CancellationReason{Item, Code, Message, } => Item, + } + } + pub fn Code(&self) -> &Rc>> { + match self { + CancellationReason::CancellationReason{Item, Code, Message, } => Code, + } + } + pub fn Message(&self) -> &Rc>> { + match self { + CancellationReason::CancellationReason{Item, Code, Message, } => Message, + } + } + } + + impl Debug + for CancellationReason { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CancellationReason { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CancellationReason::CancellationReason{Item, Code, Message, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CancellationReason.CancellationReason(")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Code, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CancellationReason {} + + impl Hash + for CancellationReason { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CancellationReason::CancellationReason{Item, Code, Message, } => { + Hash::hash(Item, _state); + Hash::hash(Code, _state); + Hash::hash(Message, _state) + }, + } + } + } + + impl Default + for CancellationReason { + fn default() -> CancellationReason { + CancellationReason::CancellationReason { + Item: Default::default(), + Code: Default::default(), + Message: Default::default() + } + } + } + + impl AsRef + for &CancellationReason { + fn as_ref(&self) -> Self { + self + } + } + + pub type CancellationReasonList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum Capacity { + Capacity { + ReadCapacityUnits: Rc>, + WriteCapacityUnits: Rc>, + CapacityUnits: Rc> + } + } + + impl Capacity { + pub fn ReadCapacityUnits(&self) -> &Rc> { + match self { + Capacity::Capacity{ReadCapacityUnits, WriteCapacityUnits, CapacityUnits, } => ReadCapacityUnits, + } + } + pub fn WriteCapacityUnits(&self) -> &Rc> { + match self { + Capacity::Capacity{ReadCapacityUnits, WriteCapacityUnits, CapacityUnits, } => WriteCapacityUnits, + } + } + pub fn CapacityUnits(&self) -> &Rc> { + match self { + Capacity::Capacity{ReadCapacityUnits, WriteCapacityUnits, CapacityUnits, } => CapacityUnits, + } + } + } + + impl Debug + for Capacity { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Capacity { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Capacity::Capacity{ReadCapacityUnits, WriteCapacityUnits, CapacityUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Capacity.Capacity(")?; + DafnyPrint::fmt_print(ReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(WriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CapacityUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Capacity {} + + impl Hash + for Capacity { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Capacity::Capacity{ReadCapacityUnits, WriteCapacityUnits, CapacityUnits, } => { + Hash::hash(ReadCapacityUnits, _state); + Hash::hash(WriteCapacityUnits, _state); + Hash::hash(CapacityUnits, _state) + }, + } + } + } + + impl Default + for Capacity { + fn default() -> Capacity { + Capacity::Capacity { + ReadCapacityUnits: Default::default(), + WriteCapacityUnits: Default::default(), + CapacityUnits: Default::default() + } + } + } + + impl AsRef + for &Capacity { + fn as_ref(&self) -> Self { + self + } + } + + pub type ClientRequestToken = Sequence; + + pub type CloudWatchLogGroupArn = Sequence; + + #[derive(PartialEq, Clone)] + pub enum ComparisonOperator { + EQ {}, + NE {}, + IN {}, + LE {}, + LT {}, + GE {}, + GT {}, + BETWEEN {}, + NOT_NULL {}, + NULL {}, + CONTAINS {}, + NOT_CONTAINS {}, + BEGINS_WITH {} + } + + impl ComparisonOperator {} + + impl Debug + for ComparisonOperator { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ComparisonOperator { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ComparisonOperator::EQ{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.EQ")?; + Ok(()) + }, + ComparisonOperator::NE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.NE")?; + Ok(()) + }, + ComparisonOperator::IN{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.IN")?; + Ok(()) + }, + ComparisonOperator::LE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.LE")?; + Ok(()) + }, + ComparisonOperator::LT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.LT")?; + Ok(()) + }, + ComparisonOperator::GE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.GE")?; + Ok(()) + }, + ComparisonOperator::GT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.GT")?; + Ok(()) + }, + ComparisonOperator::BETWEEN{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.BETWEEN")?; + Ok(()) + }, + ComparisonOperator::NOT_NULL{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.NOT__NULL")?; + Ok(()) + }, + ComparisonOperator::NULL{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.NULL")?; + Ok(()) + }, + ComparisonOperator::CONTAINS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.CONTAINS")?; + Ok(()) + }, + ComparisonOperator::NOT_CONTAINS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.NOT__CONTAINS")?; + Ok(()) + }, + ComparisonOperator::BEGINS_WITH{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ComparisonOperator.BEGINS__WITH")?; + Ok(()) + }, + } + } + } + + impl ComparisonOperator { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ComparisonOperator::EQ {}), Rc::new(ComparisonOperator::NE {}), Rc::new(ComparisonOperator::IN {}), Rc::new(ComparisonOperator::LE {}), Rc::new(ComparisonOperator::LT {}), Rc::new(ComparisonOperator::GE {}), Rc::new(ComparisonOperator::GT {}), Rc::new(ComparisonOperator::BETWEEN {}), Rc::new(ComparisonOperator::NOT_NULL {}), Rc::new(ComparisonOperator::NULL {}), Rc::new(ComparisonOperator::CONTAINS {}), Rc::new(ComparisonOperator::NOT_CONTAINS {}), Rc::new(ComparisonOperator::BEGINS_WITH {})].iter() + } + } + + impl Eq + for ComparisonOperator {} + + impl Hash + for ComparisonOperator { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ComparisonOperator::EQ{} => { + + }, + ComparisonOperator::NE{} => { + + }, + ComparisonOperator::IN{} => { + + }, + ComparisonOperator::LE{} => { + + }, + ComparisonOperator::LT{} => { + + }, + ComparisonOperator::GE{} => { + + }, + ComparisonOperator::GT{} => { + + }, + ComparisonOperator::BETWEEN{} => { + + }, + ComparisonOperator::NOT_NULL{} => { + + }, + ComparisonOperator::NULL{} => { + + }, + ComparisonOperator::CONTAINS{} => { + + }, + ComparisonOperator::NOT_CONTAINS{} => { + + }, + ComparisonOperator::BEGINS_WITH{} => { + + }, + } + } + } + + impl Default + for ComparisonOperator { + fn default() -> ComparisonOperator { + ComparisonOperator::EQ {} + } + } + + impl AsRef + for &ComparisonOperator { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Condition { + Condition { + AttributeValueList: Rc>>>, + ComparisonOperator: Rc + } + } + + impl Condition { + pub fn AttributeValueList(&self) -> &Rc>>> { + match self { + Condition::Condition{AttributeValueList, ComparisonOperator, } => AttributeValueList, + } + } + pub fn ComparisonOperator(&self) -> &Rc { + match self { + Condition::Condition{AttributeValueList, ComparisonOperator, } => ComparisonOperator, + } + } + } + + impl Debug + for Condition { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Condition { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Condition::Condition{AttributeValueList, ComparisonOperator, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Condition.Condition(")?; + DafnyPrint::fmt_print(AttributeValueList, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ComparisonOperator, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Condition {} + + impl Hash + for Condition { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Condition::Condition{AttributeValueList, ComparisonOperator, } => { + Hash::hash(AttributeValueList, _state); + Hash::hash(ComparisonOperator, _state) + }, + } + } + } + + impl Default + for Condition { + fn default() -> Condition { + Condition::Condition { + AttributeValueList: Default::default(), + ComparisonOperator: Default::default() + } + } + } + + impl AsRef + for &Condition { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ConditionalOperator { + AND {}, + OR {} + } + + impl ConditionalOperator {} + + impl Debug + for ConditionalOperator { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ConditionalOperator { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ConditionalOperator::AND{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionalOperator.AND")?; + Ok(()) + }, + ConditionalOperator::OR{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionalOperator.OR")?; + Ok(()) + }, + } + } + } + + impl ConditionalOperator { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ConditionalOperator::AND {}), Rc::new(ConditionalOperator::OR {})].iter() + } + } + + impl Eq + for ConditionalOperator {} + + impl Hash + for ConditionalOperator { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ConditionalOperator::AND{} => { + + }, + ConditionalOperator::OR{} => { + + }, + } + } + } + + impl Default + for ConditionalOperator { + fn default() -> ConditionalOperator { + ConditionalOperator::AND {} + } + } + + impl AsRef + for &ConditionalOperator { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ConditionCheck { + ConditionCheck { + Key: Map, Rc>, + TableName: Sequence, + ConditionExpression: Sequence, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>>, + ReturnValuesOnConditionCheckFailure: Rc>> + } + } + + impl ConditionCheck { + pub fn Key(&self) -> &Map, Rc> { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => Key, + } + } + pub fn TableName(&self) -> &Sequence { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => TableName, + } + } + pub fn ConditionExpression(&self) -> &Sequence { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeValues, + } + } + pub fn ReturnValuesOnConditionCheckFailure(&self) -> &Rc>> { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ReturnValuesOnConditionCheckFailure, + } + } + } + + impl Debug + for ConditionCheck { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ConditionCheck { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionCheck.ConditionCheck(")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnValuesOnConditionCheckFailure, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ConditionCheck {} + + impl Hash + for ConditionCheck { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ConditionCheck::ConditionCheck{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + Hash::hash(Key, _state); + Hash::hash(TableName, _state); + Hash::hash(ConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state); + Hash::hash(ReturnValuesOnConditionCheckFailure, _state) + }, + } + } + } + + impl Default + for ConditionCheck { + fn default() -> ConditionCheck { + ConditionCheck::ConditionCheck { + Key: Default::default(), + TableName: Default::default(), + ConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default(), + ReturnValuesOnConditionCheckFailure: Default::default() + } + } + } + + impl AsRef + for &ConditionCheck { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ConsumedCapacity { + ConsumedCapacity { + TableName: Rc>>, + CapacityUnits: Rc>, + ReadCapacityUnits: Rc>, + WriteCapacityUnits: Rc>, + Table: Rc>>, + LocalSecondaryIndexes: Rc, Rc>>>, + GlobalSecondaryIndexes: Rc, Rc>>> + } + } + + impl ConsumedCapacity { + pub fn TableName(&self) -> &Rc>> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => TableName, + } + } + pub fn CapacityUnits(&self) -> &Rc> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => CapacityUnits, + } + } + pub fn ReadCapacityUnits(&self) -> &Rc> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => ReadCapacityUnits, + } + } + pub fn WriteCapacityUnits(&self) -> &Rc> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => WriteCapacityUnits, + } + } + pub fn Table(&self) -> &Rc>> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => Table, + } + } + pub fn LocalSecondaryIndexes(&self) -> &Rc, Rc>>> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => LocalSecondaryIndexes, + } + } + pub fn GlobalSecondaryIndexes(&self) -> &Rc, Rc>>> { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => GlobalSecondaryIndexes, + } + } + } + + impl Debug + for ConsumedCapacity { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ConsumedCapacity { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ConsumedCapacity.ConsumedCapacity(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(WriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Table, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LocalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ConsumedCapacity {} + + impl Hash + for ConsumedCapacity { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ConsumedCapacity::ConsumedCapacity{TableName, CapacityUnits, ReadCapacityUnits, WriteCapacityUnits, Table, LocalSecondaryIndexes, GlobalSecondaryIndexes, } => { + Hash::hash(TableName, _state); + Hash::hash(CapacityUnits, _state); + Hash::hash(ReadCapacityUnits, _state); + Hash::hash(WriteCapacityUnits, _state); + Hash::hash(Table, _state); + Hash::hash(LocalSecondaryIndexes, _state); + Hash::hash(GlobalSecondaryIndexes, _state) + }, + } + } + } + + impl Default + for ConsumedCapacity { + fn default() -> ConsumedCapacity { + ConsumedCapacity::ConsumedCapacity { + TableName: Default::default(), + CapacityUnits: Default::default(), + ReadCapacityUnits: Default::default(), + WriteCapacityUnits: Default::default(), + Table: Default::default(), + LocalSecondaryIndexes: Default::default(), + GlobalSecondaryIndexes: Default::default() + } + } + } + + impl AsRef + for &ConsumedCapacity { + fn as_ref(&self) -> Self { + self + } + } + + pub type ConsumedCapacityUnits = Sequence; + + #[derive(PartialEq, Clone)] + pub enum ContinuousBackupsDescription { + ContinuousBackupsDescription { + ContinuousBackupsStatus: Rc, + PointInTimeRecoveryDescription: Rc>> + } + } + + impl ContinuousBackupsDescription { + pub fn ContinuousBackupsStatus(&self) -> &Rc { + match self { + ContinuousBackupsDescription::ContinuousBackupsDescription{ContinuousBackupsStatus, PointInTimeRecoveryDescription, } => ContinuousBackupsStatus, + } + } + pub fn PointInTimeRecoveryDescription(&self) -> &Rc>> { + match self { + ContinuousBackupsDescription::ContinuousBackupsDescription{ContinuousBackupsStatus, PointInTimeRecoveryDescription, } => PointInTimeRecoveryDescription, + } + } + } + + impl Debug + for ContinuousBackupsDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ContinuousBackupsDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ContinuousBackupsDescription::ContinuousBackupsDescription{ContinuousBackupsStatus, PointInTimeRecoveryDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsDescription.ContinuousBackupsDescription(")?; + DafnyPrint::fmt_print(ContinuousBackupsStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(PointInTimeRecoveryDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ContinuousBackupsDescription {} + + impl Hash + for ContinuousBackupsDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ContinuousBackupsDescription::ContinuousBackupsDescription{ContinuousBackupsStatus, PointInTimeRecoveryDescription, } => { + Hash::hash(ContinuousBackupsStatus, _state); + Hash::hash(PointInTimeRecoveryDescription, _state) + }, + } + } + } + + impl Default + for ContinuousBackupsDescription { + fn default() -> ContinuousBackupsDescription { + ContinuousBackupsDescription::ContinuousBackupsDescription { + ContinuousBackupsStatus: Default::default(), + PointInTimeRecoveryDescription: Default::default() + } + } + } + + impl AsRef + for &ContinuousBackupsDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ContinuousBackupsStatus { + ENABLED {}, + DISABLED {} + } + + impl ContinuousBackupsStatus {} + + impl Debug + for ContinuousBackupsStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ContinuousBackupsStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ContinuousBackupsStatus::ENABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsStatus.ENABLED")?; + Ok(()) + }, + ContinuousBackupsStatus::DISABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsStatus.DISABLED")?; + Ok(()) + }, + } + } + } + + impl ContinuousBackupsStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ContinuousBackupsStatus::ENABLED {}), Rc::new(ContinuousBackupsStatus::DISABLED {})].iter() + } + } + + impl Eq + for ContinuousBackupsStatus {} + + impl Hash + for ContinuousBackupsStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ContinuousBackupsStatus::ENABLED{} => { + + }, + ContinuousBackupsStatus::DISABLED{} => { + + }, + } + } + } + + impl Default + for ContinuousBackupsStatus { + fn default() -> ContinuousBackupsStatus { + ContinuousBackupsStatus::ENABLED {} + } + } + + impl AsRef + for &ContinuousBackupsStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ContributorInsightsAction { + ENABLE {}, + DISABLE {} + } + + impl ContributorInsightsAction {} + + impl Debug + for ContributorInsightsAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ContributorInsightsAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ContributorInsightsAction::ENABLE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsAction.ENABLE")?; + Ok(()) + }, + ContributorInsightsAction::DISABLE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsAction.DISABLE")?; + Ok(()) + }, + } + } + } + + impl ContributorInsightsAction { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ContributorInsightsAction::ENABLE {}), Rc::new(ContributorInsightsAction::DISABLE {})].iter() + } + } + + impl Eq + for ContributorInsightsAction {} + + impl Hash + for ContributorInsightsAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ContributorInsightsAction::ENABLE{} => { + + }, + ContributorInsightsAction::DISABLE{} => { + + }, + } + } + } + + impl Default + for ContributorInsightsAction { + fn default() -> ContributorInsightsAction { + ContributorInsightsAction::ENABLE {} + } + } + + impl AsRef + for &ContributorInsightsAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ContributorInsightsStatus { + ENABLING {}, + ENABLED {}, + DISABLING {}, + DISABLED {}, + FAILED {} + } + + impl ContributorInsightsStatus {} + + impl Debug + for ContributorInsightsStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ContributorInsightsStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ContributorInsightsStatus::ENABLING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsStatus.ENABLING")?; + Ok(()) + }, + ContributorInsightsStatus::ENABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsStatus.ENABLED")?; + Ok(()) + }, + ContributorInsightsStatus::DISABLING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsStatus.DISABLING")?; + Ok(()) + }, + ContributorInsightsStatus::DISABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsStatus.DISABLED")?; + Ok(()) + }, + ContributorInsightsStatus::FAILED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsStatus.FAILED")?; + Ok(()) + }, + } + } + } + + impl ContributorInsightsStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ContributorInsightsStatus::ENABLING {}), Rc::new(ContributorInsightsStatus::ENABLED {}), Rc::new(ContributorInsightsStatus::DISABLING {}), Rc::new(ContributorInsightsStatus::DISABLED {}), Rc::new(ContributorInsightsStatus::FAILED {})].iter() + } + } + + impl Eq + for ContributorInsightsStatus {} + + impl Hash + for ContributorInsightsStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ContributorInsightsStatus::ENABLING{} => { + + }, + ContributorInsightsStatus::ENABLED{} => { + + }, + ContributorInsightsStatus::DISABLING{} => { + + }, + ContributorInsightsStatus::DISABLED{} => { + + }, + ContributorInsightsStatus::FAILED{} => { + + }, + } + } + } + + impl Default + for ContributorInsightsStatus { + fn default() -> ContributorInsightsStatus { + ContributorInsightsStatus::ENABLING {} + } + } + + impl AsRef + for &ContributorInsightsStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ContributorInsightsSummary { + ContributorInsightsSummary { + TableName: Rc>>, + IndexName: Rc>>, + ContributorInsightsStatus: Rc>> + } + } + + impl ContributorInsightsSummary { + pub fn TableName(&self) -> &Rc>> { + match self { + ContributorInsightsSummary::ContributorInsightsSummary{TableName, IndexName, ContributorInsightsStatus, } => TableName, + } + } + pub fn IndexName(&self) -> &Rc>> { + match self { + ContributorInsightsSummary::ContributorInsightsSummary{TableName, IndexName, ContributorInsightsStatus, } => IndexName, + } + } + pub fn ContributorInsightsStatus(&self) -> &Rc>> { + match self { + ContributorInsightsSummary::ContributorInsightsSummary{TableName, IndexName, ContributorInsightsStatus, } => ContributorInsightsStatus, + } + } + } + + impl Debug + for ContributorInsightsSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ContributorInsightsSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ContributorInsightsSummary::ContributorInsightsSummary{TableName, IndexName, ContributorInsightsStatus, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsSummary.ContributorInsightsSummary(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ContributorInsightsStatus, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ContributorInsightsSummary {} + + impl Hash + for ContributorInsightsSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ContributorInsightsSummary::ContributorInsightsSummary{TableName, IndexName, ContributorInsightsStatus, } => { + Hash::hash(TableName, _state); + Hash::hash(IndexName, _state); + Hash::hash(ContributorInsightsStatus, _state) + }, + } + } + } + + impl Default + for ContributorInsightsSummary { + fn default() -> ContributorInsightsSummary { + ContributorInsightsSummary::ContributorInsightsSummary { + TableName: Default::default(), + IndexName: Default::default(), + ContributorInsightsStatus: Default::default() + } + } + } + + impl AsRef + for &ContributorInsightsSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateBackupInput { + CreateBackupInput { + TableName: Sequence, + BackupName: Sequence + } + } + + impl CreateBackupInput { + pub fn TableName(&self) -> &Sequence { + match self { + CreateBackupInput::CreateBackupInput{TableName, BackupName, } => TableName, + } + } + pub fn BackupName(&self) -> &Sequence { + match self { + CreateBackupInput::CreateBackupInput{TableName, BackupName, } => BackupName, + } + } + } + + impl Debug + for CreateBackupInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateBackupInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateBackupInput::CreateBackupInput{TableName, BackupName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateBackupInput.CreateBackupInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateBackupInput {} + + impl Hash + for CreateBackupInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateBackupInput::CreateBackupInput{TableName, BackupName, } => { + Hash::hash(TableName, _state); + Hash::hash(BackupName, _state) + }, + } + } + } + + impl Default + for CreateBackupInput { + fn default() -> CreateBackupInput { + CreateBackupInput::CreateBackupInput { + TableName: Default::default(), + BackupName: Default::default() + } + } + } + + impl AsRef + for &CreateBackupInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateBackupOutput { + CreateBackupOutput { + BackupDetails: Rc>> + } + } + + impl CreateBackupOutput { + pub fn BackupDetails(&self) -> &Rc>> { + match self { + CreateBackupOutput::CreateBackupOutput{BackupDetails, } => BackupDetails, + } + } + } + + impl Debug + for CreateBackupOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateBackupOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateBackupOutput::CreateBackupOutput{BackupDetails, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateBackupOutput.CreateBackupOutput(")?; + DafnyPrint::fmt_print(BackupDetails, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateBackupOutput {} + + impl Hash + for CreateBackupOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateBackupOutput::CreateBackupOutput{BackupDetails, } => { + Hash::hash(BackupDetails, _state) + }, + } + } + } + + impl Default + for CreateBackupOutput { + fn default() -> CreateBackupOutput { + CreateBackupOutput::CreateBackupOutput { + BackupDetails: Default::default() + } + } + } + + impl AsRef + for &CreateBackupOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateGlobalSecondaryIndexAction { + CreateGlobalSecondaryIndexAction { + IndexName: Sequence, + KeySchema: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema, + Projection: Rc, + ProvisionedThroughput: Rc>>, + OnDemandThroughput: Rc>> + } + } + + impl CreateGlobalSecondaryIndexAction { + pub fn IndexName(&self) -> &Sequence { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => IndexName, + } + } + pub fn KeySchema(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => Projection, + } + } + pub fn ProvisionedThroughput(&self) -> &Rc>> { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => ProvisionedThroughput, + } + } + pub fn OnDemandThroughput(&self) -> &Rc>> { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => OnDemandThroughput, + } + } + } + + impl Debug + for CreateGlobalSecondaryIndexAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateGlobalSecondaryIndexAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalSecondaryIndexAction.CreateGlobalSecondaryIndexAction(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateGlobalSecondaryIndexAction {} + + impl Hash + for CreateGlobalSecondaryIndexAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state); + Hash::hash(ProvisionedThroughput, _state); + Hash::hash(OnDemandThroughput, _state) + }, + } + } + } + + impl Default + for CreateGlobalSecondaryIndexAction { + fn default() -> CreateGlobalSecondaryIndexAction { + CreateGlobalSecondaryIndexAction::CreateGlobalSecondaryIndexAction { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default(), + ProvisionedThroughput: Default::default(), + OnDemandThroughput: Default::default() + } + } + } + + impl AsRef + for &CreateGlobalSecondaryIndexAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateGlobalTableInput { + CreateGlobalTableInput { + GlobalTableName: Sequence, + ReplicationGroup: Sequence> + } + } + + impl CreateGlobalTableInput { + pub fn GlobalTableName(&self) -> &Sequence { + match self { + CreateGlobalTableInput::CreateGlobalTableInput{GlobalTableName, ReplicationGroup, } => GlobalTableName, + } + } + pub fn ReplicationGroup(&self) -> &Sequence> { + match self { + CreateGlobalTableInput::CreateGlobalTableInput{GlobalTableName, ReplicationGroup, } => ReplicationGroup, + } + } + } + + impl Debug + for CreateGlobalTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateGlobalTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateGlobalTableInput::CreateGlobalTableInput{GlobalTableName, ReplicationGroup, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalTableInput.CreateGlobalTableInput(")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicationGroup, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateGlobalTableInput {} + + impl Hash + for CreateGlobalTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateGlobalTableInput::CreateGlobalTableInput{GlobalTableName, ReplicationGroup, } => { + Hash::hash(GlobalTableName, _state); + Hash::hash(ReplicationGroup, _state) + }, + } + } + } + + impl Default + for CreateGlobalTableInput { + fn default() -> CreateGlobalTableInput { + CreateGlobalTableInput::CreateGlobalTableInput { + GlobalTableName: Default::default(), + ReplicationGroup: Default::default() + } + } + } + + impl AsRef + for &CreateGlobalTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateGlobalTableOutput { + CreateGlobalTableOutput { + GlobalTableDescription: Rc>> + } + } + + impl CreateGlobalTableOutput { + pub fn GlobalTableDescription(&self) -> &Rc>> { + match self { + CreateGlobalTableOutput::CreateGlobalTableOutput{GlobalTableDescription, } => GlobalTableDescription, + } + } + } + + impl Debug + for CreateGlobalTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateGlobalTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateGlobalTableOutput::CreateGlobalTableOutput{GlobalTableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalTableOutput.CreateGlobalTableOutput(")?; + DafnyPrint::fmt_print(GlobalTableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateGlobalTableOutput {} + + impl Hash + for CreateGlobalTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateGlobalTableOutput::CreateGlobalTableOutput{GlobalTableDescription, } => { + Hash::hash(GlobalTableDescription, _state) + }, + } + } + } + + impl Default + for CreateGlobalTableOutput { + fn default() -> CreateGlobalTableOutput { + CreateGlobalTableOutput::CreateGlobalTableOutput { + GlobalTableDescription: Default::default() + } + } + } + + impl AsRef + for &CreateGlobalTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateReplicaAction { + CreateReplicaAction { + RegionName: Sequence + } + } + + impl CreateReplicaAction { + pub fn RegionName(&self) -> &Sequence { + match self { + CreateReplicaAction::CreateReplicaAction{RegionName, } => RegionName, + } + } + } + + impl Debug + for CreateReplicaAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateReplicaAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateReplicaAction::CreateReplicaAction{RegionName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateReplicaAction.CreateReplicaAction(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateReplicaAction {} + + impl Hash + for CreateReplicaAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateReplicaAction::CreateReplicaAction{RegionName, } => { + Hash::hash(RegionName, _state) + }, + } + } + } + + impl Default + for CreateReplicaAction { + fn default() -> CreateReplicaAction { + CreateReplicaAction::CreateReplicaAction { + RegionName: Default::default() + } + } + } + + impl AsRef + for &CreateReplicaAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateReplicationGroupMemberAction { + CreateReplicationGroupMemberAction { + RegionName: Sequence, + KMSMasterKeyId: Rc>>, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>>, + GlobalSecondaryIndexes: Rc>, + TableClassOverride: Rc>> + } + } + + impl CreateReplicationGroupMemberAction { + pub fn RegionName(&self) -> &Sequence { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => RegionName, + } + } + pub fn KMSMasterKeyId(&self) -> &Rc>> { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => KMSMasterKeyId, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => OnDemandThroughputOverride, + } + } + pub fn GlobalSecondaryIndexes(&self) -> &Rc> { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => GlobalSecondaryIndexes, + } + } + pub fn TableClassOverride(&self) -> &Rc>> { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => TableClassOverride, + } + } + } + + impl Debug + for CreateReplicationGroupMemberAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateReplicationGroupMemberAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateReplicationGroupMemberAction.CreateReplicationGroupMemberAction(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KMSMasterKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableClassOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateReplicationGroupMemberAction {} + + impl Hash + for CreateReplicationGroupMemberAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction{RegionName, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, TableClassOverride, } => { + Hash::hash(RegionName, _state); + Hash::hash(KMSMasterKeyId, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state); + Hash::hash(GlobalSecondaryIndexes, _state); + Hash::hash(TableClassOverride, _state) + }, + } + } + } + + impl Default + for CreateReplicationGroupMemberAction { + fn default() -> CreateReplicationGroupMemberAction { + CreateReplicationGroupMemberAction::CreateReplicationGroupMemberAction { + RegionName: Default::default(), + KMSMasterKeyId: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default(), + GlobalSecondaryIndexes: Default::default(), + TableClassOverride: Default::default() + } + } + } + + impl AsRef + for &CreateReplicationGroupMemberAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateTableInput { + CreateTableInput { + AttributeDefinitions: Sequence>, + TableName: Sequence, + KeySchema: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema, + LocalSecondaryIndexes: Rc>>>, + GlobalSecondaryIndexes: Rc>>>, + BillingMode: Rc>>, + ProvisionedThroughput: Rc>>, + StreamSpecification: Rc>>, + SSESpecification: Rc>>, + Tags: Rc>>>, + TableClass: Rc>>, + DeletionProtectionEnabled: Rc>, + ResourcePolicy: Rc>>, + OnDemandThroughput: Rc>> + } + } + + impl CreateTableInput { + pub fn AttributeDefinitions(&self) -> &Sequence> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => AttributeDefinitions, + } + } + pub fn TableName(&self) -> &Sequence { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => TableName, + } + } + pub fn KeySchema(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => KeySchema, + } + } + pub fn LocalSecondaryIndexes(&self) -> &Rc>>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => LocalSecondaryIndexes, + } + } + pub fn GlobalSecondaryIndexes(&self) -> &Rc>>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => GlobalSecondaryIndexes, + } + } + pub fn BillingMode(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => BillingMode, + } + } + pub fn ProvisionedThroughput(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => ProvisionedThroughput, + } + } + pub fn StreamSpecification(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => StreamSpecification, + } + } + pub fn SSESpecification(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => SSESpecification, + } + } + pub fn Tags(&self) -> &Rc>>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => Tags, + } + } + pub fn TableClass(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => TableClass, + } + } + pub fn DeletionProtectionEnabled(&self) -> &Rc> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => DeletionProtectionEnabled, + } + } + pub fn ResourcePolicy(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => ResourcePolicy, + } + } + pub fn OnDemandThroughput(&self) -> &Rc>> { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => OnDemandThroughput, + } + } + } + + impl Debug + for CreateTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableInput.CreateTableInput(")?; + DafnyPrint::fmt_print(AttributeDefinitions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LocalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BillingMode, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamSpecification, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SSESpecification, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Tags, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableClass, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DeletionProtectionEnabled, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ResourcePolicy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateTableInput {} + + impl Hash + for CreateTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateTableInput::CreateTableInput{AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, BillingMode, ProvisionedThroughput, StreamSpecification, SSESpecification, Tags, TableClass, DeletionProtectionEnabled, ResourcePolicy, OnDemandThroughput, } => { + Hash::hash(AttributeDefinitions, _state); + Hash::hash(TableName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(LocalSecondaryIndexes, _state); + Hash::hash(GlobalSecondaryIndexes, _state); + Hash::hash(BillingMode, _state); + Hash::hash(ProvisionedThroughput, _state); + Hash::hash(StreamSpecification, _state); + Hash::hash(SSESpecification, _state); + Hash::hash(Tags, _state); + Hash::hash(TableClass, _state); + Hash::hash(DeletionProtectionEnabled, _state); + Hash::hash(ResourcePolicy, _state); + Hash::hash(OnDemandThroughput, _state) + }, + } + } + } + + impl Default + for CreateTableInput { + fn default() -> CreateTableInput { + CreateTableInput::CreateTableInput { + AttributeDefinitions: Default::default(), + TableName: Default::default(), + KeySchema: Default::default(), + LocalSecondaryIndexes: Default::default(), + GlobalSecondaryIndexes: Default::default(), + BillingMode: Default::default(), + ProvisionedThroughput: Default::default(), + StreamSpecification: Default::default(), + SSESpecification: Default::default(), + Tags: Default::default(), + TableClass: Default::default(), + DeletionProtectionEnabled: Default::default(), + ResourcePolicy: Default::default(), + OnDemandThroughput: Default::default() + } + } + } + + impl AsRef + for &CreateTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateTableOutput { + CreateTableOutput { + TableDescription: Rc>> + } + } + + impl CreateTableOutput { + pub fn TableDescription(&self) -> &Rc>> { + match self { + CreateTableOutput::CreateTableOutput{TableDescription, } => TableDescription, + } + } + } + + impl Debug + for CreateTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateTableOutput::CreateTableOutput{TableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableOutput.CreateTableOutput(")?; + DafnyPrint::fmt_print(TableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateTableOutput {} + + impl Hash + for CreateTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateTableOutput::CreateTableOutput{TableDescription, } => { + Hash::hash(TableDescription, _state) + }, + } + } + } + + impl Default + for CreateTableOutput { + fn default() -> CreateTableOutput { + CreateTableOutput::CreateTableOutput { + TableDescription: Default::default() + } + } + } + + impl AsRef + for &CreateTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type CsvDelimiter = Sequence; + + pub type CsvHeader = Sequence; + + pub type CsvHeaderList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum CsvOptions { + CsvOptions { + Delimiter: Rc>>, + HeaderList: Rc> + } + } + + impl CsvOptions { + pub fn Delimiter(&self) -> &Rc>> { + match self { + CsvOptions::CsvOptions{Delimiter, HeaderList, } => Delimiter, + } + } + pub fn HeaderList(&self) -> &Rc> { + match self { + CsvOptions::CsvOptions{Delimiter, HeaderList, } => HeaderList, + } + } + } + + impl Debug + for CsvOptions { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CsvOptions { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CsvOptions::CsvOptions{Delimiter, HeaderList, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.CsvOptions.CsvOptions(")?; + DafnyPrint::fmt_print(Delimiter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(HeaderList, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CsvOptions {} + + impl Hash + for CsvOptions { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CsvOptions::CsvOptions{Delimiter, HeaderList, } => { + Hash::hash(Delimiter, _state); + Hash::hash(HeaderList, _state) + }, + } + } + } + + impl Default + for CsvOptions { + fn default() -> CsvOptions { + CsvOptions::CsvOptions { + Delimiter: Default::default(), + HeaderList: Default::default() + } + } + } + + impl AsRef + for &CsvOptions { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Delete { + Delete { + Key: Map, Rc>, + TableName: Sequence, + ConditionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>>, + ReturnValuesOnConditionCheckFailure: Rc>> + } + } + + impl Delete { + pub fn Key(&self) -> &Map, Rc> { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => Key, + } + } + pub fn TableName(&self) -> &Sequence { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => TableName, + } + } + pub fn ConditionExpression(&self) -> &Rc>> { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeValues, + } + } + pub fn ReturnValuesOnConditionCheckFailure(&self) -> &Rc>> { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ReturnValuesOnConditionCheckFailure, + } + } + } + + impl Debug + for Delete { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Delete { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Delete.Delete(")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnValuesOnConditionCheckFailure, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Delete {} + + impl Hash + for Delete { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Delete::Delete{Key, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + Hash::hash(Key, _state); + Hash::hash(TableName, _state); + Hash::hash(ConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state); + Hash::hash(ReturnValuesOnConditionCheckFailure, _state) + }, + } + } + } + + impl Default + for Delete { + fn default() -> Delete { + Delete::Delete { + Key: Default::default(), + TableName: Default::default(), + ConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default(), + ReturnValuesOnConditionCheckFailure: Default::default() + } + } + } + + impl AsRef + for &Delete { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteBackupInput { + DeleteBackupInput { + BackupArn: Sequence + } + } + + impl DeleteBackupInput { + pub fn BackupArn(&self) -> &Sequence { + match self { + DeleteBackupInput::DeleteBackupInput{BackupArn, } => BackupArn, + } + } + } + + impl Debug + for DeleteBackupInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteBackupInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteBackupInput::DeleteBackupInput{BackupArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupInput.DeleteBackupInput(")?; + DafnyPrint::fmt_print(BackupArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteBackupInput {} + + impl Hash + for DeleteBackupInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteBackupInput::DeleteBackupInput{BackupArn, } => { + Hash::hash(BackupArn, _state) + }, + } + } + } + + impl Default + for DeleteBackupInput { + fn default() -> DeleteBackupInput { + DeleteBackupInput::DeleteBackupInput { + BackupArn: Default::default() + } + } + } + + impl AsRef + for &DeleteBackupInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteBackupOutput { + DeleteBackupOutput { + BackupDescription: Rc>> + } + } + + impl DeleteBackupOutput { + pub fn BackupDescription(&self) -> &Rc>> { + match self { + DeleteBackupOutput::DeleteBackupOutput{BackupDescription, } => BackupDescription, + } + } + } + + impl Debug + for DeleteBackupOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteBackupOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteBackupOutput::DeleteBackupOutput{BackupDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupOutput.DeleteBackupOutput(")?; + DafnyPrint::fmt_print(BackupDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteBackupOutput {} + + impl Hash + for DeleteBackupOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteBackupOutput::DeleteBackupOutput{BackupDescription, } => { + Hash::hash(BackupDescription, _state) + }, + } + } + } + + impl Default + for DeleteBackupOutput { + fn default() -> DeleteBackupOutput { + DeleteBackupOutput::DeleteBackupOutput { + BackupDescription: Default::default() + } + } + } + + impl AsRef + for &DeleteBackupOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteGlobalSecondaryIndexAction { + DeleteGlobalSecondaryIndexAction { + IndexName: Sequence + } + } + + impl DeleteGlobalSecondaryIndexAction { + pub fn IndexName(&self) -> &Sequence { + match self { + DeleteGlobalSecondaryIndexAction::DeleteGlobalSecondaryIndexAction{IndexName, } => IndexName, + } + } + } + + impl Debug + for DeleteGlobalSecondaryIndexAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteGlobalSecondaryIndexAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteGlobalSecondaryIndexAction::DeleteGlobalSecondaryIndexAction{IndexName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteGlobalSecondaryIndexAction.DeleteGlobalSecondaryIndexAction(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteGlobalSecondaryIndexAction {} + + impl Hash + for DeleteGlobalSecondaryIndexAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteGlobalSecondaryIndexAction::DeleteGlobalSecondaryIndexAction{IndexName, } => { + Hash::hash(IndexName, _state) + }, + } + } + } + + impl Default + for DeleteGlobalSecondaryIndexAction { + fn default() -> DeleteGlobalSecondaryIndexAction { + DeleteGlobalSecondaryIndexAction::DeleteGlobalSecondaryIndexAction { + IndexName: Default::default() + } + } + } + + impl AsRef + for &DeleteGlobalSecondaryIndexAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemInput { + DeleteItemInput { + TableName: Sequence, + Key: Map, Rc>, + Expected: Rc, Rc>>>, + ConditionalOperator: Rc>>, + ReturnValues: Rc>>, + ReturnConsumedCapacity: Rc>>, + ReturnItemCollectionMetrics: Rc>>, + ConditionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>> + } + } + + impl DeleteItemInput { + pub fn TableName(&self) -> &Sequence { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => TableName, + } + } + pub fn Key(&self) -> &Map, Rc> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Key, + } + } + pub fn Expected(&self) -> &Rc, Rc>>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Expected, + } + } + pub fn ConditionalOperator(&self) -> &Rc>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConditionalOperator, + } + } + pub fn ReturnValues(&self) -> &Rc>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnValues, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnConsumedCapacity, + } + } + pub fn ReturnItemCollectionMetrics(&self) -> &Rc>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnItemCollectionMetrics, + } + } + pub fn ConditionExpression(&self) -> &Rc>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeValues, + } + } + } + + impl Debug + for DeleteItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemInput.DeleteItemInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Expected, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionalOperator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemInput {} + + impl Hash + for DeleteItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemInput::DeleteItemInput{TableName, Key, Expected, ConditionalOperator, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + Hash::hash(TableName, _state); + Hash::hash(Key, _state); + Hash::hash(Expected, _state); + Hash::hash(ConditionalOperator, _state); + Hash::hash(ReturnValues, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(ReturnItemCollectionMetrics, _state); + Hash::hash(ConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state) + }, + } + } + } + + impl Default + for DeleteItemInput { + fn default() -> DeleteItemInput { + DeleteItemInput::DeleteItemInput { + TableName: Default::default(), + Key: Default::default(), + Expected: Default::default(), + ConditionalOperator: Default::default(), + ReturnValues: Default::default(), + ReturnConsumedCapacity: Default::default(), + ReturnItemCollectionMetrics: Default::default(), + ConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default() + } + } + } + + impl AsRef + for &DeleteItemInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemOutput { + DeleteItemOutput { + Attributes: Rc, Rc>>>, + ConsumedCapacity: Rc>>, + ItemCollectionMetrics: Rc>> + } + } + + impl DeleteItemOutput { + pub fn Attributes(&self) -> &Rc, Rc>>> { + match self { + DeleteItemOutput::DeleteItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => Attributes, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + DeleteItemOutput::DeleteItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => ConsumedCapacity, + } + } + pub fn ItemCollectionMetrics(&self) -> &Rc>> { + match self { + DeleteItemOutput::DeleteItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => ItemCollectionMetrics, + } + } + } + + impl Debug + for DeleteItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemOutput::DeleteItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemOutput.DeleteItemOutput(")?; + DafnyPrint::fmt_print(Attributes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemOutput {} + + impl Hash + for DeleteItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemOutput::DeleteItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => { + Hash::hash(Attributes, _state); + Hash::hash(ConsumedCapacity, _state); + Hash::hash(ItemCollectionMetrics, _state) + }, + } + } + } + + impl Default + for DeleteItemOutput { + fn default() -> DeleteItemOutput { + DeleteItemOutput::DeleteItemOutput { + Attributes: Default::default(), + ConsumedCapacity: Default::default(), + ItemCollectionMetrics: Default::default() + } + } + } + + impl AsRef + for &DeleteItemOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteReplicaAction { + DeleteReplicaAction { + RegionName: Sequence + } + } + + impl DeleteReplicaAction { + pub fn RegionName(&self) -> &Sequence { + match self { + DeleteReplicaAction::DeleteReplicaAction{RegionName, } => RegionName, + } + } + } + + impl Debug + for DeleteReplicaAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteReplicaAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteReplicaAction::DeleteReplicaAction{RegionName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteReplicaAction.DeleteReplicaAction(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteReplicaAction {} + + impl Hash + for DeleteReplicaAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteReplicaAction::DeleteReplicaAction{RegionName, } => { + Hash::hash(RegionName, _state) + }, + } + } + } + + impl Default + for DeleteReplicaAction { + fn default() -> DeleteReplicaAction { + DeleteReplicaAction::DeleteReplicaAction { + RegionName: Default::default() + } + } + } + + impl AsRef + for &DeleteReplicaAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteReplicationGroupMemberAction { + DeleteReplicationGroupMemberAction { + RegionName: Sequence + } + } + + impl DeleteReplicationGroupMemberAction { + pub fn RegionName(&self) -> &Sequence { + match self { + DeleteReplicationGroupMemberAction::DeleteReplicationGroupMemberAction{RegionName, } => RegionName, + } + } + } + + impl Debug + for DeleteReplicationGroupMemberAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteReplicationGroupMemberAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteReplicationGroupMemberAction::DeleteReplicationGroupMemberAction{RegionName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteReplicationGroupMemberAction.DeleteReplicationGroupMemberAction(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteReplicationGroupMemberAction {} + + impl Hash + for DeleteReplicationGroupMemberAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteReplicationGroupMemberAction::DeleteReplicationGroupMemberAction{RegionName, } => { + Hash::hash(RegionName, _state) + }, + } + } + } + + impl Default + for DeleteReplicationGroupMemberAction { + fn default() -> DeleteReplicationGroupMemberAction { + DeleteReplicationGroupMemberAction::DeleteReplicationGroupMemberAction { + RegionName: Default::default() + } + } + } + + impl AsRef + for &DeleteReplicationGroupMemberAction { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteRequest { + DeleteRequest { + Key: Map, Rc> + } + } + + impl DeleteRequest { + pub fn Key(&self) -> &Map, Rc> { + match self { + DeleteRequest::DeleteRequest{Key, } => Key, + } + } + } + + impl Debug + for DeleteRequest { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteRequest { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteRequest::DeleteRequest{Key, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteRequest.DeleteRequest(")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteRequest {} + + impl Hash + for DeleteRequest { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteRequest::DeleteRequest{Key, } => { + Hash::hash(Key, _state) + }, + } + } + } + + impl Default + for DeleteRequest { + fn default() -> DeleteRequest { + DeleteRequest::DeleteRequest { + Key: Default::default() + } + } + } + + impl AsRef + for &DeleteRequest { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteResourcePolicyInput { + DeleteResourcePolicyInput { + ResourceArn: Sequence, + ExpectedRevisionId: Rc>> + } + } + + impl DeleteResourcePolicyInput { + pub fn ResourceArn(&self) -> &Sequence { + match self { + DeleteResourcePolicyInput::DeleteResourcePolicyInput{ResourceArn, ExpectedRevisionId, } => ResourceArn, + } + } + pub fn ExpectedRevisionId(&self) -> &Rc>> { + match self { + DeleteResourcePolicyInput::DeleteResourcePolicyInput{ResourceArn, ExpectedRevisionId, } => ExpectedRevisionId, + } + } + } + + impl Debug + for DeleteResourcePolicyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteResourcePolicyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteResourcePolicyInput::DeleteResourcePolicyInput{ResourceArn, ExpectedRevisionId, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput.DeleteResourcePolicyInput(")?; + DafnyPrint::fmt_print(ResourceArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpectedRevisionId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteResourcePolicyInput {} + + impl Hash + for DeleteResourcePolicyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteResourcePolicyInput::DeleteResourcePolicyInput{ResourceArn, ExpectedRevisionId, } => { + Hash::hash(ResourceArn, _state); + Hash::hash(ExpectedRevisionId, _state) + }, + } + } + } + + impl Default + for DeleteResourcePolicyInput { + fn default() -> DeleteResourcePolicyInput { + DeleteResourcePolicyInput::DeleteResourcePolicyInput { + ResourceArn: Default::default(), + ExpectedRevisionId: Default::default() + } + } + } + + impl AsRef + for &DeleteResourcePolicyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteResourcePolicyOutput { + DeleteResourcePolicyOutput { + RevisionId: Rc>> + } + } + + impl DeleteResourcePolicyOutput { + pub fn RevisionId(&self) -> &Rc>> { + match self { + DeleteResourcePolicyOutput::DeleteResourcePolicyOutput{RevisionId, } => RevisionId, + } + } + } + + impl Debug + for DeleteResourcePolicyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteResourcePolicyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteResourcePolicyOutput::DeleteResourcePolicyOutput{RevisionId, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput.DeleteResourcePolicyOutput(")?; + DafnyPrint::fmt_print(RevisionId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteResourcePolicyOutput {} + + impl Hash + for DeleteResourcePolicyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteResourcePolicyOutput::DeleteResourcePolicyOutput{RevisionId, } => { + Hash::hash(RevisionId, _state) + }, + } + } + } + + impl Default + for DeleteResourcePolicyOutput { + fn default() -> DeleteResourcePolicyOutput { + DeleteResourcePolicyOutput::DeleteResourcePolicyOutput { + RevisionId: Default::default() + } + } + } + + impl AsRef + for &DeleteResourcePolicyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteTableInput { + DeleteTableInput { + TableName: Sequence + } + } + + impl DeleteTableInput { + pub fn TableName(&self) -> &Sequence { + match self { + DeleteTableInput::DeleteTableInput{TableName, } => TableName, + } + } + } + + impl Debug + for DeleteTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteTableInput::DeleteTableInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableInput.DeleteTableInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteTableInput {} + + impl Hash + for DeleteTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteTableInput::DeleteTableInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DeleteTableInput { + fn default() -> DeleteTableInput { + DeleteTableInput::DeleteTableInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DeleteTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteTableOutput { + DeleteTableOutput { + TableDescription: Rc>> + } + } + + impl DeleteTableOutput { + pub fn TableDescription(&self) -> &Rc>> { + match self { + DeleteTableOutput::DeleteTableOutput{TableDescription, } => TableDescription, + } + } + } + + impl Debug + for DeleteTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteTableOutput::DeleteTableOutput{TableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput.DeleteTableOutput(")?; + DafnyPrint::fmt_print(TableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteTableOutput {} + + impl Hash + for DeleteTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteTableOutput::DeleteTableOutput{TableDescription, } => { + Hash::hash(TableDescription, _state) + }, + } + } + } + + impl Default + for DeleteTableOutput { + fn default() -> DeleteTableOutput { + DeleteTableOutput::DeleteTableOutput { + TableDescription: Default::default() + } + } + } + + impl AsRef + for &DeleteTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeBackupInput { + DescribeBackupInput { + BackupArn: Sequence + } + } + + impl DescribeBackupInput { + pub fn BackupArn(&self) -> &Sequence { + match self { + DescribeBackupInput::DescribeBackupInput{BackupArn, } => BackupArn, + } + } + } + + impl Debug + for DescribeBackupInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeBackupInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeBackupInput::DescribeBackupInput{BackupArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupInput.DescribeBackupInput(")?; + DafnyPrint::fmt_print(BackupArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeBackupInput {} + + impl Hash + for DescribeBackupInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeBackupInput::DescribeBackupInput{BackupArn, } => { + Hash::hash(BackupArn, _state) + }, + } + } + } + + impl Default + for DescribeBackupInput { + fn default() -> DescribeBackupInput { + DescribeBackupInput::DescribeBackupInput { + BackupArn: Default::default() + } + } + } + + impl AsRef + for &DescribeBackupInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeBackupOutput { + DescribeBackupOutput { + BackupDescription: Rc>> + } + } + + impl DescribeBackupOutput { + pub fn BackupDescription(&self) -> &Rc>> { + match self { + DescribeBackupOutput::DescribeBackupOutput{BackupDescription, } => BackupDescription, + } + } + } + + impl Debug + for DescribeBackupOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeBackupOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeBackupOutput::DescribeBackupOutput{BackupDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupOutput.DescribeBackupOutput(")?; + DafnyPrint::fmt_print(BackupDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeBackupOutput {} + + impl Hash + for DescribeBackupOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeBackupOutput::DescribeBackupOutput{BackupDescription, } => { + Hash::hash(BackupDescription, _state) + }, + } + } + } + + impl Default + for DescribeBackupOutput { + fn default() -> DescribeBackupOutput { + DescribeBackupOutput::DescribeBackupOutput { + BackupDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeBackupOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeContinuousBackupsInput { + DescribeContinuousBackupsInput { + TableName: Sequence + } + } + + impl DescribeContinuousBackupsInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeContinuousBackupsInput::DescribeContinuousBackupsInput{TableName, } => TableName, + } + } + } + + impl Debug + for DescribeContinuousBackupsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeContinuousBackupsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeContinuousBackupsInput::DescribeContinuousBackupsInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContinuousBackupsInput.DescribeContinuousBackupsInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeContinuousBackupsInput {} + + impl Hash + for DescribeContinuousBackupsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeContinuousBackupsInput::DescribeContinuousBackupsInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DescribeContinuousBackupsInput { + fn default() -> DescribeContinuousBackupsInput { + DescribeContinuousBackupsInput::DescribeContinuousBackupsInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DescribeContinuousBackupsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeContinuousBackupsOutput { + DescribeContinuousBackupsOutput { + ContinuousBackupsDescription: Rc>> + } + } + + impl DescribeContinuousBackupsOutput { + pub fn ContinuousBackupsDescription(&self) -> &Rc>> { + match self { + DescribeContinuousBackupsOutput::DescribeContinuousBackupsOutput{ContinuousBackupsDescription, } => ContinuousBackupsDescription, + } + } + } + + impl Debug + for DescribeContinuousBackupsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeContinuousBackupsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeContinuousBackupsOutput::DescribeContinuousBackupsOutput{ContinuousBackupsDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContinuousBackupsOutput.DescribeContinuousBackupsOutput(")?; + DafnyPrint::fmt_print(ContinuousBackupsDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeContinuousBackupsOutput {} + + impl Hash + for DescribeContinuousBackupsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeContinuousBackupsOutput::DescribeContinuousBackupsOutput{ContinuousBackupsDescription, } => { + Hash::hash(ContinuousBackupsDescription, _state) + }, + } + } + } + + impl Default + for DescribeContinuousBackupsOutput { + fn default() -> DescribeContinuousBackupsOutput { + DescribeContinuousBackupsOutput::DescribeContinuousBackupsOutput { + ContinuousBackupsDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeContinuousBackupsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeContributorInsightsInput { + DescribeContributorInsightsInput { + TableName: Sequence, + IndexName: Rc>> + } + } + + impl DescribeContributorInsightsInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeContributorInsightsInput::DescribeContributorInsightsInput{TableName, IndexName, } => TableName, + } + } + pub fn IndexName(&self) -> &Rc>> { + match self { + DescribeContributorInsightsInput::DescribeContributorInsightsInput{TableName, IndexName, } => IndexName, + } + } + } + + impl Debug + for DescribeContributorInsightsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeContributorInsightsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeContributorInsightsInput::DescribeContributorInsightsInput{TableName, IndexName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsInput.DescribeContributorInsightsInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeContributorInsightsInput {} + + impl Hash + for DescribeContributorInsightsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeContributorInsightsInput::DescribeContributorInsightsInput{TableName, IndexName, } => { + Hash::hash(TableName, _state); + Hash::hash(IndexName, _state) + }, + } + } + } + + impl Default + for DescribeContributorInsightsInput { + fn default() -> DescribeContributorInsightsInput { + DescribeContributorInsightsInput::DescribeContributorInsightsInput { + TableName: Default::default(), + IndexName: Default::default() + } + } + } + + impl AsRef + for &DescribeContributorInsightsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeContributorInsightsOutput { + DescribeContributorInsightsOutput { + TableName: Rc>>, + IndexName: Rc>>, + ContributorInsightsRuleList: Rc>>>, + ContributorInsightsStatus: Rc>>, + LastUpdateDateTime: Rc>>, + FailureException: Rc>> + } + } + + impl DescribeContributorInsightsOutput { + pub fn TableName(&self) -> &Rc>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => TableName, + } + } + pub fn IndexName(&self) -> &Rc>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => IndexName, + } + } + pub fn ContributorInsightsRuleList(&self) -> &Rc>>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => ContributorInsightsRuleList, + } + } + pub fn ContributorInsightsStatus(&self) -> &Rc>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => ContributorInsightsStatus, + } + } + pub fn LastUpdateDateTime(&self) -> &Rc>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => LastUpdateDateTime, + } + } + pub fn FailureException(&self) -> &Rc>> { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => FailureException, + } + } + } + + impl Debug + for DescribeContributorInsightsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeContributorInsightsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsOutput.DescribeContributorInsightsOutput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ContributorInsightsRuleList, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ContributorInsightsStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastUpdateDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FailureException, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeContributorInsightsOutput {} + + impl Hash + for DescribeContributorInsightsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput{TableName, IndexName, ContributorInsightsRuleList, ContributorInsightsStatus, LastUpdateDateTime, FailureException, } => { + Hash::hash(TableName, _state); + Hash::hash(IndexName, _state); + Hash::hash(ContributorInsightsRuleList, _state); + Hash::hash(ContributorInsightsStatus, _state); + Hash::hash(LastUpdateDateTime, _state); + Hash::hash(FailureException, _state) + }, + } + } + } + + impl Default + for DescribeContributorInsightsOutput { + fn default() -> DescribeContributorInsightsOutput { + DescribeContributorInsightsOutput::DescribeContributorInsightsOutput { + TableName: Default::default(), + IndexName: Default::default(), + ContributorInsightsRuleList: Default::default(), + ContributorInsightsStatus: Default::default(), + LastUpdateDateTime: Default::default(), + FailureException: Default::default() + } + } + } + + impl AsRef + for &DescribeContributorInsightsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeEndpointsRequest { + DescribeEndpointsRequest {} + } + + impl DescribeEndpointsRequest {} + + impl Debug + for DescribeEndpointsRequest { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeEndpointsRequest { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeEndpointsRequest::DescribeEndpointsRequest{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeEndpointsRequest.DescribeEndpointsRequest")?; + Ok(()) + }, + } + } + } + + impl DescribeEndpointsRequest { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DescribeEndpointsRequest::DescribeEndpointsRequest {})].iter() + } + } + + impl Eq + for DescribeEndpointsRequest {} + + impl Hash + for DescribeEndpointsRequest { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeEndpointsRequest::DescribeEndpointsRequest{} => { + + }, + } + } + } + + impl Default + for DescribeEndpointsRequest { + fn default() -> DescribeEndpointsRequest { + DescribeEndpointsRequest::DescribeEndpointsRequest {} + } + } + + impl AsRef + for &DescribeEndpointsRequest { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeEndpointsResponse { + DescribeEndpointsResponse { + Endpoints: Sequence> + } + } + + impl DescribeEndpointsResponse { + pub fn Endpoints(&self) -> &Sequence> { + match self { + DescribeEndpointsResponse::DescribeEndpointsResponse{Endpoints, } => Endpoints, + } + } + } + + impl Debug + for DescribeEndpointsResponse { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeEndpointsResponse { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeEndpointsResponse::DescribeEndpointsResponse{Endpoints, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeEndpointsResponse.DescribeEndpointsResponse(")?; + DafnyPrint::fmt_print(Endpoints, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeEndpointsResponse {} + + impl Hash + for DescribeEndpointsResponse { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeEndpointsResponse::DescribeEndpointsResponse{Endpoints, } => { + Hash::hash(Endpoints, _state) + }, + } + } + } + + impl Default + for DescribeEndpointsResponse { + fn default() -> DescribeEndpointsResponse { + DescribeEndpointsResponse::DescribeEndpointsResponse { + Endpoints: Default::default() + } + } + } + + impl AsRef + for &DescribeEndpointsResponse { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeExportInput { + DescribeExportInput { + ExportArn: Sequence + } + } + + impl DescribeExportInput { + pub fn ExportArn(&self) -> &Sequence { + match self { + DescribeExportInput::DescribeExportInput{ExportArn, } => ExportArn, + } + } + } + + impl Debug + for DescribeExportInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeExportInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeExportInput::DescribeExportInput{ExportArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeExportInput.DescribeExportInput(")?; + DafnyPrint::fmt_print(ExportArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeExportInput {} + + impl Hash + for DescribeExportInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeExportInput::DescribeExportInput{ExportArn, } => { + Hash::hash(ExportArn, _state) + }, + } + } + } + + impl Default + for DescribeExportInput { + fn default() -> DescribeExportInput { + DescribeExportInput::DescribeExportInput { + ExportArn: Default::default() + } + } + } + + impl AsRef + for &DescribeExportInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeExportOutput { + DescribeExportOutput { + ExportDescription: Rc>> + } + } + + impl DescribeExportOutput { + pub fn ExportDescription(&self) -> &Rc>> { + match self { + DescribeExportOutput::DescribeExportOutput{ExportDescription, } => ExportDescription, + } + } + } + + impl Debug + for DescribeExportOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeExportOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeExportOutput::DescribeExportOutput{ExportDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeExportOutput.DescribeExportOutput(")?; + DafnyPrint::fmt_print(ExportDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeExportOutput {} + + impl Hash + for DescribeExportOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeExportOutput::DescribeExportOutput{ExportDescription, } => { + Hash::hash(ExportDescription, _state) + }, + } + } + } + + impl Default + for DescribeExportOutput { + fn default() -> DescribeExportOutput { + DescribeExportOutput::DescribeExportOutput { + ExportDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeExportOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeGlobalTableInput { + DescribeGlobalTableInput { + GlobalTableName: Sequence + } + } + + impl DescribeGlobalTableInput { + pub fn GlobalTableName(&self) -> &Sequence { + match self { + DescribeGlobalTableInput::DescribeGlobalTableInput{GlobalTableName, } => GlobalTableName, + } + } + } + + impl Debug + for DescribeGlobalTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeGlobalTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeGlobalTableInput::DescribeGlobalTableInput{GlobalTableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableInput.DescribeGlobalTableInput(")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeGlobalTableInput {} + + impl Hash + for DescribeGlobalTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeGlobalTableInput::DescribeGlobalTableInput{GlobalTableName, } => { + Hash::hash(GlobalTableName, _state) + }, + } + } + } + + impl Default + for DescribeGlobalTableInput { + fn default() -> DescribeGlobalTableInput { + DescribeGlobalTableInput::DescribeGlobalTableInput { + GlobalTableName: Default::default() + } + } + } + + impl AsRef + for &DescribeGlobalTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeGlobalTableOutput { + DescribeGlobalTableOutput { + GlobalTableDescription: Rc>> + } + } + + impl DescribeGlobalTableOutput { + pub fn GlobalTableDescription(&self) -> &Rc>> { + match self { + DescribeGlobalTableOutput::DescribeGlobalTableOutput{GlobalTableDescription, } => GlobalTableDescription, + } + } + } + + impl Debug + for DescribeGlobalTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeGlobalTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeGlobalTableOutput::DescribeGlobalTableOutput{GlobalTableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableOutput.DescribeGlobalTableOutput(")?; + DafnyPrint::fmt_print(GlobalTableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeGlobalTableOutput {} + + impl Hash + for DescribeGlobalTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeGlobalTableOutput::DescribeGlobalTableOutput{GlobalTableDescription, } => { + Hash::hash(GlobalTableDescription, _state) + }, + } + } + } + + impl Default + for DescribeGlobalTableOutput { + fn default() -> DescribeGlobalTableOutput { + DescribeGlobalTableOutput::DescribeGlobalTableOutput { + GlobalTableDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeGlobalTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeGlobalTableSettingsInput { + DescribeGlobalTableSettingsInput { + GlobalTableName: Sequence + } + } + + impl DescribeGlobalTableSettingsInput { + pub fn GlobalTableName(&self) -> &Sequence { + match self { + DescribeGlobalTableSettingsInput::DescribeGlobalTableSettingsInput{GlobalTableName, } => GlobalTableName, + } + } + } + + impl Debug + for DescribeGlobalTableSettingsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeGlobalTableSettingsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeGlobalTableSettingsInput::DescribeGlobalTableSettingsInput{GlobalTableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableSettingsInput.DescribeGlobalTableSettingsInput(")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeGlobalTableSettingsInput {} + + impl Hash + for DescribeGlobalTableSettingsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeGlobalTableSettingsInput::DescribeGlobalTableSettingsInput{GlobalTableName, } => { + Hash::hash(GlobalTableName, _state) + }, + } + } + } + + impl Default + for DescribeGlobalTableSettingsInput { + fn default() -> DescribeGlobalTableSettingsInput { + DescribeGlobalTableSettingsInput::DescribeGlobalTableSettingsInput { + GlobalTableName: Default::default() + } + } + } + + impl AsRef + for &DescribeGlobalTableSettingsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeGlobalTableSettingsOutput { + DescribeGlobalTableSettingsOutput { + GlobalTableName: Rc>>, + ReplicaSettings: Rc>>> + } + } + + impl DescribeGlobalTableSettingsOutput { + pub fn GlobalTableName(&self) -> &Rc>> { + match self { + DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput{GlobalTableName, ReplicaSettings, } => GlobalTableName, + } + } + pub fn ReplicaSettings(&self) -> &Rc>>> { + match self { + DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput{GlobalTableName, ReplicaSettings, } => ReplicaSettings, + } + } + } + + impl Debug + for DescribeGlobalTableSettingsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeGlobalTableSettingsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput{GlobalTableName, ReplicaSettings, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableSettingsOutput.DescribeGlobalTableSettingsOutput(")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaSettings, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeGlobalTableSettingsOutput {} + + impl Hash + for DescribeGlobalTableSettingsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput{GlobalTableName, ReplicaSettings, } => { + Hash::hash(GlobalTableName, _state); + Hash::hash(ReplicaSettings, _state) + }, + } + } + } + + impl Default + for DescribeGlobalTableSettingsOutput { + fn default() -> DescribeGlobalTableSettingsOutput { + DescribeGlobalTableSettingsOutput::DescribeGlobalTableSettingsOutput { + GlobalTableName: Default::default(), + ReplicaSettings: Default::default() + } + } + } + + impl AsRef + for &DescribeGlobalTableSettingsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeImportInput { + DescribeImportInput { + ImportArn: Sequence + } + } + + impl DescribeImportInput { + pub fn ImportArn(&self) -> &Sequence { + match self { + DescribeImportInput::DescribeImportInput{ImportArn, } => ImportArn, + } + } + } + + impl Debug + for DescribeImportInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeImportInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeImportInput::DescribeImportInput{ImportArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeImportInput.DescribeImportInput(")?; + DafnyPrint::fmt_print(ImportArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeImportInput {} + + impl Hash + for DescribeImportInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeImportInput::DescribeImportInput{ImportArn, } => { + Hash::hash(ImportArn, _state) + }, + } + } + } + + impl Default + for DescribeImportInput { + fn default() -> DescribeImportInput { + DescribeImportInput::DescribeImportInput { + ImportArn: Default::default() + } + } + } + + impl AsRef + for &DescribeImportInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeImportOutput { + DescribeImportOutput { + ImportTableDescription: Rc + } + } + + impl DescribeImportOutput { + pub fn ImportTableDescription(&self) -> &Rc { + match self { + DescribeImportOutput::DescribeImportOutput{ImportTableDescription, } => ImportTableDescription, + } + } + } + + impl Debug + for DescribeImportOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeImportOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeImportOutput::DescribeImportOutput{ImportTableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeImportOutput.DescribeImportOutput(")?; + DafnyPrint::fmt_print(ImportTableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeImportOutput {} + + impl Hash + for DescribeImportOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeImportOutput::DescribeImportOutput{ImportTableDescription, } => { + Hash::hash(ImportTableDescription, _state) + }, + } + } + } + + impl Default + for DescribeImportOutput { + fn default() -> DescribeImportOutput { + DescribeImportOutput::DescribeImportOutput { + ImportTableDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeImportOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeKinesisStreamingDestinationInput { + DescribeKinesisStreamingDestinationInput { + TableName: Sequence + } + } + + impl DescribeKinesisStreamingDestinationInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeKinesisStreamingDestinationInput::DescribeKinesisStreamingDestinationInput{TableName, } => TableName, + } + } + } + + impl Debug + for DescribeKinesisStreamingDestinationInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeKinesisStreamingDestinationInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeKinesisStreamingDestinationInput::DescribeKinesisStreamingDestinationInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeKinesisStreamingDestinationInput.DescribeKinesisStreamingDestinationInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeKinesisStreamingDestinationInput {} + + impl Hash + for DescribeKinesisStreamingDestinationInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeKinesisStreamingDestinationInput::DescribeKinesisStreamingDestinationInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DescribeKinesisStreamingDestinationInput { + fn default() -> DescribeKinesisStreamingDestinationInput { + DescribeKinesisStreamingDestinationInput::DescribeKinesisStreamingDestinationInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DescribeKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeKinesisStreamingDestinationOutput { + DescribeKinesisStreamingDestinationOutput { + TableName: Rc>>, + KinesisDataStreamDestinations: Rc>>> + } + } + + impl DescribeKinesisStreamingDestinationOutput { + pub fn TableName(&self) -> &Rc>> { + match self { + DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput{TableName, KinesisDataStreamDestinations, } => TableName, + } + } + pub fn KinesisDataStreamDestinations(&self) -> &Rc>>> { + match self { + DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput{TableName, KinesisDataStreamDestinations, } => KinesisDataStreamDestinations, + } + } + } + + impl Debug + for DescribeKinesisStreamingDestinationOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeKinesisStreamingDestinationOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput{TableName, KinesisDataStreamDestinations, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeKinesisStreamingDestinationOutput.DescribeKinesisStreamingDestinationOutput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KinesisDataStreamDestinations, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeKinesisStreamingDestinationOutput {} + + impl Hash + for DescribeKinesisStreamingDestinationOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput{TableName, KinesisDataStreamDestinations, } => { + Hash::hash(TableName, _state); + Hash::hash(KinesisDataStreamDestinations, _state) + }, + } + } + } + + impl Default + for DescribeKinesisStreamingDestinationOutput { + fn default() -> DescribeKinesisStreamingDestinationOutput { + DescribeKinesisStreamingDestinationOutput::DescribeKinesisStreamingDestinationOutput { + TableName: Default::default(), + KinesisDataStreamDestinations: Default::default() + } + } + } + + impl AsRef + for &DescribeKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeLimitsInput { + DescribeLimitsInput {} + } + + impl DescribeLimitsInput {} + + impl Debug + for DescribeLimitsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeLimitsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeLimitsInput::DescribeLimitsInput{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeLimitsInput.DescribeLimitsInput")?; + Ok(()) + }, + } + } + } + + impl DescribeLimitsInput { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DescribeLimitsInput::DescribeLimitsInput {})].iter() + } + } + + impl Eq + for DescribeLimitsInput {} + + impl Hash + for DescribeLimitsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeLimitsInput::DescribeLimitsInput{} => { + + }, + } + } + } + + impl Default + for DescribeLimitsInput { + fn default() -> DescribeLimitsInput { + DescribeLimitsInput::DescribeLimitsInput {} + } + } + + impl AsRef + for &DescribeLimitsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeLimitsOutput { + DescribeLimitsOutput { + AccountMaxReadCapacityUnits: Rc>, + AccountMaxWriteCapacityUnits: Rc>, + TableMaxReadCapacityUnits: Rc>, + TableMaxWriteCapacityUnits: Rc> + } + } + + impl DescribeLimitsOutput { + pub fn AccountMaxReadCapacityUnits(&self) -> &Rc> { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => AccountMaxReadCapacityUnits, + } + } + pub fn AccountMaxWriteCapacityUnits(&self) -> &Rc> { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => AccountMaxWriteCapacityUnits, + } + } + pub fn TableMaxReadCapacityUnits(&self) -> &Rc> { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => TableMaxReadCapacityUnits, + } + } + pub fn TableMaxWriteCapacityUnits(&self) -> &Rc> { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => TableMaxWriteCapacityUnits, + } + } + } + + impl Debug + for DescribeLimitsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeLimitsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeLimitsOutput.DescribeLimitsOutput(")?; + DafnyPrint::fmt_print(AccountMaxReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AccountMaxWriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableMaxReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableMaxWriteCapacityUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeLimitsOutput {} + + impl Hash + for DescribeLimitsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeLimitsOutput::DescribeLimitsOutput{AccountMaxReadCapacityUnits, AccountMaxWriteCapacityUnits, TableMaxReadCapacityUnits, TableMaxWriteCapacityUnits, } => { + Hash::hash(AccountMaxReadCapacityUnits, _state); + Hash::hash(AccountMaxWriteCapacityUnits, _state); + Hash::hash(TableMaxReadCapacityUnits, _state); + Hash::hash(TableMaxWriteCapacityUnits, _state) + }, + } + } + } + + impl Default + for DescribeLimitsOutput { + fn default() -> DescribeLimitsOutput { + DescribeLimitsOutput::DescribeLimitsOutput { + AccountMaxReadCapacityUnits: Default::default(), + AccountMaxWriteCapacityUnits: Default::default(), + TableMaxReadCapacityUnits: Default::default(), + TableMaxWriteCapacityUnits: Default::default() + } + } + } + + impl AsRef + for &DescribeLimitsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTableInput { + DescribeTableInput { + TableName: Sequence + } + } + + impl DescribeTableInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeTableInput::DescribeTableInput{TableName, } => TableName, + } + } + } + + impl Debug + for DescribeTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTableInput::DescribeTableInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableInput.DescribeTableInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTableInput {} + + impl Hash + for DescribeTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTableInput::DescribeTableInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DescribeTableInput { + fn default() -> DescribeTableInput { + DescribeTableInput::DescribeTableInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DescribeTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTableOutput { + DescribeTableOutput { + Table: Rc>> + } + } + + impl DescribeTableOutput { + pub fn Table(&self) -> &Rc>> { + match self { + DescribeTableOutput::DescribeTableOutput{Table, } => Table, + } + } + } + + impl Debug + for DescribeTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTableOutput::DescribeTableOutput{Table, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableOutput.DescribeTableOutput(")?; + DafnyPrint::fmt_print(Table, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTableOutput {} + + impl Hash + for DescribeTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTableOutput::DescribeTableOutput{Table, } => { + Hash::hash(Table, _state) + }, + } + } + } + + impl Default + for DescribeTableOutput { + fn default() -> DescribeTableOutput { + DescribeTableOutput::DescribeTableOutput { + Table: Default::default() + } + } + } + + impl AsRef + for &DescribeTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTableReplicaAutoScalingInput { + DescribeTableReplicaAutoScalingInput { + TableName: Sequence + } + } + + impl DescribeTableReplicaAutoScalingInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeTableReplicaAutoScalingInput::DescribeTableReplicaAutoScalingInput{TableName, } => TableName, + } + } + } + + impl Debug + for DescribeTableReplicaAutoScalingInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTableReplicaAutoScalingInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTableReplicaAutoScalingInput::DescribeTableReplicaAutoScalingInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableReplicaAutoScalingInput.DescribeTableReplicaAutoScalingInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTableReplicaAutoScalingInput {} + + impl Hash + for DescribeTableReplicaAutoScalingInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTableReplicaAutoScalingInput::DescribeTableReplicaAutoScalingInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DescribeTableReplicaAutoScalingInput { + fn default() -> DescribeTableReplicaAutoScalingInput { + DescribeTableReplicaAutoScalingInput::DescribeTableReplicaAutoScalingInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DescribeTableReplicaAutoScalingInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTableReplicaAutoScalingOutput { + DescribeTableReplicaAutoScalingOutput { + TableAutoScalingDescription: Rc>> + } + } + + impl DescribeTableReplicaAutoScalingOutput { + pub fn TableAutoScalingDescription(&self) -> &Rc>> { + match self { + DescribeTableReplicaAutoScalingOutput::DescribeTableReplicaAutoScalingOutput{TableAutoScalingDescription, } => TableAutoScalingDescription, + } + } + } + + impl Debug + for DescribeTableReplicaAutoScalingOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTableReplicaAutoScalingOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTableReplicaAutoScalingOutput::DescribeTableReplicaAutoScalingOutput{TableAutoScalingDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableReplicaAutoScalingOutput.DescribeTableReplicaAutoScalingOutput(")?; + DafnyPrint::fmt_print(TableAutoScalingDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTableReplicaAutoScalingOutput {} + + impl Hash + for DescribeTableReplicaAutoScalingOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTableReplicaAutoScalingOutput::DescribeTableReplicaAutoScalingOutput{TableAutoScalingDescription, } => { + Hash::hash(TableAutoScalingDescription, _state) + }, + } + } + } + + impl Default + for DescribeTableReplicaAutoScalingOutput { + fn default() -> DescribeTableReplicaAutoScalingOutput { + DescribeTableReplicaAutoScalingOutput::DescribeTableReplicaAutoScalingOutput { + TableAutoScalingDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeTableReplicaAutoScalingOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTimeToLiveInput { + DescribeTimeToLiveInput { + TableName: Sequence + } + } + + impl DescribeTimeToLiveInput { + pub fn TableName(&self) -> &Sequence { + match self { + DescribeTimeToLiveInput::DescribeTimeToLiveInput{TableName, } => TableName, + } + } + } + + impl Debug + for DescribeTimeToLiveInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTimeToLiveInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTimeToLiveInput::DescribeTimeToLiveInput{TableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTimeToLiveInput.DescribeTimeToLiveInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTimeToLiveInput {} + + impl Hash + for DescribeTimeToLiveInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTimeToLiveInput::DescribeTimeToLiveInput{TableName, } => { + Hash::hash(TableName, _state) + }, + } + } + } + + impl Default + for DescribeTimeToLiveInput { + fn default() -> DescribeTimeToLiveInput { + DescribeTimeToLiveInput::DescribeTimeToLiveInput { + TableName: Default::default() + } + } + } + + impl AsRef + for &DescribeTimeToLiveInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DescribeTimeToLiveOutput { + DescribeTimeToLiveOutput { + TimeToLiveDescription: Rc>> + } + } + + impl DescribeTimeToLiveOutput { + pub fn TimeToLiveDescription(&self) -> &Rc>> { + match self { + DescribeTimeToLiveOutput::DescribeTimeToLiveOutput{TimeToLiveDescription, } => TimeToLiveDescription, + } + } + } + + impl Debug + for DescribeTimeToLiveOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DescribeTimeToLiveOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DescribeTimeToLiveOutput::DescribeTimeToLiveOutput{TimeToLiveDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTimeToLiveOutput.DescribeTimeToLiveOutput(")?; + DafnyPrint::fmt_print(TimeToLiveDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DescribeTimeToLiveOutput {} + + impl Hash + for DescribeTimeToLiveOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DescribeTimeToLiveOutput::DescribeTimeToLiveOutput{TimeToLiveDescription, } => { + Hash::hash(TimeToLiveDescription, _state) + }, + } + } + } + + impl Default + for DescribeTimeToLiveOutput { + fn default() -> DescribeTimeToLiveOutput { + DescribeTimeToLiveOutput::DescribeTimeToLiveOutput { + TimeToLiveDescription: Default::default() + } + } + } + + impl AsRef + for &DescribeTimeToLiveOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DestinationStatus { + ENABLING {}, + ACTIVE {}, + DISABLING {}, + DISABLED {}, + ENABLE_FAILED {}, + UPDATING {} + } + + impl DestinationStatus {} + + impl Debug + for DestinationStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DestinationStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DestinationStatus::ENABLING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.ENABLING")?; + Ok(()) + }, + DestinationStatus::ACTIVE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.ACTIVE")?; + Ok(()) + }, + DestinationStatus::DISABLING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.DISABLING")?; + Ok(()) + }, + DestinationStatus::DISABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.DISABLED")?; + Ok(()) + }, + DestinationStatus::ENABLE_FAILED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.ENABLE__FAILED")?; + Ok(()) + }, + DestinationStatus::UPDATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus.UPDATING")?; + Ok(()) + }, + } + } + } + + impl DestinationStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DestinationStatus::ENABLING {}), Rc::new(DestinationStatus::ACTIVE {}), Rc::new(DestinationStatus::DISABLING {}), Rc::new(DestinationStatus::DISABLED {}), Rc::new(DestinationStatus::ENABLE_FAILED {}), Rc::new(DestinationStatus::UPDATING {})].iter() + } + } + + impl Eq + for DestinationStatus {} + + impl Hash + for DestinationStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DestinationStatus::ENABLING{} => { + + }, + DestinationStatus::ACTIVE{} => { + + }, + DestinationStatus::DISABLING{} => { + + }, + DestinationStatus::DISABLED{} => { + + }, + DestinationStatus::ENABLE_FAILED{} => { + + }, + DestinationStatus::UPDATING{} => { + + }, + } + } + } + + impl Default + for DestinationStatus { + fn default() -> DestinationStatus { + DestinationStatus::ENABLING {} + } + } + + impl AsRef + for &DestinationStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DisableKinesisStreamingDestinationInput { + DisableKinesisStreamingDestinationInput { + TableName: Sequence, + StreamArn: Sequence, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl DisableKinesisStreamingDestinationInput { + pub fn TableName(&self) -> &Sequence { + match self { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Sequence { + match self { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for DisableKinesisStreamingDestinationInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DisableKinesisStreamingDestinationInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationInput.DisableKinesisStreamingDestinationInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DisableKinesisStreamingDestinationInput {} + + impl Hash + for DisableKinesisStreamingDestinationInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for DisableKinesisStreamingDestinationInput { + fn default() -> DisableKinesisStreamingDestinationInput { + DisableKinesisStreamingDestinationInput::DisableKinesisStreamingDestinationInput { + TableName: Default::default(), + StreamArn: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &DisableKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DisableKinesisStreamingDestinationOutput { + DisableKinesisStreamingDestinationOutput { + TableName: Rc>>, + StreamArn: Rc>>, + DestinationStatus: Rc>>, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl DisableKinesisStreamingDestinationOutput { + pub fn TableName(&self) -> &Rc>> { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Rc>> { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn DestinationStatus(&self) -> &Rc>> { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => DestinationStatus, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for DisableKinesisStreamingDestinationOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DisableKinesisStreamingDestinationOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationOutput.DisableKinesisStreamingDestinationOutput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DestinationStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DisableKinesisStreamingDestinationOutput {} + + impl Hash + for DisableKinesisStreamingDestinationOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(DestinationStatus, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for DisableKinesisStreamingDestinationOutput { + fn default() -> DisableKinesisStreamingDestinationOutput { + DisableKinesisStreamingDestinationOutput::DisableKinesisStreamingDestinationOutput { + TableName: Default::default(), + StreamArn: Default::default(), + DestinationStatus: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &DisableKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type DoubleObject = Sequence; + + pub struct IDynamoDBClientCallHistory {} + + impl IDynamoDBClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::IDynamoDBClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IDynamoDBClient: Any + UpcastObject { + fn BatchExecuteStatement(&self, input: &Rc) -> Rc, Rc>>; + fn BatchGetItem(&self, input: &Rc) -> Rc, Rc>>; + fn BatchWriteItem(&self, input: &Rc) -> Rc, Rc>>; + fn CreateBackup(&self, input: &Rc) -> Rc, Rc>>; + fn CreateGlobalTable(&self, input: &Rc) -> Rc, Rc>>; + fn CreateTable(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteBackup(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteItem(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteResourcePolicy(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteTable(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeBackup(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeContinuousBackups(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeContributorInsights(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeEndpoints(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeExport(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeGlobalTable(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeGlobalTableSettings(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeImport(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeKinesisStreamingDestination(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeLimits(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeTable(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeTableReplicaAutoScaling(&self, input: &Rc) -> Rc, Rc>>; + fn DescribeTimeToLive(&self, input: &Rc) -> Rc, Rc>>; + fn DisableKinesisStreamingDestination(&self, input: &Rc) -> Rc, Rc>>; + fn EnableKinesisStreamingDestination(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteStatement(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteTransaction(&self, input: &Rc) -> Rc, Rc>>; + fn ExportTableToPointInTime(&self, input: &Rc) -> Rc, Rc>>; + fn GetItem(&self, input: &Rc) -> Rc, Rc>>; + fn GetResourcePolicy(&self, input: &Rc) -> Rc, Rc>>; + fn ImportTable(&self, input: &Rc) -> Rc, Rc>>; + fn ListBackups(&self, input: &Rc) -> Rc, Rc>>; + fn ListContributorInsights(&self, input: &Rc) -> Rc, Rc>>; + fn ListExports(&self, input: &Rc) -> Rc, Rc>>; + fn ListGlobalTables(&self, input: &Rc) -> Rc, Rc>>; + fn ListImports(&self, input: &Rc) -> Rc, Rc>>; + fn ListTables(&self, input: &Rc) -> Rc, Rc>>; + fn ListTagsOfResource(&self, input: &Rc) -> Rc, Rc>>; + fn PutItem(&self, input: &Rc) -> Rc, Rc>>; + fn PutResourcePolicy(&self, input: &Rc) -> Rc, Rc>>; + fn Query(&self, input: &Rc) -> Rc, Rc>>; + fn RestoreTableFromBackup(&self, input: &Rc) -> Rc, Rc>>; + fn RestoreTableToPointInTime(&self, input: &Rc) -> Rc, Rc>>; + fn Scan(&self, input: &Rc) -> Rc, Rc>>; + fn TagResource(&self, input: &Rc) -> Rc>>; + fn TransactGetItems(&self, input: &Rc) -> Rc, Rc>>; + fn TransactWriteItems(&self, input: &Rc) -> Rc, Rc>>; + fn UntagResource(&self, input: &Rc) -> Rc>>; + fn UpdateContinuousBackups(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateContributorInsights(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateGlobalTable(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateGlobalTableSettings(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateItem(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateKinesisStreamingDestination(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateTable(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateTableReplicaAutoScaling(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateTimeToLive(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum EnableKinesisStreamingConfiguration { + EnableKinesisStreamingConfiguration { + ApproximateCreationDateTimePrecision: Rc>> + } + } + + impl EnableKinesisStreamingConfiguration { + pub fn ApproximateCreationDateTimePrecision(&self) -> &Rc>> { + match self { + EnableKinesisStreamingConfiguration::EnableKinesisStreamingConfiguration{ApproximateCreationDateTimePrecision, } => ApproximateCreationDateTimePrecision, + } + } + } + + impl Debug + for EnableKinesisStreamingConfiguration { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EnableKinesisStreamingConfiguration { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EnableKinesisStreamingConfiguration::EnableKinesisStreamingConfiguration{ApproximateCreationDateTimePrecision, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingConfiguration.EnableKinesisStreamingConfiguration(")?; + DafnyPrint::fmt_print(ApproximateCreationDateTimePrecision, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EnableKinesisStreamingConfiguration {} + + impl Hash + for EnableKinesisStreamingConfiguration { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EnableKinesisStreamingConfiguration::EnableKinesisStreamingConfiguration{ApproximateCreationDateTimePrecision, } => { + Hash::hash(ApproximateCreationDateTimePrecision, _state) + }, + } + } + } + + impl Default + for EnableKinesisStreamingConfiguration { + fn default() -> EnableKinesisStreamingConfiguration { + EnableKinesisStreamingConfiguration::EnableKinesisStreamingConfiguration { + ApproximateCreationDateTimePrecision: Default::default() + } + } + } + + impl AsRef + for &EnableKinesisStreamingConfiguration { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EnableKinesisStreamingDestinationInput { + EnableKinesisStreamingDestinationInput { + TableName: Sequence, + StreamArn: Sequence, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl EnableKinesisStreamingDestinationInput { + pub fn TableName(&self) -> &Sequence { + match self { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Sequence { + match self { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for EnableKinesisStreamingDestinationInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EnableKinesisStreamingDestinationInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationInput.EnableKinesisStreamingDestinationInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EnableKinesisStreamingDestinationInput {} + + impl Hash + for EnableKinesisStreamingDestinationInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for EnableKinesisStreamingDestinationInput { + fn default() -> EnableKinesisStreamingDestinationInput { + EnableKinesisStreamingDestinationInput::EnableKinesisStreamingDestinationInput { + TableName: Default::default(), + StreamArn: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &EnableKinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EnableKinesisStreamingDestinationOutput { + EnableKinesisStreamingDestinationOutput { + TableName: Rc>>, + StreamArn: Rc>>, + DestinationStatus: Rc>>, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl EnableKinesisStreamingDestinationOutput { + pub fn TableName(&self) -> &Rc>> { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Rc>> { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn DestinationStatus(&self) -> &Rc>> { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => DestinationStatus, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for EnableKinesisStreamingDestinationOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EnableKinesisStreamingDestinationOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationOutput.EnableKinesisStreamingDestinationOutput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DestinationStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EnableKinesisStreamingDestinationOutput {} + + impl Hash + for EnableKinesisStreamingDestinationOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(DestinationStatus, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for EnableKinesisStreamingDestinationOutput { + fn default() -> EnableKinesisStreamingDestinationOutput { + EnableKinesisStreamingDestinationOutput::EnableKinesisStreamingDestinationOutput { + TableName: Default::default(), + StreamArn: Default::default(), + DestinationStatus: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &EnableKinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Endpoint { + Endpoint { + Address: Sequence, + CachePeriodInMinutes: i64 + } + } + + impl Endpoint { + pub fn Address(&self) -> &Sequence { + match self { + Endpoint::Endpoint{Address, CachePeriodInMinutes, } => Address, + } + } + pub fn CachePeriodInMinutes(&self) -> &i64 { + match self { + Endpoint::Endpoint{Address, CachePeriodInMinutes, } => CachePeriodInMinutes, + } + } + } + + impl Debug + for Endpoint { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Endpoint { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Endpoint::Endpoint{Address, CachePeriodInMinutes, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Endpoint.Endpoint(")?; + DafnyPrint::fmt_print(Address, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CachePeriodInMinutes, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Endpoint {} + + impl Hash + for Endpoint { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Endpoint::Endpoint{Address, CachePeriodInMinutes, } => { + Hash::hash(Address, _state); + Hash::hash(CachePeriodInMinutes, _state) + }, + } + } + } + + impl Default + for Endpoint { + fn default() -> Endpoint { + Endpoint::Endpoint { + Address: Default::default(), + CachePeriodInMinutes: Default::default() + } + } + } + + impl AsRef + for &Endpoint { + fn as_ref(&self) -> Self { + self + } + } + + pub type ErrorCount = i64; + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementInput { + ExecuteStatementInput { + Statement: Sequence, + Parameters: Rc>, + ConsistentRead: Rc>, + NextToken: Rc>>, + ReturnConsumedCapacity: Rc>>, + Limit: Rc> + } + } + + impl ExecuteStatementInput { + pub fn Statement(&self) -> &Sequence { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => Statement, + } + } + pub fn Parameters(&self) -> &Rc> { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => Parameters, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => ConsistentRead, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => NextToken, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => ReturnConsumedCapacity, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => Limit, + } + } + } + + impl Debug + for ExecuteStatementInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementInput.ExecuteStatementInput(")?; + DafnyPrint::fmt_print(Statement, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Parameters, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementInput {} + + impl Hash + for ExecuteStatementInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementInput::ExecuteStatementInput{Statement, Parameters, ConsistentRead, NextToken, ReturnConsumedCapacity, Limit, } => { + Hash::hash(Statement, _state); + Hash::hash(Parameters, _state); + Hash::hash(ConsistentRead, _state); + Hash::hash(NextToken, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(Limit, _state) + }, + } + } + } + + impl Default + for ExecuteStatementInput { + fn default() -> ExecuteStatementInput { + ExecuteStatementInput::ExecuteStatementInput { + Statement: Default::default(), + Parameters: Default::default(), + ConsistentRead: Default::default(), + NextToken: Default::default(), + ReturnConsumedCapacity: Default::default(), + Limit: Default::default() + } + } + } + + impl AsRef + for &ExecuteStatementInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementOutput { + ExecuteStatementOutput { + Items: Rc, Rc>>>>, + NextToken: Rc>>, + ConsumedCapacity: Rc>>, + LastEvaluatedKey: Rc, Rc>>> + } + } + + impl ExecuteStatementOutput { + pub fn Items(&self) -> &Rc, Rc>>>> { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => Items, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => NextToken, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => ConsumedCapacity, + } + } + pub fn LastEvaluatedKey(&self) -> &Rc, Rc>>> { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => LastEvaluatedKey, + } + } + } + + impl Debug + for ExecuteStatementOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementOutput.ExecuteStatementOutput(")?; + DafnyPrint::fmt_print(Items, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementOutput {} + + impl Hash + for ExecuteStatementOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementOutput::ExecuteStatementOutput{Items, NextToken, ConsumedCapacity, LastEvaluatedKey, } => { + Hash::hash(Items, _state); + Hash::hash(NextToken, _state); + Hash::hash(ConsumedCapacity, _state); + Hash::hash(LastEvaluatedKey, _state) + }, + } + } + } + + impl Default + for ExecuteStatementOutput { + fn default() -> ExecuteStatementOutput { + ExecuteStatementOutput::ExecuteStatementOutput { + Items: Default::default(), + NextToken: Default::default(), + ConsumedCapacity: Default::default(), + LastEvaluatedKey: Default::default() + } + } + } + + impl AsRef + for &ExecuteStatementOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionInput { + ExecuteTransactionInput { + TransactStatements: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ParameterizedStatements, + ClientRequestToken: Rc>>, + ReturnConsumedCapacity: Rc>> + } + } + + impl ExecuteTransactionInput { + pub fn TransactStatements(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ParameterizedStatements { + match self { + ExecuteTransactionInput::ExecuteTransactionInput{TransactStatements, ClientRequestToken, ReturnConsumedCapacity, } => TransactStatements, + } + } + pub fn ClientRequestToken(&self) -> &Rc>> { + match self { + ExecuteTransactionInput::ExecuteTransactionInput{TransactStatements, ClientRequestToken, ReturnConsumedCapacity, } => ClientRequestToken, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + ExecuteTransactionInput::ExecuteTransactionInput{TransactStatements, ClientRequestToken, ReturnConsumedCapacity, } => ReturnConsumedCapacity, + } + } + } + + impl Debug + for ExecuteTransactionInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionInput::ExecuteTransactionInput{TransactStatements, ClientRequestToken, ReturnConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionInput.ExecuteTransactionInput(")?; + DafnyPrint::fmt_print(TransactStatements, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ClientRequestToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionInput {} + + impl Hash + for ExecuteTransactionInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionInput::ExecuteTransactionInput{TransactStatements, ClientRequestToken, ReturnConsumedCapacity, } => { + Hash::hash(TransactStatements, _state); + Hash::hash(ClientRequestToken, _state); + Hash::hash(ReturnConsumedCapacity, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionInput { + fn default() -> ExecuteTransactionInput { + ExecuteTransactionInput::ExecuteTransactionInput { + TransactStatements: Default::default(), + ClientRequestToken: Default::default(), + ReturnConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &ExecuteTransactionInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionOutput { + ExecuteTransactionOutput { + Responses: Rc>, + ConsumedCapacity: Rc>>> + } + } + + impl ExecuteTransactionOutput { + pub fn Responses(&self) -> &Rc> { + match self { + ExecuteTransactionOutput::ExecuteTransactionOutput{Responses, ConsumedCapacity, } => Responses, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>>> { + match self { + ExecuteTransactionOutput::ExecuteTransactionOutput{Responses, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for ExecuteTransactionOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionOutput::ExecuteTransactionOutput{Responses, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionOutput.ExecuteTransactionOutput(")?; + DafnyPrint::fmt_print(Responses, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionOutput {} + + impl Hash + for ExecuteTransactionOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionOutput::ExecuteTransactionOutput{Responses, ConsumedCapacity, } => { + Hash::hash(Responses, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionOutput { + fn default() -> ExecuteTransactionOutput { + ExecuteTransactionOutput::ExecuteTransactionOutput { + Responses: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &ExecuteTransactionOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExpectedAttributeValue { + ExpectedAttributeValue { + Value: Rc>>, + Exists: Rc>, + ComparisonOperator: Rc>>, + AttributeValueList: Rc>>> + } + } + + impl ExpectedAttributeValue { + pub fn Value(&self) -> &Rc>> { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => Value, + } + } + pub fn Exists(&self) -> &Rc> { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => Exists, + } + } + pub fn ComparisonOperator(&self) -> &Rc>> { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => ComparisonOperator, + } + } + pub fn AttributeValueList(&self) -> &Rc>>> { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => AttributeValueList, + } + } + } + + impl Debug + for ExpectedAttributeValue { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExpectedAttributeValue { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExpectedAttributeValue.ExpectedAttributeValue(")?; + DafnyPrint::fmt_print(Value, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Exists, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ComparisonOperator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributeValueList, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExpectedAttributeValue {} + + impl Hash + for ExpectedAttributeValue { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExpectedAttributeValue::ExpectedAttributeValue{Value, Exists, ComparisonOperator, AttributeValueList, } => { + Hash::hash(Value, _state); + Hash::hash(Exists, _state); + Hash::hash(ComparisonOperator, _state); + Hash::hash(AttributeValueList, _state) + }, + } + } + } + + impl Default + for ExpectedAttributeValue { + fn default() -> ExpectedAttributeValue { + ExpectedAttributeValue::ExpectedAttributeValue { + Value: Default::default(), + Exists: Default::default(), + ComparisonOperator: Default::default(), + AttributeValueList: Default::default() + } + } + } + + impl AsRef + for &ExpectedAttributeValue { + fn as_ref(&self) -> Self { + self + } + } + + pub type ExportArn = Sequence; + + #[derive(PartialEq, Clone)] + pub enum ExportDescription { + ExportDescription { + ExportArn: Rc>>, + ExportStatus: Rc>>, + StartTime: Rc>>, + EndTime: Rc>>, + ExportManifest: Rc>>, + TableArn: Rc>>, + TableId: Rc>>, + ExportTime: Rc>>, + ClientToken: Rc>>, + S3Bucket: Rc>>, + S3BucketOwner: Rc>>, + S3Prefix: Rc>>, + S3SseAlgorithm: Rc>>, + S3SseKmsKeyId: Rc>>, + FailureCode: Rc>>, + FailureMessage: Rc>>, + ExportFormat: Rc>>, + BilledSizeBytes: Rc>, + ItemCount: Rc>, + ExportType: Rc>>, + IncrementalExportSpecification: Rc>> + } + } + + impl ExportDescription { + pub fn ExportArn(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportArn, + } + } + pub fn ExportStatus(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportStatus, + } + } + pub fn StartTime(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => StartTime, + } + } + pub fn EndTime(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => EndTime, + } + } + pub fn ExportManifest(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportManifest, + } + } + pub fn TableArn(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => TableArn, + } + } + pub fn TableId(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => TableId, + } + } + pub fn ExportTime(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportTime, + } + } + pub fn ClientToken(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ClientToken, + } + } + pub fn S3Bucket(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => S3Bucket, + } + } + pub fn S3BucketOwner(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => S3BucketOwner, + } + } + pub fn S3Prefix(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => S3Prefix, + } + } + pub fn S3SseAlgorithm(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => S3SseAlgorithm, + } + } + pub fn S3SseKmsKeyId(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => S3SseKmsKeyId, + } + } + pub fn FailureCode(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => FailureCode, + } + } + pub fn FailureMessage(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => FailureMessage, + } + } + pub fn ExportFormat(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportFormat, + } + } + pub fn BilledSizeBytes(&self) -> &Rc> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => BilledSizeBytes, + } + } + pub fn ItemCount(&self) -> &Rc> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ItemCount, + } + } + pub fn ExportType(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => ExportType, + } + } + pub fn IncrementalExportSpecification(&self) -> &Rc>> { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => IncrementalExportSpecification, + } + } + } + + impl Debug + for ExportDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportDescription.ExportDescription(")?; + DafnyPrint::fmt_print(ExportArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StartTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EndTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportManifest, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ClientToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3Bucket, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3BucketOwner, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3Prefix, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3SseAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3SseKmsKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FailureCode, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FailureMessage, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportFormat, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BilledSizeBytes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IncrementalExportSpecification, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExportDescription {} + + impl Hash + for ExportDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportDescription::ExportDescription{ExportArn, ExportStatus, StartTime, EndTime, ExportManifest, TableArn, TableId, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, FailureCode, FailureMessage, ExportFormat, BilledSizeBytes, ItemCount, ExportType, IncrementalExportSpecification, } => { + Hash::hash(ExportArn, _state); + Hash::hash(ExportStatus, _state); + Hash::hash(StartTime, _state); + Hash::hash(EndTime, _state); + Hash::hash(ExportManifest, _state); + Hash::hash(TableArn, _state); + Hash::hash(TableId, _state); + Hash::hash(ExportTime, _state); + Hash::hash(ClientToken, _state); + Hash::hash(S3Bucket, _state); + Hash::hash(S3BucketOwner, _state); + Hash::hash(S3Prefix, _state); + Hash::hash(S3SseAlgorithm, _state); + Hash::hash(S3SseKmsKeyId, _state); + Hash::hash(FailureCode, _state); + Hash::hash(FailureMessage, _state); + Hash::hash(ExportFormat, _state); + Hash::hash(BilledSizeBytes, _state); + Hash::hash(ItemCount, _state); + Hash::hash(ExportType, _state); + Hash::hash(IncrementalExportSpecification, _state) + }, + } + } + } + + impl Default + for ExportDescription { + fn default() -> ExportDescription { + ExportDescription::ExportDescription { + ExportArn: Default::default(), + ExportStatus: Default::default(), + StartTime: Default::default(), + EndTime: Default::default(), + ExportManifest: Default::default(), + TableArn: Default::default(), + TableId: Default::default(), + ExportTime: Default::default(), + ClientToken: Default::default(), + S3Bucket: Default::default(), + S3BucketOwner: Default::default(), + S3Prefix: Default::default(), + S3SseAlgorithm: Default::default(), + S3SseKmsKeyId: Default::default(), + FailureCode: Default::default(), + FailureMessage: Default::default(), + ExportFormat: Default::default(), + BilledSizeBytes: Default::default(), + ItemCount: Default::default(), + ExportType: Default::default(), + IncrementalExportSpecification: Default::default() + } + } + } + + impl AsRef + for &ExportDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportFormat { + DYNAMODB_JSON {}, + ION {} + } + + impl ExportFormat {} + + impl Debug + for ExportFormat { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportFormat { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportFormat::DYNAMODB_JSON{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportFormat.DYNAMODB__JSON")?; + Ok(()) + }, + ExportFormat::ION{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportFormat.ION")?; + Ok(()) + }, + } + } + } + + impl ExportFormat { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ExportFormat::DYNAMODB_JSON {}), Rc::new(ExportFormat::ION {})].iter() + } + } + + impl Eq + for ExportFormat {} + + impl Hash + for ExportFormat { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportFormat::DYNAMODB_JSON{} => { + + }, + ExportFormat::ION{} => { + + }, + } + } + } + + impl Default + for ExportFormat { + fn default() -> ExportFormat { + ExportFormat::DYNAMODB_JSON {} + } + } + + impl AsRef + for &ExportFormat { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportStatus { + IN_PROGRESS {}, + COMPLETED {}, + FAILED {} + } + + impl ExportStatus {} + + impl Debug + for ExportStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportStatus::IN_PROGRESS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportStatus.IN__PROGRESS")?; + Ok(()) + }, + ExportStatus::COMPLETED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportStatus.COMPLETED")?; + Ok(()) + }, + ExportStatus::FAILED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportStatus.FAILED")?; + Ok(()) + }, + } + } + } + + impl ExportStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ExportStatus::IN_PROGRESS {}), Rc::new(ExportStatus::COMPLETED {}), Rc::new(ExportStatus::FAILED {})].iter() + } + } + + impl Eq + for ExportStatus {} + + impl Hash + for ExportStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportStatus::IN_PROGRESS{} => { + + }, + ExportStatus::COMPLETED{} => { + + }, + ExportStatus::FAILED{} => { + + }, + } + } + } + + impl Default + for ExportStatus { + fn default() -> ExportStatus { + ExportStatus::IN_PROGRESS {} + } + } + + impl AsRef + for &ExportStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportSummary { + ExportSummary { + ExportArn: Rc>>, + ExportStatus: Rc>>, + ExportType: Rc>> + } + } + + impl ExportSummary { + pub fn ExportArn(&self) -> &Rc>> { + match self { + ExportSummary::ExportSummary{ExportArn, ExportStatus, ExportType, } => ExportArn, + } + } + pub fn ExportStatus(&self) -> &Rc>> { + match self { + ExportSummary::ExportSummary{ExportArn, ExportStatus, ExportType, } => ExportStatus, + } + } + pub fn ExportType(&self) -> &Rc>> { + match self { + ExportSummary::ExportSummary{ExportArn, ExportStatus, ExportType, } => ExportType, + } + } + } + + impl Debug + for ExportSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportSummary::ExportSummary{ExportArn, ExportStatus, ExportType, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportSummary.ExportSummary(")?; + DafnyPrint::fmt_print(ExportArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportType, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExportSummary {} + + impl Hash + for ExportSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportSummary::ExportSummary{ExportArn, ExportStatus, ExportType, } => { + Hash::hash(ExportArn, _state); + Hash::hash(ExportStatus, _state); + Hash::hash(ExportType, _state) + }, + } + } + } + + impl Default + for ExportSummary { + fn default() -> ExportSummary { + ExportSummary::ExportSummary { + ExportArn: Default::default(), + ExportStatus: Default::default(), + ExportType: Default::default() + } + } + } + + impl AsRef + for &ExportSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportTableToPointInTimeInput { + ExportTableToPointInTimeInput { + TableArn: Sequence, + ExportTime: Rc>>, + ClientToken: Rc>>, + S3Bucket: Sequence, + S3BucketOwner: Rc>>, + S3Prefix: Rc>>, + S3SseAlgorithm: Rc>>, + S3SseKmsKeyId: Rc>>, + ExportFormat: Rc>>, + ExportType: Rc>>, + IncrementalExportSpecification: Rc>> + } + } + + impl ExportTableToPointInTimeInput { + pub fn TableArn(&self) -> &Sequence { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => TableArn, + } + } + pub fn ExportTime(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => ExportTime, + } + } + pub fn ClientToken(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => ClientToken, + } + } + pub fn S3Bucket(&self) -> &Sequence { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => S3Bucket, + } + } + pub fn S3BucketOwner(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => S3BucketOwner, + } + } + pub fn S3Prefix(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => S3Prefix, + } + } + pub fn S3SseAlgorithm(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => S3SseAlgorithm, + } + } + pub fn S3SseKmsKeyId(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => S3SseKmsKeyId, + } + } + pub fn ExportFormat(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => ExportFormat, + } + } + pub fn ExportType(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => ExportType, + } + } + pub fn IncrementalExportSpecification(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => IncrementalExportSpecification, + } + } + } + + impl Debug + for ExportTableToPointInTimeInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportTableToPointInTimeInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeInput.ExportTableToPointInTimeInput(")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ClientToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3Bucket, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3BucketOwner, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3Prefix, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3SseAlgorithm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3SseKmsKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportFormat, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IncrementalExportSpecification, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExportTableToPointInTimeInput {} + + impl Hash + for ExportTableToPointInTimeInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput{TableArn, ExportTime, ClientToken, S3Bucket, S3BucketOwner, S3Prefix, S3SseAlgorithm, S3SseKmsKeyId, ExportFormat, ExportType, IncrementalExportSpecification, } => { + Hash::hash(TableArn, _state); + Hash::hash(ExportTime, _state); + Hash::hash(ClientToken, _state); + Hash::hash(S3Bucket, _state); + Hash::hash(S3BucketOwner, _state); + Hash::hash(S3Prefix, _state); + Hash::hash(S3SseAlgorithm, _state); + Hash::hash(S3SseKmsKeyId, _state); + Hash::hash(ExportFormat, _state); + Hash::hash(ExportType, _state); + Hash::hash(IncrementalExportSpecification, _state) + }, + } + } + } + + impl Default + for ExportTableToPointInTimeInput { + fn default() -> ExportTableToPointInTimeInput { + ExportTableToPointInTimeInput::ExportTableToPointInTimeInput { + TableArn: Default::default(), + ExportTime: Default::default(), + ClientToken: Default::default(), + S3Bucket: Default::default(), + S3BucketOwner: Default::default(), + S3Prefix: Default::default(), + S3SseAlgorithm: Default::default(), + S3SseKmsKeyId: Default::default(), + ExportFormat: Default::default(), + ExportType: Default::default(), + IncrementalExportSpecification: Default::default() + } + } + } + + impl AsRef + for &ExportTableToPointInTimeInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportTableToPointInTimeOutput { + ExportTableToPointInTimeOutput { + ExportDescription: Rc>> + } + } + + impl ExportTableToPointInTimeOutput { + pub fn ExportDescription(&self) -> &Rc>> { + match self { + ExportTableToPointInTimeOutput::ExportTableToPointInTimeOutput{ExportDescription, } => ExportDescription, + } + } + } + + impl Debug + for ExportTableToPointInTimeOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportTableToPointInTimeOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportTableToPointInTimeOutput::ExportTableToPointInTimeOutput{ExportDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput.ExportTableToPointInTimeOutput(")?; + DafnyPrint::fmt_print(ExportDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExportTableToPointInTimeOutput {} + + impl Hash + for ExportTableToPointInTimeOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportTableToPointInTimeOutput::ExportTableToPointInTimeOutput{ExportDescription, } => { + Hash::hash(ExportDescription, _state) + }, + } + } + } + + impl Default + for ExportTableToPointInTimeOutput { + fn default() -> ExportTableToPointInTimeOutput { + ExportTableToPointInTimeOutput::ExportTableToPointInTimeOutput { + ExportDescription: Default::default() + } + } + } + + impl AsRef + for &ExportTableToPointInTimeOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportType { + FULL_EXPORT {}, + INCREMENTAL_EXPORT {} + } + + impl ExportType {} + + impl Debug + for ExportType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportType::FULL_EXPORT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportType.FULL__EXPORT")?; + Ok(()) + }, + ExportType::INCREMENTAL_EXPORT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportType.INCREMENTAL__EXPORT")?; + Ok(()) + }, + } + } + } + + impl ExportType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ExportType::FULL_EXPORT {}), Rc::new(ExportType::INCREMENTAL_EXPORT {})].iter() + } + } + + impl Eq + for ExportType {} + + impl Hash + for ExportType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportType::FULL_EXPORT{} => { + + }, + ExportType::INCREMENTAL_EXPORT{} => { + + }, + } + } + } + + impl Default + for ExportType { + fn default() -> ExportType { + ExportType::FULL_EXPORT {} + } + } + + impl AsRef + for &ExportType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExportViewType { + NEW_IMAGE {}, + NEW_AND_OLD_IMAGES {} + } + + impl ExportViewType {} + + impl Debug + for ExportViewType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExportViewType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExportViewType::NEW_IMAGE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportViewType.NEW__IMAGE")?; + Ok(()) + }, + ExportViewType::NEW_AND_OLD_IMAGES{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportViewType.NEW__AND__OLD__IMAGES")?; + Ok(()) + }, + } + } + } + + impl ExportViewType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ExportViewType::NEW_IMAGE {}), Rc::new(ExportViewType::NEW_AND_OLD_IMAGES {})].iter() + } + } + + impl Eq + for ExportViewType {} + + impl Hash + for ExportViewType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExportViewType::NEW_IMAGE{} => { + + }, + ExportViewType::NEW_AND_OLD_IMAGES{} => { + + }, + } + } + } + + impl Default + for ExportViewType { + fn default() -> ExportViewType { + ExportViewType::NEW_IMAGE {} + } + } + + impl AsRef + for &ExportViewType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum FailureException { + FailureException { + ExceptionName: Rc>>, + ExceptionDescription: Rc>> + } + } + + impl FailureException { + pub fn ExceptionName(&self) -> &Rc>> { + match self { + FailureException::FailureException{ExceptionName, ExceptionDescription, } => ExceptionName, + } + } + pub fn ExceptionDescription(&self) -> &Rc>> { + match self { + FailureException::FailureException{ExceptionName, ExceptionDescription, } => ExceptionDescription, + } + } + } + + impl Debug + for FailureException { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for FailureException { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + FailureException::FailureException{ExceptionName, ExceptionDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.FailureException.FailureException(")?; + DafnyPrint::fmt_print(ExceptionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExceptionDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for FailureException {} + + impl Hash + for FailureException { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + FailureException::FailureException{ExceptionName, ExceptionDescription, } => { + Hash::hash(ExceptionName, _state); + Hash::hash(ExceptionDescription, _state) + }, + } + } + } + + impl Default + for FailureException { + fn default() -> FailureException { + FailureException::FailureException { + ExceptionName: Default::default(), + ExceptionDescription: Default::default() + } + } + } + + impl AsRef + for &FailureException { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Get { + Get { + Key: Map, Rc>, + TableName: Sequence, + ProjectionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>> + } + } + + impl Get { + pub fn Key(&self) -> &Map, Rc> { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => Key, + } + } + pub fn TableName(&self) -> &Sequence { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => TableName, + } + } + pub fn ProjectionExpression(&self) -> &Rc>> { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => ProjectionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => ExpressionAttributeNames, + } + } + } + + impl Debug + for Get { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Get { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Get.Get(")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProjectionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Get {} + + impl Hash + for Get { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Get::Get{Key, TableName, ProjectionExpression, ExpressionAttributeNames, } => { + Hash::hash(Key, _state); + Hash::hash(TableName, _state); + Hash::hash(ProjectionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state) + }, + } + } + } + + impl Default + for Get { + fn default() -> Get { + Get::Get { + Key: Default::default(), + TableName: Default::default(), + ProjectionExpression: Default::default(), + ExpressionAttributeNames: Default::default() + } + } + } + + impl AsRef + for &Get { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemInput { + GetItemInput { + TableName: Sequence, + Key: Map, Rc>, + AttributesToGet: Rc>, + ConsistentRead: Rc>, + ReturnConsumedCapacity: Rc>>, + ProjectionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>> + } + } + + impl GetItemInput { + pub fn TableName(&self) -> &Sequence { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => TableName, + } + } + pub fn Key(&self) -> &Map, Rc> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => Key, + } + } + pub fn AttributesToGet(&self) -> &Rc> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => AttributesToGet, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => ConsistentRead, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => ReturnConsumedCapacity, + } + } + pub fn ProjectionExpression(&self) -> &Rc>> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => ProjectionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => ExpressionAttributeNames, + } + } + } + + impl Debug + for GetItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput.GetItemInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributesToGet, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProjectionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemInput {} + + impl Hash + for GetItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemInput::GetItemInput{TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames, } => { + Hash::hash(TableName, _state); + Hash::hash(Key, _state); + Hash::hash(AttributesToGet, _state); + Hash::hash(ConsistentRead, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(ProjectionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state) + }, + } + } + } + + impl Default + for GetItemInput { + fn default() -> GetItemInput { + GetItemInput::GetItemInput { + TableName: Default::default(), + Key: Default::default(), + AttributesToGet: Default::default(), + ConsistentRead: Default::default(), + ReturnConsumedCapacity: Default::default(), + ProjectionExpression: Default::default(), + ExpressionAttributeNames: Default::default() + } + } + } + + impl AsRef + for &GetItemInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemOutput { + GetItemOutput { + Item: Rc, Rc>>>, + ConsumedCapacity: Rc>> + } + } + + impl GetItemOutput { + pub fn Item(&self) -> &Rc, Rc>>> { + match self { + GetItemOutput::GetItemOutput{Item, ConsumedCapacity, } => Item, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + GetItemOutput::GetItemOutput{Item, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for GetItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemOutput::GetItemOutput{Item, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput.GetItemOutput(")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemOutput {} + + impl Hash + for GetItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemOutput::GetItemOutput{Item, ConsumedCapacity, } => { + Hash::hash(Item, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for GetItemOutput { + fn default() -> GetItemOutput { + GetItemOutput::GetItemOutput { + Item: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &GetItemOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetResourcePolicyInput { + GetResourcePolicyInput { + ResourceArn: Sequence + } + } + + impl GetResourcePolicyInput { + pub fn ResourceArn(&self) -> &Sequence { + match self { + GetResourcePolicyInput::GetResourcePolicyInput{ResourceArn, } => ResourceArn, + } + } + } + + impl Debug + for GetResourcePolicyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetResourcePolicyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetResourcePolicyInput::GetResourcePolicyInput{ResourceArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyInput.GetResourcePolicyInput(")?; + DafnyPrint::fmt_print(ResourceArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetResourcePolicyInput {} + + impl Hash + for GetResourcePolicyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetResourcePolicyInput::GetResourcePolicyInput{ResourceArn, } => { + Hash::hash(ResourceArn, _state) + }, + } + } + } + + impl Default + for GetResourcePolicyInput { + fn default() -> GetResourcePolicyInput { + GetResourcePolicyInput::GetResourcePolicyInput { + ResourceArn: Default::default() + } + } + } + + impl AsRef + for &GetResourcePolicyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetResourcePolicyOutput { + GetResourcePolicyOutput { + Policy: Rc>>, + RevisionId: Rc>> + } + } + + impl GetResourcePolicyOutput { + pub fn Policy(&self) -> &Rc>> { + match self { + GetResourcePolicyOutput::GetResourcePolicyOutput{Policy, RevisionId, } => Policy, + } + } + pub fn RevisionId(&self) -> &Rc>> { + match self { + GetResourcePolicyOutput::GetResourcePolicyOutput{Policy, RevisionId, } => RevisionId, + } + } + } + + impl Debug + for GetResourcePolicyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetResourcePolicyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetResourcePolicyOutput::GetResourcePolicyOutput{Policy, RevisionId, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput.GetResourcePolicyOutput(")?; + DafnyPrint::fmt_print(Policy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(RevisionId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetResourcePolicyOutput {} + + impl Hash + for GetResourcePolicyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetResourcePolicyOutput::GetResourcePolicyOutput{Policy, RevisionId, } => { + Hash::hash(Policy, _state); + Hash::hash(RevisionId, _state) + }, + } + } + } + + impl Default + for GetResourcePolicyOutput { + fn default() -> GetResourcePolicyOutput { + GetResourcePolicyOutput::GetResourcePolicyOutput { + Policy: Default::default(), + RevisionId: Default::default() + } + } + } + + impl AsRef + for &GetResourcePolicyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalSecondaryIndex { + GlobalSecondaryIndex { + IndexName: Sequence, + KeySchema: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema, + Projection: Rc, + ProvisionedThroughput: Rc>>, + OnDemandThroughput: Rc>> + } + } + + impl GlobalSecondaryIndex { + pub fn IndexName(&self) -> &Sequence { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => IndexName, + } + } + pub fn KeySchema(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => Projection, + } + } + pub fn ProvisionedThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => ProvisionedThroughput, + } + } + pub fn OnDemandThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => OnDemandThroughput, + } + } + } + + impl Debug + for GlobalSecondaryIndex { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalSecondaryIndex { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndex.GlobalSecondaryIndex(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalSecondaryIndex {} + + impl Hash + for GlobalSecondaryIndex { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalSecondaryIndex::GlobalSecondaryIndex{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state); + Hash::hash(ProvisionedThroughput, _state); + Hash::hash(OnDemandThroughput, _state) + }, + } + } + } + + impl Default + for GlobalSecondaryIndex { + fn default() -> GlobalSecondaryIndex { + GlobalSecondaryIndex::GlobalSecondaryIndex { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default(), + ProvisionedThroughput: Default::default(), + OnDemandThroughput: Default::default() + } + } + } + + impl AsRef + for &GlobalSecondaryIndex { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalSecondaryIndexAutoScalingUpdate { + GlobalSecondaryIndexAutoScalingUpdate { + IndexName: Rc>>, + ProvisionedWriteCapacityAutoScalingUpdate: Rc>> + } + } + + impl GlobalSecondaryIndexAutoScalingUpdate { + pub fn IndexName(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedWriteCapacityAutoScalingUpdate, } => IndexName, + } + } + pub fn ProvisionedWriteCapacityAutoScalingUpdate(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedWriteCapacityAutoScalingUpdate, } => ProvisionedWriteCapacityAutoScalingUpdate, + } + } + } + + impl Debug + for GlobalSecondaryIndexAutoScalingUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalSecondaryIndexAutoScalingUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedWriteCapacityAutoScalingUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexAutoScalingUpdate.GlobalSecondaryIndexAutoScalingUpdate(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityAutoScalingUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalSecondaryIndexAutoScalingUpdate {} + + impl Hash + for GlobalSecondaryIndexAutoScalingUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedWriteCapacityAutoScalingUpdate, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedWriteCapacityAutoScalingUpdate, _state) + }, + } + } + } + + impl Default + for GlobalSecondaryIndexAutoScalingUpdate { + fn default() -> GlobalSecondaryIndexAutoScalingUpdate { + GlobalSecondaryIndexAutoScalingUpdate::GlobalSecondaryIndexAutoScalingUpdate { + IndexName: Default::default(), + ProvisionedWriteCapacityAutoScalingUpdate: Default::default() + } + } + } + + impl AsRef + for &GlobalSecondaryIndexAutoScalingUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type GlobalSecondaryIndexAutoScalingUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum GlobalSecondaryIndexDescription { + GlobalSecondaryIndexDescription { + IndexName: Rc>>, + KeySchema: Rc>, + Projection: Rc>>, + IndexStatus: Rc>>, + Backfilling: Rc>, + ProvisionedThroughput: Rc>>, + IndexSizeBytes: Rc>, + ItemCount: Rc>, + IndexArn: Rc>>, + OnDemandThroughput: Rc>> + } + } + + impl GlobalSecondaryIndexDescription { + pub fn IndexName(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => IndexName, + } + } + pub fn KeySchema(&self) -> &Rc> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => Projection, + } + } + pub fn IndexStatus(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => IndexStatus, + } + } + pub fn Backfilling(&self) -> &Rc> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => Backfilling, + } + } + pub fn ProvisionedThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => ProvisionedThroughput, + } + } + pub fn IndexSizeBytes(&self) -> &Rc> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => IndexSizeBytes, + } + } + pub fn ItemCount(&self) -> &Rc> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => ItemCount, + } + } + pub fn IndexArn(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => IndexArn, + } + } + pub fn OnDemandThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => OnDemandThroughput, + } + } + } + + impl Debug + for GlobalSecondaryIndexDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalSecondaryIndexDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexDescription.GlobalSecondaryIndexDescription(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Backfilling, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexSizeBytes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalSecondaryIndexDescription {} + + impl Hash + for GlobalSecondaryIndexDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexStatus, Backfilling, ProvisionedThroughput, IndexSizeBytes, ItemCount, IndexArn, OnDemandThroughput, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state); + Hash::hash(IndexStatus, _state); + Hash::hash(Backfilling, _state); + Hash::hash(ProvisionedThroughput, _state); + Hash::hash(IndexSizeBytes, _state); + Hash::hash(ItemCount, _state); + Hash::hash(IndexArn, _state); + Hash::hash(OnDemandThroughput, _state) + }, + } + } + } + + impl Default + for GlobalSecondaryIndexDescription { + fn default() -> GlobalSecondaryIndexDescription { + GlobalSecondaryIndexDescription::GlobalSecondaryIndexDescription { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default(), + IndexStatus: Default::default(), + Backfilling: Default::default(), + ProvisionedThroughput: Default::default(), + IndexSizeBytes: Default::default(), + ItemCount: Default::default(), + IndexArn: Default::default(), + OnDemandThroughput: Default::default() + } + } + } + + impl AsRef + for &GlobalSecondaryIndexDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalSecondaryIndexInfo { + GlobalSecondaryIndexInfo { + IndexName: Rc>>, + KeySchema: Rc>, + Projection: Rc>>, + ProvisionedThroughput: Rc>>, + OnDemandThroughput: Rc>> + } + } + + impl GlobalSecondaryIndexInfo { + pub fn IndexName(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => IndexName, + } + } + pub fn KeySchema(&self) -> &Rc> { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => Projection, + } + } + pub fn ProvisionedThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => ProvisionedThroughput, + } + } + pub fn OnDemandThroughput(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => OnDemandThroughput, + } + } + } + + impl Debug + for GlobalSecondaryIndexInfo { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalSecondaryIndexInfo { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexInfo.GlobalSecondaryIndexInfo(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalSecondaryIndexInfo {} + + impl Hash + for GlobalSecondaryIndexInfo { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo{IndexName, KeySchema, Projection, ProvisionedThroughput, OnDemandThroughput, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state); + Hash::hash(ProvisionedThroughput, _state); + Hash::hash(OnDemandThroughput, _state) + }, + } + } + } + + impl Default + for GlobalSecondaryIndexInfo { + fn default() -> GlobalSecondaryIndexInfo { + GlobalSecondaryIndexInfo::GlobalSecondaryIndexInfo { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default(), + ProvisionedThroughput: Default::default(), + OnDemandThroughput: Default::default() + } + } + } + + impl AsRef + for &GlobalSecondaryIndexInfo { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalSecondaryIndexUpdate { + GlobalSecondaryIndexUpdate { + Update: Rc>>, + Create: Rc>>, + Delete: Rc>> + } + } + + impl GlobalSecondaryIndexUpdate { + pub fn Update(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate{Update, Create, Delete, } => Update, + } + } + pub fn Create(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate{Update, Create, Delete, } => Create, + } + } + pub fn Delete(&self) -> &Rc>> { + match self { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate{Update, Create, Delete, } => Delete, + } + } + } + + impl Debug + for GlobalSecondaryIndexUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalSecondaryIndexUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate{Update, Create, Delete, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexUpdate.GlobalSecondaryIndexUpdate(")?; + DafnyPrint::fmt_print(Update, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Create, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Delete, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalSecondaryIndexUpdate {} + + impl Hash + for GlobalSecondaryIndexUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate{Update, Create, Delete, } => { + Hash::hash(Update, _state); + Hash::hash(Create, _state); + Hash::hash(Delete, _state) + }, + } + } + } + + impl Default + for GlobalSecondaryIndexUpdate { + fn default() -> GlobalSecondaryIndexUpdate { + GlobalSecondaryIndexUpdate::GlobalSecondaryIndexUpdate { + Update: Default::default(), + Create: Default::default(), + Delete: Default::default() + } + } + } + + impl AsRef + for &GlobalSecondaryIndexUpdate { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalTable { + GlobalTable { + GlobalTableName: Rc>>, + ReplicationGroup: Rc>>> + } + } + + impl GlobalTable { + pub fn GlobalTableName(&self) -> &Rc>> { + match self { + GlobalTable::GlobalTable{GlobalTableName, ReplicationGroup, } => GlobalTableName, + } + } + pub fn ReplicationGroup(&self) -> &Rc>>> { + match self { + GlobalTable::GlobalTable{GlobalTableName, ReplicationGroup, } => ReplicationGroup, + } + } + } + + impl Debug + for GlobalTable { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalTable { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalTable::GlobalTable{GlobalTableName, ReplicationGroup, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTable.GlobalTable(")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicationGroup, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalTable {} + + impl Hash + for GlobalTable { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalTable::GlobalTable{GlobalTableName, ReplicationGroup, } => { + Hash::hash(GlobalTableName, _state); + Hash::hash(ReplicationGroup, _state) + }, + } + } + } + + impl Default + for GlobalTable { + fn default() -> GlobalTable { + GlobalTable::GlobalTable { + GlobalTableName: Default::default(), + ReplicationGroup: Default::default() + } + } + } + + impl AsRef + for &GlobalTable { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalTableDescription { + GlobalTableDescription { + ReplicationGroup: Rc>>>, + GlobalTableArn: Rc>>, + CreationDateTime: Rc>>, + GlobalTableStatus: Rc>>, + GlobalTableName: Rc>> + } + } + + impl GlobalTableDescription { + pub fn ReplicationGroup(&self) -> &Rc>>> { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => ReplicationGroup, + } + } + pub fn GlobalTableArn(&self) -> &Rc>> { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => GlobalTableArn, + } + } + pub fn CreationDateTime(&self) -> &Rc>> { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => CreationDateTime, + } + } + pub fn GlobalTableStatus(&self) -> &Rc>> { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => GlobalTableStatus, + } + } + pub fn GlobalTableName(&self) -> &Rc>> { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => GlobalTableName, + } + } + } + + impl Debug + for GlobalTableDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalTableDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableDescription.GlobalTableDescription(")?; + DafnyPrint::fmt_print(ReplicationGroup, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalTableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CreationDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalTableStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalTableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalTableDescription {} + + impl Hash + for GlobalTableDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalTableDescription::GlobalTableDescription{ReplicationGroup, GlobalTableArn, CreationDateTime, GlobalTableStatus, GlobalTableName, } => { + Hash::hash(ReplicationGroup, _state); + Hash::hash(GlobalTableArn, _state); + Hash::hash(CreationDateTime, _state); + Hash::hash(GlobalTableStatus, _state); + Hash::hash(GlobalTableName, _state) + }, + } + } + } + + impl Default + for GlobalTableDescription { + fn default() -> GlobalTableDescription { + GlobalTableDescription::GlobalTableDescription { + ReplicationGroup: Default::default(), + GlobalTableArn: Default::default(), + CreationDateTime: Default::default(), + GlobalTableStatus: Default::default(), + GlobalTableName: Default::default() + } + } + } + + impl AsRef + for &GlobalTableDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GlobalTableGlobalSecondaryIndexSettingsUpdate { + GlobalTableGlobalSecondaryIndexSettingsUpdate { + IndexName: Sequence, + ProvisionedWriteCapacityUnits: Rc>, + ProvisionedWriteCapacityAutoScalingSettingsUpdate: Rc>> + } + } + + impl GlobalTableGlobalSecondaryIndexSettingsUpdate { + pub fn IndexName(&self) -> &Sequence { + match self { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettingsUpdate, } => IndexName, + } + } + pub fn ProvisionedWriteCapacityUnits(&self) -> &Rc> { + match self { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettingsUpdate, } => ProvisionedWriteCapacityUnits, + } + } + pub fn ProvisionedWriteCapacityAutoScalingSettingsUpdate(&self) -> &Rc>> { + match self { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettingsUpdate, } => ProvisionedWriteCapacityAutoScalingSettingsUpdate, + } + } + } + + impl Debug + for GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettingsUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableGlobalSecondaryIndexSettingsUpdate.GlobalTableGlobalSecondaryIndexSettingsUpdate(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityAutoScalingSettingsUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GlobalTableGlobalSecondaryIndexSettingsUpdate {} + + impl Hash + for GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettingsUpdate, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedWriteCapacityUnits, _state); + Hash::hash(ProvisionedWriteCapacityAutoScalingSettingsUpdate, _state) + }, + } + } + } + + impl Default + for GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn default() -> GlobalTableGlobalSecondaryIndexSettingsUpdate { + GlobalTableGlobalSecondaryIndexSettingsUpdate::GlobalTableGlobalSecondaryIndexSettingsUpdate { + IndexName: Default::default(), + ProvisionedWriteCapacityUnits: Default::default(), + ProvisionedWriteCapacityAutoScalingSettingsUpdate: Default::default() + } + } + } + + impl AsRef + for &GlobalTableGlobalSecondaryIndexSettingsUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type GlobalTableGlobalSecondaryIndexSettingsUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum GlobalTableStatus { + CREATING {}, + ACTIVE {}, + DELETING {}, + UPDATING {} + } + + impl GlobalTableStatus {} + + impl Debug + for GlobalTableStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GlobalTableStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GlobalTableStatus::CREATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableStatus.CREATING")?; + Ok(()) + }, + GlobalTableStatus::ACTIVE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableStatus.ACTIVE")?; + Ok(()) + }, + GlobalTableStatus::DELETING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableStatus.DELETING")?; + Ok(()) + }, + GlobalTableStatus::UPDATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableStatus.UPDATING")?; + Ok(()) + }, + } + } + } + + impl GlobalTableStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(GlobalTableStatus::CREATING {}), Rc::new(GlobalTableStatus::ACTIVE {}), Rc::new(GlobalTableStatus::DELETING {}), Rc::new(GlobalTableStatus::UPDATING {})].iter() + } + } + + impl Eq + for GlobalTableStatus {} + + impl Hash + for GlobalTableStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GlobalTableStatus::CREATING{} => { + + }, + GlobalTableStatus::ACTIVE{} => { + + }, + GlobalTableStatus::DELETING{} => { + + }, + GlobalTableStatus::UPDATING{} => { + + }, + } + } + } + + impl Default + for GlobalTableStatus { + fn default() -> GlobalTableStatus { + GlobalTableStatus::CREATING {} + } + } + + impl AsRef + for &GlobalTableStatus { + fn as_ref(&self) -> Self { + self + } + } + + pub type ImportArn = Sequence; + + pub type ImportedItemCount = i64; + + pub type ImportNextToken = Sequence; + + #[derive(PartialEq, Clone)] + pub enum ImportStatus { + IN_PROGRESS {}, + COMPLETED {}, + CANCELLING {}, + CANCELLED {}, + FAILED {} + } + + impl ImportStatus {} + + impl Debug + for ImportStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ImportStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ImportStatus::IN_PROGRESS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportStatus.IN__PROGRESS")?; + Ok(()) + }, + ImportStatus::COMPLETED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportStatus.COMPLETED")?; + Ok(()) + }, + ImportStatus::CANCELLING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportStatus.CANCELLING")?; + Ok(()) + }, + ImportStatus::CANCELLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportStatus.CANCELLED")?; + Ok(()) + }, + ImportStatus::FAILED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportStatus.FAILED")?; + Ok(()) + }, + } + } + } + + impl ImportStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ImportStatus::IN_PROGRESS {}), Rc::new(ImportStatus::COMPLETED {}), Rc::new(ImportStatus::CANCELLING {}), Rc::new(ImportStatus::CANCELLED {}), Rc::new(ImportStatus::FAILED {})].iter() + } + } + + impl Eq + for ImportStatus {} + + impl Hash + for ImportStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ImportStatus::IN_PROGRESS{} => { + + }, + ImportStatus::COMPLETED{} => { + + }, + ImportStatus::CANCELLING{} => { + + }, + ImportStatus::CANCELLED{} => { + + }, + ImportStatus::FAILED{} => { + + }, + } + } + } + + impl Default + for ImportStatus { + fn default() -> ImportStatus { + ImportStatus::IN_PROGRESS {} + } + } + + impl AsRef + for &ImportStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ImportSummary { + ImportSummary { + ImportArn: Rc>>, + ImportStatus: Rc>>, + TableArn: Rc>>, + S3BucketSource: Rc>>, + CloudWatchLogGroupArn: Rc>>, + InputFormat: Rc>>, + StartTime: Rc>>, + EndTime: Rc>> + } + } + + impl ImportSummary { + pub fn ImportArn(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => ImportArn, + } + } + pub fn ImportStatus(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => ImportStatus, + } + } + pub fn TableArn(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => TableArn, + } + } + pub fn S3BucketSource(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => S3BucketSource, + } + } + pub fn CloudWatchLogGroupArn(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => CloudWatchLogGroupArn, + } + } + pub fn InputFormat(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => InputFormat, + } + } + pub fn StartTime(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => StartTime, + } + } + pub fn EndTime(&self) -> &Rc>> { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => EndTime, + } + } + } + + impl Debug + for ImportSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ImportSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportSummary.ImportSummary(")?; + DafnyPrint::fmt_print(ImportArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ImportStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3BucketSource, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CloudWatchLogGroupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputFormat, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StartTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EndTime, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ImportSummary {} + + impl Hash + for ImportSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ImportSummary::ImportSummary{ImportArn, ImportStatus, TableArn, S3BucketSource, CloudWatchLogGroupArn, InputFormat, StartTime, EndTime, } => { + Hash::hash(ImportArn, _state); + Hash::hash(ImportStatus, _state); + Hash::hash(TableArn, _state); + Hash::hash(S3BucketSource, _state); + Hash::hash(CloudWatchLogGroupArn, _state); + Hash::hash(InputFormat, _state); + Hash::hash(StartTime, _state); + Hash::hash(EndTime, _state) + }, + } + } + } + + impl Default + for ImportSummary { + fn default() -> ImportSummary { + ImportSummary::ImportSummary { + ImportArn: Default::default(), + ImportStatus: Default::default(), + TableArn: Default::default(), + S3BucketSource: Default::default(), + CloudWatchLogGroupArn: Default::default(), + InputFormat: Default::default(), + StartTime: Default::default(), + EndTime: Default::default() + } + } + } + + impl AsRef + for &ImportSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ImportTableDescription { + ImportTableDescription { + ImportArn: Rc>>, + ImportStatus: Rc>>, + TableArn: Rc>>, + TableId: Rc>>, + ClientToken: Rc>>, + S3BucketSource: Rc>>, + ErrorCount: Rc>, + CloudWatchLogGroupArn: Rc>>, + InputFormat: Rc>>, + InputFormatOptions: Rc>>, + InputCompressionType: Rc>>, + TableCreationParameters: Rc>>, + StartTime: Rc>>, + EndTime: Rc>>, + ProcessedSizeBytes: Rc>, + ProcessedItemCount: Rc>, + ImportedItemCount: Rc>, + FailureCode: Rc>>, + FailureMessage: Rc>> + } + } + + impl ImportTableDescription { + pub fn ImportArn(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ImportArn, + } + } + pub fn ImportStatus(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ImportStatus, + } + } + pub fn TableArn(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => TableArn, + } + } + pub fn TableId(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => TableId, + } + } + pub fn ClientToken(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ClientToken, + } + } + pub fn S3BucketSource(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => S3BucketSource, + } + } + pub fn ErrorCount(&self) -> &Rc> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ErrorCount, + } + } + pub fn CloudWatchLogGroupArn(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => CloudWatchLogGroupArn, + } + } + pub fn InputFormat(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => InputFormat, + } + } + pub fn InputFormatOptions(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => InputFormatOptions, + } + } + pub fn InputCompressionType(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => InputCompressionType, + } + } + pub fn TableCreationParameters(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => TableCreationParameters, + } + } + pub fn StartTime(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => StartTime, + } + } + pub fn EndTime(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => EndTime, + } + } + pub fn ProcessedSizeBytes(&self) -> &Rc> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ProcessedSizeBytes, + } + } + pub fn ProcessedItemCount(&self) -> &Rc> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ProcessedItemCount, + } + } + pub fn ImportedItemCount(&self) -> &Rc> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => ImportedItemCount, + } + } + pub fn FailureCode(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => FailureCode, + } + } + pub fn FailureMessage(&self) -> &Rc>> { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => FailureMessage, + } + } + } + + impl Debug + for ImportTableDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ImportTableDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableDescription.ImportTableDescription(")?; + DafnyPrint::fmt_print(ImportArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ImportStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ClientToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3BucketSource, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ErrorCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CloudWatchLogGroupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputFormat, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputFormatOptions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputCompressionType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableCreationParameters, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StartTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EndTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProcessedSizeBytes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProcessedItemCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ImportedItemCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FailureCode, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FailureMessage, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ImportTableDescription {} + + impl Hash + for ImportTableDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ImportTableDescription::ImportTableDescription{ImportArn, ImportStatus, TableArn, TableId, ClientToken, S3BucketSource, ErrorCount, CloudWatchLogGroupArn, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, StartTime, EndTime, ProcessedSizeBytes, ProcessedItemCount, ImportedItemCount, FailureCode, FailureMessage, } => { + Hash::hash(ImportArn, _state); + Hash::hash(ImportStatus, _state); + Hash::hash(TableArn, _state); + Hash::hash(TableId, _state); + Hash::hash(ClientToken, _state); + Hash::hash(S3BucketSource, _state); + Hash::hash(ErrorCount, _state); + Hash::hash(CloudWatchLogGroupArn, _state); + Hash::hash(InputFormat, _state); + Hash::hash(InputFormatOptions, _state); + Hash::hash(InputCompressionType, _state); + Hash::hash(TableCreationParameters, _state); + Hash::hash(StartTime, _state); + Hash::hash(EndTime, _state); + Hash::hash(ProcessedSizeBytes, _state); + Hash::hash(ProcessedItemCount, _state); + Hash::hash(ImportedItemCount, _state); + Hash::hash(FailureCode, _state); + Hash::hash(FailureMessage, _state) + }, + } + } + } + + impl Default + for ImportTableDescription { + fn default() -> ImportTableDescription { + ImportTableDescription::ImportTableDescription { + ImportArn: Default::default(), + ImportStatus: Default::default(), + TableArn: Default::default(), + TableId: Default::default(), + ClientToken: Default::default(), + S3BucketSource: Default::default(), + ErrorCount: Default::default(), + CloudWatchLogGroupArn: Default::default(), + InputFormat: Default::default(), + InputFormatOptions: Default::default(), + InputCompressionType: Default::default(), + TableCreationParameters: Default::default(), + StartTime: Default::default(), + EndTime: Default::default(), + ProcessedSizeBytes: Default::default(), + ProcessedItemCount: Default::default(), + ImportedItemCount: Default::default(), + FailureCode: Default::default(), + FailureMessage: Default::default() + } + } + } + + impl AsRef + for &ImportTableDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ImportTableInput { + ImportTableInput { + ClientToken: Rc>>, + S3BucketSource: Rc, + InputFormat: Rc, + InputFormatOptions: Rc>>, + InputCompressionType: Rc>>, + TableCreationParameters: Rc + } + } + + impl ImportTableInput { + pub fn ClientToken(&self) -> &Rc>> { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => ClientToken, + } + } + pub fn S3BucketSource(&self) -> &Rc { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => S3BucketSource, + } + } + pub fn InputFormat(&self) -> &Rc { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => InputFormat, + } + } + pub fn InputFormatOptions(&self) -> &Rc>> { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => InputFormatOptions, + } + } + pub fn InputCompressionType(&self) -> &Rc>> { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => InputCompressionType, + } + } + pub fn TableCreationParameters(&self) -> &Rc { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => TableCreationParameters, + } + } + } + + impl Debug + for ImportTableInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ImportTableInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput.ImportTableInput(")?; + DafnyPrint::fmt_print(ClientToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3BucketSource, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputFormat, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputFormatOptions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(InputCompressionType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableCreationParameters, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ImportTableInput {} + + impl Hash + for ImportTableInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ImportTableInput::ImportTableInput{ClientToken, S3BucketSource, InputFormat, InputFormatOptions, InputCompressionType, TableCreationParameters, } => { + Hash::hash(ClientToken, _state); + Hash::hash(S3BucketSource, _state); + Hash::hash(InputFormat, _state); + Hash::hash(InputFormatOptions, _state); + Hash::hash(InputCompressionType, _state); + Hash::hash(TableCreationParameters, _state) + }, + } + } + } + + impl Default + for ImportTableInput { + fn default() -> ImportTableInput { + ImportTableInput::ImportTableInput { + ClientToken: Default::default(), + S3BucketSource: Default::default(), + InputFormat: Default::default(), + InputFormatOptions: Default::default(), + InputCompressionType: Default::default(), + TableCreationParameters: Default::default() + } + } + } + + impl AsRef + for &ImportTableInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ImportTableOutput { + ImportTableOutput { + ImportTableDescription: Rc + } + } + + impl ImportTableOutput { + pub fn ImportTableDescription(&self) -> &Rc { + match self { + ImportTableOutput::ImportTableOutput{ImportTableDescription, } => ImportTableDescription, + } + } + } + + impl Debug + for ImportTableOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ImportTableOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ImportTableOutput::ImportTableOutput{ImportTableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableOutput.ImportTableOutput(")?; + DafnyPrint::fmt_print(ImportTableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ImportTableOutput {} + + impl Hash + for ImportTableOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ImportTableOutput::ImportTableOutput{ImportTableDescription, } => { + Hash::hash(ImportTableDescription, _state) + }, + } + } + } + + impl Default + for ImportTableOutput { + fn default() -> ImportTableOutput { + ImportTableOutput::ImportTableOutput { + ImportTableDescription: Default::default() + } + } + } + + impl AsRef + for &ImportTableOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum IncrementalExportSpecification { + IncrementalExportSpecification { + ExportFromTime: Rc>>, + ExportToTime: Rc>>, + ExportViewType: Rc>> + } + } + + impl IncrementalExportSpecification { + pub fn ExportFromTime(&self) -> &Rc>> { + match self { + IncrementalExportSpecification::IncrementalExportSpecification{ExportFromTime, ExportToTime, ExportViewType, } => ExportFromTime, + } + } + pub fn ExportToTime(&self) -> &Rc>> { + match self { + IncrementalExportSpecification::IncrementalExportSpecification{ExportFromTime, ExportToTime, ExportViewType, } => ExportToTime, + } + } + pub fn ExportViewType(&self) -> &Rc>> { + match self { + IncrementalExportSpecification::IncrementalExportSpecification{ExportFromTime, ExportToTime, ExportViewType, } => ExportViewType, + } + } + } + + impl Debug + for IncrementalExportSpecification { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for IncrementalExportSpecification { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + IncrementalExportSpecification::IncrementalExportSpecification{ExportFromTime, ExportToTime, ExportViewType, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.IncrementalExportSpecification.IncrementalExportSpecification(")?; + DafnyPrint::fmt_print(ExportFromTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportToTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExportViewType, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for IncrementalExportSpecification {} + + impl Hash + for IncrementalExportSpecification { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + IncrementalExportSpecification::IncrementalExportSpecification{ExportFromTime, ExportToTime, ExportViewType, } => { + Hash::hash(ExportFromTime, _state); + Hash::hash(ExportToTime, _state); + Hash::hash(ExportViewType, _state) + }, + } + } + } + + impl Default + for IncrementalExportSpecification { + fn default() -> IncrementalExportSpecification { + IncrementalExportSpecification::IncrementalExportSpecification { + ExportFromTime: Default::default(), + ExportToTime: Default::default(), + ExportViewType: Default::default() + } + } + } + + impl AsRef + for &IncrementalExportSpecification { + fn as_ref(&self) -> Self { + self + } + } + + pub type IndexName = Sequence; + + #[derive(PartialEq, Clone)] + pub enum IndexStatus { + CREATING {}, + UPDATING {}, + DELETING {}, + ACTIVE {} + } + + impl IndexStatus {} + + impl Debug + for IndexStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for IndexStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + IndexStatus::CREATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus.CREATING")?; + Ok(()) + }, + IndexStatus::UPDATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus.UPDATING")?; + Ok(()) + }, + IndexStatus::DELETING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus.DELETING")?; + Ok(()) + }, + IndexStatus::ACTIVE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus.ACTIVE")?; + Ok(()) + }, + } + } + } + + impl IndexStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(IndexStatus::CREATING {}), Rc::new(IndexStatus::UPDATING {}), Rc::new(IndexStatus::DELETING {}), Rc::new(IndexStatus::ACTIVE {})].iter() + } + } + + impl Eq + for IndexStatus {} + + impl Hash + for IndexStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + IndexStatus::CREATING{} => { + + }, + IndexStatus::UPDATING{} => { + + }, + IndexStatus::DELETING{} => { + + }, + IndexStatus::ACTIVE{} => { + + }, + } + } + } + + impl Default + for IndexStatus { + fn default() -> IndexStatus { + IndexStatus::CREATING {} + } + } + + impl AsRef + for &IndexStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum InputCompressionType { + GZIP {}, + ZSTD {}, + NONE {} + } + + impl InputCompressionType {} + + impl Debug + for InputCompressionType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for InputCompressionType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + InputCompressionType::GZIP{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputCompressionType.GZIP")?; + Ok(()) + }, + InputCompressionType::ZSTD{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputCompressionType.ZSTD")?; + Ok(()) + }, + InputCompressionType::NONE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputCompressionType.NONE")?; + Ok(()) + }, + } + } + } + + impl InputCompressionType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(InputCompressionType::GZIP {}), Rc::new(InputCompressionType::ZSTD {}), Rc::new(InputCompressionType::NONE {})].iter() + } + } + + impl Eq + for InputCompressionType {} + + impl Hash + for InputCompressionType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + InputCompressionType::GZIP{} => { + + }, + InputCompressionType::ZSTD{} => { + + }, + InputCompressionType::NONE{} => { + + }, + } + } + } + + impl Default + for InputCompressionType { + fn default() -> InputCompressionType { + InputCompressionType::GZIP {} + } + } + + impl AsRef + for &InputCompressionType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum InputFormat { + DYNAMODB_JSON {}, + ION {}, + CSV {} + } + + impl InputFormat {} + + impl Debug + for InputFormat { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for InputFormat { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + InputFormat::DYNAMODB_JSON{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormat.DYNAMODB__JSON")?; + Ok(()) + }, + InputFormat::ION{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormat.ION")?; + Ok(()) + }, + InputFormat::CSV{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormat.CSV")?; + Ok(()) + }, + } + } + } + + impl InputFormat { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(InputFormat::DYNAMODB_JSON {}), Rc::new(InputFormat::ION {}), Rc::new(InputFormat::CSV {})].iter() + } + } + + impl Eq + for InputFormat {} + + impl Hash + for InputFormat { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + InputFormat::DYNAMODB_JSON{} => { + + }, + InputFormat::ION{} => { + + }, + InputFormat::CSV{} => { + + }, + } + } + } + + impl Default + for InputFormat { + fn default() -> InputFormat { + InputFormat::DYNAMODB_JSON {} + } + } + + impl AsRef + for &InputFormat { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum InputFormatOptions { + InputFormatOptions { + Csv: Rc>> + } + } + + impl InputFormatOptions { + pub fn Csv(&self) -> &Rc>> { + match self { + InputFormatOptions::InputFormatOptions{Csv, } => Csv, + } + } + } + + impl Debug + for InputFormatOptions { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for InputFormatOptions { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + InputFormatOptions::InputFormatOptions{Csv, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormatOptions.InputFormatOptions(")?; + DafnyPrint::fmt_print(Csv, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for InputFormatOptions {} + + impl Hash + for InputFormatOptions { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + InputFormatOptions::InputFormatOptions{Csv, } => { + Hash::hash(Csv, _state) + }, + } + } + } + + impl Default + for InputFormatOptions { + fn default() -> InputFormatOptions { + InputFormatOptions::InputFormatOptions { + Csv: Default::default() + } + } + } + + impl AsRef + for &InputFormatOptions { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ItemCollectionMetrics { + ItemCollectionMetrics { + ItemCollectionKey: Rc, Rc>>>, + SizeEstimateRangeGB: Rc>> + } + } + + impl ItemCollectionMetrics { + pub fn ItemCollectionKey(&self) -> &Rc, Rc>>> { + match self { + ItemCollectionMetrics::ItemCollectionMetrics{ItemCollectionKey, SizeEstimateRangeGB, } => ItemCollectionKey, + } + } + pub fn SizeEstimateRangeGB(&self) -> &Rc>> { + match self { + ItemCollectionMetrics::ItemCollectionMetrics{ItemCollectionKey, SizeEstimateRangeGB, } => SizeEstimateRangeGB, + } + } + } + + impl Debug + for ItemCollectionMetrics { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ItemCollectionMetrics { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ItemCollectionMetrics::ItemCollectionMetrics{ItemCollectionKey, SizeEstimateRangeGB, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemCollectionMetrics.ItemCollectionMetrics(")?; + DafnyPrint::fmt_print(ItemCollectionKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SizeEstimateRangeGB, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ItemCollectionMetrics {} + + impl Hash + for ItemCollectionMetrics { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ItemCollectionMetrics::ItemCollectionMetrics{ItemCollectionKey, SizeEstimateRangeGB, } => { + Hash::hash(ItemCollectionKey, _state); + Hash::hash(SizeEstimateRangeGB, _state) + }, + } + } + } + + impl Default + for ItemCollectionMetrics { + fn default() -> ItemCollectionMetrics { + ItemCollectionMetrics::ItemCollectionMetrics { + ItemCollectionKey: Default::default(), + SizeEstimateRangeGB: Default::default() + } + } + } + + impl AsRef + for &ItemCollectionMetrics { + fn as_ref(&self) -> Self { + self + } + } + + pub type ItemCollectionSizeEstimateBound = Sequence; + + pub type ItemCount = i64; + + #[derive(PartialEq, Clone)] + pub enum ItemResponse { + ItemResponse { + Item: Rc, Rc>>> + } + } + + impl ItemResponse { + pub fn Item(&self) -> &Rc, Rc>>> { + match self { + ItemResponse::ItemResponse{Item, } => Item, + } + } + } + + impl Debug + for ItemResponse { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ItemResponse { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ItemResponse::ItemResponse{Item, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemResponse.ItemResponse(")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ItemResponse {} + + impl Hash + for ItemResponse { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ItemResponse::ItemResponse{Item, } => { + Hash::hash(Item, _state) + }, + } + } + } + + impl Default + for ItemResponse { + fn default() -> ItemResponse { + ItemResponse::ItemResponse { + Item: Default::default() + } + } + } + + impl AsRef + for &ItemResponse { + fn as_ref(&self) -> Self { + self + } + } + + pub type ItemResponseList = Sequence>; + + pub type KeyList = Sequence, Rc>>; + + #[derive(PartialEq, Clone)] + pub enum KeysAndAttributes { + KeysAndAttributes { + Keys: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyList, + AttributesToGet: Rc>, + ConsistentRead: Rc>, + ProjectionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>> + } + } + + impl KeysAndAttributes { + pub fn Keys(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeyList { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => Keys, + } + } + pub fn AttributesToGet(&self) -> &Rc> { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => AttributesToGet, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => ConsistentRead, + } + } + pub fn ProjectionExpression(&self) -> &Rc>> { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => ProjectionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => ExpressionAttributeNames, + } + } + } + + impl Debug + for KeysAndAttributes { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KeysAndAttributes { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KeysAndAttributes.KeysAndAttributes(")?; + DafnyPrint::fmt_print(Keys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributesToGet, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProjectionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KeysAndAttributes {} + + impl Hash + for KeysAndAttributes { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KeysAndAttributes::KeysAndAttributes{Keys, AttributesToGet, ConsistentRead, ProjectionExpression, ExpressionAttributeNames, } => { + Hash::hash(Keys, _state); + Hash::hash(AttributesToGet, _state); + Hash::hash(ConsistentRead, _state); + Hash::hash(ProjectionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state) + }, + } + } + } + + impl Default + for KeysAndAttributes { + fn default() -> KeysAndAttributes { + KeysAndAttributes::KeysAndAttributes { + Keys: Default::default(), + AttributesToGet: Default::default(), + ConsistentRead: Default::default(), + ProjectionExpression: Default::default(), + ExpressionAttributeNames: Default::default() + } + } + } + + impl AsRef + for &KeysAndAttributes { + fn as_ref(&self) -> Self { + self + } + } + + pub type KeySchema = Sequence>; + + pub type KeySchemaAttributeName = Sequence; + + #[derive(PartialEq, Clone)] + pub enum KeySchemaElement { + KeySchemaElement { + AttributeName: Sequence, + KeyType: Rc + } + } + + impl KeySchemaElement { + pub fn AttributeName(&self) -> &Sequence { + match self { + KeySchemaElement::KeySchemaElement{AttributeName, KeyType, } => AttributeName, + } + } + pub fn KeyType(&self) -> &Rc { + match self { + KeySchemaElement::KeySchemaElement{AttributeName, KeyType, } => KeyType, + } + } + } + + impl Debug + for KeySchemaElement { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KeySchemaElement { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KeySchemaElement::KeySchemaElement{AttributeName, KeyType, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KeySchemaElement.KeySchemaElement(")?; + DafnyPrint::fmt_print(AttributeName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeyType, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KeySchemaElement {} + + impl Hash + for KeySchemaElement { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KeySchemaElement::KeySchemaElement{AttributeName, KeyType, } => { + Hash::hash(AttributeName, _state); + Hash::hash(KeyType, _state) + }, + } + } + } + + impl Default + for KeySchemaElement { + fn default() -> KeySchemaElement { + KeySchemaElement::KeySchemaElement { + AttributeName: Default::default(), + KeyType: Default::default() + } + } + } + + impl AsRef + for &KeySchemaElement { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KeyType { + HASH {}, + RANGE {} + } + + impl KeyType {} + + impl Debug + for KeyType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KeyType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KeyType::HASH{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KeyType.HASH")?; + Ok(()) + }, + KeyType::RANGE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KeyType.RANGE")?; + Ok(()) + }, + } + } + } + + impl KeyType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(KeyType::HASH {}), Rc::new(KeyType::RANGE {})].iter() + } + } + + impl Eq + for KeyType {} + + impl Hash + for KeyType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KeyType::HASH{} => { + + }, + KeyType::RANGE{} => { + + }, + } + } + } + + impl Default + for KeyType { + fn default() -> KeyType { + KeyType::HASH {} + } + } + + impl AsRef + for &KeyType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KinesisDataStreamDestination { + KinesisDataStreamDestination { + StreamArn: Rc>>, + DestinationStatus: Rc>>, + DestinationStatusDescription: Rc>>, + ApproximateCreationDateTimePrecision: Rc>> + } + } + + impl KinesisDataStreamDestination { + pub fn StreamArn(&self) -> &Rc>> { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => StreamArn, + } + } + pub fn DestinationStatus(&self) -> &Rc>> { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => DestinationStatus, + } + } + pub fn DestinationStatusDescription(&self) -> &Rc>> { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => DestinationStatusDescription, + } + } + pub fn ApproximateCreationDateTimePrecision(&self) -> &Rc>> { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => ApproximateCreationDateTimePrecision, + } + } + } + + impl Debug + for KinesisDataStreamDestination { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KinesisDataStreamDestination { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KinesisDataStreamDestination.KinesisDataStreamDestination(")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DestinationStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DestinationStatusDescription, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ApproximateCreationDateTimePrecision, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KinesisDataStreamDestination {} + + impl Hash + for KinesisDataStreamDestination { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KinesisDataStreamDestination::KinesisDataStreamDestination{StreamArn, DestinationStatus, DestinationStatusDescription, ApproximateCreationDateTimePrecision, } => { + Hash::hash(StreamArn, _state); + Hash::hash(DestinationStatus, _state); + Hash::hash(DestinationStatusDescription, _state); + Hash::hash(ApproximateCreationDateTimePrecision, _state) + }, + } + } + } + + impl Default + for KinesisDataStreamDestination { + fn default() -> KinesisDataStreamDestination { + KinesisDataStreamDestination::KinesisDataStreamDestination { + StreamArn: Default::default(), + DestinationStatus: Default::default(), + DestinationStatusDescription: Default::default(), + ApproximateCreationDateTimePrecision: Default::default() + } + } + } + + impl AsRef + for &KinesisDataStreamDestination { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KinesisStreamingDestinationInput { + KinesisStreamingDestinationInput { + TableName: Sequence, + StreamArn: Sequence, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl KinesisStreamingDestinationInput { + pub fn TableName(&self) -> &Sequence { + match self { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Sequence { + match self { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for KinesisStreamingDestinationInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KinesisStreamingDestinationInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KinesisStreamingDestinationInput.KinesisStreamingDestinationInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KinesisStreamingDestinationInput {} + + impl Hash + for KinesisStreamingDestinationInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput{TableName, StreamArn, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for KinesisStreamingDestinationInput { + fn default() -> KinesisStreamingDestinationInput { + KinesisStreamingDestinationInput::KinesisStreamingDestinationInput { + TableName: Default::default(), + StreamArn: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &KinesisStreamingDestinationInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum KinesisStreamingDestinationOutput { + KinesisStreamingDestinationOutput { + TableName: Rc>>, + StreamArn: Rc>>, + DestinationStatus: Rc>>, + EnableKinesisStreamingConfiguration: Rc>> + } + } + + impl KinesisStreamingDestinationOutput { + pub fn TableName(&self) -> &Rc>> { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => TableName, + } + } + pub fn StreamArn(&self) -> &Rc>> { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => StreamArn, + } + } + pub fn DestinationStatus(&self) -> &Rc>> { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => DestinationStatus, + } + } + pub fn EnableKinesisStreamingConfiguration(&self) -> &Rc>> { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => EnableKinesisStreamingConfiguration, + } + } + } + + impl Debug + for KinesisStreamingDestinationOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for KinesisStreamingDestinationOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.KinesisStreamingDestinationOutput.KinesisStreamingDestinationOutput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(StreamArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(DestinationStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EnableKinesisStreamingConfiguration, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for KinesisStreamingDestinationOutput {} + + impl Hash + for KinesisStreamingDestinationOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput{TableName, StreamArn, DestinationStatus, EnableKinesisStreamingConfiguration, } => { + Hash::hash(TableName, _state); + Hash::hash(StreamArn, _state); + Hash::hash(DestinationStatus, _state); + Hash::hash(EnableKinesisStreamingConfiguration, _state) + }, + } + } + } + + impl Default + for KinesisStreamingDestinationOutput { + fn default() -> KinesisStreamingDestinationOutput { + KinesisStreamingDestinationOutput::KinesisStreamingDestinationOutput { + TableName: Default::default(), + StreamArn: Default::default(), + DestinationStatus: Default::default(), + EnableKinesisStreamingConfiguration: Default::default() + } + } + } + + impl AsRef + for &KinesisStreamingDestinationOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListBackupsInput { + ListBackupsInput { + TableName: Rc>>, + Limit: Rc>, + TimeRangeLowerBound: Rc>>, + TimeRangeUpperBound: Rc>>, + ExclusiveStartBackupArn: Rc>>, + BackupType: Rc>> + } + } + + impl ListBackupsInput { + pub fn TableName(&self) -> &Rc>> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => TableName, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => Limit, + } + } + pub fn TimeRangeLowerBound(&self) -> &Rc>> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => TimeRangeLowerBound, + } + } + pub fn TimeRangeUpperBound(&self) -> &Rc>> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => TimeRangeUpperBound, + } + } + pub fn ExclusiveStartBackupArn(&self) -> &Rc>> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => ExclusiveStartBackupArn, + } + } + pub fn BackupType(&self) -> &Rc>> { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => BackupType, + } + } + } + + impl Debug + for ListBackupsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListBackupsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsInput.ListBackupsInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TimeRangeLowerBound, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TimeRangeUpperBound, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExclusiveStartBackupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupType, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListBackupsInput {} + + impl Hash + for ListBackupsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListBackupsInput::ListBackupsInput{TableName, Limit, TimeRangeLowerBound, TimeRangeUpperBound, ExclusiveStartBackupArn, BackupType, } => { + Hash::hash(TableName, _state); + Hash::hash(Limit, _state); + Hash::hash(TimeRangeLowerBound, _state); + Hash::hash(TimeRangeUpperBound, _state); + Hash::hash(ExclusiveStartBackupArn, _state); + Hash::hash(BackupType, _state) + }, + } + } + } + + impl Default + for ListBackupsInput { + fn default() -> ListBackupsInput { + ListBackupsInput::ListBackupsInput { + TableName: Default::default(), + Limit: Default::default(), + TimeRangeLowerBound: Default::default(), + TimeRangeUpperBound: Default::default(), + ExclusiveStartBackupArn: Default::default(), + BackupType: Default::default() + } + } + } + + impl AsRef + for &ListBackupsInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListBackupsOutput { + ListBackupsOutput { + BackupSummaries: Rc>>>, + LastEvaluatedBackupArn: Rc>> + } + } + + impl ListBackupsOutput { + pub fn BackupSummaries(&self) -> &Rc>>> { + match self { + ListBackupsOutput::ListBackupsOutput{BackupSummaries, LastEvaluatedBackupArn, } => BackupSummaries, + } + } + pub fn LastEvaluatedBackupArn(&self) -> &Rc>> { + match self { + ListBackupsOutput::ListBackupsOutput{BackupSummaries, LastEvaluatedBackupArn, } => LastEvaluatedBackupArn, + } + } + } + + impl Debug + for ListBackupsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListBackupsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListBackupsOutput::ListBackupsOutput{BackupSummaries, LastEvaluatedBackupArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsOutput.ListBackupsOutput(")?; + DafnyPrint::fmt_print(BackupSummaries, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedBackupArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListBackupsOutput {} + + impl Hash + for ListBackupsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListBackupsOutput::ListBackupsOutput{BackupSummaries, LastEvaluatedBackupArn, } => { + Hash::hash(BackupSummaries, _state); + Hash::hash(LastEvaluatedBackupArn, _state) + }, + } + } + } + + impl Default + for ListBackupsOutput { + fn default() -> ListBackupsOutput { + ListBackupsOutput::ListBackupsOutput { + BackupSummaries: Default::default(), + LastEvaluatedBackupArn: Default::default() + } + } + } + + impl AsRef + for &ListBackupsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListContributorInsightsInput { + ListContributorInsightsInput { + TableName: Rc>>, + NextToken: Rc>>, + MaxResults: Rc> + } + } + + impl ListContributorInsightsInput { + pub fn TableName(&self) -> &Rc>> { + match self { + ListContributorInsightsInput::ListContributorInsightsInput{TableName, NextToken, MaxResults, } => TableName, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListContributorInsightsInput::ListContributorInsightsInput{TableName, NextToken, MaxResults, } => NextToken, + } + } + pub fn MaxResults(&self) -> &Rc> { + match self { + ListContributorInsightsInput::ListContributorInsightsInput{TableName, NextToken, MaxResults, } => MaxResults, + } + } + } + + impl Debug + for ListContributorInsightsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListContributorInsightsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListContributorInsightsInput::ListContributorInsightsInput{TableName, NextToken, MaxResults, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsInput.ListContributorInsightsInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(MaxResults, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListContributorInsightsInput {} + + impl Hash + for ListContributorInsightsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListContributorInsightsInput::ListContributorInsightsInput{TableName, NextToken, MaxResults, } => { + Hash::hash(TableName, _state); + Hash::hash(NextToken, _state); + Hash::hash(MaxResults, _state) + }, + } + } + } + + impl Default + for ListContributorInsightsInput { + fn default() -> ListContributorInsightsInput { + ListContributorInsightsInput::ListContributorInsightsInput { + TableName: Default::default(), + NextToken: Default::default(), + MaxResults: Default::default() + } + } + } + + impl AsRef + for &ListContributorInsightsInput { + fn as_ref(&self) -> Self { + self + } + } + + pub type ListContributorInsightsLimit = i32; + + #[derive(PartialEq, Clone)] + pub enum ListContributorInsightsOutput { + ListContributorInsightsOutput { + ContributorInsightsSummaries: Rc>>>, + NextToken: Rc>> + } + } + + impl ListContributorInsightsOutput { + pub fn ContributorInsightsSummaries(&self) -> &Rc>>> { + match self { + ListContributorInsightsOutput::ListContributorInsightsOutput{ContributorInsightsSummaries, NextToken, } => ContributorInsightsSummaries, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListContributorInsightsOutput::ListContributorInsightsOutput{ContributorInsightsSummaries, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListContributorInsightsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListContributorInsightsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListContributorInsightsOutput::ListContributorInsightsOutput{ContributorInsightsSummaries, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsOutput.ListContributorInsightsOutput(")?; + DafnyPrint::fmt_print(ContributorInsightsSummaries, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListContributorInsightsOutput {} + + impl Hash + for ListContributorInsightsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListContributorInsightsOutput::ListContributorInsightsOutput{ContributorInsightsSummaries, NextToken, } => { + Hash::hash(ContributorInsightsSummaries, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListContributorInsightsOutput { + fn default() -> ListContributorInsightsOutput { + ListContributorInsightsOutput::ListContributorInsightsOutput { + ContributorInsightsSummaries: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListContributorInsightsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListExportsInput { + ListExportsInput { + TableArn: Rc>>, + MaxResults: Rc>, + NextToken: Rc>> + } + } + + impl ListExportsInput { + pub fn TableArn(&self) -> &Rc>> { + match self { + ListExportsInput::ListExportsInput{TableArn, MaxResults, NextToken, } => TableArn, + } + } + pub fn MaxResults(&self) -> &Rc> { + match self { + ListExportsInput::ListExportsInput{TableArn, MaxResults, NextToken, } => MaxResults, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListExportsInput::ListExportsInput{TableArn, MaxResults, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListExportsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListExportsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListExportsInput::ListExportsInput{TableArn, MaxResults, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsInput.ListExportsInput(")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(MaxResults, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListExportsInput {} + + impl Hash + for ListExportsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListExportsInput::ListExportsInput{TableArn, MaxResults, NextToken, } => { + Hash::hash(TableArn, _state); + Hash::hash(MaxResults, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListExportsInput { + fn default() -> ListExportsInput { + ListExportsInput::ListExportsInput { + TableArn: Default::default(), + MaxResults: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListExportsInput { + fn as_ref(&self) -> Self { + self + } + } + + pub type ListExportsMaxLimit = i32; + + #[derive(PartialEq, Clone)] + pub enum ListExportsOutput { + ListExportsOutput { + ExportSummaries: Rc>>>, + NextToken: Rc>> + } + } + + impl ListExportsOutput { + pub fn ExportSummaries(&self) -> &Rc>>> { + match self { + ListExportsOutput::ListExportsOutput{ExportSummaries, NextToken, } => ExportSummaries, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListExportsOutput::ListExportsOutput{ExportSummaries, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListExportsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListExportsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListExportsOutput::ListExportsOutput{ExportSummaries, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsOutput.ListExportsOutput(")?; + DafnyPrint::fmt_print(ExportSummaries, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListExportsOutput {} + + impl Hash + for ListExportsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListExportsOutput::ListExportsOutput{ExportSummaries, NextToken, } => { + Hash::hash(ExportSummaries, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListExportsOutput { + fn default() -> ListExportsOutput { + ListExportsOutput::ListExportsOutput { + ExportSummaries: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListExportsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListGlobalTablesInput { + ListGlobalTablesInput { + ExclusiveStartGlobalTableName: Rc>>, + Limit: Rc>, + RegionName: Rc>> + } + } + + impl ListGlobalTablesInput { + pub fn ExclusiveStartGlobalTableName(&self) -> &Rc>> { + match self { + ListGlobalTablesInput::ListGlobalTablesInput{ExclusiveStartGlobalTableName, Limit, RegionName, } => ExclusiveStartGlobalTableName, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + ListGlobalTablesInput::ListGlobalTablesInput{ExclusiveStartGlobalTableName, Limit, RegionName, } => Limit, + } + } + pub fn RegionName(&self) -> &Rc>> { + match self { + ListGlobalTablesInput::ListGlobalTablesInput{ExclusiveStartGlobalTableName, Limit, RegionName, } => RegionName, + } + } + } + + impl Debug + for ListGlobalTablesInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListGlobalTablesInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListGlobalTablesInput::ListGlobalTablesInput{ExclusiveStartGlobalTableName, Limit, RegionName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesInput.ListGlobalTablesInput(")?; + DafnyPrint::fmt_print(ExclusiveStartGlobalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListGlobalTablesInput {} + + impl Hash + for ListGlobalTablesInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListGlobalTablesInput::ListGlobalTablesInput{ExclusiveStartGlobalTableName, Limit, RegionName, } => { + Hash::hash(ExclusiveStartGlobalTableName, _state); + Hash::hash(Limit, _state); + Hash::hash(RegionName, _state) + }, + } + } + } + + impl Default + for ListGlobalTablesInput { + fn default() -> ListGlobalTablesInput { + ListGlobalTablesInput::ListGlobalTablesInput { + ExclusiveStartGlobalTableName: Default::default(), + Limit: Default::default(), + RegionName: Default::default() + } + } + } + + impl AsRef + for &ListGlobalTablesInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListGlobalTablesOutput { + ListGlobalTablesOutput { + GlobalTables: Rc>>>, + LastEvaluatedGlobalTableName: Rc>> + } + } + + impl ListGlobalTablesOutput { + pub fn GlobalTables(&self) -> &Rc>>> { + match self { + ListGlobalTablesOutput::ListGlobalTablesOutput{GlobalTables, LastEvaluatedGlobalTableName, } => GlobalTables, + } + } + pub fn LastEvaluatedGlobalTableName(&self) -> &Rc>> { + match self { + ListGlobalTablesOutput::ListGlobalTablesOutput{GlobalTables, LastEvaluatedGlobalTableName, } => LastEvaluatedGlobalTableName, + } + } + } + + impl Debug + for ListGlobalTablesOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListGlobalTablesOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListGlobalTablesOutput::ListGlobalTablesOutput{GlobalTables, LastEvaluatedGlobalTableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesOutput.ListGlobalTablesOutput(")?; + DafnyPrint::fmt_print(GlobalTables, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedGlobalTableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListGlobalTablesOutput {} + + impl Hash + for ListGlobalTablesOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListGlobalTablesOutput::ListGlobalTablesOutput{GlobalTables, LastEvaluatedGlobalTableName, } => { + Hash::hash(GlobalTables, _state); + Hash::hash(LastEvaluatedGlobalTableName, _state) + }, + } + } + } + + impl Default + for ListGlobalTablesOutput { + fn default() -> ListGlobalTablesOutput { + ListGlobalTablesOutput::ListGlobalTablesOutput { + GlobalTables: Default::default(), + LastEvaluatedGlobalTableName: Default::default() + } + } + } + + impl AsRef + for &ListGlobalTablesOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListImportsInput { + ListImportsInput { + TableArn: Rc>>, + PageSize: Rc>, + NextToken: Rc>> + } + } + + impl ListImportsInput { + pub fn TableArn(&self) -> &Rc>> { + match self { + ListImportsInput::ListImportsInput{TableArn, PageSize, NextToken, } => TableArn, + } + } + pub fn PageSize(&self) -> &Rc> { + match self { + ListImportsInput::ListImportsInput{TableArn, PageSize, NextToken, } => PageSize, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListImportsInput::ListImportsInput{TableArn, PageSize, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListImportsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListImportsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListImportsInput::ListImportsInput{TableArn, PageSize, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsInput.ListImportsInput(")?; + DafnyPrint::fmt_print(TableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(PageSize, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListImportsInput {} + + impl Hash + for ListImportsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListImportsInput::ListImportsInput{TableArn, PageSize, NextToken, } => { + Hash::hash(TableArn, _state); + Hash::hash(PageSize, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListImportsInput { + fn default() -> ListImportsInput { + ListImportsInput::ListImportsInput { + TableArn: Default::default(), + PageSize: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListImportsInput { + fn as_ref(&self) -> Self { + self + } + } + + pub type ListImportsMaxLimit = i32; + + #[derive(PartialEq, Clone)] + pub enum ListImportsOutput { + ListImportsOutput { + ImportSummaryList: Rc>>>, + NextToken: Rc>> + } + } + + impl ListImportsOutput { + pub fn ImportSummaryList(&self) -> &Rc>>> { + match self { + ListImportsOutput::ListImportsOutput{ImportSummaryList, NextToken, } => ImportSummaryList, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListImportsOutput::ListImportsOutput{ImportSummaryList, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListImportsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListImportsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListImportsOutput::ListImportsOutput{ImportSummaryList, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsOutput.ListImportsOutput(")?; + DafnyPrint::fmt_print(ImportSummaryList, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListImportsOutput {} + + impl Hash + for ListImportsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListImportsOutput::ListImportsOutput{ImportSummaryList, NextToken, } => { + Hash::hash(ImportSummaryList, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListImportsOutput { + fn default() -> ListImportsOutput { + ListImportsOutput::ListImportsOutput { + ImportSummaryList: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListImportsOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListTablesInput { + ListTablesInput { + ExclusiveStartTableName: Rc>>, + Limit: Rc> + } + } + + impl ListTablesInput { + pub fn ExclusiveStartTableName(&self) -> &Rc>> { + match self { + ListTablesInput::ListTablesInput{ExclusiveStartTableName, Limit, } => ExclusiveStartTableName, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + ListTablesInput::ListTablesInput{ExclusiveStartTableName, Limit, } => Limit, + } + } + } + + impl Debug + for ListTablesInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListTablesInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListTablesInput::ListTablesInput{ExclusiveStartTableName, Limit, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesInput.ListTablesInput(")?; + DafnyPrint::fmt_print(ExclusiveStartTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListTablesInput {} + + impl Hash + for ListTablesInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListTablesInput::ListTablesInput{ExclusiveStartTableName, Limit, } => { + Hash::hash(ExclusiveStartTableName, _state); + Hash::hash(Limit, _state) + }, + } + } + } + + impl Default + for ListTablesInput { + fn default() -> ListTablesInput { + ListTablesInput::ListTablesInput { + ExclusiveStartTableName: Default::default(), + Limit: Default::default() + } + } + } + + impl AsRef + for &ListTablesInput { + fn as_ref(&self) -> Self { + self + } + } + + pub type ListTablesInputLimit = i32; + + #[derive(PartialEq, Clone)] + pub enum ListTablesOutput { + ListTablesOutput { + TableNames: Rc>>>, + LastEvaluatedTableName: Rc>> + } + } + + impl ListTablesOutput { + pub fn TableNames(&self) -> &Rc>>> { + match self { + ListTablesOutput::ListTablesOutput{TableNames, LastEvaluatedTableName, } => TableNames, + } + } + pub fn LastEvaluatedTableName(&self) -> &Rc>> { + match self { + ListTablesOutput::ListTablesOutput{TableNames, LastEvaluatedTableName, } => LastEvaluatedTableName, + } + } + } + + impl Debug + for ListTablesOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListTablesOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListTablesOutput::ListTablesOutput{TableNames, LastEvaluatedTableName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesOutput.ListTablesOutput(")?; + DafnyPrint::fmt_print(TableNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedTableName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListTablesOutput {} + + impl Hash + for ListTablesOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListTablesOutput::ListTablesOutput{TableNames, LastEvaluatedTableName, } => { + Hash::hash(TableNames, _state); + Hash::hash(LastEvaluatedTableName, _state) + }, + } + } + } + + impl Default + for ListTablesOutput { + fn default() -> ListTablesOutput { + ListTablesOutput::ListTablesOutput { + TableNames: Default::default(), + LastEvaluatedTableName: Default::default() + } + } + } + + impl AsRef + for &ListTablesOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListTagsOfResourceInput { + ListTagsOfResourceInput { + ResourceArn: Sequence, + NextToken: Rc>> + } + } + + impl ListTagsOfResourceInput { + pub fn ResourceArn(&self) -> &Sequence { + match self { + ListTagsOfResourceInput::ListTagsOfResourceInput{ResourceArn, NextToken, } => ResourceArn, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListTagsOfResourceInput::ListTagsOfResourceInput{ResourceArn, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListTagsOfResourceInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListTagsOfResourceInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListTagsOfResourceInput::ListTagsOfResourceInput{ResourceArn, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceInput.ListTagsOfResourceInput(")?; + DafnyPrint::fmt_print(ResourceArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListTagsOfResourceInput {} + + impl Hash + for ListTagsOfResourceInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListTagsOfResourceInput::ListTagsOfResourceInput{ResourceArn, NextToken, } => { + Hash::hash(ResourceArn, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListTagsOfResourceInput { + fn default() -> ListTagsOfResourceInput { + ListTagsOfResourceInput::ListTagsOfResourceInput { + ResourceArn: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListTagsOfResourceInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ListTagsOfResourceOutput { + ListTagsOfResourceOutput { + Tags: Rc>>>, + NextToken: Rc>> + } + } + + impl ListTagsOfResourceOutput { + pub fn Tags(&self) -> &Rc>>> { + match self { + ListTagsOfResourceOutput::ListTagsOfResourceOutput{Tags, NextToken, } => Tags, + } + } + pub fn NextToken(&self) -> &Rc>> { + match self { + ListTagsOfResourceOutput::ListTagsOfResourceOutput{Tags, NextToken, } => NextToken, + } + } + } + + impl Debug + for ListTagsOfResourceOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ListTagsOfResourceOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ListTagsOfResourceOutput::ListTagsOfResourceOutput{Tags, NextToken, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceOutput.ListTagsOfResourceOutput(")?; + DafnyPrint::fmt_print(Tags, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NextToken, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ListTagsOfResourceOutput {} + + impl Hash + for ListTagsOfResourceOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ListTagsOfResourceOutput::ListTagsOfResourceOutput{Tags, NextToken, } => { + Hash::hash(Tags, _state); + Hash::hash(NextToken, _state) + }, + } + } + } + + impl Default + for ListTagsOfResourceOutput { + fn default() -> ListTagsOfResourceOutput { + ListTagsOfResourceOutput::ListTagsOfResourceOutput { + Tags: Default::default(), + NextToken: Default::default() + } + } + } + + impl AsRef + for &ListTagsOfResourceOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum LocalSecondaryIndex { + LocalSecondaryIndex { + IndexName: Sequence, + KeySchema: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema, + Projection: Rc + } + } + + impl LocalSecondaryIndex { + pub fn IndexName(&self) -> &Sequence { + match self { + LocalSecondaryIndex::LocalSecondaryIndex{IndexName, KeySchema, Projection, } => IndexName, + } + } + pub fn KeySchema(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::KeySchema { + match self { + LocalSecondaryIndex::LocalSecondaryIndex{IndexName, KeySchema, Projection, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc { + match self { + LocalSecondaryIndex::LocalSecondaryIndex{IndexName, KeySchema, Projection, } => Projection, + } + } + } + + impl Debug + for LocalSecondaryIndex { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for LocalSecondaryIndex { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + LocalSecondaryIndex::LocalSecondaryIndex{IndexName, KeySchema, Projection, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndex.LocalSecondaryIndex(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for LocalSecondaryIndex {} + + impl Hash + for LocalSecondaryIndex { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + LocalSecondaryIndex::LocalSecondaryIndex{IndexName, KeySchema, Projection, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state) + }, + } + } + } + + impl Default + for LocalSecondaryIndex { + fn default() -> LocalSecondaryIndex { + LocalSecondaryIndex::LocalSecondaryIndex { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default() + } + } + } + + impl AsRef + for &LocalSecondaryIndex { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum LocalSecondaryIndexDescription { + LocalSecondaryIndexDescription { + IndexName: Rc>>, + KeySchema: Rc>, + Projection: Rc>>, + IndexSizeBytes: Rc>, + ItemCount: Rc>, + IndexArn: Rc>> + } + } + + impl LocalSecondaryIndexDescription { + pub fn IndexName(&self) -> &Rc>> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => IndexName, + } + } + pub fn KeySchema(&self) -> &Rc> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc>> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => Projection, + } + } + pub fn IndexSizeBytes(&self) -> &Rc> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => IndexSizeBytes, + } + } + pub fn ItemCount(&self) -> &Rc> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => ItemCount, + } + } + pub fn IndexArn(&self) -> &Rc>> { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => IndexArn, + } + } + } + + impl Debug + for LocalSecondaryIndexDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for LocalSecondaryIndexDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexDescription.LocalSecondaryIndexDescription(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexSizeBytes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexArn, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for LocalSecondaryIndexDescription {} + + impl Hash + for LocalSecondaryIndexDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription{IndexName, KeySchema, Projection, IndexSizeBytes, ItemCount, IndexArn, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state); + Hash::hash(IndexSizeBytes, _state); + Hash::hash(ItemCount, _state); + Hash::hash(IndexArn, _state) + }, + } + } + } + + impl Default + for LocalSecondaryIndexDescription { + fn default() -> LocalSecondaryIndexDescription { + LocalSecondaryIndexDescription::LocalSecondaryIndexDescription { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default(), + IndexSizeBytes: Default::default(), + ItemCount: Default::default(), + IndexArn: Default::default() + } + } + } + + impl AsRef + for &LocalSecondaryIndexDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum LocalSecondaryIndexInfo { + LocalSecondaryIndexInfo { + IndexName: Rc>>, + KeySchema: Rc>, + Projection: Rc>> + } + } + + impl LocalSecondaryIndexInfo { + pub fn IndexName(&self) -> &Rc>> { + match self { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo{IndexName, KeySchema, Projection, } => IndexName, + } + } + pub fn KeySchema(&self) -> &Rc> { + match self { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo{IndexName, KeySchema, Projection, } => KeySchema, + } + } + pub fn Projection(&self) -> &Rc>> { + match self { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo{IndexName, KeySchema, Projection, } => Projection, + } + } + } + + impl Debug + for LocalSecondaryIndexInfo { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for LocalSecondaryIndexInfo { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo{IndexName, KeySchema, Projection, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexInfo.LocalSecondaryIndexInfo(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeySchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Projection, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for LocalSecondaryIndexInfo {} + + impl Hash + for LocalSecondaryIndexInfo { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo{IndexName, KeySchema, Projection, } => { + Hash::hash(IndexName, _state); + Hash::hash(KeySchema, _state); + Hash::hash(Projection, _state) + }, + } + } + } + + impl Default + for LocalSecondaryIndexInfo { + fn default() -> LocalSecondaryIndexInfo { + LocalSecondaryIndexInfo::LocalSecondaryIndexInfo { + IndexName: Default::default(), + KeySchema: Default::default(), + Projection: Default::default() + } + } + } + + impl AsRef + for &LocalSecondaryIndexInfo { + fn as_ref(&self) -> Self { + self + } + } + + pub type NonKeyAttributeName = Sequence; + + pub type NonKeyAttributeNameList = Sequence>; + + pub type NonNegativeLongObject = i64; + + #[derive(PartialEq, Clone)] + pub enum OnDemandThroughput { + OnDemandThroughput { + MaxReadRequestUnits: Rc>, + MaxWriteRequestUnits: Rc> + } + } + + impl OnDemandThroughput { + pub fn MaxReadRequestUnits(&self) -> &Rc> { + match self { + OnDemandThroughput::OnDemandThroughput{MaxReadRequestUnits, MaxWriteRequestUnits, } => MaxReadRequestUnits, + } + } + pub fn MaxWriteRequestUnits(&self) -> &Rc> { + match self { + OnDemandThroughput::OnDemandThroughput{MaxReadRequestUnits, MaxWriteRequestUnits, } => MaxWriteRequestUnits, + } + } + } + + impl Debug + for OnDemandThroughput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnDemandThroughput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnDemandThroughput::OnDemandThroughput{MaxReadRequestUnits, MaxWriteRequestUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughput.OnDemandThroughput(")?; + DafnyPrint::fmt_print(MaxReadRequestUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(MaxWriteRequestUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnDemandThroughput {} + + impl Hash + for OnDemandThroughput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnDemandThroughput::OnDemandThroughput{MaxReadRequestUnits, MaxWriteRequestUnits, } => { + Hash::hash(MaxReadRequestUnits, _state); + Hash::hash(MaxWriteRequestUnits, _state) + }, + } + } + } + + impl Default + for OnDemandThroughput { + fn default() -> OnDemandThroughput { + OnDemandThroughput::OnDemandThroughput { + MaxReadRequestUnits: Default::default(), + MaxWriteRequestUnits: Default::default() + } + } + } + + impl AsRef + for &OnDemandThroughput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum OnDemandThroughputOverride { + OnDemandThroughputOverride { + MaxReadRequestUnits: Rc> + } + } + + impl OnDemandThroughputOverride { + pub fn MaxReadRequestUnits(&self) -> &Rc> { + match self { + OnDemandThroughputOverride::OnDemandThroughputOverride{MaxReadRequestUnits, } => MaxReadRequestUnits, + } + } + } + + impl Debug + for OnDemandThroughputOverride { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for OnDemandThroughputOverride { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + OnDemandThroughputOverride::OnDemandThroughputOverride{MaxReadRequestUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughputOverride.OnDemandThroughputOverride(")?; + DafnyPrint::fmt_print(MaxReadRequestUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for OnDemandThroughputOverride {} + + impl Hash + for OnDemandThroughputOverride { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + OnDemandThroughputOverride::OnDemandThroughputOverride{MaxReadRequestUnits, } => { + Hash::hash(MaxReadRequestUnits, _state) + }, + } + } + } + + impl Default + for OnDemandThroughputOverride { + fn default() -> OnDemandThroughputOverride { + OnDemandThroughputOverride::OnDemandThroughputOverride { + MaxReadRequestUnits: Default::default() + } + } + } + + impl AsRef + for &OnDemandThroughputOverride { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ParameterizedStatement { + ParameterizedStatement { + Statement: Sequence, + Parameters: Rc> + } + } + + impl ParameterizedStatement { + pub fn Statement(&self) -> &Sequence { + match self { + ParameterizedStatement::ParameterizedStatement{Statement, Parameters, } => Statement, + } + } + pub fn Parameters(&self) -> &Rc> { + match self { + ParameterizedStatement::ParameterizedStatement{Statement, Parameters, } => Parameters, + } + } + } + + impl Debug + for ParameterizedStatement { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ParameterizedStatement { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ParameterizedStatement::ParameterizedStatement{Statement, Parameters, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ParameterizedStatement.ParameterizedStatement(")?; + DafnyPrint::fmt_print(Statement, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Parameters, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ParameterizedStatement {} + + impl Hash + for ParameterizedStatement { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ParameterizedStatement::ParameterizedStatement{Statement, Parameters, } => { + Hash::hash(Statement, _state); + Hash::hash(Parameters, _state) + }, + } + } + } + + impl Default + for ParameterizedStatement { + fn default() -> ParameterizedStatement { + ParameterizedStatement::ParameterizedStatement { + Statement: Default::default(), + Parameters: Default::default() + } + } + } + + impl AsRef + for &ParameterizedStatement { + fn as_ref(&self) -> Self { + self + } + } + + pub type ParameterizedStatements = Sequence>; + + pub type PartiQLBatchRequest = Sequence>; + + pub type PartiQLNextToken = Sequence; + + pub type PartiQLStatement = Sequence; + + #[derive(PartialEq, Clone)] + pub enum PointInTimeRecoveryDescription { + PointInTimeRecoveryDescription { + PointInTimeRecoveryStatus: Rc>>, + EarliestRestorableDateTime: Rc>>, + LatestRestorableDateTime: Rc>> + } + } + + impl PointInTimeRecoveryDescription { + pub fn PointInTimeRecoveryStatus(&self) -> &Rc>> { + match self { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription{PointInTimeRecoveryStatus, EarliestRestorableDateTime, LatestRestorableDateTime, } => PointInTimeRecoveryStatus, + } + } + pub fn EarliestRestorableDateTime(&self) -> &Rc>> { + match self { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription{PointInTimeRecoveryStatus, EarliestRestorableDateTime, LatestRestorableDateTime, } => EarliestRestorableDateTime, + } + } + pub fn LatestRestorableDateTime(&self) -> &Rc>> { + match self { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription{PointInTimeRecoveryStatus, EarliestRestorableDateTime, LatestRestorableDateTime, } => LatestRestorableDateTime, + } + } + } + + impl Debug + for PointInTimeRecoveryDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PointInTimeRecoveryDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription{PointInTimeRecoveryStatus, EarliestRestorableDateTime, LatestRestorableDateTime, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryDescription.PointInTimeRecoveryDescription(")?; + DafnyPrint::fmt_print(PointInTimeRecoveryStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(EarliestRestorableDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LatestRestorableDateTime, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PointInTimeRecoveryDescription {} + + impl Hash + for PointInTimeRecoveryDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription{PointInTimeRecoveryStatus, EarliestRestorableDateTime, LatestRestorableDateTime, } => { + Hash::hash(PointInTimeRecoveryStatus, _state); + Hash::hash(EarliestRestorableDateTime, _state); + Hash::hash(LatestRestorableDateTime, _state) + }, + } + } + } + + impl Default + for PointInTimeRecoveryDescription { + fn default() -> PointInTimeRecoveryDescription { + PointInTimeRecoveryDescription::PointInTimeRecoveryDescription { + PointInTimeRecoveryStatus: Default::default(), + EarliestRestorableDateTime: Default::default(), + LatestRestorableDateTime: Default::default() + } + } + } + + impl AsRef + for &PointInTimeRecoveryDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PointInTimeRecoverySpecification { + PointInTimeRecoverySpecification { + PointInTimeRecoveryEnabled: bool + } + } + + impl PointInTimeRecoverySpecification { + pub fn PointInTimeRecoveryEnabled(&self) -> &bool { + match self { + PointInTimeRecoverySpecification::PointInTimeRecoverySpecification{PointInTimeRecoveryEnabled, } => PointInTimeRecoveryEnabled, + } + } + } + + impl Debug + for PointInTimeRecoverySpecification { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PointInTimeRecoverySpecification { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PointInTimeRecoverySpecification::PointInTimeRecoverySpecification{PointInTimeRecoveryEnabled, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoverySpecification.PointInTimeRecoverySpecification(")?; + DafnyPrint::fmt_print(PointInTimeRecoveryEnabled, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PointInTimeRecoverySpecification {} + + impl Hash + for PointInTimeRecoverySpecification { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PointInTimeRecoverySpecification::PointInTimeRecoverySpecification{PointInTimeRecoveryEnabled, } => { + Hash::hash(PointInTimeRecoveryEnabled, _state) + }, + } + } + } + + impl Default + for PointInTimeRecoverySpecification { + fn default() -> PointInTimeRecoverySpecification { + PointInTimeRecoverySpecification::PointInTimeRecoverySpecification { + PointInTimeRecoveryEnabled: Default::default() + } + } + } + + impl AsRef + for &PointInTimeRecoverySpecification { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PointInTimeRecoveryStatus { + ENABLED {}, + DISABLED {} + } + + impl PointInTimeRecoveryStatus {} + + impl Debug + for PointInTimeRecoveryStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PointInTimeRecoveryStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PointInTimeRecoveryStatus::ENABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryStatus.ENABLED")?; + Ok(()) + }, + PointInTimeRecoveryStatus::DISABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryStatus.DISABLED")?; + Ok(()) + }, + } + } + } + + impl PointInTimeRecoveryStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(PointInTimeRecoveryStatus::ENABLED {}), Rc::new(PointInTimeRecoveryStatus::DISABLED {})].iter() + } + } + + impl Eq + for PointInTimeRecoveryStatus {} + + impl Hash + for PointInTimeRecoveryStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PointInTimeRecoveryStatus::ENABLED{} => { + + }, + PointInTimeRecoveryStatus::DISABLED{} => { + + }, + } + } + } + + impl Default + for PointInTimeRecoveryStatus { + fn default() -> PointInTimeRecoveryStatus { + PointInTimeRecoveryStatus::ENABLED {} + } + } + + impl AsRef + for &PointInTimeRecoveryStatus { + fn as_ref(&self) -> Self { + self + } + } + + pub type PolicyRevisionId = Sequence; + + pub type PositiveIntegerObject = i32; + + pub type PositiveLongObject = i64; + + pub type PreparedStatementParameters = Sequence>; + + pub type ProcessedItemCount = i64; + + #[derive(PartialEq, Clone)] + pub enum Projection { + Projection { + ProjectionType: Rc>>, + NonKeyAttributes: Rc> + } + } + + impl Projection { + pub fn ProjectionType(&self) -> &Rc>> { + match self { + Projection::Projection{ProjectionType, NonKeyAttributes, } => ProjectionType, + } + } + pub fn NonKeyAttributes(&self) -> &Rc> { + match self { + Projection::Projection{ProjectionType, NonKeyAttributes, } => NonKeyAttributes, + } + } + } + + impl Debug + for Projection { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Projection { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Projection::Projection{ProjectionType, NonKeyAttributes, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Projection.Projection(")?; + DafnyPrint::fmt_print(ProjectionType, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NonKeyAttributes, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Projection {} + + impl Hash + for Projection { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Projection::Projection{ProjectionType, NonKeyAttributes, } => { + Hash::hash(ProjectionType, _state); + Hash::hash(NonKeyAttributes, _state) + }, + } + } + } + + impl Default + for Projection { + fn default() -> Projection { + Projection::Projection { + ProjectionType: Default::default(), + NonKeyAttributes: Default::default() + } + } + } + + impl AsRef + for &Projection { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ProjectionType { + ALL {}, + KEYS_ONLY {}, + INCLUDE {} + } + + impl ProjectionType {} + + impl Debug + for ProjectionType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ProjectionType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ProjectionType::ALL{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProjectionType.ALL")?; + Ok(()) + }, + ProjectionType::KEYS_ONLY{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProjectionType.KEYS__ONLY")?; + Ok(()) + }, + ProjectionType::INCLUDE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProjectionType.INCLUDE")?; + Ok(()) + }, + } + } + } + + impl ProjectionType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ProjectionType::ALL {}), Rc::new(ProjectionType::KEYS_ONLY {}), Rc::new(ProjectionType::INCLUDE {})].iter() + } + } + + impl Eq + for ProjectionType {} + + impl Hash + for ProjectionType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ProjectionType::ALL{} => { + + }, + ProjectionType::KEYS_ONLY{} => { + + }, + ProjectionType::INCLUDE{} => { + + }, + } + } + } + + impl Default + for ProjectionType { + fn default() -> ProjectionType { + ProjectionType::ALL {} + } + } + + impl AsRef + for &ProjectionType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ProvisionedThroughput { + ProvisionedThroughput { + ReadCapacityUnits: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PositiveLongObject, + WriteCapacityUnits: crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PositiveLongObject + } + } + + impl ProvisionedThroughput { + pub fn ReadCapacityUnits(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PositiveLongObject { + match self { + ProvisionedThroughput::ProvisionedThroughput{ReadCapacityUnits, WriteCapacityUnits, } => ReadCapacityUnits, + } + } + pub fn WriteCapacityUnits(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PositiveLongObject { + match self { + ProvisionedThroughput::ProvisionedThroughput{ReadCapacityUnits, WriteCapacityUnits, } => WriteCapacityUnits, + } + } + } + + impl Debug + for ProvisionedThroughput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ProvisionedThroughput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ProvisionedThroughput::ProvisionedThroughput{ReadCapacityUnits, WriteCapacityUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughput.ProvisionedThroughput(")?; + DafnyPrint::fmt_print(ReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(WriteCapacityUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ProvisionedThroughput {} + + impl Hash + for ProvisionedThroughput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ProvisionedThroughput::ProvisionedThroughput{ReadCapacityUnits, WriteCapacityUnits, } => { + Hash::hash(ReadCapacityUnits, _state); + Hash::hash(WriteCapacityUnits, _state) + }, + } + } + } + + impl Default + for ProvisionedThroughput { + fn default() -> ProvisionedThroughput { + ProvisionedThroughput::ProvisionedThroughput { + ReadCapacityUnits: Default::default(), + WriteCapacityUnits: Default::default() + } + } + } + + impl AsRef + for &ProvisionedThroughput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ProvisionedThroughputDescription { + ProvisionedThroughputDescription { + LastIncreaseDateTime: Rc>>, + LastDecreaseDateTime: Rc>>, + NumberOfDecreasesToday: Rc>, + ReadCapacityUnits: Rc>, + WriteCapacityUnits: Rc> + } + } + + impl ProvisionedThroughputDescription { + pub fn LastIncreaseDateTime(&self) -> &Rc>> { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => LastIncreaseDateTime, + } + } + pub fn LastDecreaseDateTime(&self) -> &Rc>> { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => LastDecreaseDateTime, + } + } + pub fn NumberOfDecreasesToday(&self) -> &Rc> { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => NumberOfDecreasesToday, + } + } + pub fn ReadCapacityUnits(&self) -> &Rc> { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => ReadCapacityUnits, + } + } + pub fn WriteCapacityUnits(&self) -> &Rc> { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => WriteCapacityUnits, + } + } + } + + impl Debug + for ProvisionedThroughputDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ProvisionedThroughputDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputDescription.ProvisionedThroughputDescription(")?; + DafnyPrint::fmt_print(LastIncreaseDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastDecreaseDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(NumberOfDecreasesToday, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(WriteCapacityUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ProvisionedThroughputDescription {} + + impl Hash + for ProvisionedThroughputDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ProvisionedThroughputDescription::ProvisionedThroughputDescription{LastIncreaseDateTime, LastDecreaseDateTime, NumberOfDecreasesToday, ReadCapacityUnits, WriteCapacityUnits, } => { + Hash::hash(LastIncreaseDateTime, _state); + Hash::hash(LastDecreaseDateTime, _state); + Hash::hash(NumberOfDecreasesToday, _state); + Hash::hash(ReadCapacityUnits, _state); + Hash::hash(WriteCapacityUnits, _state) + }, + } + } + } + + impl Default + for ProvisionedThroughputDescription { + fn default() -> ProvisionedThroughputDescription { + ProvisionedThroughputDescription::ProvisionedThroughputDescription { + LastIncreaseDateTime: Default::default(), + LastDecreaseDateTime: Default::default(), + NumberOfDecreasesToday: Default::default(), + ReadCapacityUnits: Default::default(), + WriteCapacityUnits: Default::default() + } + } + } + + impl AsRef + for &ProvisionedThroughputDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ProvisionedThroughputOverride { + ProvisionedThroughputOverride { + ReadCapacityUnits: Rc> + } + } + + impl ProvisionedThroughputOverride { + pub fn ReadCapacityUnits(&self) -> &Rc> { + match self { + ProvisionedThroughputOverride::ProvisionedThroughputOverride{ReadCapacityUnits, } => ReadCapacityUnits, + } + } + } + + impl Debug + for ProvisionedThroughputOverride { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ProvisionedThroughputOverride { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ProvisionedThroughputOverride::ProvisionedThroughputOverride{ReadCapacityUnits, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputOverride.ProvisionedThroughputOverride(")?; + DafnyPrint::fmt_print(ReadCapacityUnits, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ProvisionedThroughputOverride {} + + impl Hash + for ProvisionedThroughputOverride { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ProvisionedThroughputOverride::ProvisionedThroughputOverride{ReadCapacityUnits, } => { + Hash::hash(ReadCapacityUnits, _state) + }, + } + } + } + + impl Default + for ProvisionedThroughputOverride { + fn default() -> ProvisionedThroughputOverride { + ProvisionedThroughputOverride::ProvisionedThroughputOverride { + ReadCapacityUnits: Default::default() + } + } + } + + impl AsRef + for &ProvisionedThroughputOverride { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Put { + Put { + Item: Map, Rc>, + TableName: Sequence, + ConditionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>>, + ReturnValuesOnConditionCheckFailure: Rc>> + } + } + + impl Put { + pub fn Item(&self) -> &Map, Rc> { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => Item, + } + } + pub fn TableName(&self) -> &Sequence { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => TableName, + } + } + pub fn ConditionExpression(&self) -> &Rc>> { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ExpressionAttributeValues, + } + } + pub fn ReturnValuesOnConditionCheckFailure(&self) -> &Rc>> { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => ReturnValuesOnConditionCheckFailure, + } + } + } + + impl Debug + for Put { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Put { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Put.Put(")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnValuesOnConditionCheckFailure, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Put {} + + impl Hash + for Put { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Put::Put{Item, TableName, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, ReturnValuesOnConditionCheckFailure, } => { + Hash::hash(Item, _state); + Hash::hash(TableName, _state); + Hash::hash(ConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state); + Hash::hash(ReturnValuesOnConditionCheckFailure, _state) + }, + } + } + } + + impl Default + for Put { + fn default() -> Put { + Put::Put { + Item: Default::default(), + TableName: Default::default(), + ConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default(), + ReturnValuesOnConditionCheckFailure: Default::default() + } + } + } + + impl AsRef + for &Put { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemInput { + PutItemInput { + TableName: Sequence, + Item: Map, Rc>, + Expected: Rc, Rc>>>, + ReturnValues: Rc>>, + ReturnConsumedCapacity: Rc>>, + ReturnItemCollectionMetrics: Rc>>, + ConditionalOperator: Rc>>, + ConditionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>> + } + } + + impl PutItemInput { + pub fn TableName(&self) -> &Sequence { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => TableName, + } + } + pub fn Item(&self) -> &Map, Rc> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Item, + } + } + pub fn Expected(&self) -> &Rc, Rc>>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Expected, + } + } + pub fn ReturnValues(&self) -> &Rc>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnValues, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnConsumedCapacity, + } + } + pub fn ReturnItemCollectionMetrics(&self) -> &Rc>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnItemCollectionMetrics, + } + } + pub fn ConditionalOperator(&self) -> &Rc>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConditionalOperator, + } + } + pub fn ConditionExpression(&self) -> &Rc>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeValues, + } + } + } + + impl Debug + for PutItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput.PutItemInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Expected, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionalOperator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemInput {} + + impl Hash + for PutItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemInput::PutItemInput{TableName, Item, Expected, ReturnValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ConditionalOperator, ConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + Hash::hash(TableName, _state); + Hash::hash(Item, _state); + Hash::hash(Expected, _state); + Hash::hash(ReturnValues, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(ReturnItemCollectionMetrics, _state); + Hash::hash(ConditionalOperator, _state); + Hash::hash(ConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state) + }, + } + } + } + + impl Default + for PutItemInput { + fn default() -> PutItemInput { + PutItemInput::PutItemInput { + TableName: Default::default(), + Item: Default::default(), + Expected: Default::default(), + ReturnValues: Default::default(), + ReturnConsumedCapacity: Default::default(), + ReturnItemCollectionMetrics: Default::default(), + ConditionalOperator: Default::default(), + ConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default() + } + } + } + + impl AsRef + for &PutItemInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemOutput { + PutItemOutput { + Attributes: Rc, Rc>>>, + ConsumedCapacity: Rc>>, + ItemCollectionMetrics: Rc>> + } + } + + impl PutItemOutput { + pub fn Attributes(&self) -> &Rc, Rc>>> { + match self { + PutItemOutput::PutItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => Attributes, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + PutItemOutput::PutItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => ConsumedCapacity, + } + } + pub fn ItemCollectionMetrics(&self) -> &Rc>> { + match self { + PutItemOutput::PutItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => ItemCollectionMetrics, + } + } + } + + impl Debug + for PutItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemOutput::PutItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput.PutItemOutput(")?; + DafnyPrint::fmt_print(Attributes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ItemCollectionMetrics, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemOutput {} + + impl Hash + for PutItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemOutput::PutItemOutput{Attributes, ConsumedCapacity, ItemCollectionMetrics, } => { + Hash::hash(Attributes, _state); + Hash::hash(ConsumedCapacity, _state); + Hash::hash(ItemCollectionMetrics, _state) + }, + } + } + } + + impl Default + for PutItemOutput { + fn default() -> PutItemOutput { + PutItemOutput::PutItemOutput { + Attributes: Default::default(), + ConsumedCapacity: Default::default(), + ItemCollectionMetrics: Default::default() + } + } + } + + impl AsRef + for &PutItemOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutRequest { + PutRequest { + Item: Map, Rc> + } + } + + impl PutRequest { + pub fn Item(&self) -> &Map, Rc> { + match self { + PutRequest::PutRequest{Item, } => Item, + } + } + } + + impl Debug + for PutRequest { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutRequest { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutRequest::PutRequest{Item, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PutRequest.PutRequest(")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutRequest {} + + impl Hash + for PutRequest { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutRequest::PutRequest{Item, } => { + Hash::hash(Item, _state) + }, + } + } + } + + impl Default + for PutRequest { + fn default() -> PutRequest { + PutRequest::PutRequest { + Item: Default::default() + } + } + } + + impl AsRef + for &PutRequest { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutResourcePolicyInput { + PutResourcePolicyInput { + ResourceArn: Sequence, + Policy: Sequence, + ExpectedRevisionId: Rc>>, + ConfirmRemoveSelfResourceAccess: Rc> + } + } + + impl PutResourcePolicyInput { + pub fn ResourceArn(&self) -> &Sequence { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => ResourceArn, + } + } + pub fn Policy(&self) -> &Sequence { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => Policy, + } + } + pub fn ExpectedRevisionId(&self) -> &Rc>> { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => ExpectedRevisionId, + } + } + pub fn ConfirmRemoveSelfResourceAccess(&self) -> &Rc> { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => ConfirmRemoveSelfResourceAccess, + } + } + } + + impl Debug + for PutResourcePolicyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutResourcePolicyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput.PutResourcePolicyInput(")?; + DafnyPrint::fmt_print(ResourceArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Policy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpectedRevisionId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConfirmRemoveSelfResourceAccess, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutResourcePolicyInput {} + + impl Hash + for PutResourcePolicyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutResourcePolicyInput::PutResourcePolicyInput{ResourceArn, Policy, ExpectedRevisionId, ConfirmRemoveSelfResourceAccess, } => { + Hash::hash(ResourceArn, _state); + Hash::hash(Policy, _state); + Hash::hash(ExpectedRevisionId, _state); + Hash::hash(ConfirmRemoveSelfResourceAccess, _state) + }, + } + } + } + + impl Default + for PutResourcePolicyInput { + fn default() -> PutResourcePolicyInput { + PutResourcePolicyInput::PutResourcePolicyInput { + ResourceArn: Default::default(), + Policy: Default::default(), + ExpectedRevisionId: Default::default(), + ConfirmRemoveSelfResourceAccess: Default::default() + } + } + } + + impl AsRef + for &PutResourcePolicyInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutResourcePolicyOutput { + PutResourcePolicyOutput { + RevisionId: Rc>> + } + } + + impl PutResourcePolicyOutput { + pub fn RevisionId(&self) -> &Rc>> { + match self { + PutResourcePolicyOutput::PutResourcePolicyOutput{RevisionId, } => RevisionId, + } + } + } + + impl Debug + for PutResourcePolicyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutResourcePolicyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutResourcePolicyOutput::PutResourcePolicyOutput{RevisionId, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput.PutResourcePolicyOutput(")?; + DafnyPrint::fmt_print(RevisionId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutResourcePolicyOutput {} + + impl Hash + for PutResourcePolicyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutResourcePolicyOutput::PutResourcePolicyOutput{RevisionId, } => { + Hash::hash(RevisionId, _state) + }, + } + } + } + + impl Default + for PutResourcePolicyOutput { + fn default() -> PutResourcePolicyOutput { + PutResourcePolicyOutput::PutResourcePolicyOutput { + RevisionId: Default::default() + } + } + } + + impl AsRef + for &PutResourcePolicyOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryInput { + QueryInput { + TableName: Sequence, + IndexName: Rc>>, + Select: Rc>>, + AttributesToGet: Rc>, + Limit: Rc>, + ConsistentRead: Rc>, + KeyConditions: Rc, Rc>>>, + QueryFilter: Rc, Rc>>>, + ConditionalOperator: Rc>>, + ScanIndexForward: Rc>, + ExclusiveStartKey: Rc, Rc>>>, + ReturnConsumedCapacity: Rc>>, + ProjectionExpression: Rc>>, + FilterExpression: Rc>>, + KeyConditionExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>> + } + } + + impl QueryInput { + pub fn TableName(&self) -> &Sequence { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => TableName, + } + } + pub fn IndexName(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => IndexName, + } + } + pub fn Select(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Select, + } + } + pub fn AttributesToGet(&self) -> &Rc> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => AttributesToGet, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => Limit, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConsistentRead, + } + } + pub fn KeyConditions(&self) -> &Rc, Rc>>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => KeyConditions, + } + } + pub fn QueryFilter(&self) -> &Rc, Rc>>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => QueryFilter, + } + } + pub fn ConditionalOperator(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ConditionalOperator, + } + } + pub fn ScanIndexForward(&self) -> &Rc> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ScanIndexForward, + } + } + pub fn ExclusiveStartKey(&self) -> &Rc, Rc>>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExclusiveStartKey, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ReturnConsumedCapacity, + } + } + pub fn ProjectionExpression(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ProjectionExpression, + } + } + pub fn FilterExpression(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => FilterExpression, + } + } + pub fn KeyConditionExpression(&self) -> &Rc>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => KeyConditionExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => ExpressionAttributeValues, + } + } + } + + impl Debug + for QueryInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput.QueryInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Select, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributesToGet, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeyConditions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(QueryFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionalOperator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScanIndexForward, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExclusiveStartKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProjectionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FilterExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KeyConditionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryInput {} + + impl Hash + for QueryInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryInput::QueryInput{TableName, IndexName, Select, AttributesToGet, Limit, ConsistentRead, KeyConditions, QueryFilter, ConditionalOperator, ScanIndexForward, ExclusiveStartKey, ReturnConsumedCapacity, ProjectionExpression, FilterExpression, KeyConditionExpression, ExpressionAttributeNames, ExpressionAttributeValues, } => { + Hash::hash(TableName, _state); + Hash::hash(IndexName, _state); + Hash::hash(Select, _state); + Hash::hash(AttributesToGet, _state); + Hash::hash(Limit, _state); + Hash::hash(ConsistentRead, _state); + Hash::hash(KeyConditions, _state); + Hash::hash(QueryFilter, _state); + Hash::hash(ConditionalOperator, _state); + Hash::hash(ScanIndexForward, _state); + Hash::hash(ExclusiveStartKey, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(ProjectionExpression, _state); + Hash::hash(FilterExpression, _state); + Hash::hash(KeyConditionExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state) + }, + } + } + } + + impl Default + for QueryInput { + fn default() -> QueryInput { + QueryInput::QueryInput { + TableName: Default::default(), + IndexName: Default::default(), + Select: Default::default(), + AttributesToGet: Default::default(), + Limit: Default::default(), + ConsistentRead: Default::default(), + KeyConditions: Default::default(), + QueryFilter: Default::default(), + ConditionalOperator: Default::default(), + ScanIndexForward: Default::default(), + ExclusiveStartKey: Default::default(), + ReturnConsumedCapacity: Default::default(), + ProjectionExpression: Default::default(), + FilterExpression: Default::default(), + KeyConditionExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default() + } + } + } + + impl AsRef + for &QueryInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryOutput { + QueryOutput { + Items: Rc, Rc>>>>, + Count: Rc>, + ScannedCount: Rc>, + LastEvaluatedKey: Rc, Rc>>>, + ConsumedCapacity: Rc>> + } + } + + impl QueryOutput { + pub fn Items(&self) -> &Rc, Rc>>>> { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => Items, + } + } + pub fn Count(&self) -> &Rc> { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => Count, + } + } + pub fn ScannedCount(&self) -> &Rc> { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => ScannedCount, + } + } + pub fn LastEvaluatedKey(&self) -> &Rc, Rc>>> { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => LastEvaluatedKey, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for QueryOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput.QueryOutput(")?; + DafnyPrint::fmt_print(Items, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Count, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScannedCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryOutput {} + + impl Hash + for QueryOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryOutput::QueryOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => { + Hash::hash(Items, _state); + Hash::hash(Count, _state); + Hash::hash(ScannedCount, _state); + Hash::hash(LastEvaluatedKey, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for QueryOutput { + fn default() -> QueryOutput { + QueryOutput::QueryOutput { + Items: Default::default(), + Count: Default::default(), + ScannedCount: Default::default(), + LastEvaluatedKey: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &QueryOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Replica { + Replica { + RegionName: Rc>> + } + } + + impl Replica { + pub fn RegionName(&self) -> &Rc>> { + match self { + Replica::Replica{RegionName, } => RegionName, + } + } + } + + impl Debug + for Replica { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Replica { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Replica::Replica{RegionName, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Replica.Replica(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Replica {} + + impl Hash + for Replica { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Replica::Replica{RegionName, } => { + Hash::hash(RegionName, _state) + }, + } + } + } + + impl Default + for Replica { + fn default() -> Replica { + Replica::Replica { + RegionName: Default::default() + } + } + } + + impl AsRef + for &Replica { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaAutoScalingDescription { + ReplicaAutoScalingDescription { + RegionName: Rc>>, + GlobalSecondaryIndexes: Rc>>>, + ReplicaProvisionedReadCapacityAutoScalingSettings: Rc>>, + ReplicaProvisionedWriteCapacityAutoScalingSettings: Rc>>, + ReplicaStatus: Rc>> + } + } + + impl ReplicaAutoScalingDescription { + pub fn RegionName(&self) -> &Rc>> { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => RegionName, + } + } + pub fn GlobalSecondaryIndexes(&self) -> &Rc>>> { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => GlobalSecondaryIndexes, + } + } + pub fn ReplicaProvisionedReadCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => ReplicaProvisionedReadCapacityAutoScalingSettings, + } + } + pub fn ReplicaProvisionedWriteCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => ReplicaProvisionedWriteCapacityAutoScalingSettings, + } + } + pub fn ReplicaStatus(&self) -> &Rc>> { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => ReplicaStatus, + } + } + } + + impl Debug + for ReplicaAutoScalingDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaAutoScalingDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingDescription.ReplicaAutoScalingDescription(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedWriteCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaStatus, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaAutoScalingDescription {} + + impl Hash + for ReplicaAutoScalingDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription{RegionName, GlobalSecondaryIndexes, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaStatus, } => { + Hash::hash(RegionName, _state); + Hash::hash(GlobalSecondaryIndexes, _state); + Hash::hash(ReplicaProvisionedReadCapacityAutoScalingSettings, _state); + Hash::hash(ReplicaProvisionedWriteCapacityAutoScalingSettings, _state); + Hash::hash(ReplicaStatus, _state) + }, + } + } + } + + impl Default + for ReplicaAutoScalingDescription { + fn default() -> ReplicaAutoScalingDescription { + ReplicaAutoScalingDescription::ReplicaAutoScalingDescription { + RegionName: Default::default(), + GlobalSecondaryIndexes: Default::default(), + ReplicaProvisionedReadCapacityAutoScalingSettings: Default::default(), + ReplicaProvisionedWriteCapacityAutoScalingSettings: Default::default(), + ReplicaStatus: Default::default() + } + } + } + + impl AsRef + for &ReplicaAutoScalingDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaAutoScalingUpdate { + ReplicaAutoScalingUpdate { + RegionName: Sequence, + ReplicaGlobalSecondaryIndexUpdates: Rc>>>, + ReplicaProvisionedReadCapacityAutoScalingUpdate: Rc>> + } + } + + impl ReplicaAutoScalingUpdate { + pub fn RegionName(&self) -> &Sequence { + match self { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate{RegionName, ReplicaGlobalSecondaryIndexUpdates, ReplicaProvisionedReadCapacityAutoScalingUpdate, } => RegionName, + } + } + pub fn ReplicaGlobalSecondaryIndexUpdates(&self) -> &Rc>>> { + match self { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate{RegionName, ReplicaGlobalSecondaryIndexUpdates, ReplicaProvisionedReadCapacityAutoScalingUpdate, } => ReplicaGlobalSecondaryIndexUpdates, + } + } + pub fn ReplicaProvisionedReadCapacityAutoScalingUpdate(&self) -> &Rc>> { + match self { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate{RegionName, ReplicaGlobalSecondaryIndexUpdates, ReplicaProvisionedReadCapacityAutoScalingUpdate, } => ReplicaProvisionedReadCapacityAutoScalingUpdate, + } + } + } + + impl Debug + for ReplicaAutoScalingUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaAutoScalingUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate{RegionName, ReplicaGlobalSecondaryIndexUpdates, ReplicaProvisionedReadCapacityAutoScalingUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingUpdate.ReplicaAutoScalingUpdate(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaGlobalSecondaryIndexUpdates, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityAutoScalingUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaAutoScalingUpdate {} + + impl Hash + for ReplicaAutoScalingUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate{RegionName, ReplicaGlobalSecondaryIndexUpdates, ReplicaProvisionedReadCapacityAutoScalingUpdate, } => { + Hash::hash(RegionName, _state); + Hash::hash(ReplicaGlobalSecondaryIndexUpdates, _state); + Hash::hash(ReplicaProvisionedReadCapacityAutoScalingUpdate, _state) + }, + } + } + } + + impl Default + for ReplicaAutoScalingUpdate { + fn default() -> ReplicaAutoScalingUpdate { + ReplicaAutoScalingUpdate::ReplicaAutoScalingUpdate { + RegionName: Default::default(), + ReplicaGlobalSecondaryIndexUpdates: Default::default(), + ReplicaProvisionedReadCapacityAutoScalingUpdate: Default::default() + } + } + } + + impl AsRef + for &ReplicaAutoScalingUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type ReplicaAutoScalingUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ReplicaDescription { + ReplicaDescription { + RegionName: Rc>>, + ReplicaStatus: Rc>>, + ReplicaStatusDescription: Rc>>, + ReplicaStatusPercentProgress: Rc>>, + KMSMasterKeyId: Rc>>, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>>, + GlobalSecondaryIndexes: Rc>>>, + ReplicaInaccessibleDateTime: Rc>>, + ReplicaTableClassSummary: Rc>> + } + } + + impl ReplicaDescription { + pub fn RegionName(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => RegionName, + } + } + pub fn ReplicaStatus(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ReplicaStatus, + } + } + pub fn ReplicaStatusDescription(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ReplicaStatusDescription, + } + } + pub fn ReplicaStatusPercentProgress(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ReplicaStatusPercentProgress, + } + } + pub fn KMSMasterKeyId(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => KMSMasterKeyId, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => OnDemandThroughputOverride, + } + } + pub fn GlobalSecondaryIndexes(&self) -> &Rc>>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => GlobalSecondaryIndexes, + } + } + pub fn ReplicaInaccessibleDateTime(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ReplicaInaccessibleDateTime, + } + } + pub fn ReplicaTableClassSummary(&self) -> &Rc>> { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => ReplicaTableClassSummary, + } + } + } + + impl Debug + for ReplicaDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaDescription.ReplicaDescription(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaStatusDescription, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaStatusPercentProgress, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(KMSMasterKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaInaccessibleDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaTableClassSummary, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaDescription {} + + impl Hash + for ReplicaDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaDescription::ReplicaDescription{RegionName, ReplicaStatus, ReplicaStatusDescription, ReplicaStatusPercentProgress, KMSMasterKeyId, ProvisionedThroughputOverride, OnDemandThroughputOverride, GlobalSecondaryIndexes, ReplicaInaccessibleDateTime, ReplicaTableClassSummary, } => { + Hash::hash(RegionName, _state); + Hash::hash(ReplicaStatus, _state); + Hash::hash(ReplicaStatusDescription, _state); + Hash::hash(ReplicaStatusPercentProgress, _state); + Hash::hash(KMSMasterKeyId, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state); + Hash::hash(GlobalSecondaryIndexes, _state); + Hash::hash(ReplicaInaccessibleDateTime, _state); + Hash::hash(ReplicaTableClassSummary, _state) + }, + } + } + } + + impl Default + for ReplicaDescription { + fn default() -> ReplicaDescription { + ReplicaDescription::ReplicaDescription { + RegionName: Default::default(), + ReplicaStatus: Default::default(), + ReplicaStatusDescription: Default::default(), + ReplicaStatusPercentProgress: Default::default(), + KMSMasterKeyId: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default(), + GlobalSecondaryIndexes: Default::default(), + ReplicaInaccessibleDateTime: Default::default(), + ReplicaTableClassSummary: Default::default() + } + } + } + + impl AsRef + for &ReplicaDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndex { + ReplicaGlobalSecondaryIndex { + IndexName: Sequence, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndex { + pub fn IndexName(&self) -> &Sequence { + match self { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => IndexName, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => OnDemandThroughputOverride, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndex { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndex { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndex.ReplicaGlobalSecondaryIndex(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndex {} + + impl Hash + for ReplicaGlobalSecondaryIndex { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndex { + fn default() -> ReplicaGlobalSecondaryIndex { + ReplicaGlobalSecondaryIndex::ReplicaGlobalSecondaryIndex { + IndexName: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndex { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndexAutoScalingDescription { + ReplicaGlobalSecondaryIndexAutoScalingDescription { + IndexName: Rc>>, + IndexStatus: Rc>>, + ProvisionedReadCapacityAutoScalingSettings: Rc>>, + ProvisionedWriteCapacityAutoScalingSettings: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndexAutoScalingDescription { + pub fn IndexName(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => IndexName, + } + } + pub fn IndexStatus(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => IndexStatus, + } + } + pub fn ProvisionedReadCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedReadCapacityAutoScalingSettings, + } + } + pub fn ProvisionedWriteCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedWriteCapacityAutoScalingSettings, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingDescription.ReplicaGlobalSecondaryIndexAutoScalingDescription(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndexAutoScalingDescription {} + + impl Hash + for ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription{IndexName, IndexStatus, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityAutoScalingSettings, } => { + Hash::hash(IndexName, _state); + Hash::hash(IndexStatus, _state); + Hash::hash(ProvisionedReadCapacityAutoScalingSettings, _state); + Hash::hash(ProvisionedWriteCapacityAutoScalingSettings, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn default() -> ReplicaGlobalSecondaryIndexAutoScalingDescription { + ReplicaGlobalSecondaryIndexAutoScalingDescription::ReplicaGlobalSecondaryIndexAutoScalingDescription { + IndexName: Default::default(), + IndexStatus: Default::default(), + ProvisionedReadCapacityAutoScalingSettings: Default::default(), + ProvisionedWriteCapacityAutoScalingSettings: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndexAutoScalingDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndexAutoScalingUpdate { + ReplicaGlobalSecondaryIndexAutoScalingUpdate { + IndexName: Rc>>, + ProvisionedReadCapacityAutoScalingUpdate: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndexAutoScalingUpdate { + pub fn IndexName(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedReadCapacityAutoScalingUpdate, } => IndexName, + } + } + pub fn ProvisionedReadCapacityAutoScalingUpdate(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedReadCapacityAutoScalingUpdate, } => ProvisionedReadCapacityAutoScalingUpdate, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedReadCapacityAutoScalingUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingUpdate.ReplicaGlobalSecondaryIndexAutoScalingUpdate(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityAutoScalingUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndexAutoScalingUpdate {} + + impl Hash + for ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate{IndexName, ProvisionedReadCapacityAutoScalingUpdate, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedReadCapacityAutoScalingUpdate, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn default() -> ReplicaGlobalSecondaryIndexAutoScalingUpdate { + ReplicaGlobalSecondaryIndexAutoScalingUpdate::ReplicaGlobalSecondaryIndexAutoScalingUpdate { + IndexName: Default::default(), + ProvisionedReadCapacityAutoScalingUpdate: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndexAutoScalingUpdate { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndexDescription { + ReplicaGlobalSecondaryIndexDescription { + IndexName: Rc>>, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndexDescription { + pub fn IndexName(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => IndexName, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => OnDemandThroughputOverride, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndexDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndexDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexDescription.ReplicaGlobalSecondaryIndexDescription(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndexDescription {} + + impl Hash + for ReplicaGlobalSecondaryIndexDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription{IndexName, ProvisionedThroughputOverride, OnDemandThroughputOverride, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndexDescription { + fn default() -> ReplicaGlobalSecondaryIndexDescription { + ReplicaGlobalSecondaryIndexDescription::ReplicaGlobalSecondaryIndexDescription { + IndexName: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndexDescription { + fn as_ref(&self) -> Self { + self + } + } + + pub type ReplicaGlobalSecondaryIndexList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndexSettingsDescription { + ReplicaGlobalSecondaryIndexSettingsDescription { + IndexName: Sequence, + IndexStatus: Rc>>, + ProvisionedReadCapacityUnits: Rc>, + ProvisionedReadCapacityAutoScalingSettings: Rc>>, + ProvisionedWriteCapacityUnits: Rc>, + ProvisionedWriteCapacityAutoScalingSettings: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndexSettingsDescription { + pub fn IndexName(&self) -> &Sequence { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => IndexName, + } + } + pub fn IndexStatus(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => IndexStatus, + } + } + pub fn ProvisionedReadCapacityUnits(&self) -> &Rc> { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedReadCapacityUnits, + } + } + pub fn ProvisionedReadCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedReadCapacityAutoScalingSettings, + } + } + pub fn ProvisionedWriteCapacityUnits(&self) -> &Rc> { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedWriteCapacityUnits, + } + } + pub fn ProvisionedWriteCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => ProvisionedWriteCapacityAutoScalingSettings, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndexSettingsDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndexSettingsDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsDescription.ReplicaGlobalSecondaryIndexSettingsDescription(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedWriteCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndexSettingsDescription {} + + impl Hash + for ReplicaGlobalSecondaryIndexSettingsDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription{IndexName, IndexStatus, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettings, ProvisionedWriteCapacityUnits, ProvisionedWriteCapacityAutoScalingSettings, } => { + Hash::hash(IndexName, _state); + Hash::hash(IndexStatus, _state); + Hash::hash(ProvisionedReadCapacityUnits, _state); + Hash::hash(ProvisionedReadCapacityAutoScalingSettings, _state); + Hash::hash(ProvisionedWriteCapacityUnits, _state); + Hash::hash(ProvisionedWriteCapacityAutoScalingSettings, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndexSettingsDescription { + fn default() -> ReplicaGlobalSecondaryIndexSettingsDescription { + ReplicaGlobalSecondaryIndexSettingsDescription::ReplicaGlobalSecondaryIndexSettingsDescription { + IndexName: Default::default(), + IndexStatus: Default::default(), + ProvisionedReadCapacityUnits: Default::default(), + ProvisionedReadCapacityAutoScalingSettings: Default::default(), + ProvisionedWriteCapacityUnits: Default::default(), + ProvisionedWriteCapacityAutoScalingSettings: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndexSettingsDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaGlobalSecondaryIndexSettingsUpdate { + ReplicaGlobalSecondaryIndexSettingsUpdate { + IndexName: Sequence, + ProvisionedReadCapacityUnits: Rc>, + ProvisionedReadCapacityAutoScalingSettingsUpdate: Rc>> + } + } + + impl ReplicaGlobalSecondaryIndexSettingsUpdate { + pub fn IndexName(&self) -> &Sequence { + match self { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettingsUpdate, } => IndexName, + } + } + pub fn ProvisionedReadCapacityUnits(&self) -> &Rc> { + match self { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettingsUpdate, } => ProvisionedReadCapacityUnits, + } + } + pub fn ProvisionedReadCapacityAutoScalingSettingsUpdate(&self) -> &Rc>> { + match self { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettingsUpdate, } => ProvisionedReadCapacityAutoScalingSettingsUpdate, + } + } + } + + impl Debug + for ReplicaGlobalSecondaryIndexSettingsUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaGlobalSecondaryIndexSettingsUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettingsUpdate, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsUpdate.ReplicaGlobalSecondaryIndexSettingsUpdate(")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedReadCapacityAutoScalingSettingsUpdate, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaGlobalSecondaryIndexSettingsUpdate {} + + impl Hash + for ReplicaGlobalSecondaryIndexSettingsUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate{IndexName, ProvisionedReadCapacityUnits, ProvisionedReadCapacityAutoScalingSettingsUpdate, } => { + Hash::hash(IndexName, _state); + Hash::hash(ProvisionedReadCapacityUnits, _state); + Hash::hash(ProvisionedReadCapacityAutoScalingSettingsUpdate, _state) + }, + } + } + } + + impl Default + for ReplicaGlobalSecondaryIndexSettingsUpdate { + fn default() -> ReplicaGlobalSecondaryIndexSettingsUpdate { + ReplicaGlobalSecondaryIndexSettingsUpdate::ReplicaGlobalSecondaryIndexSettingsUpdate { + IndexName: Default::default(), + ProvisionedReadCapacityUnits: Default::default(), + ProvisionedReadCapacityAutoScalingSettingsUpdate: Default::default() + } + } + } + + impl AsRef + for &ReplicaGlobalSecondaryIndexSettingsUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type ReplicaGlobalSecondaryIndexSettingsUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ReplicaSettingsDescription { + ReplicaSettingsDescription { + RegionName: Sequence, + ReplicaStatus: Rc>>, + ReplicaBillingModeSummary: Rc>>, + ReplicaProvisionedReadCapacityUnits: Rc>, + ReplicaProvisionedReadCapacityAutoScalingSettings: Rc>>, + ReplicaProvisionedWriteCapacityUnits: Rc>, + ReplicaProvisionedWriteCapacityAutoScalingSettings: Rc>>, + ReplicaGlobalSecondaryIndexSettings: Rc>>>, + ReplicaTableClassSummary: Rc>> + } + } + + impl ReplicaSettingsDescription { + pub fn RegionName(&self) -> &Sequence { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => RegionName, + } + } + pub fn ReplicaStatus(&self) -> &Rc>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaStatus, + } + } + pub fn ReplicaBillingModeSummary(&self) -> &Rc>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaBillingModeSummary, + } + } + pub fn ReplicaProvisionedReadCapacityUnits(&self) -> &Rc> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaProvisionedReadCapacityUnits, + } + } + pub fn ReplicaProvisionedReadCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaProvisionedReadCapacityAutoScalingSettings, + } + } + pub fn ReplicaProvisionedWriteCapacityUnits(&self) -> &Rc> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaProvisionedWriteCapacityUnits, + } + } + pub fn ReplicaProvisionedWriteCapacityAutoScalingSettings(&self) -> &Rc>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaProvisionedWriteCapacityAutoScalingSettings, + } + } + pub fn ReplicaGlobalSecondaryIndexSettings(&self) -> &Rc>>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaGlobalSecondaryIndexSettings, + } + } + pub fn ReplicaTableClassSummary(&self) -> &Rc>> { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => ReplicaTableClassSummary, + } + } + } + + impl Debug + for ReplicaSettingsDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaSettingsDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsDescription.ReplicaSettingsDescription(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaStatus, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaBillingModeSummary, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedWriteCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedWriteCapacityAutoScalingSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaGlobalSecondaryIndexSettings, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaTableClassSummary, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaSettingsDescription {} + + impl Hash + for ReplicaSettingsDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaSettingsDescription::ReplicaSettingsDescription{RegionName, ReplicaStatus, ReplicaBillingModeSummary, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettings, ReplicaProvisionedWriteCapacityUnits, ReplicaProvisionedWriteCapacityAutoScalingSettings, ReplicaGlobalSecondaryIndexSettings, ReplicaTableClassSummary, } => { + Hash::hash(RegionName, _state); + Hash::hash(ReplicaStatus, _state); + Hash::hash(ReplicaBillingModeSummary, _state); + Hash::hash(ReplicaProvisionedReadCapacityUnits, _state); + Hash::hash(ReplicaProvisionedReadCapacityAutoScalingSettings, _state); + Hash::hash(ReplicaProvisionedWriteCapacityUnits, _state); + Hash::hash(ReplicaProvisionedWriteCapacityAutoScalingSettings, _state); + Hash::hash(ReplicaGlobalSecondaryIndexSettings, _state); + Hash::hash(ReplicaTableClassSummary, _state) + }, + } + } + } + + impl Default + for ReplicaSettingsDescription { + fn default() -> ReplicaSettingsDescription { + ReplicaSettingsDescription::ReplicaSettingsDescription { + RegionName: Default::default(), + ReplicaStatus: Default::default(), + ReplicaBillingModeSummary: Default::default(), + ReplicaProvisionedReadCapacityUnits: Default::default(), + ReplicaProvisionedReadCapacityAutoScalingSettings: Default::default(), + ReplicaProvisionedWriteCapacityUnits: Default::default(), + ReplicaProvisionedWriteCapacityAutoScalingSettings: Default::default(), + ReplicaGlobalSecondaryIndexSettings: Default::default(), + ReplicaTableClassSummary: Default::default() + } + } + } + + impl AsRef + for &ReplicaSettingsDescription { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicaSettingsUpdate { + ReplicaSettingsUpdate { + RegionName: Sequence, + ReplicaProvisionedReadCapacityUnits: Rc>, + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: Rc>>, + ReplicaGlobalSecondaryIndexSettingsUpdate: Rc>, + ReplicaTableClass: Rc>> + } + } + + impl ReplicaSettingsUpdate { + pub fn RegionName(&self) -> &Sequence { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => RegionName, + } + } + pub fn ReplicaProvisionedReadCapacityUnits(&self) -> &Rc> { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => ReplicaProvisionedReadCapacityUnits, + } + } + pub fn ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(&self) -> &Rc>> { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, + } + } + pub fn ReplicaGlobalSecondaryIndexSettingsUpdate(&self) -> &Rc> { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => ReplicaGlobalSecondaryIndexSettingsUpdate, + } + } + pub fn ReplicaTableClass(&self) -> &Rc>> { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => ReplicaTableClass, + } + } + } + + impl Debug + for ReplicaSettingsUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaSettingsUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsUpdate.ReplicaSettingsUpdate(")?; + DafnyPrint::fmt_print(RegionName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityUnits, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaGlobalSecondaryIndexSettingsUpdate, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReplicaTableClass, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaSettingsUpdate {} + + impl Hash + for ReplicaSettingsUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaSettingsUpdate::ReplicaSettingsUpdate{RegionName, ReplicaProvisionedReadCapacityUnits, ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaTableClass, } => { + Hash::hash(RegionName, _state); + Hash::hash(ReplicaProvisionedReadCapacityUnits, _state); + Hash::hash(ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, _state); + Hash::hash(ReplicaGlobalSecondaryIndexSettingsUpdate, _state); + Hash::hash(ReplicaTableClass, _state) + }, + } + } + } + + impl Default + for ReplicaSettingsUpdate { + fn default() -> ReplicaSettingsUpdate { + ReplicaSettingsUpdate::ReplicaSettingsUpdate { + RegionName: Default::default(), + ReplicaProvisionedReadCapacityUnits: Default::default(), + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: Default::default(), + ReplicaGlobalSecondaryIndexSettingsUpdate: Default::default(), + ReplicaTableClass: Default::default() + } + } + } + + impl AsRef + for &ReplicaSettingsUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type ReplicaSettingsUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ReplicaStatus { + CREATING {}, + CREATION_FAILED {}, + UPDATING {}, + DELETING {}, + ACTIVE {}, + REGION_DISABLED {}, + INACCESSIBLE_ENCRYPTION_CREDENTIALS {} + } + + impl ReplicaStatus {} + + impl Debug + for ReplicaStatus { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaStatus { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaStatus::CREATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.CREATING")?; + Ok(()) + }, + ReplicaStatus::CREATION_FAILED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.CREATION__FAILED")?; + Ok(()) + }, + ReplicaStatus::UPDATING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.UPDATING")?; + Ok(()) + }, + ReplicaStatus::DELETING{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.DELETING")?; + Ok(()) + }, + ReplicaStatus::ACTIVE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.ACTIVE")?; + Ok(()) + }, + ReplicaStatus::REGION_DISABLED{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.REGION__DISABLED")?; + Ok(()) + }, + ReplicaStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaStatus.INACCESSIBLE__ENCRYPTION__CREDENTIALS")?; + Ok(()) + }, + } + } + } + + impl ReplicaStatus { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ReplicaStatus::CREATING {}), Rc::new(ReplicaStatus::CREATION_FAILED {}), Rc::new(ReplicaStatus::UPDATING {}), Rc::new(ReplicaStatus::DELETING {}), Rc::new(ReplicaStatus::ACTIVE {}), Rc::new(ReplicaStatus::REGION_DISABLED {}), Rc::new(ReplicaStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS {})].iter() + } + } + + impl Eq + for ReplicaStatus {} + + impl Hash + for ReplicaStatus { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaStatus::CREATING{} => { + + }, + ReplicaStatus::CREATION_FAILED{} => { + + }, + ReplicaStatus::UPDATING{} => { + + }, + ReplicaStatus::DELETING{} => { + + }, + ReplicaStatus::ACTIVE{} => { + + }, + ReplicaStatus::REGION_DISABLED{} => { + + }, + ReplicaStatus::INACCESSIBLE_ENCRYPTION_CREDENTIALS{} => { + + }, + } + } + } + + impl Default + for ReplicaStatus { + fn default() -> ReplicaStatus { + ReplicaStatus::CREATING {} + } + } + + impl AsRef + for &ReplicaStatus { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReplicationGroupUpdate { + ReplicationGroupUpdate { + Create: Rc>>, + Update: Rc>>, + Delete: Rc>> + } + } + + impl ReplicationGroupUpdate { + pub fn Create(&self) -> &Rc>> { + match self { + ReplicationGroupUpdate::ReplicationGroupUpdate{Create, Update, Delete, } => Create, + } + } + pub fn Update(&self) -> &Rc>> { + match self { + ReplicationGroupUpdate::ReplicationGroupUpdate{Create, Update, Delete, } => Update, + } + } + pub fn Delete(&self) -> &Rc>> { + match self { + ReplicationGroupUpdate::ReplicationGroupUpdate{Create, Update, Delete, } => Delete, + } + } + } + + impl Debug + for ReplicationGroupUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicationGroupUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicationGroupUpdate::ReplicationGroupUpdate{Create, Update, Delete, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicationGroupUpdate.ReplicationGroupUpdate(")?; + DafnyPrint::fmt_print(Create, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Update, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Delete, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicationGroupUpdate {} + + impl Hash + for ReplicationGroupUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicationGroupUpdate::ReplicationGroupUpdate{Create, Update, Delete, } => { + Hash::hash(Create, _state); + Hash::hash(Update, _state); + Hash::hash(Delete, _state) + }, + } + } + } + + impl Default + for ReplicationGroupUpdate { + fn default() -> ReplicationGroupUpdate { + ReplicationGroupUpdate::ReplicationGroupUpdate { + Create: Default::default(), + Update: Default::default(), + Delete: Default::default() + } + } + } + + impl AsRef + for &ReplicationGroupUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type ReplicationGroupUpdateList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ReplicaUpdate { + ReplicaUpdate { + Create: Rc>>, + Delete: Rc>> + } + } + + impl ReplicaUpdate { + pub fn Create(&self) -> &Rc>> { + match self { + ReplicaUpdate::ReplicaUpdate{Create, Delete, } => Create, + } + } + pub fn Delete(&self) -> &Rc>> { + match self { + ReplicaUpdate::ReplicaUpdate{Create, Delete, } => Delete, + } + } + } + + impl Debug + for ReplicaUpdate { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReplicaUpdate { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReplicaUpdate::ReplicaUpdate{Create, Delete, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaUpdate.ReplicaUpdate(")?; + DafnyPrint::fmt_print(Create, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Delete, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ReplicaUpdate {} + + impl Hash + for ReplicaUpdate { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReplicaUpdate::ReplicaUpdate{Create, Delete, } => { + Hash::hash(Create, _state); + Hash::hash(Delete, _state) + }, + } + } + } + + impl Default + for ReplicaUpdate { + fn default() -> ReplicaUpdate { + ReplicaUpdate::ReplicaUpdate { + Create: Default::default(), + Delete: Default::default() + } + } + } + + impl AsRef + for &ReplicaUpdate { + fn as_ref(&self) -> Self { + self + } + } + + pub type ResourceArnString = Sequence; + + #[derive(PartialEq, Clone)] + pub enum RestoreSummary { + RestoreSummary { + SourceBackupArn: Rc>>, + SourceTableArn: Rc>>, + RestoreDateTime: Sequence, + RestoreInProgress: bool + } + } + + impl RestoreSummary { + pub fn SourceBackupArn(&self) -> &Rc>> { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => SourceBackupArn, + } + } + pub fn SourceTableArn(&self) -> &Rc>> { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => SourceTableArn, + } + } + pub fn RestoreDateTime(&self) -> &Sequence { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => RestoreDateTime, + } + } + pub fn RestoreInProgress(&self) -> &bool { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => RestoreInProgress, + } + } + } + + impl Debug + for RestoreSummary { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RestoreSummary { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreSummary.RestoreSummary(")?; + DafnyPrint::fmt_print(SourceBackupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SourceTableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(RestoreDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(RestoreInProgress, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RestoreSummary {} + + impl Hash + for RestoreSummary { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RestoreSummary::RestoreSummary{SourceBackupArn, SourceTableArn, RestoreDateTime, RestoreInProgress, } => { + Hash::hash(SourceBackupArn, _state); + Hash::hash(SourceTableArn, _state); + Hash::hash(RestoreDateTime, _state); + Hash::hash(RestoreInProgress, _state) + }, + } + } + } + + impl Default + for RestoreSummary { + fn default() -> RestoreSummary { + RestoreSummary::RestoreSummary { + SourceBackupArn: Default::default(), + SourceTableArn: Default::default(), + RestoreDateTime: Default::default(), + RestoreInProgress: Default::default() + } + } + } + + impl AsRef + for &RestoreSummary { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RestoreTableFromBackupInput { + RestoreTableFromBackupInput { + TargetTableName: Sequence, + BackupArn: Sequence, + BillingModeOverride: Rc>>, + GlobalSecondaryIndexOverride: Rc>>>, + LocalSecondaryIndexOverride: Rc>>>, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>>, + SSESpecificationOverride: Rc>> + } + } + + impl RestoreTableFromBackupInput { + pub fn TargetTableName(&self) -> &Sequence { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => TargetTableName, + } + } + pub fn BackupArn(&self) -> &Sequence { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => BackupArn, + } + } + pub fn BillingModeOverride(&self) -> &Rc>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => BillingModeOverride, + } + } + pub fn GlobalSecondaryIndexOverride(&self) -> &Rc>>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => GlobalSecondaryIndexOverride, + } + } + pub fn LocalSecondaryIndexOverride(&self) -> &Rc>>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => LocalSecondaryIndexOverride, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => OnDemandThroughputOverride, + } + } + pub fn SSESpecificationOverride(&self) -> &Rc>> { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => SSESpecificationOverride, + } + } + } + + impl Debug + for RestoreTableFromBackupInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RestoreTableFromBackupInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupInput.RestoreTableFromBackupInput(")?; + DafnyPrint::fmt_print(TargetTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BackupArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BillingModeOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LocalSecondaryIndexOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SSESpecificationOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RestoreTableFromBackupInput {} + + impl Hash + for RestoreTableFromBackupInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RestoreTableFromBackupInput::RestoreTableFromBackupInput{TargetTableName, BackupArn, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => { + Hash::hash(TargetTableName, _state); + Hash::hash(BackupArn, _state); + Hash::hash(BillingModeOverride, _state); + Hash::hash(GlobalSecondaryIndexOverride, _state); + Hash::hash(LocalSecondaryIndexOverride, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state); + Hash::hash(SSESpecificationOverride, _state) + }, + } + } + } + + impl Default + for RestoreTableFromBackupInput { + fn default() -> RestoreTableFromBackupInput { + RestoreTableFromBackupInput::RestoreTableFromBackupInput { + TargetTableName: Default::default(), + BackupArn: Default::default(), + BillingModeOverride: Default::default(), + GlobalSecondaryIndexOverride: Default::default(), + LocalSecondaryIndexOverride: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default(), + SSESpecificationOverride: Default::default() + } + } + } + + impl AsRef + for &RestoreTableFromBackupInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RestoreTableFromBackupOutput { + RestoreTableFromBackupOutput { + TableDescription: Rc>> + } + } + + impl RestoreTableFromBackupOutput { + pub fn TableDescription(&self) -> &Rc>> { + match self { + RestoreTableFromBackupOutput::RestoreTableFromBackupOutput{TableDescription, } => TableDescription, + } + } + } + + impl Debug + for RestoreTableFromBackupOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RestoreTableFromBackupOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RestoreTableFromBackupOutput::RestoreTableFromBackupOutput{TableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupOutput.RestoreTableFromBackupOutput(")?; + DafnyPrint::fmt_print(TableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RestoreTableFromBackupOutput {} + + impl Hash + for RestoreTableFromBackupOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RestoreTableFromBackupOutput::RestoreTableFromBackupOutput{TableDescription, } => { + Hash::hash(TableDescription, _state) + }, + } + } + } + + impl Default + for RestoreTableFromBackupOutput { + fn default() -> RestoreTableFromBackupOutput { + RestoreTableFromBackupOutput::RestoreTableFromBackupOutput { + TableDescription: Default::default() + } + } + } + + impl AsRef + for &RestoreTableFromBackupOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RestoreTableToPointInTimeInput { + RestoreTableToPointInTimeInput { + SourceTableArn: Rc>>, + SourceTableName: Rc>>, + TargetTableName: Sequence, + UseLatestRestorableTime: Rc>, + RestoreDateTime: Rc>>, + BillingModeOverride: Rc>>, + GlobalSecondaryIndexOverride: Rc>>>, + LocalSecondaryIndexOverride: Rc>>>, + ProvisionedThroughputOverride: Rc>>, + OnDemandThroughputOverride: Rc>>, + SSESpecificationOverride: Rc>> + } + } + + impl RestoreTableToPointInTimeInput { + pub fn SourceTableArn(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => SourceTableArn, + } + } + pub fn SourceTableName(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => SourceTableName, + } + } + pub fn TargetTableName(&self) -> &Sequence { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => TargetTableName, + } + } + pub fn UseLatestRestorableTime(&self) -> &Rc> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => UseLatestRestorableTime, + } + } + pub fn RestoreDateTime(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => RestoreDateTime, + } + } + pub fn BillingModeOverride(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => BillingModeOverride, + } + } + pub fn GlobalSecondaryIndexOverride(&self) -> &Rc>>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => GlobalSecondaryIndexOverride, + } + } + pub fn LocalSecondaryIndexOverride(&self) -> &Rc>>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => LocalSecondaryIndexOverride, + } + } + pub fn ProvisionedThroughputOverride(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => ProvisionedThroughputOverride, + } + } + pub fn OnDemandThroughputOverride(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => OnDemandThroughputOverride, + } + } + pub fn SSESpecificationOverride(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => SSESpecificationOverride, + } + } + } + + impl Debug + for RestoreTableToPointInTimeInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RestoreTableToPointInTimeInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeInput.RestoreTableToPointInTimeInput(")?; + DafnyPrint::fmt_print(SourceTableArn, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SourceTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TargetTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(UseLatestRestorableTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(RestoreDateTime, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(BillingModeOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(GlobalSecondaryIndexOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LocalSecondaryIndexOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProvisionedThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(OnDemandThroughputOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(SSESpecificationOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RestoreTableToPointInTimeInput {} + + impl Hash + for RestoreTableToPointInTimeInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput{SourceTableArn, SourceTableName, TargetTableName, UseLatestRestorableTime, RestoreDateTime, BillingModeOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, ProvisionedThroughputOverride, OnDemandThroughputOverride, SSESpecificationOverride, } => { + Hash::hash(SourceTableArn, _state); + Hash::hash(SourceTableName, _state); + Hash::hash(TargetTableName, _state); + Hash::hash(UseLatestRestorableTime, _state); + Hash::hash(RestoreDateTime, _state); + Hash::hash(BillingModeOverride, _state); + Hash::hash(GlobalSecondaryIndexOverride, _state); + Hash::hash(LocalSecondaryIndexOverride, _state); + Hash::hash(ProvisionedThroughputOverride, _state); + Hash::hash(OnDemandThroughputOverride, _state); + Hash::hash(SSESpecificationOverride, _state) + }, + } + } + } + + impl Default + for RestoreTableToPointInTimeInput { + fn default() -> RestoreTableToPointInTimeInput { + RestoreTableToPointInTimeInput::RestoreTableToPointInTimeInput { + SourceTableArn: Default::default(), + SourceTableName: Default::default(), + TargetTableName: Default::default(), + UseLatestRestorableTime: Default::default(), + RestoreDateTime: Default::default(), + BillingModeOverride: Default::default(), + GlobalSecondaryIndexOverride: Default::default(), + LocalSecondaryIndexOverride: Default::default(), + ProvisionedThroughputOverride: Default::default(), + OnDemandThroughputOverride: Default::default(), + SSESpecificationOverride: Default::default() + } + } + } + + impl AsRef + for &RestoreTableToPointInTimeInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum RestoreTableToPointInTimeOutput { + RestoreTableToPointInTimeOutput { + TableDescription: Rc>> + } + } + + impl RestoreTableToPointInTimeOutput { + pub fn TableDescription(&self) -> &Rc>> { + match self { + RestoreTableToPointInTimeOutput::RestoreTableToPointInTimeOutput{TableDescription, } => TableDescription, + } + } + } + + impl Debug + for RestoreTableToPointInTimeOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for RestoreTableToPointInTimeOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + RestoreTableToPointInTimeOutput::RestoreTableToPointInTimeOutput{TableDescription, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeOutput.RestoreTableToPointInTimeOutput(")?; + DafnyPrint::fmt_print(TableDescription, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for RestoreTableToPointInTimeOutput {} + + impl Hash + for RestoreTableToPointInTimeOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + RestoreTableToPointInTimeOutput::RestoreTableToPointInTimeOutput{TableDescription, } => { + Hash::hash(TableDescription, _state) + }, + } + } + } + + impl Default + for RestoreTableToPointInTimeOutput { + fn default() -> RestoreTableToPointInTimeOutput { + RestoreTableToPointInTimeOutput::RestoreTableToPointInTimeOutput { + TableDescription: Default::default() + } + } + } + + impl AsRef + for &RestoreTableToPointInTimeOutput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReturnConsumedCapacity { + INDEXES {}, + TOTAL {}, + NONE {} + } + + impl ReturnConsumedCapacity {} + + impl Debug + for ReturnConsumedCapacity { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReturnConsumedCapacity { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReturnConsumedCapacity::INDEXES{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnConsumedCapacity.INDEXES")?; + Ok(()) + }, + ReturnConsumedCapacity::TOTAL{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnConsumedCapacity.TOTAL")?; + Ok(()) + }, + ReturnConsumedCapacity::NONE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnConsumedCapacity.NONE")?; + Ok(()) + }, + } + } + } + + impl ReturnConsumedCapacity { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ReturnConsumedCapacity::INDEXES {}), Rc::new(ReturnConsumedCapacity::TOTAL {}), Rc::new(ReturnConsumedCapacity::NONE {})].iter() + } + } + + impl Eq + for ReturnConsumedCapacity {} + + impl Hash + for ReturnConsumedCapacity { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReturnConsumedCapacity::INDEXES{} => { + + }, + ReturnConsumedCapacity::TOTAL{} => { + + }, + ReturnConsumedCapacity::NONE{} => { + + }, + } + } + } + + impl Default + for ReturnConsumedCapacity { + fn default() -> ReturnConsumedCapacity { + ReturnConsumedCapacity::INDEXES {} + } + } + + impl AsRef + for &ReturnConsumedCapacity { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReturnItemCollectionMetrics { + SIZE {}, + NONE {} + } + + impl ReturnItemCollectionMetrics {} + + impl Debug + for ReturnItemCollectionMetrics { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReturnItemCollectionMetrics { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReturnItemCollectionMetrics::SIZE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnItemCollectionMetrics.SIZE")?; + Ok(()) + }, + ReturnItemCollectionMetrics::NONE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnItemCollectionMetrics.NONE")?; + Ok(()) + }, + } + } + } + + impl ReturnItemCollectionMetrics { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ReturnItemCollectionMetrics::SIZE {}), Rc::new(ReturnItemCollectionMetrics::NONE {})].iter() + } + } + + impl Eq + for ReturnItemCollectionMetrics {} + + impl Hash + for ReturnItemCollectionMetrics { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReturnItemCollectionMetrics::SIZE{} => { + + }, + ReturnItemCollectionMetrics::NONE{} => { + + }, + } + } + } + + impl Default + for ReturnItemCollectionMetrics { + fn default() -> ReturnItemCollectionMetrics { + ReturnItemCollectionMetrics::SIZE {} + } + } + + impl AsRef + for &ReturnItemCollectionMetrics { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReturnValue { + NONE {}, + ALL_OLD {}, + UPDATED_OLD {}, + ALL_NEW {}, + UPDATED_NEW {} + } + + impl ReturnValue {} + + impl Debug + for ReturnValue { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReturnValue { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReturnValue::NONE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValue.NONE")?; + Ok(()) + }, + ReturnValue::ALL_OLD{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValue.ALL__OLD")?; + Ok(()) + }, + ReturnValue::UPDATED_OLD{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValue.UPDATED__OLD")?; + Ok(()) + }, + ReturnValue::ALL_NEW{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValue.ALL__NEW")?; + Ok(()) + }, + ReturnValue::UPDATED_NEW{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValue.UPDATED__NEW")?; + Ok(()) + }, + } + } + } + + impl ReturnValue { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ReturnValue::NONE {}), Rc::new(ReturnValue::ALL_OLD {}), Rc::new(ReturnValue::UPDATED_OLD {}), Rc::new(ReturnValue::ALL_NEW {}), Rc::new(ReturnValue::UPDATED_NEW {})].iter() + } + } + + impl Eq + for ReturnValue {} + + impl Hash + for ReturnValue { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReturnValue::NONE{} => { + + }, + ReturnValue::ALL_OLD{} => { + + }, + ReturnValue::UPDATED_OLD{} => { + + }, + ReturnValue::ALL_NEW{} => { + + }, + ReturnValue::UPDATED_NEW{} => { + + }, + } + } + } + + impl Default + for ReturnValue { + fn default() -> ReturnValue { + ReturnValue::NONE {} + } + } + + impl AsRef + for &ReturnValue { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ReturnValuesOnConditionCheckFailure { + ALL_OLD {}, + NONE {} + } + + impl ReturnValuesOnConditionCheckFailure {} + + impl Debug + for ReturnValuesOnConditionCheckFailure { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ReturnValuesOnConditionCheckFailure { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ReturnValuesOnConditionCheckFailure::ALL_OLD{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValuesOnConditionCheckFailure.ALL__OLD")?; + Ok(()) + }, + ReturnValuesOnConditionCheckFailure::NONE{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ReturnValuesOnConditionCheckFailure.NONE")?; + Ok(()) + }, + } + } + } + + impl ReturnValuesOnConditionCheckFailure { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ReturnValuesOnConditionCheckFailure::ALL_OLD {}), Rc::new(ReturnValuesOnConditionCheckFailure::NONE {})].iter() + } + } + + impl Eq + for ReturnValuesOnConditionCheckFailure {} + + impl Hash + for ReturnValuesOnConditionCheckFailure { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ReturnValuesOnConditionCheckFailure::ALL_OLD{} => { + + }, + ReturnValuesOnConditionCheckFailure::NONE{} => { + + }, + } + } + } + + impl Default + for ReturnValuesOnConditionCheckFailure { + fn default() -> ReturnValuesOnConditionCheckFailure { + ReturnValuesOnConditionCheckFailure::ALL_OLD {} + } + } + + impl AsRef + for &ReturnValuesOnConditionCheckFailure { + fn as_ref(&self) -> Self { + self + } + } + + pub type S3Bucket = Sequence; + + #[derive(PartialEq, Clone)] + pub enum S3BucketSource { + S3BucketSource { + S3BucketOwner: Rc>>, + S3Bucket: Sequence, + S3KeyPrefix: Rc>> + } + } + + impl S3BucketSource { + pub fn S3BucketOwner(&self) -> &Rc>> { + match self { + S3BucketSource::S3BucketSource{S3BucketOwner, S3Bucket, S3KeyPrefix, } => S3BucketOwner, + } + } + pub fn S3Bucket(&self) -> &Sequence { + match self { + S3BucketSource::S3BucketSource{S3BucketOwner, S3Bucket, S3KeyPrefix, } => S3Bucket, + } + } + pub fn S3KeyPrefix(&self) -> &Rc>> { + match self { + S3BucketSource::S3BucketSource{S3BucketOwner, S3Bucket, S3KeyPrefix, } => S3KeyPrefix, + } + } + } + + impl Debug + for S3BucketSource { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for S3BucketSource { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + S3BucketSource::S3BucketSource{S3BucketOwner, S3Bucket, S3KeyPrefix, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.S3BucketSource.S3BucketSource(")?; + DafnyPrint::fmt_print(S3BucketOwner, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3Bucket, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(S3KeyPrefix, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for S3BucketSource {} + + impl Hash + for S3BucketSource { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + S3BucketSource::S3BucketSource{S3BucketOwner, S3Bucket, S3KeyPrefix, } => { + Hash::hash(S3BucketOwner, _state); + Hash::hash(S3Bucket, _state); + Hash::hash(S3KeyPrefix, _state) + }, + } + } + } + + impl Default + for S3BucketSource { + fn default() -> S3BucketSource { + S3BucketSource::S3BucketSource { + S3BucketOwner: Default::default(), + S3Bucket: Default::default(), + S3KeyPrefix: Default::default() + } + } + } + + impl AsRef + for &S3BucketSource { + fn as_ref(&self) -> Self { + self + } + } + + pub type S3Prefix = Sequence; + + #[derive(PartialEq, Clone)] + pub enum S3SseAlgorithm { + AES256 {}, + KMS {} + } + + impl S3SseAlgorithm {} + + impl Debug + for S3SseAlgorithm { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for S3SseAlgorithm { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + S3SseAlgorithm::AES256{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.S3SseAlgorithm.AES256")?; + Ok(()) + }, + S3SseAlgorithm::KMS{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.S3SseAlgorithm.KMS")?; + Ok(()) + }, + } + } + } + + impl S3SseAlgorithm { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(S3SseAlgorithm::AES256 {}), Rc::new(S3SseAlgorithm::KMS {})].iter() + } + } + + impl Eq + for S3SseAlgorithm {} + + impl Hash + for S3SseAlgorithm { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + S3SseAlgorithm::AES256{} => { + + }, + S3SseAlgorithm::KMS{} => { + + }, + } + } + } + + impl Default + for S3SseAlgorithm { + fn default() -> S3SseAlgorithm { + S3SseAlgorithm::AES256 {} + } + } + + impl AsRef + for &S3SseAlgorithm { + fn as_ref(&self) -> Self { + self + } + } + + pub type S3SseKmsKeyId = Sequence; + + #[derive(PartialEq, Clone)] + pub enum ScalarAttributeType { + S {}, + N {}, + B {} + } + + impl ScalarAttributeType {} + + impl Debug + for ScalarAttributeType { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScalarAttributeType { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScalarAttributeType::S{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ScalarAttributeType.S")?; + Ok(()) + }, + ScalarAttributeType::N{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ScalarAttributeType.N")?; + Ok(()) + }, + ScalarAttributeType::B{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ScalarAttributeType.B")?; + Ok(()) + }, + } + } + } + + impl ScalarAttributeType { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(ScalarAttributeType::S {}), Rc::new(ScalarAttributeType::N {}), Rc::new(ScalarAttributeType::B {})].iter() + } + } + + impl Eq + for ScalarAttributeType {} + + impl Hash + for ScalarAttributeType { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScalarAttributeType::S{} => { + + }, + ScalarAttributeType::N{} => { + + }, + ScalarAttributeType::B{} => { + + }, + } + } + } + + impl Default + for ScalarAttributeType { + fn default() -> ScalarAttributeType { + ScalarAttributeType::S {} + } + } + + impl AsRef + for &ScalarAttributeType { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanInput { + ScanInput { + TableName: Sequence, + IndexName: Rc>>, + AttributesToGet: Rc>, + Limit: Rc>, + Select: Rc>>, + ScanFilter: Rc, Rc>>>, + ConditionalOperator: Rc>>, + ExclusiveStartKey: Rc, Rc>>>, + ReturnConsumedCapacity: Rc>>, + TotalSegments: Rc>, + Segment: Rc>, + ProjectionExpression: Rc>>, + FilterExpression: Rc>>, + ExpressionAttributeNames: Rc, Sequence>>>, + ExpressionAttributeValues: Rc, Rc>>>, + ConsistentRead: Rc> + } + } + + impl ScanInput { + pub fn TableName(&self) -> &Sequence { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => TableName, + } + } + pub fn IndexName(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => IndexName, + } + } + pub fn AttributesToGet(&self) -> &Rc> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => AttributesToGet, + } + } + pub fn Limit(&self) -> &Rc> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => Limit, + } + } + pub fn Select(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => Select, + } + } + pub fn ScanFilter(&self) -> &Rc, Rc>>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ScanFilter, + } + } + pub fn ConditionalOperator(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ConditionalOperator, + } + } + pub fn ExclusiveStartKey(&self) -> &Rc, Rc>>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ExclusiveStartKey, + } + } + pub fn ReturnConsumedCapacity(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ReturnConsumedCapacity, + } + } + pub fn TotalSegments(&self) -> &Rc> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => TotalSegments, + } + } + pub fn Segment(&self) -> &Rc> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => Segment, + } + } + pub fn ProjectionExpression(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ProjectionExpression, + } + } + pub fn FilterExpression(&self) -> &Rc>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => FilterExpression, + } + } + pub fn ExpressionAttributeNames(&self) -> &Rc, Sequence>>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ExpressionAttributeNames, + } + } + pub fn ExpressionAttributeValues(&self) -> &Rc, Rc>>> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ExpressionAttributeValues, + } + } + pub fn ConsistentRead(&self) -> &Rc> { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => ConsistentRead, + } + } + } + + impl Debug + for ScanInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanInput.ScanInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(IndexName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(AttributesToGet, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Limit, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Select, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScanFilter, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConditionalOperator, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExclusiveStartKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ReturnConsumedCapacity, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(TotalSegments, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Segment, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ProjectionExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(FilterExpression, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeNames, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ExpressionAttributeValues, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsistentRead, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanInput {} + + impl Hash + for ScanInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanInput::ScanInput{TableName, IndexName, AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, ExpressionAttributeNames, ExpressionAttributeValues, ConsistentRead, } => { + Hash::hash(TableName, _state); + Hash::hash(IndexName, _state); + Hash::hash(AttributesToGet, _state); + Hash::hash(Limit, _state); + Hash::hash(Select, _state); + Hash::hash(ScanFilter, _state); + Hash::hash(ConditionalOperator, _state); + Hash::hash(ExclusiveStartKey, _state); + Hash::hash(ReturnConsumedCapacity, _state); + Hash::hash(TotalSegments, _state); + Hash::hash(Segment, _state); + Hash::hash(ProjectionExpression, _state); + Hash::hash(FilterExpression, _state); + Hash::hash(ExpressionAttributeNames, _state); + Hash::hash(ExpressionAttributeValues, _state); + Hash::hash(ConsistentRead, _state) + }, + } + } + } + + impl Default + for ScanInput { + fn default() -> ScanInput { + ScanInput::ScanInput { + TableName: Default::default(), + IndexName: Default::default(), + AttributesToGet: Default::default(), + Limit: Default::default(), + Select: Default::default(), + ScanFilter: Default::default(), + ConditionalOperator: Default::default(), + ExclusiveStartKey: Default::default(), + ReturnConsumedCapacity: Default::default(), + TotalSegments: Default::default(), + Segment: Default::default(), + ProjectionExpression: Default::default(), + FilterExpression: Default::default(), + ExpressionAttributeNames: Default::default(), + ExpressionAttributeValues: Default::default(), + ConsistentRead: Default::default() + } + } + } + + impl AsRef + for &ScanInput { + fn as_ref(&self) -> Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanOutput { + ScanOutput { + Items: Rc, Rc>>>>, + Count: Rc>, + ScannedCount: Rc>, + LastEvaluatedKey: Rc, Rc>>>, + ConsumedCapacity: Rc>> + } + } + + impl ScanOutput { + pub fn Items(&self) -> &Rc, Rc>>>> { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => Items, + } + } + pub fn Count(&self) -> &Rc> { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => Count, + } + } + pub fn ScannedCount(&self) -> &Rc> { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => ScannedCount, + } + } + pub fn LastEvaluatedKey(&self) -> &Rc, Rc>>> { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => LastEvaluatedKey, + } + } + pub fn ConsumedCapacity(&self) -> &Rc>> { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => ConsumedCapacity, + } + } + } + + impl Debug + for ScanOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanOutput.ScanOutput(")?; + DafnyPrint::fmt_print(Items, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Count, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ScannedCount, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(LastEvaluatedKey, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(ConsumedCapacity, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanOutput {} + + impl Hash + for ScanOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanOutput::ScanOutput{Items, Count, ScannedCount, LastEvaluatedKey, ConsumedCapacity, } => { + Hash::hash(Items, _state); + Hash::hash(Count, _state); + Hash::hash(ScannedCount, _state); + Hash::hash(LastEvaluatedKey, _state); + Hash::hash(ConsumedCapacity, _state) + }, + } + } + } + + impl Default + for ScanOutput { + fn default() -> ScanOutput { + ScanOutput::ScanOutput { + Items: Default::default(), + Count: Default::default(), + ScannedCount: Default::default(), + LastEvaluatedKey: Default::default(), + ConsumedCapacity: Default::default() + } + } + } + + impl AsRef + for &ScanOutput { + fn as_ref(&self) -> Self { + self + } + } + + pub type ScanSegment = i32; + + pub type ScanTotalSegments = i32; + + #[derive(PartialEq, Clone)] + pub enum Select { + ALL_ATTRIBUTES {}, + ALL_PROJECTED_ATTRIBUTES {}, + SPECIFIC_ATTRIBUTES {}, + COUNT {} + } + + impl Select {} + + impl Debug + for Select { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Select { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Select::ALL_ATTRIBUTES{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Select.ALL__ATTRIBUTES")?; + Ok(()) + }, + Select::ALL_PROJECTED_ATTRIBUTES{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Select.ALL__PROJECTED__ATTRIBUTES")?; + Ok(()) + }, + Select::SPECIFIC_ATTRIBUTES{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Select.SPECIFIC__ATTRIBUTES")?; + Ok(()) + }, + Select::COUNT{} => { + write!(_formatter, "software.amazon.cryptography.services.dynamodb.internaldafny.types.Select.COUNT")?; + Ok(()) + }, + } + } + } + + impl Select { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(Select::ALL_ATTRIBUTES {}), Rc::new(Select::ALL_PROJECTED_ATTRIBUTES {}), Rc::new(Select::SPECIFIC_ATTRIBUTES {}), Rc::new(Select::COUNT {})].iter() + } + } + + impl Eq + for Select {} + + impl Hash + for Select { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Select::ALL_ATTRIBUTES{} => { + + }, + Select::ALL_PROJECTED_ATTRIBUTES{} => { + + }, + Select::SPECIFIC_ATTRIBUTES{} => { + + }, + Select::COUNT{} => { + + }, + } + } + } + + impl Default + for Select { + fn default() -> Select { + Select::ALL_ATTRIBUTES {} + } + } + + impl AsRef